0% found this document useful (0 votes)
5 views23 pages

Chi-Square Test

The document provides an overview of the Chi-Square (χ²) test, including its types, applications, and conditions for use. It explains the test's purpose in assessing independence of attributes and goodness of fit, along with examples of hypothesis testing in various scenarios. The document also includes formulas for calculating χ² and degrees of freedom, as well as sample problems demonstrating its application.

Uploaded by

Jaimin Sathavara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views23 pages

Chi-Square Test

The document provides an overview of the Chi-Square (χ²) test, including its types, applications, and conditions for use. It explains the test's purpose in assessing independence of attributes and goodness of fit, along with examples of hypothesis testing in various scenarios. The document also includes formulas for calculating χ² and degrees of freedom, as well as sample problems demonstrating its application.

Uploaded by

Jaimin Sathavara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Chi-Square

Test
DR. RACHITA JAYSWAL
Parametric and Non – Parametric Test
Parametric Tests: Non-Parametric Tests:

Testing procedure requires the It is applied when no exact information


assumption about type or parameters of is available about the population,
the population. e.g.: z-test, t-test, f-test, whether the population distribution is
etc. binomial, Poisson, or normal.

These are distribution-free testing


methods.

χ² test is commonly used as a non-


parametric test.
χ² Test:
First used by Karl Pearson in 1900.
Denoted by square of the Greek letter χ (Chi).
The quantity χ² describes the magnitude of the discrepancy between theory &
observation.
Formula:
Conditions for Applying χ² Test:
•Each cell should contain at least 5 observations (generally preferred 10
observations), because if it is ≤ 5, then χ² will be overestimated, which leads to
rejection of null hypothesis.
•All individual observations should be independent and completely random.
•The total sample size should be at least 50 observations.
•The data should be expressed in original units. It should not be expressed in
percentage or ratio.
Chi-Square (χ²) Test
Various Applications
Test for Independence of Attributes:

With the help of χ² test, we can find out whether two or more attributes are associated or not.χ²

Test as Goodness of Fit:

On several occasions, the decision-maker needs to understand whether an actual sample


distribution matches or coincides with a known probability distribution such as Poisson, binomial,
or normal.

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.

Treatment Fever No Fever Total


Quinine 20 480 500
No Quinine 100 1400 1500
Total 120 1880 2000
Solution
H₀: Quinine = Not effective in checking malaria

H1: Quinine ≠ Not effective in checking malaria

Given Data

Treatment Fever Expected Value No Fever Expected Value Total


Quinine 20 30 480 470 500
No Quinine 100 90 1400 1410 1500
Total 120 1880 2000
Calculation of χ²
Reject
Null
Question 2
A drug X claimed to be effective in curing colds. In an experiment on 500 persons with cold, half
of them were given the drug X and half were given placebo (sugar pills). The patients' reactions
to the treatment are recorded in the following table:

On the basis of the data, can it be concluded that there is a significant difference in the
effect of drug X and placebo?

Treatment Helped Reaction No Effect Total


Drug X 150 30 70 250
Placebo 130 40 80 250
Total 280 70 150 500
Null Hypothesis (H₀): Drug = Placebo
Alternate Hypothesis (H₁): Drug ≠ Placebo

Combined Table with Expected Values:

Reaction E No Effect E (No


Treatment Helped (O) E (Helped) Total (O)
(O) (Reaction) (O) Effect)
Drug X 150 140 30 35 70 75 250
Placebo 130 140 40 35 80 75 250
Total 280 280 70 70 150 150 500
(O) (E) (O - E) (O - E)² (O - E)² / E
150 140 +10 100 0.714
130 140 -10 100 0.714
30 35 -5 25 0.714
40 35 +5 25 0.714
70 75 -5 25 0.333
80 75 +5 25 0.333
χ² = Σ [(O - E)² / E] 3.522
Accept
Null
Question 3
From the following data, find out whether there is any relationship between sex
(Male/Female) and preference of color.
Colour Males Females Total
Pink 10 40 50
Black 70 30 100
Yellow 30 20 50
Total 110 90 200
Goodness of Fit
In the chi-square – Goodness of Fit test, it is determining how well the
distribution of experimental and observed data fits the population or expectations.
It is applied when dealing with counts or frequencies for a categorical variable
with 2 or more categories.
Question
A car manufacturer expects the order colours of their model J to be distributed as follows:

White Black Silver Other


28% 25% 16% 31%

A random sample of 140 orders revealed the following:


White Black Silver Other
39 29 24 48

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:

At a 5% significance level and 3 degrees of freedom, the critical value is 7.815.

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.

We want to determine if the frequencies differ significantly from a uniform.

A random sample of 140 orders revealed the following:


White Black Silver Other
39 29 24 48

White Black Silver Other

Null Hypothesis (H₀): ρ1=ρ2​=ρ3​=ρ4​=0.25


Alternate Hypothesis (H₁): At least one ρi ≠0.25
Question 3
A company claims that its newly launched snack product is equally preferred by customers
across four regions: North, South, East, and West. A survey of 400 customers was conducted to
test this claim, and the following data was collected:
Region Observed Frequency
North 110
South 90
East 100
West 100

Using a 5% level of significance, test whether the company's claim that customer preference is
equal across all regions holds true.

You might also like