Testing Normal Models Using Chi-Square Goodness-of-Fit

Apply the chi-square goodness-of-fit test to assess whether sample data come from a normal distribution: bin the data, compute expected frequencies from the normal CDF, calculate the chi-square statistic, determine degrees of freedom (adjusting when parameters are estimated), and decide whether to reject the null hypothesis.

Step 1 of 157%

Tutorial

Expected Frequencies Under a Normal Model

The chi-square goodness-of-fit test can be used to test whether a sample X1,,XnX_1, \ldots, X_n comes from a specified normal distribution N(μ,σ2)N(\mu, \sigma^2). Since the normal distribution is continuous, we first partition the real line into kk non-overlapping bins B1,,BkB_1, \ldots, B_k and convert the data into bin counts.

Under H0H_0, the probability that an observation falls in bin Bi=(ai,bi]B_i = (a_i, b_i] is

pi=Φ ⁣(biμσ)Φ ⁣(aiμσ),p_i = \Phi\!\left(\dfrac{b_i - \mu}{\sigma}\right) - \Phi\!\left(\dfrac{a_i - \mu}{\sigma}\right),

where Φ\Phi is the standard normal CDF. The expected count in bin BiB_i is

Ei=npi.E_i = n \cdot p_i.

For instance, suppose n=100n = 100 and H0:XN(50,102)H_0: X \sim N(50, 10^2). For the bin (40,60](40, 60],

p=Φ(1)Φ(1)0.84130.1587=0.6826,p = \Phi(1) - \Phi(-1) \approx 0.8413 - 0.1587 = 0.6826,

so E=1000.6826=68.26E = 100 \cdot 0.6826 = 68.26.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle