SlideShare a Scribd company logo
1 of 4
Chi-Square Test
What is chi-square testing?
o Identifiessignificantdifferencesamongthe observedfrequenciesandthe expected
frequenciesof aparticulargroup
o Attemptstoidentifywhetherany differencesbetweenthe expectedandobserved
frequenciesare due tochance,or some otherfactor that isaffectingit.
o There are actuallymanytypesof Chi-square tests,butthe mostcommonone isthe
Pearson Chi-squareTest.
Terms and Definitions
o Categorical Data- 2 types
a. Numerical data- informof numbers.(ex.1,2,3,4)
b. Categorical data- comesinformof divisions.(ex.Yesorno)
o ExpectedFrequencies
-valuesforparametersthatare hypothesizedtooccur
-can be determinedthrough:
1) Hypothesizingthatthe frequencies are equal foreach category.
2) Hypothesizingthe valuesonthe basisof some prior knowledge.
3) A mathematical method (seePage 3)
Two applications ofPearson Chi-Square Test
1) Chi-square testforIndependence
-Thistestswhetherthe “category”fromwhichthe data comesfromaffectsthe data.
-May alsobe thoughtof as testingwhetherthe categoriesinthe experiment“prefer”certain
kindsof data.
Example:Isthere a difference inthe carchoicesof male and females?
2) Chi-square testforgoodness-of-fit
-Thistestswhetherthe observed data“fit”the expected data.
Example:Dothe car salesthisyearmatch the car saleslastyear?(ie.Didwe still sell around50
blue cars? 25 redcars?)
Requirementsofthe Chi-squaredTest
1. The valuesof the parameterstobe comparedare quantitative andnominal.
2. There shouldbe one or more categoriesinthe setup.
3. The observationsshouldbe independentof eachother.
4. An adequate sample size.(Atleast10)
5. Most of the time,itis the frequencyof the observationsthatare used.
Example
A studentwantstosee whetherthe foodpreferencesof malesandfemalesdiffered.He triedtosee
whethermalesorfemaleshadageneral difference inthe preference forcookedandraw foods. A survey
was conductedwiththe followingresults:
Twelve malespreferredCookedfoods.
Eightmalespreferred Rawfoods.
Five femalespreferred Cookedfoods.
Five femalespreferred Cawfoods.
Step 1: State the null hypothesisand the alternative hypothesis.
Ho: There isno significantdifference betweenthe food preferencesof malesandfemales.
Or
Foodpreference isindependentof gender.
Ha: There is a significantdifferencebetweenthe foodpreferencesof malesandfemales.
Or
Foodpreference isaffectedbygender.
Step 2: State the level ofsignificance. (FishThingy)
α = 0.05
0.05 is the level of significance for most scientific experiments.
Step 3: Set up a contingencytable:
The contingencytable summarizesthe data.
The categoriesonthe columnsare the “preferences”thatyouare checking.
The categoriesonthe rows are the “populations”whosepreferencesare beingchecked.A row total and
columntotal isalwaysincludedaswell.
Preference Male Female Total
(Row)
Cooked 12 5 17
Raw 8 5 13
Total (Column) 20 10 30
Step 4: Compute for the expectedfrequencies.
The chi-square testforindependenceusuallyusesthe thirdmethodof gettingexpectedfrequencies.
ExpectedFrequency=(RowTotal)(ColumnTotal)
Grand total
ThisexpectedfrequencyiscomputedforEACH cell.
Preference Male Female Total
(Row)
Cooked (20)(17)/30
= 11.33
(10)(17)/30
= 5.67
17
Raw (13)(20)/30
= 8.67
(13)(10)/30
= 4.33
13
Total
(Column)
20 10 30
The fundamental formulaforthe Chi-squaredtestis:
Where O isthe observedfrequencies
E is the expectedfrequencies
Andx2
isthe chi-square value
Step 5: Rearrange the table to show the observedand expectedfrequenciesonthe columns,and the
subcategorieson the rows.
Preference Observed Expected Chi-square
CookedMales 12 11.33 0.0396
CookedFemales 5 5.67 0.0792
Raw Males 8 8.67 0.0518
Raw Females 5 4.33 0.1037
Total 0.2743
Step 6: Determine the degreesoffreedom
The degreesof freedomis: df = (Rows – 1)(Columns– 1)
df = (2 – 1)(2 – 1) = 1
Step 7: Check the tabular Chi-squaredvalue with your df and level ofsignificance.
Checkingthe table,we see thatthe tabular chi-squaredvaluefordf = 1, and α = 0.05 is3.841.
Since our calculatedchi-squareislessthanthis,the conclusionisto acceptthe null hypothesis. Hence,
foodpreference isindependentof gender.
If it were greater, we would rejectthe null hypothesis.

