SlideShare a Scribd company logo
1 of 25
KARL PEARSON
(1857-1936)
British
mathematician,
‘father’ of modern
statistics and a
pioneer of eugenics!
(Pearson’s)
Chi-squared (χ2
) test
• This test compares measurements relating to
the frequency of individuals in defined
categories e.g. the numbers of white and
purple flowers in a population of pea plants.
• Chi-squared is used to test if the observed
frequency fits the frequency you expected or
predicted.
How do we calculate the expected
frequency?
• You might expect the observed frequency of
your data to match a specific ratio. e.g. a 3:1
ratio of phenotypes in a genetic cross.
• Or you may predict a homogenous distribution
of individuals in an environment. e.g. numbers
of daisies counted in quadrats on a field.
Note: In some cases you might expect the observed
frequencies to match the expected, in others you
might hope for a difference between them.
Example 1: GENETICS
Comparing the observed frequency of
different types of maize grains with the
expected ratio calculated using a
Punnett square.
The photo shows four different phenotypes for maize grain,
as follows:
Purple & Smooth (A), Purple & Shrunken (B), Yellow &
Smooth (C) and Yellow & Shrunken (D)
Gametes PS Ps pS ps
PS PPSS PPSs PpSS PpSs
Ps PPSs PPss PpSs Ppss
pS PpSS PpSs ppSS ppSs
ps PpSs Ppss ppSs ppss
The Punnett square below shows the
expected ratio of phenotypes from crosses of
four genotypes of maize.
A : B : C : D = 9 : 3 : 3 : 1
H0 = there is no statistically significant difference
between the observed frequency of maize grains
and the expected frequency (the 9:3:3:1 ratio)
HA = there is a significant difference between the
observed frequency of maize grains and the
expected frequency
If the value for χ2
exceeds the critical value (P =
0.05), then you can reject the null hypothesis.
What is the null hypothesis (H0)?
Calculating χ2
χ2
= (O – E)2
E
Σ
O = the observed results
E = the expected (or predicted) results
Phenotype O
E
(9:3:3:1)
O-E (O-E)2
(O-E)2
E
A 271 244 27 729 2.99
B 73 81 -8 64 0.88
C 63 81 -18 324 4.00
D 26 27 -1 1 0.04
Σ 433 433 χ2
= 7.91
Compare your calculated value of χ2 with the critical value
in your stats table
Our value of χ2
= 7.91
Degrees of freedom = no. of categories - 1 = 3
D.F. Critical Value
(P = 0.05)
1 3.84
2 5.99
3 7.82
4 9.49
5 11.07
Our value for χ2
exceeds the
critical value, so we can reject
the null hypothesis.
There is a significant difference
between our expected and
observed ratios. i.e. they are a
poor fit.
Example 2: ECOLOGY
• One section of a river was trawled and four
species of fish counted and frequencies
recorded.
• The expected frequency is equal numbers of the
four fish species to be present in the sample.
H0 = there is no statistically significant difference
between the observed frequency of fish species and
the expected frequency.
HA = there is a significant difference between the
observed frequency of fish and the expected
frequency
If the value for χ2
exceeds the critical value (P =
0.05), then you can reject the null hypothesis.
What is the null hypothesis (H0)?
Calculating χ2
χ2
= (O – E)2
E
Σ
O = the observed results
E = the expected (or predicted) results
Species O E O-E (O-E)2
(O-E)2
E
Rudd 15 10 5 25 2.5
Roach 15 10 5 25 2.5
Dace 4 10 -6 36 3.6
Bream 6 10 -4 16 1.6
Σ 40 40 χ2
= 10.2
Compare your calculated value of χ2 with the critical value
in your table of critical values.
Our value of χ2
= 10.2
Degrees of freedom = no. of categories - 1 = 3
D.F. Critical Value
(P = 0.05)
1 3.84
2 5.99
3 7.82
4 9.49
5 11.07
Our value for χ2 exceeds the
critical value, so we can reject
the null hypothesis.
There is a significant difference
between our expected and
observed frequencies of fish
species.
Example 3: ECOLOGY
• Do 2 plant species A and B grow independently
of one another?
• Quadrats taken to see if each plant species is
present or absent
• The expected frequency is equal numbers of the
two species to be present in the sample.
Observed values
Species A
Present Absent Totals
Specis B
Present 111 9 120
Absent 71 43 114
182 52 234
Expected Values
Species A
Present Absent Totals
Specis B
Present 182/234*120 52/234*120 120
Absent 182/234*114 52/234*114 114
182 52 234
So…
• Chi 2 = (Observed – Expected)2
» Expected
• Null hypothesis:
• If the plants grow independently of each
other there should be no statistically
significant difference in the number of
species A seen when B is present as
when it is absent! And vice versa
Example 4: CONTINGENCY TABLES
You can use contingency tables to calculate
expected frequencies when the relationship
between two quantities is being investigated.
In this example we will look
at the incidence of colour
blindness in both males and
females.
H0 = there is no statistically significant difference
between the observed frequency of colour blindness
in males and females.
HA = there is a significant difference between the
between the observed frequency of colour blindness
in males and females
If the value for χ2
exceeds the critical value (P =
0.05), then you can reject the null hypothesis.
What is the null hypothesis (H0)?
Observed frequencies Males Females
Colour blind 56 14
Not colour blind 754 536
e.g.
The expected frequency
for colour blind males =
(56 + 14) x (56 + 754)
1360
= 42
Expected Cell Frequency = (Row Total x Column Total)
n
Observed: Males Females
•Colour blind 56 14
•Not colour blind 754 536
Expected: Males Females
•Colour blind 42 28
•Not colour blind 768 522
Males Females
•Colour blind 4.7 14
•Not colour blind 754 536
χ2
=… (O – E)2
E
Σ = 4.7 + 14 + 754 + 536 = 12.33
(O – E)2
/ E
Compare your calculated value of χ2 with the critical value
in your table of critical values
Our value of χ2
= 12.33
Deg of Freedom = (2 rows - 1) x (2 cols – 1) = 1
D.F. Critical Value
(P = 0.05)
1 3.84
2 5.99
3 7.82
4 9.49
5 11.07
Our value for χ2 exceeds the
critical value, so we can reject
the null hypothesis.
There is a significant difference
between our expected and
observed frequencies.
The fraction of males with colour
blindness is greater than that in
females. The difference cannot
be attributed to chance alone.

More Related Content

What's hot

2 2 synthetic division, remainder & factor theorems
2 2 synthetic division, remainder & factor theorems2 2 synthetic division, remainder & factor theorems
2 2 synthetic division, remainder & factor theoremshisema01
 
Remainder and factor theorems
Remainder and factor theoremsRemainder and factor theorems
Remainder and factor theoremsRon Eick
 
ROOTS OF EQUATIONS
ROOTS OF EQUATIONSROOTS OF EQUATIONS
ROOTS OF EQUATIONSKt Silva
 
Rational Root Theorem
Rational Root TheoremRational Root Theorem
Rational Root Theoremcmorgancavo
 
3.3 Zeros of Polynomial Functions
3.3 Zeros of Polynomial Functions3.3 Zeros of Polynomial Functions
3.3 Zeros of Polynomial Functionssmiller5
 
Real numbers
Real numbersReal numbers
Real numbersRamki M
 
3.2 properties of division and roots t
3.2 properties of division and roots t3.2 properties of division and roots t
3.2 properties of division and roots tmath260
 
Long division, synthetic division, remainder theorem and factor theorem
Long division, synthetic division, remainder theorem and factor theoremLong division, synthetic division, remainder theorem and factor theorem
Long division, synthetic division, remainder theorem and factor theoremJohn Rome Aranas
 
Finding union, intersection and complements
Finding union, intersection and complementsFinding union, intersection and complements
Finding union, intersection and complementsMartinGeraldine
 

What's hot (20)

2 2 synthetic division, remainder & factor theorems
2 2 synthetic division, remainder & factor theorems2 2 synthetic division, remainder & factor theorems
2 2 synthetic division, remainder & factor theorems
 
Finding values of polynomial functions
Finding values of polynomial functionsFinding values of polynomial functions
Finding values of polynomial functions
 
Remainder and factor theorems
Remainder and factor theoremsRemainder and factor theorems
Remainder and factor theorems
 
ROOTS OF EQUATIONS
ROOTS OF EQUATIONSROOTS OF EQUATIONS
ROOTS OF EQUATIONS
 
Rational Root Theorem
Rational Root TheoremRational Root Theorem
Rational Root Theorem
 
Zeroes and roots
Zeroes and rootsZeroes and roots
Zeroes and roots
 
Chi square
Chi squareChi square
Chi square
 
3.3 Zeros of Polynomial Functions
3.3 Zeros of Polynomial Functions3.3 Zeros of Polynomial Functions
3.3 Zeros of Polynomial Functions
 
Probability distribution
Probability distributionProbability distribution
Probability distribution
 
Real numbers
Real numbersReal numbers
Real numbers
 
Zeros of p(x)
Zeros of p(x)Zeros of p(x)
Zeros of p(x)
 
Real numbers
Real numbersReal numbers
Real numbers
 
Mathematics 10 (Quarter Two)
Mathematics 10 (Quarter Two)Mathematics 10 (Quarter Two)
Mathematics 10 (Quarter Two)
 
Real Numbers
Real NumbersReal Numbers
Real Numbers
 
Remainder theorem
Remainder theoremRemainder theorem
Remainder theorem
 
Real numbers
Real numbersReal numbers
Real numbers
 
real numbers
real numbersreal numbers
real numbers
 
3.2 properties of division and roots t
3.2 properties of division and roots t3.2 properties of division and roots t
3.2 properties of division and roots t
 
Long division, synthetic division, remainder theorem and factor theorem
Long division, synthetic division, remainder theorem and factor theoremLong division, synthetic division, remainder theorem and factor theorem
Long division, synthetic division, remainder theorem and factor theorem
 
Finding union, intersection and complements
Finding union, intersection and complementsFinding union, intersection and complements
Finding union, intersection and complements
 

Similar to Chi squared test

Similar to Chi squared test (20)

Statistical analysis by iswar
Statistical analysis by iswarStatistical analysis by iswar
Statistical analysis by iswar
 
Chi square test
Chi square testChi square test
Chi square test
 
Chi square tests
Chi square testsChi square tests
Chi square tests
 
Chisquare
ChisquareChisquare
Chisquare
 
Chi square[1]
Chi square[1]Chi square[1]
Chi square[1]
 
Chi -square test
Chi -square testChi -square test
Chi -square test
 
Chi square test
Chi square testChi square test
Chi square test
 
Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
 
chi-squaretest-170826142554.ppt
chi-squaretest-170826142554.pptchi-squaretest-170826142554.ppt
chi-squaretest-170826142554.ppt
 
Chi sqyre test
Chi sqyre testChi sqyre test
Chi sqyre test
 
Lect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_testLect w7 t_test_amp_chi_test
Lect w7 t_test_amp_chi_test
 
Hitch hiking journalclub
Hitch hiking journalclubHitch hiking journalclub
Hitch hiking journalclub
 
Categorical data final
Categorical data finalCategorical data final
Categorical data final
 
Chi square
Chi square Chi square
Chi square
 
U unit7 ssb
U unit7 ssbU unit7 ssb
U unit7 ssb
 
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
 
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptxCHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
CHI SQUARE DISTRIBUTIONdjfnbefklwfwpfioaekf.pptx
 
4 1 probability and discrete probability distributions
4 1 probability and discrete    probability distributions4 1 probability and discrete    probability distributions
4 1 probability and discrete probability distributions
 
Categorical data analysis full lecture note PPT.pptx
Categorical data analysis full lecture note  PPT.pptxCategorical data analysis full lecture note  PPT.pptx
Categorical data analysis full lecture note PPT.pptx
 
PG STAT 531 Lecture 6 Test of Significance, z Test
PG STAT 531 Lecture 6 Test of Significance, z TestPG STAT 531 Lecture 6 Test of Significance, z Test
PG STAT 531 Lecture 6 Test of Significance, z Test
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

