Coba jelasin where dari Uji kuadrat-chi Pearson dalam bahasa sunda dong

p = probability, under the null hypothesis,

n = number of observations in the sample.

In the above example the hypothesised probability of a male observation is 0.5, with 100 samples. Thus we expect to observe 50 males.

If n is sufficiently large, the above binomial distribution may be approximated as by Gaussian (normal) distribution and thus the Péarson test statistic approximates a chi-squared distribution,

Let O1 be the number of observations from the sample that are in the first cell. The Péarson test statistic can be expressed as

which can in turn be expressed as

By the normal approximation to a binomial this is the square of one standard normal variate, and hence is distributed as chi-square with 1 degree of freedom.  Note that the denominator is one standard deviation of the Gaussian approximation, so can be written

So as consistent with the méaning of the chi-square distribution, we are méasuring how probable the observed number of standard deviations away from the méan is under the Gaussian approximation (which is a good approximation for large n).

The chi-square distribution is then integrated on the right of the statistic value to obtain the probability that this result or worse were observed given the modél.