Professional Documents
Culture Documents
Student Chi-Square.2020
Student Chi-Square.2020
Topics to be covered
• Chi-square Goodness of fit test
– Expected proportions
• Chi-square test of independence
– Is one factor associated with another?
Qualitative
Data
2 or more
1 pop. pop.
Proportion Independence
2 pop.
TOTAL 60 60
Yes No Total
Males 10 20 30
GENDER
females 15 30 45
Total 25 50 7y
Conducting Chi-Square Analysis
Test of independence
1) Make a hypothesis based on your basic biological question
1) Ho :Column and row classifications are independent of each other
2) Ha: Column and row classifications are not independent of each other.
2) Determine the expected frequencies
3) Create a table with observed frequencies, expected frequencies,
and chi-square values using the formula:
2 = ∑ [(O-E)2 / E]
Less than 3 20 80
3 or more 25 225
Example 1: Solution
• State Hypotheses:
• Ho: History of mastitis is independent of parity
number
• α = 0.05
Example 1: Solution
• Step 2.
– Calculate Row and Column Totals
MASTITIS HISTORY
Mastitis No Mastitis Total
Less than 3 20 80 100
Parity
• Conclusion:
– The history of mastitis is dependent on parity
number.
Example 2
• The table below shows classification of Sows
according to breed and weight gain. Test if
weight gain is dependent on breed.
WEIGHT Gain (g)
0 1-150 151-300 300+
Duroc 220 327 110 71
Hampshire 36 45 38 21
Landrace 650 1535 600 240
Example 2: Solution
• State Hypotheses:
• Ho: Weight gain is independent of breed
• α = 0.05
Example 2: Solution
• Step 2.
– Calculate Row and Column Totals
• Degrees of freedom:
(r-1) * (c-1)
= (3-1)*(4-1)
=6
Example 2: Solution
• Rejection Rule: REJECT Ho if 2 (calculated) is > 2 (table)
– Since 2 (calculated) is > 2 (table), Then WE MUST
REJECT Ho.
• Conclusion:
– The weight gain is dependent on breed.
Example 3
• The table below shows classification of
students according to gender and hair colour.
Test if hair color is dependent of gender.
Functional teats
1 2 3 4
North 29 16 42 23
Central 6 11 26 7
South 15 5 10 10
Conducting Chi-Square Analysis
Test of independence
1) Make a hypothesis based on your basic biological question
1) Ho :Column and row classifications are independent of each other
2) Ha: Column and row classifications are not independent of each other.
2) Determine the column and Row totals
3) Calculate expected frequencies
4) Create a table with observed frequencies, expected frequencies, and
chi-square values using the formula:
2 = ∑ [(O-E)2 / E]