Question

In: Statistics and Probability

set.seed(12345678) x=rpois(300,3) State the sample (g1) that you obtained. Do these look like observations of a...

set.seed(12345678)
x=rpois(300,3)

State the sample (g1) that you obtained. Do these look like observations of a Poisson random variable with mean λ = 3?

(a) What is the sample mean and sample variance. Are they approximately equal?

(b) Find the frequencies of 0, 1, 2, . . . , 7, and 8 or more.

(c) Construct a Poisson probability histogram with λ = 3 and a relative frequency histogram of the sample on the same graph using part (b). Comment on this graph.

(d) Use α = 0.05 and a chi-square goodness-of-fit test to test whether the sample looks like observations of a Poisson random variable with mean λ = 3.

Solutions

Expert Solution

The R-code is

set.seed(12345678)

x=rpois(300,3)

#a)

mean(x) #mean

var(x) #variance

#Yes, mean and variance are approximately equal to 3

#b)

f=table(x);f

#c)

Prob=c(dpois(0:7,3),1-ppois(7,3))

hist(x,freq=F,breaks=9)

lines(0:8,Prob,col=2)

legend("topright",legend=c("Poisson distribution with lambda = 3 "),fill=2)

#The Poisson distribution is good fit for given sample

#d)

chisq.test(f,p=Prob)

#Here pvalue=0.5073>alpha=0.05 then we fail to reject the null hypothesis and conclude that sample looks like observations of a Poisson random variable with mean λ = 3

The output of the code is

>set.seed(12345678)
>x=rpois(300,3)
>#a)
>mean(x) #mean
[1] 2.893333
>var(x) #variance
[1] 2.563835
>#Yes, mean and variance are approximately equal to 3
>#b)
>f=table(x);f
x
0 1 2 3 4 5 6 7 8
17 38 79 64 54 32 10 4 2

>#c)
>Prob=c(dpois(0:7,3),1-ppois(7,3))
>hist(x,freq=F,breaks=9)
>lines(0:8,Prob,col=2)
>legend("topright",legend=c("Poisson distribution with lambda = 3 "),fill=2)


>#The Poisson distribution is good fit for given sample
>#d)
>chisq.test(f,p=Prob)
Chi-squared test for given probabilities

data: f
X-squared = 7.2746, df = 8, p-value = 0.5073

>#Here pvalue=0.5073>alpha=0.05 then we fail to reject the null hypothesis and conclude that sample looks like observations of a Poisson random variable with mean λ = 3


Related Solutions

he following observations are obtained from a random sample of 10 individuals: Individual x y 1...
he following observations are obtained from a random sample of 10 individuals: Individual x y 1 9.47 5.24 2 4.21 3.04 3 6.63 4.58 4 10.7 5.73 5 8.52 4.11 6 10.1 5.57 7 4.92 3.60 8 8.28 5.77 9 7.58 4.30 10 9.21 5.01 Run a t-linear regression test on this data. (HINT: make sure you copy the numbers correctly!) What are the appropriate null and alternative hypotheses? H0:ρ=0H1:ρ<0 H0:ρ=0H1:ρ>0 H0:r=0H1:r>0 H0:r=0H1:r<0 H0:r=0H1:r≠0 H0:ρ=0H1:ρ≠0 What is the correlation coefficient?...
You are given the following information obtained from a sample of 5 observations taken from a...
You are given the following information obtained from a sample of 5 observations taken from a population that has a normal distribution. 76 67 83 61 63 Develop a 98% confidence interval estimate for the mean of the population.
what do you think the future of marketing will look like?
what do you think the future of marketing will look like?
what information do you look at to evaluate whether an effect obtained in an experiment is...
what information do you look at to evaluate whether an effect obtained in an experiment is large enough to have practical /clinical significance? also give an example of interpreting practical or clinical significance.
Recall that the quartiles for sample data are obtained by dividing the number of ordered observations...
Recall that the quartiles for sample data are obtained by dividing the number of ordered observations into two equal parts: a lower half and an upper half. We are given the following data. Urban Area Total Cost (millions of dollars) New York 17 Los Angeles 15 Chicago 9 Washington, D.C. 7 Houston 7 Dallas/Fort Worth 5 Detroit 5 Miami 5 Phoenix 5 Philadelphia 5 San Francisco 4 Boston 4 Atlanta 4 To find the values of the lower quartile and...
(a) If your utility is represented by u(x,y) = min(x+2y,2x+y);what do you indifference curves look like?...
(a) If your utility is represented by u(x,y) = min(x+2y,2x+y);what do you indifference curves look like? (b) Given your answer in (a), obtain the MRS (marginal rates of substitution). (c) Suppose the prices of x and y are px = $3 and py = $1 and you have 100 dollars. What would you choose? (d) If px decreases to $1; what would you choose? (e) Use the Slutsky decomposition to decompose the total price effect into the substitution effect and...
What do you think the future of health policy will look like in the U.S.?
What do you think the future of health policy will look like in the U.S.?
A) The following observations are obtained when a random sample is drawn from a normally distributed...
A) The following observations are obtained when a random sample is drawn from a normally distributed population: [7.472, 37.89, 21.32, 25.99, 15.8] Use this information to test the null hypothesis H0:σ2=60 against the alternative hypothesis HA:σ2>60. a) What is the value of the test statistic χ2? Round your response to at least 3 decimal places. b) The P-value falls within which one of the following ranges: A P-value > 0.10 B 0.05 < P-value < 0.10 C 0.025 < P-value...
The following 84% for u was obtained from a sample of 18 observations (the population varience...
The following 84% for u was obtained from a sample of 18 observations (the population varience is known): (-310.6310, 122.3920) what is x bar? what is sigma?
In studying the occurrence of genetic characteristics, the following sample data were obtained. You would like...
In studying the occurrence of genetic characteristics, the following sample data were obtained. You would like to test the claim that the characteristics occur with the same frequency at the 0.05 significance level. What is value of the test statistic? Characteristic | Frequency A|28 B|30 C|45 D|48 E|39 F|39
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT