mode 2×2 -
💡 : 🔍
H₀: variables independent
📊 mode : calculate E (i,j)?
💡 : E 🔍
mode expected -
📊 Example: 2×2 table: Row 1 total: 50, column 1 total: 60 n=100. What is E(1,1)?
💡 Detailed Explanation: Computing E 📊
Data: R₁ = 50 (sum of row 1) C₁ = 60 (sum of column 1) n = 100Calculation: E(1,1) = (50 × 60) / 100 = 3000 / 100 = 30 Interpretation: If there is no relationship, we expect 30 in this cell
Correct answer: E(1,1) = 30
📊 Statistic: What is the χ² formula for independence?
💡 Detailed Explanation: χ² formula 🔍
Formula: χ² = Σᵢ Σⱼ [(Oᵢⱼ - Eᵢⱼ)² / Eᵢⱼ]That is: Double sum over all cells in the tableExample - 2×2 table: χ² = (O₁₁-E₁₁)²/E₁₁ + (O₁₂-E₁₂)²/E₁₂ + (O₂₁-E₂₁)²/E₂₁ + (O₂₂-E₂₂)²/E₂₂
Correct answer: χ² = ΣΣ[(O-E)²/E] over all cells
📊 Degrees of freedom: What is df for an r×c table?
💡 Detailed Explanation: Degrees of freedom 🔍
Formula: df = (r-1)(c-1) where: • r = number of rows • c = number of columnsExplanation: Once we know (r-1)×(c-1) cells, the rest are determined by the row and column sumsExamples: • 2×2: df = 1×1 = 1 • 3×2: df = 2×1 = 2 • 3×4: df = 2×3 = 6
Correct answer: df = (r-1)(c-1)
📊 2×2 table: How many degrees of freedom are there in a 2×2 table?
💡 Detailed Explanation: 2×2 table 🔍
Calculation: r = 2, c = 2 df = (2-1)(2-1) = 1×1 = 1 Meaning: If we know O₁₁, and all the marginal sums, everything else is determined! O₁₂ = R₁ - O₁₁ O₂₁ = C₁ - O₁₁ O₂₂ = R₂ - O₂₁ = C₂ - O₁₂
Correct answer: df = 1
📊 Example: Gender × product preference: Male: likes=30, no=20 Female: likes=40, no=10 What is E for "male + likes"?
💡 Detailed Explanation: Computing the table 📊
Organizing the data: Male: 30+20 = 50 Female: 40+10 = 50 Likes: 30+40 = 70 Doesn't: 20+10 = 30 n = 100Computing E(male, likes): E = (50 × 70) / 100 = 3500 / 100 = 35
Correct answer: E = 35
📊 Continuation: What are the remaining E values?
E(male,doesn't)=15, E(female,likes)=35, E(female,doesn't)=15
All 25
E(male,doesn't)=20, E(female,likes)=40, E(female,doesn't)=10
All 30
💡 Detailed Explanation: Computing all E values 📊
E(male, doesn't like): (50 × 30) / 100 = 15E(female, likes): (50 × 70) / 100 = 35E(female, doesn't like): (50 × 30) / 100 = 15Verification: Sum of all E = 35+15+35+15 = 100 ✓
Correct answer: E(male,doesn't)=15, E(female,likes)=35, E(female,doesn't)=15
📊 Continuation: O: 30,20,40,10 E: 35,15,35,15 What is χ²?
💡 Detailed Explanation: Detailed calculation 📊
For each cell: (30-35)²/35 = 25/35 = 0.714 (20-15)²/15 = 25/15 = 1.667 (40-35)²/35 = 25/35 = 0.714 (10-15)²/15 = 25/15 = 1.667Total: χ² = 0.714 + 1.667 + 0.714 + 1.667 = 4.76 df = 1
Correct answer: χ² ≈ 4.76
📊 Continuation: χ²=4.76, df=1 Critical value (α=0.05): 3.84 What is the conclusion?
💡 Detailed Explanation: Decision 📊
Comparison: χ² = 4.76 > 3.84 (critical) → reject H₀ Conclusion: "There is a statistically significant relationship between gender and product preference (p < 0.05)"Interpretation: Women tend to like the product more
Correct answer: reject H₀ — there is a relationship between gender and preference
📊 Validity condition: What is the minimum condition for a test of independence?
💡 Detailed Explanation: E condition 🔍
⚠️ Important condition! Common rule: • E ≥ 5 in every cell • Or at least 80% of cellsIf E < 5: • Merge rows/columns • Use Fisher Exact test (2×2 table) • Increase the sample sizeExample: 3×3 table (9 cells) → at least 7 cells must have E≥5
Correct answer: E ≥ 5 in every cell (or at least 80% of cells)
📊 Fisher test: When do we use Fisher Exact?
💡 Detailed Explanation: Fisher test 🔍
Fisher Exact Test: When: • 2×2 table • E < 5 in one or more cells • Small sampleAdvantage: Exact - not an approximationDisadvantage: Complex to compute by hand (software needed) χ² is an approximation to the Fisher test
Correct answer: when a 2×2 table has E values below 5
📊 Effect size: How do we measure the strength of the association?
💡 Detailed Explanation: Cramér V 🔍
Formula: V = √[χ² / (n × min(r-1, c-1))]Range: 0 ≤ V ≤ 1Interpretation: • V ≈ 0.1 → weak association • V ≈ 0.3 → moderate association • V ≈ 0.5 → strong associationExample (2×2): V = √(4.76/(100×1)) = √0.0476 ≈ 0.218
Correct answer: Cramér V = √[χ²/(n×min(r-1,c-1))]
📊 2×2 table: What is Phi (φ) for a 2×2 table?
💡 Detailed Explanation: Phi Coefficient 🔍
φ (Phi): A special case of Cramér V for a 2×2 table φ = √(χ²/n)Equivalent to: Pearson correlation between two binary variablesExample: χ²=4.76, n=100 φ = √(4.76/100) ≈ 0.218Interpretation: weak-moderate association
Correct answer: φ = √(χ²/n) = Cramér V for the 2×2 case
📊 Yates correction: Do we use Yates correction for a 2×2 table?
💡 Detailed Explanation: Yates in a 2×2 table 🔍
Yates correction: χ²(Yates) = Σ[(|O-E| - 0.5)²/E]When: • 2×2 table (df=1) • n < 100 • E close to 5Effect: Slightly reduces χ² → more conservative → closer to the Fisher testDivided opinions: Some books no longer recommend it
Correct answer: Yes - when n is small or E is close to 5
📊 3×3 table: Education (3 levels) × income (3 levels) n=200. How many df?
💡 Detailed Explanation: Computing df 📊
3×3 table: r = 3 rows c = 3 columnsdf: df = (r-1)(c-1) = (3-1)(3-1) = 2 × 2 = 4 Meaning: After 4 free cells, the other 5 are determined
Correct answer: df = 4