3. IMPORTANT TERMS
HYPOTHESIS – a premise or claim that we want to
test/investigate.
NULL HYPOTHESIS: (Ho) – States that no association exists
between the two cross-tabulated variables in the population,
and therefore the variables are statistically independent. E.g. if
we want to compare 2 methods method A and method B for its
superiority, and if the assumption is that both methods are
equally good, then this assumption is called as Null Hypothesis.
ALTERNATIVE HYPOTHESIS: (Ha) – proposes that the two
variable are related in the population. If we assume that from 2
methods, method A is superior than method B, then this
assumption is called as Alternative Hypothesis.
4. IMPORTANT TERMS
DEGREE OF FREEDOM – It denotes the extent of
independence (freedom) enjoyed by a given set of observed
frequencies. Suppose we are given a set of n observed
frequencies w/c are subjected to k independent constraints
(restrictions) then,
d.f.=(number of frequencies) – (number of independent
constraints of them)
In other terms,
df = (r-1)(c-1)
where
r = the number of Rows
c = the numbers of column
STUDENT 0-2 HOURS 2-4 HOURS
FRESHMAN
SENIORS
5. IMPORTANT TERMS
CONTINGENCY TABLE – When the table is prepared by
enumeration of qualitative data by entering the actual
frequencies, and if that table represents occurance of two
sets of events, that the table is called the contingency
table
For example:
Gender Smoker Non-Smoker Total
Male 72 44 116
Female 34 53 87
Total 106 97 203
10. Chi Square Test
Is a statistical hypothesis test that is
valid to perform or evaluates the
inherent variability like comparing the;
Data Collected Data Predicted
Chi-Squared
Value
Sum
Data
Collected
Data
Predicted
11. How do we calculate & interpret it?
Female Male
Observed Student
Expected Student 10 10
For example (20 students)
13 7
• 1st determine the Null Hypothesis
and Alternative Hypothesis
Ho : Equal frequencies
Ha : Unequal frequencies
Do not
Reject
Region
Ar=0.05(significance
level)
Reject
Region
CV
𝑋2
Value
• 2nd determine the degree of freedom using table
say significance level is 0.05
df = (r-1)
= (2-1)
= 1
=3.84
Critical chi
square value
12.
13. Female Male
Observed Student 13 7
Expected Student 10 10
For example (20 students)
• 3rd determine the calculated chi square
value
Using the equation:
𝑋2 = (13-10)² + (7-10)²
10 10
= (3)² + (-3)²
10 10
= 0.9 + 0.9
𝑋2 = 1.8
𝑋2
Value
3.84
1.8
Do not
Reject
Region
Reject
Region
Note: if the calculated chi square value lies in
the Reject Region the Ho is Rejected.
Therefore: we cannot reject the possibility that
the school claim is 50% female and
50% male.
Ho: Accepted
14. IF X₁, X₂,…….Xn are independent normal variates and each is
distributed normally with mean zero and standard deviation unity,
then X₁² + X₂² + .....+ Xn² = ∑ X₁² is distributed as chi square (X²) with
n degrees of freedom (d.f.) where n is large.
CHI SQUARE DISTRIBUTION:
df=1
15. 1. GOODNESS OF FIT TEST
2. TEST OF HOMOGENEITY
3. TEST OF INDEPENDENCE
APPLICATION OF CHI SQUARE TEST
17. THREE CHI SQUARE TEST
GOODNESS OF FIT
TEST
Ho=(30%,70%)
n=100
45 SMOKERS
55 NON-SMOKERS
Smoker Non
Smoker
Sample 45 55
18. THREE CHI SQUARE TEST
GOODNESS OF FIT
TEST
Ho=(30%,70%)
n=100
45 SMOKERS
55 NON-SMOKERS
Smoker Non
Smoker
Sample 45 55
TEST OF HOMOGENEITY
n=100 n=100
45 SMOKERS
55 NON-SMOKERS
50 SMOKERS
50 NON-SMOKERS
Smoker Non
Smoker
Sample A 45 55
Sample B 50 50
19. THREE CHI SQUARE TEST
GOODNESS OF FIT
TEST
Ho=(30%,70%)
n=100
45 SMOKERS
55 NON-SMOKERS
Smoker Non
Smoker
Sample 45 55
TEST OF HOMOGENEITY
n=100 n=100
45 SMOKERS
55 NON-SMOKERS
50 SMOKERS
50 NON-SMOKERS
Smoker Non
Smoker
Sample A 45 55
Sample B 50 50
TEST OF INDEPENDENCE
n=200
WOMEN
45 SMOKERS
55 NON-SMOKERS
MEN
50 SMOKERS
50 NON-SMOKERS
Smoker Non
Smoker
Women 45 55
Men 50 50
20. Example of Test of Independence
1. The table below shows the average number of hours students spend studying for classes
each day in a high school. Is the average number of hours dependent on the type of student?
(use a 5% significance level).
Observed Results Expected Results
1st determine the Null Hypothesis and Alternative Hypothesis
Ho = Independent on the type of students
Ha = Dependent on the type of students
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 76 143 91 310
Seniors 147 109 64 320
Total 223 252 155 630
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman
Seniors
Total
Do not
Reject
Region
Ar=0.05(significance
level)
Reject
Region
CV
𝑋2
Value
21. Example of Test of Independence
Observed Results Expected Results
2nd determine the degree of freedom using table
say significance level is 0.05
df = (r-1) (c-1)
= (3-1) (2-1)
= 2
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 76 143 91 310
Seniors 147 109 64 320
Total 223 252 155 630
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman
Seniors
Total
Do not
Reject
Region
Ar=0.05(significance
level)
Reject
Region
CV
𝑋2
Value
=5.99
Critical chi
square value
22. Example of Test of Independence
Observed Results Expected Results
3rd determine the Expected Values
E = (Row Total) (Column Total)
TOTAL
E₁,₁ = (310) (223) E₁,₃ = (310) (155) E₂,₁ = (320) (223) E₂,₃ = (320) (155)
630 630 630 630
E₁,₁ = 109.7 SAY 110 E₁,₃ = 76.3 SAY 76 E₂,₁ = 113.27 SAY 113 E₂,₃ = 78.7 SAY 79
E₁,₂ = (310) (252) E₂,₂ = (320) (252)
630 630
E₁,₂ = 124 E₂,₂ = 128
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 76 143 91 310
Seniors 147 109 64 320
Total 223 252 155 630
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 110 124 76 310
Seniors 113 128 79 320
Total 223 252 155 630
23. Example of Test of Independence
Observed Results Expected Results
4TH determine the calculated chi square value
Using the equation:
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 76 143 91 310
Seniors 147 109 64 320
Total 223 252 155 630
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 110 124 76 310
Seniors 113 128 79 320
Total 223 252 155 630
𝑋2 = (76-110)² + (143-124)² + (91-76)² + (147-113)² + (109-128)² + (64-79)²
110 124 76 113 128 79
= 10.509 + 2.911 + 2.961 + 10.230 + 2.820 + 2.848
𝑋2 = 32.28
24. Example of Test of Independence
Observed Results Expected Results
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 76 143 91 310
Seniors 147 109 64 320
Total 223 252 155 630
Student 0-2Hours 2-4Hours 4-6Hours Total
Freshman 110 124 76 310
Seniors 113 128 79 320
Total 223 252 155 630
Do not
Reject
Region
Reject
Region
𝑋2
Value
5.99
32.28
Note: if the calculated chi square value lies in
the Reject Region the Ho is Rejected.
Therefore: The calculated chi square value lies in Reject
Region so we must reject the null hypothesis
Ha: Accepted, that the average of number of hours
dependent of type of student.