More Related Content

What's hot

B.8 diff between paired means
B.8  diff between paired meansB.8  diff between paired means
B.8 diff between paired means
Ulster BOCES
 
Chi Square
Chi SquareChi Square
Chi Square
Jolie Yu
 

What's hot (13)

B.8 diff between paired means
B.8  diff between paired meansB.8  diff between paired means
B.8 diff between paired means
 
Chi square
Chi squareChi square
Chi square
 
Chi square
Chi squareChi square
Chi square
 
Chi square[1]
Chi square[1]Chi square[1]
Chi square[1]
 
Chi Square
Chi SquareChi Square
Chi Square
 
Chi square & related procedure
Chi square & related procedureChi square & related procedure
Chi square & related procedure
 
Chi sqyre test
Chi sqyre testChi sqyre test
Chi sqyre test
 
Chi square test
Chi square testChi square test
Chi square test
 
Unpaired t Test Family
Unpaired t Test FamilyUnpaired t Test Family
Unpaired t Test Family
 
Chi square test
Chi square testChi square test
Chi square test
 
Criterion to select the test
Criterion to select the testCriterion to select the test
Criterion to select the test
 
Chi squared test
Chi squared testChi squared test
Chi squared test
 
What is chi square test
What  is  chi square testWhat  is  chi square test
What is chi square test
 

Viewers also liked

Str statistics lec notes
Str   statistics lec notesStr   statistics lec notes
Str statistics lec notes
iamkim
 
Physics statics
Physics   staticsPhysics   statics
Physics statics
iamkim
 
14 january 2011 congress
14 january 2011 congress14 january 2011 congress
14 january 2011 congress
iamkim
 
Str tlc
Str   tlcStr   tlc
Str tlc
iamkim
 
Fil panitikan
Fil   panitikanFil   panitikan
Fil panitikan
iamkim
 
Nat Sci - Minerals
Nat Sci - MineralsNat Sci - Minerals
Nat Sci - Minerals
iamkim
 
Cs project instructions
Cs   project instructionsCs   project instructions
Cs project instructions
iamkim
 
Econ syllabus, ex log, infocard
Econ   syllabus, ex log, infocardEcon   syllabus, ex log, infocard
Econ syllabus, ex log, infocard
iamkim
 
Health evaluation of life threatening conditions
Health   evaluation of life threatening conditionsHealth   evaluation of life threatening conditions
Health evaluation of life threatening conditions
iamkim
 
M4 combinatronics hw
M4   combinatronics hwM4   combinatronics hw
M4 combinatronics hw
iamkim
 
Reminders
RemindersReminders
Reminders
iamkim
 
1 july 2011 batch congress
1 july 2011 batch congress1 july 2011 batch congress
1 july 2011 batch congress
iamkim
 
Pax romana research
Pax romana researchPax romana research
Pax romana research
iamkim
 
Java applet handouts
Java applet handoutsJava applet handouts
Java applet handouts
iamkim
 
Ss greek civilization2
Ss   greek civilization2Ss   greek civilization2
Ss greek civilization2
iamkim
 
Yearbook grad pic orders
Yearbook   grad pic ordersYearbook   grad pic orders
Yearbook grad pic orders
iamkim
 
Ss northern renaissance
Ss   northern renaissanceSs   northern renaissance
Ss northern renaissance
iamkim
 
Ss industrial rev
Ss   industrial revSs   industrial rev
Ss industrial rev
iamkim
 
Yearbook grad pic orders
Yearbook   grad pic ordersYearbook   grad pic orders
Yearbook grad pic orders
iamkim
 
Cs project instructions
Cs   project instructionsCs   project instructions
Cs project instructions
iamkim
 

Viewers also liked (20)

Str statistics lec notes
Str   statistics lec notesStr   statistics lec notes
Str statistics lec notes
 
Physics statics
Physics   staticsPhysics   statics
Physics statics
 
14 january 2011 congress
14 january 2011 congress14 january 2011 congress
14 january 2011 congress
 
Str tlc
Str   tlcStr   tlc
Str tlc
 
Fil panitikan
Fil   panitikanFil   panitikan
Fil panitikan
 
Nat Sci - Minerals
Nat Sci - MineralsNat Sci - Minerals
Nat Sci - Minerals
 
