Chi-Square Test of Independence

Chi-Square Test of Independence. Practice questions to deepen understanding of the chi-square test of independence. Online statistics practice with full solutions and step-by-step explanations.

Chi-square independence practice — contingency table, expected frequencies E=(R×C)/n, df=(r−1)(c−1), Cramér’s V, Fisher’s exact test.

Definition of the test of independence. Two-way contingency table.

20 questions

Question 1
5.00 pts

📊 Chi-square test of independence:
What is a chi-square test of independence?

Explanation:

💡 Detailed Explanation:

Test of Independence 🔍

Goal:

To test whether there is a relationship/dependence
between two categorical variables

Examples:
• Is there a relationship between gender and product preference?
• Is there a relationship between education and income?
• Is there a relationship between smoking and disease?

English name: Chi-Square Test of Independence

Correct answer: test whether two categorical variables are independent

Question 2
5.00 pts

📊 :
?

Explanation:

💡 :

mode 🔍

mode 2×2 -
Question 3
5.00 pts

📊 :
?

Explanation:

💡 :

🔍

H₀: variables independent
Question 4
5.00 pts

📊 mode :
calculate E (i,j)?

Explanation:

💡 :

E 🔍

mode expected -
Question 5
5.00 pts

📊 Example:
2×2 table:
Row 1 total: 50, column 1 total: 60
n=100. What is E(1,1)?

Explanation:

💡 Detailed Explanation:

Computing E 📊

Data:
R₁ = 50 (sum of row 1)
C₁ = 60 (sum of column 1)
n = 100

Calculation:
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

Question 6
5.00 pts

📊 Statistic:
What is the χ² formula for independence?

Explanation:

💡 Detailed Explanation:

χ² formula 🔍

Formula:

χ² = Σᵢ Σⱼ [(Oᵢⱼ - Eᵢⱼ)² / Eᵢⱼ]

That is:
Double sum over all cells in the table

Example - 2×2 table:
χ² = (O₁₁-E₁₁)²/E₁₁ + (O₁₂-E₁₂)²/E₁₂
    + (O₂₁-E₂₁)²/E₂₁ + (O₂₂-E₂₂)²/E₂₂

Correct answer: χ² = ΣΣ[(O-E)²/E] over all cells

Question 7
5.00 pts

📊 Degrees of freedom:
What is df for an r×c table?

Explanation:

💡 Detailed Explanation:

Degrees of freedom 🔍

Formula: df = (r-1)(c-1)

where:
• r = number of rows
• c = number of columns

Explanation:
Once we know (r-1)×(c-1) cells,
the rest are determined by the row and column sums

Examples:
• 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)

Question 8
5.00 pts

📊 2×2 table:
How many degrees of freedom are there in a 2×2 table?

Explanation:

💡 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

Question 9
5.00 pts

📊 Example:
Gender × product preference:
Male: likes=30, no=20
Female: likes=40, no=10

What is E for "male + likes"?

Explanation:

💡 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 = 100

Computing E(male, likes):
E = (50 × 70) / 100
= 3500 / 100
= 35

Correct answer: E = 35

Question 10
5.00 pts

📊 Continuation:
What are the remaining E values?

Explanation:

💡 Detailed Explanation:

Computing all E values 📊

E(male, doesn't like):
(50 × 30) / 100 = 15

E(female, likes):
(50 × 70) / 100 = 35

E(female, doesn't like):
(50 × 30) / 100 = 15

Verification:
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

Question 11
5.00 pts

📊 Continuation:
O: 30,20,40,10 E: 35,15,35,15

What is χ²?

Explanation:

💡 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.667

Total:
χ² = 0.714 + 1.667 + 0.714 + 1.667
= 4.76

df = 1

Correct answer: χ² ≈ 4.76

Question 12
5.00 pts

📊 Continuation:
χ²=4.76, df=1
Critical value (α=0.05): 3.84

What is the conclusion?

Explanation:

💡 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

Question 13
5.00 pts

📊 Validity condition:
What is the minimum condition for a test of independence?

Explanation:

💡 Detailed Explanation:

E condition 🔍

⚠️ Important condition!

Common rule:
• E ≥ 5 in every cell
• Or at least 80% of cells

If E < 5:
• Merge rows/columns
• Use Fisher Exact test (2×2 table)
• Increase the sample size

Example:
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)

Question 14
5.00 pts

📊 Fisher test:
When do we use Fisher Exact?

Explanation:

💡 Detailed Explanation:

Fisher test 🔍

Fisher Exact Test:

When:
• 2×2 table
• E < 5 in one or more cells
• Small sample

Advantage:
Exact - not an approximation

Disadvantage:
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

Question 15
5.00 pts

📊 Effect size:
How do we measure the strength of the association?

Explanation:

💡 Detailed Explanation:

Cramér V 🔍

Formula:

V = √[χ² / (n × min(r-1, c-1))]

Range: 0 ≤ V ≤ 1

Interpretation:
• V ≈ 0.1 → weak association
• V ≈ 0.3 → moderate association
• V ≈ 0.5 → strong association

Example (2×2):
V = √(4.76/(100×1)) = √0.0476 ≈ 0.218

Correct answer: Cramér V = √[χ²/(n×min(r-1,c-1))]

Question 16
5.00 pts

📊 2×2 table:
What is Phi (φ) for a 2×2 table?

Explanation:

💡 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 variables

Example:
χ²=4.76, n=100
φ = √(4.76/100) ≈ 0.218

Interpretation: weak-moderate association

Correct answer: φ = √(χ²/n) = Cramér V for the 2×2 case

Question 17
5.00 pts

📊 Yates correction:
Do we use Yates correction for a 2×2 table?

Explanation:

💡 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 5

Effect:
Slightly reduces χ²
→ more conservative
→ closer to the Fisher test

Divided opinions:
Some books no longer recommend it

Correct answer: Yes - when n is small or E is close to 5

Question 18
5.00 pts

📊 3×3 table:
Education (3 levels) × income (3 levels)
n=200. How many df?

Explanation:

💡 Detailed Explanation:

Computing df 📊

3×3 table:

r = 3 rows
c = 3 columns

df:
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

Question 19
5.00 pts

📊 :
χ² No-?

Explanation:

💡 :

🔍

Question 20
5.00 pts

📊 :
?

Explanation:

💡 :

chi-square No- 🔍

chi-square -← Back to all exams