Professional Documents
Culture Documents
χ²
Mary Joy M. Manjares
MAED- Math
Monaliza D. Perez
MAED- Guidance
χ²
WHAT IS CHI-SQUARE?
B. Dichotomous Variables
-nominal variables which have only two categories or levels.
Example:
Gender: somebody as either "male" or "female".
Do you own a mobile phone? Ownership as either "Yes" or "No".
Type of property had been classified as either residential or commercial
CHI SQUARE
6
GOODNESS OF FIT TESTS
• 𝝌𝟐 is the random variable whose sampling distribution is approximately very close by the Chi-
Square distribution with k-1 degrees of freedom.
• refers to the fitness of the data to follow a certain probability distribution such as normal,
binomial, hypergeometric, Poisson, geometric or any discrete variable.
• To test how good is the fit of the observed data to the theoretical distribution, the formula
(𝑶𝒊 $𝑬𝒊 )𝟐
that follows is used:𝝌𝟐 = 𝜮
𝑬𝒊
Observed frequencies
Chi square value is Good fit Acceptance of Null
are too close to
expected frequencies small Hypothesis
Hypothesis Testing
Example:
The North Luzon expressway utilizing four lanes in each direction was studied to see whether drivers preferred to drive on the
inside lanes. A total of 1000 cars were observed during the early morning traffic and their respective lanes recorded. Results
are as follow:
Do the data present sufficient evidence to indicate that some lanes are preferred over others?
Hypothesis Testing
•We assume that the random variable is in binomial distribution.
•Using α=0.05
Ho:p1=p2=p3=p4=14 ;
àdata follows a distribution that lanes are not preferred by others
Ha: At least one of the p’s is not equal.
àSome lanes are preferred over by others
LANE 1 2 3 4
1 294
2 276
3 238
4 192
TOTAL 1000
GOODNESS OF A FIT TEST
1 294 250
4 192 250
TOTAL 1000
GOODNESS OF A FIT TEST
Step 5: Compare the calculated χ2 with the appropriate chi-square value from the distribution table. α=0.05, df=3.
Step 6: Conclude.
Since, the calculated 𝜒 ! of 24.48 is larger than the table value, we reject the null hypothesis. These findings
suggest that some lanes are preferred over by some drivers. Likewise, we conclude that we have insufficient
evidence to accept that the random variables fitted to a binomial distribution.
CONTINGENCY TABLE
Tests using Contingency Tables
Two tests are the independence variables and the test of homogeneity of
proportions test.
Both tests use the chi square distribution and a contingency table, and the test
value is found in the same way.
TEST OF INDEPENDENCE
To test whether two categorical variable are associated with each other, the formula employed is:
(𝑶 −𝑬 )𝟐
𝒊𝒋 𝒊𝒋
𝝌𝟐 = 𝜮
𝑬𝒊𝒋
Where 𝑂$% is the observed frequency in ith row and jth column;
𝐸$ is the expected frequency in the ith row and jth column.
For a contingency table that has r rows and c columns, the Chi-square test can be generalized as a test of
independence. Thus, as a test of independence, hypotheses are as follows:
𝐻" : There is no relationship between two categorical variables. (The two variables are independent.)
𝐻# : There is a relationship between two categorical variables. (The two variables are not independent.)
TEST OF INDEPENDENCE
𝑫𝒆𝒄𝒊𝒔𝒊𝒐𝒏 𝑹𝒖𝒍𝒆:
Example:
Considering a study in which the effectiveness of hypnosis as a means of improving the memory of the
eyewitness to a crime is examined and the result is shown:
Hypotheses:
Ho: Hypnosis does not affect the recognition memory of eye witness to a crime.
Ha: Hypnosis affects the recognition memory of eye witness to a crime.
Hypnotized Control
Correct Identification 7 17
Incorrect Identification 33 23
Total 40 40
TEST OF INDEPENDENCE
Step 1: Rearrange the data in the form of a 2x2 table containing the observed frequencies for each cell.
Hypnotized Control Total
Correct Identification 7 17 24
Incorrect Identification 33 23 56
Total 40 40 80
Correct Identification 𝐻$ =
%&(&()
=12 𝐶$ =
%&(&()
=12 24
*( *(
Incorrect Identification 𝐻+ =
,-(&()
=28 𝐶+ =
,-(&()
=28 56
*( *(
Total 40 40 80
TEST OF INDEPENDENCE
𝐻$ (Hypnotized/Correct) -5 25
𝐻+ (Hypnotized/Incorrect) 5 25
𝐶$ (Control/Correct) 5 25
𝐶+ (Control/Incorrect) -5 25
TEST OF INDEPENDENCE
(Hypnotized/Incorrect) 5 25 $%
= 0.89
$'
(Control/Correct) 5 25 $%
= 2.08
&$
(Control/Incorrect) -5 25 $%
= 0.89
&$
Step 8: Compare the obtained chi-square value with the table value at 0.05 level of significance.
TEST OF INDEPENDENCE
Step 9: Conclude.
Since, the obtained chi-square value of 5.94 is greater than the tabular value of
3.84, then we have insufficient evidence to accept the null hypothesis. The result suggests
significant difference in the ability of hypnotized and control subjects in identifying a thief.
The hypnotized subjects were less not more accurate in identifying the thief.
TEST OF HOMOGENEITY
àUsed to test the homogeneity of the responses of the respondents with regard to
certain issues and opinions; where responses are put in a contingency table.
Examples:
Impeachment trial of Pres. Estrada– the reactions of the Filipino people
Opening of the second envelope-favor, not favor or neutral
Survey from students of different colleges
TEST OF HOMOGENEITY
Example:
President Arroyo made a nationwide announcement on television about her conversation with
the COMELEC Commissioner and she asked for public apology. To determine the opinion of the public, a
survey was conducted in 4 towns of La Union. The following table gives the opinion of 2000000 parents
from San Fernando, 1500 parents from Agoo, 1000 parents from Bacnotan and 1000 parents from San
Juan.
At the 0.01 level of significance, test for homogeneity of opinion among the 4 municipalities
concerning the public apology of President Arroyo.
TEST OF HOMOGENEITY
OBSERVED FREQUENCIES
Opinion Municipalities
EXPECTED FREQUENCIES
Opinion Municipalities
9100.7025/745.45 = 12.21
(𝑓 −𝑓 )'
13119.4116/534.54 = 24.54 ( 8
𝜒' = 𝛴
44100.00/720.00 = 61.25 𝑓8
'
𝜒 = 12.21+ 24.54+ 61.25+ 2.00+
743.6529/372.73 = 2.00
0.00/540.00 = 0.00
29835.6529/372.73 = 80.05
23326.4529/267.27 = 87.28
14400.00/360.00 = 40.00
TEST OF HOMOGENEITY
• Step 8: Conclude.
Since, the tabular chi-square value of 16.812 is less than the computed value of 388.16, then there is
sufficient evidence to reject the null hypothesis and conclude that at least the proportions of the opinions in each
municipality are not the same. Meaning, people in different municipalities give different views with regards to the
public apology of Pres. Arroyo.
THANK YOU
FOR
LISTENING!
MERRY
CHRISTMAS
TO ALL!!!
MARY JOY M. MANJARES
MAED- MATH
MONALIZA D. PEREZ
MAED- GUIDANCE