Cs project instructions
Cs   project instructionsCs   project instructions
Cs project instructions
 
Econ syllabus, ex log, infocard
Econ   syllabus, ex log, infocardEcon   syllabus, ex log, infocard
Econ syllabus, ex log, infocard
 
Health evaluation of life threatening conditions
Health   evaluation of life threatening conditionsHealth   evaluation of life threatening conditions
Health evaluation of life threatening conditions
 
M4 combinatronics hw
M4   combinatronics hwM4   combinatronics hw
M4 combinatronics hw
 
Reminders
RemindersReminders
Reminders
 
1 july 2011 batch congress
1 july 2011 batch congress1 july 2011 batch congress
1 july 2011 batch congress
 
Pax romana research
Pax romana researchPax romana research
Pax romana research
 
Java applet handouts
Java applet handoutsJava applet handouts
Java applet handouts
 
Ss greek civilization2
Ss   greek civilization2Ss   greek civilization2
Ss greek civilization2
 
Yearbook grad pic orders
Yearbook   grad pic ordersYearbook   grad pic orders
Yearbook grad pic orders
 
Ss northern renaissance
Ss   northern renaissanceSs   northern renaissance
Ss northern renaissance
 
Ss industrial rev
Ss   industrial revSs   industrial rev
Ss industrial rev
 
Yearbook grad pic orders
Yearbook   grad pic ordersYearbook   grad pic orders
Yearbook grad pic orders
 
Cs project instructions
Cs   project instructionsCs   project instructions
Cs project instructions
 

Similar to Chi square hand out (1)

Chi square hand out
Chi square hand outChi square hand out
Chi square hand out
iamkim
 
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptxCHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
rathorebhagwan07
 
Chi square test social research refer.ppt
Chi square test social research refer.pptChi square test social research refer.ppt
Chi square test social research refer.ppt
Snehamurali18
 
36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx
36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx
36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx
rhetttrevannion
 

Similar to Chi square hand out (1) (20)

Chi square hand out
Chi square hand outChi square hand out
Chi square hand out
 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical Analysis
 
Contingency tables
Contingency tables  Contingency tables
Contingency tables
 
Contingency Tables
Contingency TablesContingency Tables
Contingency Tables
 
Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
 
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptxCHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
 
Chi square test social research refer.ppt
Chi square test social research refer.pptChi square test social research refer.ppt
Chi square test social research refer.ppt
 
Resampling methods
Resampling methodsResampling methods
Resampling methods
 
Chi square test
Chi square testChi square test
Chi square test
 
Basen Network
Basen NetworkBasen Network
Basen Network
 
Statistics78 (2)
Statistics78 (2)Statistics78 (2)
Statistics78 (2)
 
08 entropie
08 entropie08 entropie
08 entropie
 
chi-squaretest-170826142554 (1).ppt
chi-squaretest-170826142554 (1).pptchi-squaretest-170826142554 (1).ppt
chi-squaretest-170826142554 (1).ppt
 
Data Analysis (Hypothesis testing, Regression).pptx
Data Analysis (Hypothesis testing, Regression).pptxData Analysis (Hypothesis testing, Regression).pptx
Data Analysis (Hypothesis testing, Regression).pptx
 
36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx
36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx
36086 Topic Discussion3Number of Pages 2 (Double Spaced).docx
 
Statistical analysis by iswar
Statistical analysis by iswarStatistical analysis by iswar
Statistical analysis by iswar
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
 
Chi square
Chi squareChi square
Chi square
 
1608 probability and statistics in engineering
1608 probability and statistics in engineering1608 probability and statistics in engineering
1608 probability and statistics in engineering
 
Unit3
Unit3Unit3
Unit3
 

More from iamkim

Nat sci minerals part1
Nat sci   minerals part1Nat sci   minerals part1
Nat sci minerals part1
iamkim
 
Batch 2012 schedule of exit interview
Batch 2012 schedule of exit interviewBatch 2012 schedule of exit interview
Batch 2012 schedule of exit interview
iamkim
 
College test results b2012
College test results b2012College test results b2012
College test results b2012
iamkim
 
Chem cations
Chem   cationsChem   cations
Chem cations
iamkim
 
Chem anions
Chem   anionsChem   anions
Chem anions
iamkim
 
Grad ball collections per section(01 28-12)
Grad ball collections per section(01 28-12)Grad ball collections per section(01 28-12)
Grad ball collections per section(01 28-12)
iamkim
 
Congratulations to batch 2012 star scholar candidates
Congratulations to batch 2012 star scholar candidatesCongratulations to batch 2012 star scholar candidates
Congratulations to batch 2012 star scholar candidates
iamkim
 
