The Chi-square (\(\chi^2\)) test is a non-parametric test. Non-parametric tests do not rely on assumptions about the underlying distribution of the data. The \(\chi^2\)-test is primarily used for categorical data to assess whether the observed frequencies differ significantly from the expected frequencies, making it a distribution-free test. Mathematically, the test statistic for the \(\chi^2\)-test is given by: \[ \chi^2 = \sum \frac{(O_i - E_i)^2}{E_i} \] where: \(O_i\) represents the observed frequency in category \(i\), \(E_i\) represents the expected frequency in category \(i\),
The summation is over all categories. If the calculated value of \(\chi^2\) is greater than the critical value from the Chi-square distribution table for a given significance level, we reject the null hypothesis.
| Year | Price of Apple | Quantity of Apple | Price of Banana | Quantity of Banana |
| 2010 | 1 | 100 | 2 | 50 |
| 2011 | 1 | 200 | 2 | 100 |
| 2012 | 2 | 200 | 4 | 100 |
, 0, π₯ β₯ 0 otherwise , 