19th Ave New York, NY 95822, USA

# 统计代写| Goodness of Fit Tes 抽样理论代考

## 统计代写

We now turn to another important Chi-squared test. We start with an example.
Example 2 Consider the following 25 observations: $0,3,1,0,1,1,1,3,4,3,2,0$, $2,0,0,0,4,2,3,4,1,6,1,4,1$. Could these observations come from a Poisson distribution?
We summarize the data in the following table:
Recall that a Poisson distribution has only one parameter, which is also its mean. We use the sample average to estimate the mean. We get
$$\bar{X}=\frac{47}{25}=1.88$$
Let $N$ be a Poisson random variable with mean $1.88$. Then,
$$P(N=0)=e^{-1.88}=0.15$$
150
13 Chi-Squared Tests
and therefore the expected number of 0 ‘s in 25 observations is $25 \times e^{-1.88}=3.81$. Likewise we have that
$$P(N=1)=1.88 e^{-1.88}=0.29$$
The expected number of 1’s in 25 observations is 7.17. Similarly, the expected number of 2’s is $6.74$ and the expected number of 3 ‘s is $4.22$. The probability that $N$ is 4 or more is $$P(N \geq 4)=0.12 \text {. }$$ Thus, the expected number of observations larger than or equal to 4 is 3 . This yields the following table for the expected counts: As for the previous Chi-squared test we compare the expected and observed Expected counts $3.817 .176 .744 .223$ $X^{2}=\sum \frac{\text { (observed-expected })^{2}}{\text { expected }}$. As before, let
\begin{tabular}{l|l|l|l|l|l|}
\hline Values & 0 & 1 & 2 & 3 & 4 or more \
\hline Expected counts & $3.81$ & $7.17$ & $6.74$ & $4.22$ & 3 \
\hline
\end{tabular} with $r-1-d$ degrees of freedom.
We apply this method on Example 2 .
The statistic $X^{2}$ is easily computed,
$$X^{2}=\sum \frac{(\text { observed-expected })^{2}}{\text { expected }}=4.68$$
Wc have $r=5$. Wc had to cstimate onc paramcter (the mean of the Poisson distribution) therefore $d=1$. Since $r-1-d=5-1-1=3$, the P value is,
$$P=P\left(\chi^{2}(3)>4.68\right)$$