Retreat consent form
Retreat consent formRetreat consent form
Retreat consent form
iamkim
 
Retreat agreements
Retreat agreementsRetreat agreements
Retreat agreements
iamkim
 
Fil la loba negra
Fil   la loba negraFil   la loba negra
Fil la loba negra
iamkim
 
Fil fray botod
Fil   fray botodFil   fray botod
Fil fray botod
iamkim
 
Fil 3 q readings
Fil   3 q readingsFil   3 q readings
Fil 3 q readings
iamkim
 
Dasalan at tocsohan
Dasalan at tocsohanDasalan at tocsohan
Dasalan at tocsohan
iamkim
 
Chem ps electrolysis
Chem   ps electrolysisChem   ps electrolysis
Chem ps electrolysis
iamkim
 
Physics waves
Physics   wavesPhysics   waves
Physics waves
iamkim
 
Math 3 hw ps2
Math   3 hw ps2Math   3 hw ps2
Math 3 hw ps2
iamkim
 
Memo circular # 4 dtd nov 4, 2011
Memo circular # 4 dtd nov 4, 2011Memo circular # 4 dtd nov 4, 2011
Memo circular # 4 dtd nov 4, 2011
iamkim
 
Final creative shots hair & makeup evaluation (110211)
Final creative shots hair & makeup evaluation (110211)Final creative shots hair & makeup evaluation (110211)
Final creative shots hair & makeup evaluation (110211)
iamkim
 
Creative shots hair & makeup evaluation (110211)
Creative shots hair & makeup evaluation (110211)Creative shots hair & makeup evaluation (110211)
Creative shots hair & makeup evaluation (110211)
iamkim
 
Cat creative marching guidelines
Cat   creative marching guidelinesCat   creative marching guidelines
Cat creative marching guidelines
iamkim
 

More from iamkim (20)

Nat sci minerals part1
Nat sci   minerals part1Nat sci   minerals part1
Nat sci minerals part1
 
Batch 2012 schedule of exit interview
Batch 2012 schedule of exit interviewBatch 2012 schedule of exit interview
Batch 2012 schedule of exit interview
 
College test results b2012
College test results b2012College test results b2012
College test results b2012
 
Chem cations
Chem   cationsChem   cations
Chem cations
 
Chem anions
Chem   anionsChem   anions
Chem anions
 
Grad ball collections per section(01 28-12)
Grad ball collections per section(01 28-12)Grad ball collections per section(01 28-12)
Grad ball collections per section(01 28-12)
 
Congratulations to batch 2012 star scholar candidates
Congratulations to batch 2012 star scholar candidatesCongratulations to batch 2012 star scholar candidates
Congratulations to batch 2012 star scholar candidates
 
Retreat consent form
Retreat consent formRetreat consent form
Retreat consent form
 
Retreat agreements
Retreat agreementsRetreat agreements
Retreat agreements
 
Fil la loba negra
Fil   la loba negraFil   la loba negra
Fil la loba negra
 
Fil fray botod
Fil   fray botodFil   fray botod
Fil fray botod
 
Fil 3 q readings
Fil   3 q readingsFil   3 q readings
Fil 3 q readings
 
Dasalan at tocsohan
Dasalan at tocsohanDasalan at tocsohan
Dasalan at tocsohan
 
Chem ps electrolysis
Chem   ps electrolysisChem   ps electrolysis
Chem ps electrolysis
 
Physics waves
Physics   wavesPhysics   waves
Physics waves
 
Math 3 hw ps2
Math   3 hw ps2Math   3 hw ps2
Math 3 hw ps2
 
Memo circular # 4 dtd nov 4, 2011
Memo circular # 4 dtd nov 4, 2011Memo circular # 4 dtd nov 4, 2011
Memo circular # 4 dtd nov 4, 2011
 
Final creative shots hair & makeup evaluation (110211)
Final creative shots hair & makeup evaluation (110211)Final creative shots hair & makeup evaluation (110211)
Final creative shots hair & makeup evaluation (110211)
 
Creative shots hair & makeup evaluation (110211)
Creative shots hair & makeup evaluation (110211)Creative shots hair & makeup evaluation (110211)
Creative shots hair & makeup evaluation (110211)
 
Cat creative marching guidelines
Cat   creative marching guidelinesCat   creative marching guidelines
Cat creative marching guidelines
 