Chi squared test

  • 1. KARL PEARSON (1857-1936) British mathematician, ‘father’ of modern statistics and a pioneer of eugenics! (Pearson’s)
  • 2. Chi-squared (χ2 ) test • This test compares measurements relating to the frequency of individuals in defined categories e.g. the numbers of white and purple flowers in a population of pea plants. • Chi-squared is used to test if the observed frequency fits the frequency you expected or predicted.
  • 3. How do we calculate the expected frequency? • You might expect the observed frequency of your data to match a specific ratio. e.g. a 3:1 ratio of phenotypes in a genetic cross. • Or you may predict a homogenous distribution of individuals in an environment. e.g. numbers of daisies counted in quadrats on a field. Note: In some cases you might expect the observed frequencies to match the expected, in others you might hope for a difference between them.
  • 4. Example 1: GENETICS Comparing the observed frequency of different types of maize grains with the expected ratio calculated using a Punnett square.
  • 5. The photo shows four different phenotypes for maize grain, as follows: Purple & Smooth (A), Purple & Shrunken (B), Yellow & Smooth (C) and Yellow & Shrunken (D)
  • 6. Gametes PS Ps pS ps PS PPSS PPSs PpSS PpSs Ps PPSs PPss PpSs Ppss pS PpSS PpSs ppSS ppSs ps PpSs Ppss ppSs ppss The Punnett square below shows the expected ratio of phenotypes from crosses of four genotypes of maize. A : B : C : D = 9 : 3 : 3 : 1
  • 7. H0 = there is no statistically significant difference between the observed frequency of maize grains and the expected frequency (the 9:3:3:1 ratio) HA = there is a significant difference between the observed frequency of maize grains and the expected frequency If the value for χ2 exceeds the critical value (P = 0.05), then you can reject the null hypothesis. What is the null hypothesis (H0)?
  • 8. Calculating χ2 χ2 = (O – E)2 E Σ O = the observed results E = the expected (or predicted) results
  • 9. Phenotype O E (9:3:3:1) O-E (O-E)2 (O-E)2 E A 271 244 27 729 2.99 B 73 81 -8 64 0.88 C 63 81 -18 324 4.00 D 26 27 -1 1 0.04 Σ 433 433 χ2 = 7.91
  • 10. Compare your calculated value of χ2 with the critical value in your stats table Our value of χ2 = 7.91 Degrees of freedom = no. of categories - 1 = 3 D.F. Critical Value (P = 0.05) 1 3.84 2 5.99 3 7.82 4 9.49 5 11.07 Our value for χ2 exceeds the critical value, so we can reject the null hypothesis. There is a significant difference between our expected and observed ratios. i.e. they are a poor fit.
  • 11. Example 2: ECOLOGY • One section of a river was trawled and four species of fish counted and frequencies recorded. • The expected frequency is equal numbers of the four fish species to be present in the sample.
  • 12. H0 = there is no statistically significant difference between the observed frequency of fish species and the expected frequency. HA = there is a significant difference between the observed frequency of fish and the expected frequency If the value for χ2 exceeds the critical value (P = 0.05), then you can reject the null hypothesis. What is the null hypothesis (H0)?
  • 13. Calculating χ2 χ2 = (O – E)2 E Σ O = the observed results E = the expected (or predicted) results
  • 14. Species O E O-E (O-E)2 (O-E)2 E Rudd 15 10 5 25 2.5 Roach 15 10 5 25 2.5 Dace 4 10 -6 36 3.6 Bream 6 10 -4 16 1.6 Σ 40 40 χ2 = 10.2
  • 15. Compare your calculated value of χ2 with the critical value in your table of critical values. Our value of χ2 = 10.2 Degrees of freedom = no. of categories - 1 = 3 D.F. Critical Value (P = 0.05) 1 3.84 2 5.99 3 7.82 4 9.49 5 11.07 Our value for χ2 exceeds the critical value, so we can reject the null hypothesis. There is a significant difference between our expected and observed frequencies of fish species.
  • 16. Example 3: ECOLOGY • Do 2 plant species A and B grow independently of one another? • Quadrats taken to see if each plant species is present or absent • The expected frequency is equal numbers of the two species to be present in the sample.
  • 17. Observed values Species A Present Absent Totals Specis B Present 111 9 120 Absent 71 43 114 182 52 234
  • 18. Expected Values Species A Present Absent Totals Specis B Present 182/234*120 52/234*120 120 Absent 182/234*114 52/234*114 114 182 52 234
  • 19. So… • Chi 2 = (Observed – Expected)2 » Expected
  • 20. • Null hypothesis: • If the plants grow independently of each other there should be no statistically significant difference in the number of species A seen when B is present as when it is absent! And vice versa
  • 21. Example 4: CONTINGENCY TABLES You can use contingency tables to calculate expected frequencies when the relationship between two quantities is being investigated. In this example we will look at the incidence of colour blindness in both males and females.
  • 22. H0 = there is no statistically significant difference between the observed frequency of colour blindness in males and females. HA = there is a significant difference between the between the observed frequency of colour blindness in males and females If the value for χ2 exceeds the critical value (P = 0.05), then you can reject the null hypothesis. What is the null hypothesis (H0)?
  • 23. Observed frequencies Males Females Colour blind 56 14 Not colour blind 754 536 e.g. The expected frequency for colour blind males = (56 + 14) x (56 + 754) 1360 = 42 Expected Cell Frequency = (Row Total x Column Total) n
  • 24. Observed: Males Females •Colour blind 56 14 •Not colour blind 754 536 Expected: Males Females •Colour blind 42 28 •Not colour blind 768 522 Males Females •Colour blind 4.7 14 •Not colour blind 754 536 χ2 =… (O – E)2 E Σ = 4.7 + 14 + 754 + 536 = 12.33 (O – E)2 / E
  • 25. Compare your calculated value of χ2 with the critical value in your table of critical values Our value of χ2 = 12.33 Deg of Freedom = (2 rows - 1) x (2 cols – 1) = 1 D.F. Critical Value (P = 0.05) 1 3.84 2 5.99 3 7.82 4 9.49 5 11.07 Our value for χ2 exceeds the critical value, so we can reject the null hypothesis. There is a significant difference between our expected and observed frequencies. The fraction of males with colour blindness is greater than that in females. The difference cannot be attributed to chance alone.