Evaluating numerical algorithm
The non-parametric Chi-Square (χ²) Test evaluates whether observed counts across categorical bins match expected theoretical frequencies, testing if discrepancies are statistically significant!
Test for equal distribution across 4 categories:
Test at significance level !
| Category (i) | Observed (O_i) | Expected (E_i) | O_i - E_i | (O_i - E_i)² / E_i |
|---|---|---|---|---|
| 1 | 25 | 20 | +5 | 1.25 |
| 2 | 19 | 20 | -1 | 0.05 |
| 3 | 16 | 20 | -4 | 0.80 |
| 4 | 20 | 20 | 0 | 0.00 |
| Total | 80 | 80 | 0 | χ²_calc = 2.10 |
Compare test statistic with critical threshold for :
Because calculated is well below critical value , we fail to reject the null hypothesis—concluding that observed frequencies match the theoretical distribution!