Chi square hand out (1)

  • 1. Chi-Square Test What is chi-square testing? o Identifiessignificantdifferencesamongthe observedfrequenciesandthe expected frequenciesof aparticulargroup o Attemptstoidentifywhetherany differencesbetweenthe expectedandobserved frequenciesare due tochance,or some otherfactor that isaffectingit. o There are actuallymanytypesof Chi-square tests,butthe mostcommonone isthe Pearson Chi-squareTest. Terms and Definitions o Categorical Data- 2 types a. Numerical data- informof numbers.(ex.1,2,3,4) b. Categorical data- comesinformof divisions.(ex.Yesorno) o ExpectedFrequencies -valuesforparametersthatare hypothesizedtooccur -can be determinedthrough: 1) Hypothesizingthatthe frequencies are equal foreach category. 2) Hypothesizingthe valuesonthe basisof some prior knowledge. 3) A mathematical method (seePage 3) Two applications ofPearson Chi-Square Test 1) Chi-square testforIndependence -Thistestswhetherthe “category”fromwhichthe data comesfromaffectsthe data. -May alsobe thoughtof as testingwhetherthe categoriesinthe experiment“prefer”certain kindsof data. Example:Isthere a difference inthe carchoicesof male and females? 2) Chi-square testforgoodness-of-fit -Thistestswhetherthe observed data“fit”the expected data. Example:Dothe car salesthisyearmatch the car saleslastyear?(ie.Didwe still sell around50 blue cars? 25 redcars?) Requirementsofthe Chi-squaredTest 1. The valuesof the parameterstobe comparedare quantitative andnominal. 2. There shouldbe one or more categoriesinthe setup. 3. The observationsshouldbe independentof eachother. 4. An adequate sample size.(Atleast10) 5. Most of the time,itis the frequencyof the observationsthatare used.
  • 2. Example A studentwantstosee whetherthe foodpreferencesof malesandfemalesdiffered.He triedtosee whethermalesorfemaleshadageneral difference inthe preference forcookedandraw foods. A survey was conductedwiththe followingresults: Twelve malespreferredCookedfoods. Eightmalespreferred Rawfoods. Five femalespreferred Cookedfoods. Five femalespreferred Cawfoods. Step 1: State the null hypothesisand the alternative hypothesis. Ho: There isno significantdifference betweenthe food preferencesof malesandfemales. Or Foodpreference isindependentof gender. Ha: There is a significantdifferencebetweenthe foodpreferencesof malesandfemales. Or Foodpreference isaffectedbygender. Step 2: State the level ofsignificance. (FishThingy) α = 0.05 0.05 is the level of significance for most scientific experiments. Step 3: Set up a contingencytable: The contingencytable summarizesthe data. The categoriesonthe columnsare the “preferences”thatyouare checking. The categoriesonthe rows are the “populations”whosepreferencesare beingchecked.A row total and columntotal isalwaysincludedaswell. Preference Male Female Total (Row) Cooked 12 5 17 Raw 8 5 13 Total (Column) 20 10 30
  • 3. Step 4: Compute for the expectedfrequencies. The chi-square testforindependenceusuallyusesthe thirdmethodof gettingexpectedfrequencies. ExpectedFrequency=(RowTotal)(ColumnTotal) Grand total ThisexpectedfrequencyiscomputedforEACH cell. Preference Male Female Total (Row) Cooked (20)(17)/30 = 11.33 (10)(17)/30 = 5.67 17 Raw (13)(20)/30 = 8.67 (13)(10)/30 = 4.33 13 Total (Column) 20 10 30 The fundamental formulaforthe Chi-squaredtestis: Where O isthe observedfrequencies E is the expectedfrequencies Andx2 isthe chi-square value Step 5: Rearrange the table to show the observedand expectedfrequenciesonthe columns,and the subcategorieson the rows. Preference Observed Expected Chi-square CookedMales 12 11.33 0.0396 CookedFemales 5 5.67 0.0792 Raw Males 8 8.67 0.0518 Raw Females 5 4.33 0.1037 Total 0.2743
  • 4. Step 6: Determine the degreesoffreedom The degreesof freedomis: df = (Rows – 1)(Columns– 1) df = (2 – 1)(2 – 1) = 1 Step 7: Check the tabular Chi-squaredvalue with your df and level ofsignificance. Checkingthe table,we see thatthe tabular chi-squaredvaluefordf = 1, and α = 0.05 is3.841. Since our calculatedchi-squareislessthanthis,the conclusionisto acceptthe null hypothesis. Hence, foodpreference isindependentof gender. If it were greater, we would rejectthe null hypothesis.