# Chi-Square Test of a Frequency Distribution

$\displaystyle{ X^2 = \sum^s_{k=1} \frac{(o_{kj} - e_{kj})^2}{e_{kj}} }$
$\displaystyle{ o_{k} }$ are the observed values,
$\displaystyle{ e_{k} = }$ are the expected values,
$\displaystyle{ p \approx \Pr(\chi^2_{(s-1)} \ge X^2) }$