Chi-Square Test
Chi-Square Test
Test
DR. RACHITA JAYSWAL
Parametric and Non – Parametric Test
Parametric Tests: Non-Parametric Tests:
With the help of χ² test, we can find out whether two or more attributes are associated or not.χ²
The χ² test for Goodness of Fit enables us to determine the extent to which the theoretical
probability distributions coincide with empirical sample distribution.
Formula
χ² = Σ [(O - E)² / E]
Where,
E = (RT × CT) / N
•O = Observed frequency,
•E = Expected frequency •RT: The row total for the row containing cell.
•CT: The column total for the column containing cells.
•N: Total no. of observations.
𝜗 = (r - 1)(c - 1)
•𝜗 : degree of freedom.
•r: No. of rows.
•c: No. of columns.
Question 1
In an Antimalarial campaign in India, Quinine was administered to 500 persons out of a
total population of 2000. The number of fever cases is shown below:
Discuss the usefulness of Quinine in checking malaria.
Given Data
On the basis of the data, can it be concluded that there is a significant difference in the
effect of drug X and placebo?
Test at α=0.05 to determine if the observed colours differ significantly from the manufacturer's
expectation.
Solution
Null Hypothesis (H₀): ρ1=0.28,ρ2=0.25,ρ3=0.16,ρ4=0.31
Alternate Hypothesis (H₁): At least one ρi is not as specified in H₀.
α=0.05 df=k−1=4−1=3
Observed Expected
Car Color (O - E) (O - E)² (O - E)² / E
Data (O) Data (E)
White 39 39.2 -0.2 0.04 0.0010
Black 29 35.0 -6.0 36.00 1.0286
Silver 24 22.4 1.6 2.56 0.1143
Fail to
other 48 43.4 4.6 21.16 0.4876 reject
Null
Total 140 (n) 140 1.6315
Chi Square Calculations: χ2=∑(O - E)² / E = 1.6315
Critical Value:
Conclusion:
Since the calculated chi-square value (1.6315) is less than the critical value (7.815), we fail to reject the null hypothesis. This
means there the distribution of the observed colors differs significantly from the expectation.
Question 2
Suppose we simply want to test if there are preferences for any 4 categories. Want to check
that customer order are different between the color categories.
Using a 5% level of significance, test whether the company's claim that customer preference is
equal across all regions holds true.