Question

Conduct a computer simulation to generate the sample means of Poisson random variables. First generate X...

Conduct a computer simulation to generate the sample means of Poisson random variables. First generate X ∼ Poisson(3), and plot a histogram of this Poisson random variable. Then generate X = 1/5(X1 + X2 + X3 + X4 + X5), where X1, X2, . . . , X5 are all from Poisson(3). Plot a histogram of this sample mean statistic X. Compare the histograms and describe the changes you see in the histograms. Explain the changes using Central Limit Theorem. (For sample code, please refer to the course website. Please attach the codes and the two computer generated histograms. Use R version

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ANSWER: I have attached the R Code for the given problem. We have two histograms, one is of the Poisson population with parameter 3. For that we have obtained 5000 realizations of Poisson(3) and plotted the histogram for it. The other histogram we have taken the mean of 5 observations from the sample and repeated this step 5000 times so that we get 5000 realizations of the sample mean. It is clear from the histogram of the sample mean that the sample mean distribution approaches normal distribution as n tends to infinity. Here n is small, i.e. 5. But if we take n to be greater than 30, the sample mean distribution will be normal, i.e.

\bar{X} \sim N\left( \lambda, \frac{\lambda}{n}\right )

as n>30.

####################### R CODE ##############################################

rm(list=ls(all=TRUE))

set.seed(12345)

n=5000
X=rpois(n,lambda = 3)
mean(X)
sd(X)

MX=rep()
for(i in 1:5000)
{
S=sample(X,5)
MX[i]=mean(S)
}

mean(MX)
sd(X)


par(mfrow=c(1,2))
hist(X)
hist(MX,main="Histogram of Sample Mean")

############################### END OF R CODE ############################################

Histogram of X Histogram of Sample Mean 髦3 41ゆ 12 12 12 髦3 12 し丈 0 2 4 6 8 10 MX

Add a comment
Know the answer?
Add Answer to:
Conduct a computer simulation to generate the sample means of Poisson random variables. First generate X...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2.Let Xj,X,, Xj, X4, Xj be a random sample of size n-5 from a Poisson distribution...

    2.Let Xj,X,, Xj, X4, Xj be a random sample of size n-5 from a Poisson distribution with mean ?. Consider the test Ho : ?-2.6 vs. H 1 : ? < 2.6. a)Find the best rejection region with the significance level a closest to 0.10 b) Find the power of the test from part (a) at ?= 2.0 and at ?=1.4. c) Suppose x1-1, x2-2, x3 -0, x4-1, x5-2. Find the p-value of the test.

  • Suppose we have 5 independent and identically distributed random variables X1, X2, X3, X4,X5 each with...

    Suppose we have 5 independent and identically distributed random variables X1, X2, X3, X4,X5 each with the moment generating function 212 Let the random variable Y be defined as Y = Σ Find the probability that Y is larger than 9. Prove that the distribution you use is the exact distribution, nota Central Limit Theorem approximation

  • Please help me to solve this probability problem. 2. Consider a random variable X with the...

    Please help me to solve this probability problem. 2. Consider a random variable X with the following PDF f(x) f(x) = for 0s x<1 x, 2-x for 1s XS2 otherwise (a) Consider 6 independent random variables X, X2, X3, X4, X5, Xs with the PDF f(x) given above. What will be the PDF of Y= (X1+X2+ X3+ X4+ Xs* X6) approximately? Explain it. (b) Compute the probability of Y>8.

  • Generate N binary random variables Xi, i E {1,2,.., N] where X 1 or -1 with equal probability in ...

    Generate N binary random variables Xi, i E {1,2,.., N] where X 1 or -1 with equal probability in Matlab using rand or randn. According to central limit theorem, i= 1 should follow normal distribution when N is large. (1) Please plot the theoretical pdf of normal distribution (2) Please estimate the pdf of Vv by generating a lot of instances of Vv (hint: use hist command to get histogram then scaleit) (3) Please plot the theoretical pdf and the...

  • Question 6: [12 Marks: 5, 3, 41 Let X1, X2, ..., X6 be a random sample...

    Question 6: [12 Marks: 5, 3, 41 Let X1, X2, ..., X6 be a random sample from a population following a Gamma distribution with parameters a and B. Consider the following two estimators of the mean (a/b) of this distribution. Ô2 = X And ôz = ž (X1 + X2 + X3) +ś (X4 + X5 + X3) Where I = (X1 + X2 + ... + X6) (a) Determine the sampling distribution of 7 using moment generating functions. (b)...

  • R commands 2) Illustrating the central limit theorem. X, X, X, a sequence of independent random variables with the same distribution as X. Define the sample mean X by X = A + A 2 be a random va...

    R commands 2) Illustrating the central limit theorem. X, X, X, a sequence of independent random variables with the same distribution as X. Define the sample mean X by X = A + A 2 be a random variable having the exponential distribution with A -2. Denote by -..- The central limit theorem applied to this particular case implices that the probability distribution of converges to the standard normal distribution for certain values of u and o (a) For what...

  • The following data were collected on a simple random sample of 20 patients with hypertension: Y=m...

    The following data were collected on a simple random sample of 20 patients with hypertension: Y=mean arterial blood pressure (mmHg), X1=age(years),  X2= weight (kg), X3=body surface area (sq m), X4=duration of hypertension, X5 =basal pulse (beats/min), X6=measure of stress. A researcher is interested in developing a regression model to predict mean arterial blood pressure and has produced the following output: > rcorr(as.matrix(hyper))       Y   X1  X2   X3   X4  X5   X6 Y  1.00 0.66 0.95 0.87 0.29 0.72 0.16 X1 0.66 1.00...

  • The following data were collected on a simple random sample of 20 patients with hypertension: Y=mean...

    The following data were collected on a simple random sample of 20 patients with hypertension: Y=mean arterial blood pressure (mmHg), X1=age(years),  X2= weight (kg), X3=body surface area (sq m), X4=duration of hypertension, X5 =basal pulse (beats/min), X6=measure of stress. A researcher is interested in developing a regression model to predict mean arterial blood pressure and has produced the following output: > rcorr(as.matrix(hyper))       Y   X1  X2   X3   X4  X5   X6 Y  1.00 0.66 0.95 0.87 0.29 0.72 0.16 X1 0.66 1.00 0.41 0.38 0.34 0.62 0.37 X2 0.95 0.41...

  • Let X1, X2, ..., Xn be a random sample from the distribution with probability density function...

    Let X1, X2, ..., Xn be a random sample from the distribution with probability density function f(x;t) = Botha, 0 < x < 2, t> -4. a. Find the method of moments estimator of t, t . Enter a formula below. Use * for multiplication, / for division and ^ for power. Use m1 for the sample mean X. For example, 7*n^2*m1/6 means 7n27/6. ſ = * Tries 0/10 b. Suppose n=5, and x1=0.36, X2=0.96, X3=1.16, X4=1.36, X5=1.96. Find the...

  • Let > 0 and let X1, X2, ..., Xn be a random sample from the distribution with the probability density function f(x;...

    Let > 0 and let X1, X2, ..., Xn be a random sample from the distribution with the probability density function f(x; 1) = 212x3 e-tz, x > 0. a. Find E(XK), where k > -4. Enter a formula below. Use * for multiplication, / for divison, ^ for power, lam for 1, Gamma for the function, and pi for the mathematical constant i. For example, lam^k*Gamma(k/2)/pi means ik r(k/2)/n. Hint 1: Consider u = 1x2 or u = x2....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT