of 35
7/28/2019 a borrowed ppt on chi squareanalysis
1/35
Chi-Square Test ofIndependence
SHAMEER P.H
dept.offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
2/35
REWIND YOUR MIND
Hypothesis-
mere assumption to be proved or disproved
normal question that intends to resolve
tentative formulated for empirical testing
tentative answer to research question
point to start a research
dept.offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
3/35
Research Questions and Hypotheses
Research question: Non-directional:
No stated expectation about outcome
Example:
Do men and women differ in terms of conversational memory? Hypothesis:
Statement of expected relationship Directionality of relationship
Example: Women will have greater conversational memory than men
dept.offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
4/35
The Null Hypothesis
Null Hypothesis - the absence of a relationship
E..g., There is no difference between mens and womenswith regards to conversational memories
Compare observed results to Null Hypothesis
How different are the results from the null hypothesis?
We do not propose a null hypothesis as research
hypothesis - need very large sample size / power Used as point of contrast for testing de
pt.offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
5/35
Hypotheses testing
When we test observed results against null:
We can make two decisions:
1. Accept the null
No significant relationship
Observed results similar to the Null Hypothesis 2. Reject the null
Significant relationship
Observed results different from the Null Hypothesis
Whichever decision, we risk making an error
dept.offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
6/35
Type I and Type II Error
1. Type I Error Reality: No relationship Decision: Reject the null
Believe your research hypothesis have received support when infact you should have disconfirmed it
Analogy: Find an innocent man guilty of a crime
2. Type II Error Reality: Relationship Decision: Accept the null
Believe your research hypothesis has not received support whenin fact you should have rejected the null.
Analogy: Find a guilty man innocent of a crime
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
7/35
Potential outcomes of testingDecision
Accept Null Reject Null
R NoE RelationshipALITY Relationship
Type II ErrorCorrectdecision
Type I Error
Correct
decision
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
8/35
Start by setting level of risk of
making a Type I Error How dangerous is it to make a Type I Error:
What risk is acceptable?:
5%?
1%?
.1%?
Smaller percentages are more conservative in guarding against a
Type I Error
Level of acceptable risk is called Significance level :
Usually the cutoff -
7/28/2019 a borrowed ppt on chi squareanalysis
9/35
Steps in Hypothesis Testing
1) State research hypothesis
2) State null hypothesis
3) Decide the appropriate test criterion( eg. t test, 2 test, Ftest etc.)
4) Set significance level (e.g., .05 level)
5) Observe results
6) Statistics calculate probability of results if null hypothesiswere true
7) If probability of observed results is less than significancelevel, then reject the null
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
10/35
Guarding against Errors
Significance level regulates Type I Error
Conservative standards reduce Type I Error:
.01 instead of .05, especially with large sample
Reducing the probability of Type I Error:
Increases the probability of Type II Error
Sample size regulates Type II Error
The larger the sample, the lower the probability of Type II Error
occurring in conservative testingdept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
11/35
Methods used to test
hypothesis
T test
Z test
F test
2 test
.. dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
12/35
Testing hypothesis for two
nominal variablesVariables Null hypothesis Procedure
Gender
Passing is not Chi-square
related to gender
Pass/Fail
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
13/35
Testing hypothesis for one
nominal and one ratio variableVariables Null hypothesis Procedure
Gender
Score is not T-test
related to gender
Test score
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
14/35
Testing hypothesis for one
nominal and one ratio variableVariable Null hypothesis ProcedureYear in school
Score is notrelated to year in ANOVA
schoolTest score
Can be used when nominal variable has more than two categories and can includemore than one independent variable
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
15/35
Testing hypothesis for two ratio
variablesVariable Null hypothesis Procedure
Hours spent
studying Score is not
related to hours Correlationspent studying
Test score
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
16/35
Testing hypothesis for more than
two ratio variablesVariable Null hypothesis Procedure
Hours spent
studying Score is positively
related to hours
Classes spent studying and Multiple
missed negatively related regression
to classes missed
Test score
dept.
offuturesstudies2010-
'12
7/28/2019 a borrowed ppt on chi squareanalysis
17/35
Chi square (2 ) test
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
18/35
Used to:
Test for goodness of fit
Test for independence of attributes
Testing homogeneity Testing given population variance
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
19/35
Chi-Square Test of
Independence
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
20/35
Introduction (1)
We often have occasions to makecomparisons between two characteristicsof something to see if they are linked or
related to each other.
One way to do this is to work out what we
would expect to find if there was norelationship between them (the usual nullhypothesis) and what we actually observe.
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
21/35
Introduction (2)
The test we use to measure the
differences between what is observed and
what is expected according to an assumed
hypothesis is called the chi-square test.
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
22/35
For Example
Some null hypotheses may be:
there is no relationship between the subjectof first period and the number of studentsabsent in our class.
there is no relationship between the height ofthe land and the vegetation cover.
there is no connection between the size offarm and the type of farm
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
23/35
Important
The chi square test can only be used on data that has the followingcharacteristics:
The data must be in the formof frequencies
The frequency data must have aprecise numerical value and must beorganised into categories or groups.
The total number of observations must begreater than 20.
The expected frequency in any one cellof the table must be greater than 5.dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
24/35
7/28/2019 a borrowed ppt on chi squareanalysis
25/35
Degrees of Freedom
no of independent observations
Number of cells no. of constraints
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
26/35
Formula
2 = (O E)2
E
2 = The value of chi squareO = The observed valueE = The expected value (O E)2 = all the values of (O E) squared then added
together
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
27/35
Critical region:
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
28/35
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
29/35
Construct a table with the information you have observedor obtained.
Observed Frequencies (O)
Money Health Love RowTotal
men 82 446 355 883
women 46 574 273 893
Column total 128 1020 628 1776
dept.
offuturesstudies2010-
'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
30/35
7/28/2019 a borrowed ppt on chi squareanalysis
31/35
For each of the cells calculate.
money health love RowTotal
Men 5.30 7.37 5.85
women 5023 7.29 5.8
Column Total 2Calc. =36.873
(O E)2
E
dept.
offuturesstudies2010-'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
32/35
2Calc. = sum of all ( O-E)2/ E values in the
cells.
Here 2Calc. =36.873
Find 2critical From the table with degree offreedom 2 and level of significance 0.05
2
Critical =5.99dept.
offuturesstudies2010-'1
2
2 table
7/28/2019 a borrowed ppt on chi squareanalysis
33/35
2table
dept.
offuturesstudies2010-'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
34/35
Conclusion
Compare2Calc.and 2critical obtained from the table
If2Calc. Is larger than2Critical.then reject null
hypothesis and accept the alternative
Here since 2
Calc.is much greater than 2
Critical,
we can
easily reject null hypothesis
that is ; there lies a relation between the gender and
choice of selection.
dept.
offuturesstudies2010-'1
2
7/28/2019 a borrowed ppt on chi squareanalysis
35/35
Reference
RESEARCH METHODOLGIES
- L R Potti
dept.
offuturesstudies2010-'1
2