Chi-Square Goodness of Fit
| Value | Observed | Expected | (O − E)² / E |
|---|
Press Test.
How it works
The parameter of the distribution is estimated from the sample: the mean for the Poisson law, the mean divided by the largest value for the binomial law, 1 / (1 + mean) for the geometric law. The expected count of a value is its probability times the size of the sample. The statistic χ² adds up (O − E)² / E: the larger it is, the worse the fit. The p-value is the probability of such a statistic or a larger one when the sample does follow the distribution; below 0.05 the distribution is rejected. The number of degrees of freedom is the number of values minus one, as in the chisq.test call of my work.