# Chi-square method

by Erikve
Tags: chisquare, method
P: 18
Hi,

I trying to complete an exercise, but I have the idea that it is completely wrong what I'm doing. I use Matlab to program the exercise, and that is not the problem.

The exercise is:
 The poisson distribution has been used as model for light traffic. That is based on the rationale that the rate of passing cars is constant and the traffic is light such that the cars move independently from each other. The data traffic (see beyond) contains the number of cars passing a crossing in 300 3-minute intervals, counted on various hours of the day and various days of the week. Column one gives the number of cars n, column two the number of intervals with n cars. 0 14 1 30 2 36 3 68 4 44 5 43 6 30 7 14 8 10 9 6 10 5 a. Use the method of moments to fit a Possion distribution to the data. b. test the goodness of fit using Pearsons chi-square statistic. Calculate the P^*-value c. Comment on the fit. Give a detailed explanation for the result.
Part a looks like very easy, so that was not a problem to do. I have only no idea what they mean in part b. I have the formula:
X^2=sum((O_i-E_i)^2/E_i with O_i the observed data and E_i the expectation value. But what will be E_i? An element of the possion dist. or something different?

Second question is about the value of p^*. How can I calculate it? I have seen the definition p^*=P(D>=d|model is correct) where D is the difference between the model and the expectation value. But what is d? That should be a value for you think that the method is good... And if I have d and D, I have totally no idea how to calculate P^* :(