Homogeneity: Testing whether different populations have the same distribution of categorical variables
Contingency Table: Cross-tabulation of categorical variables from different populations
Expected Frequency: E = (Row Total × Column Total) / Grand Total
Degrees of Freedom: df = (number of rows - 1) × (number of columns - 1)
Null Hypothesis: Populations have the same distribution
Alternative Hypothesis: At least one population has a different distribution
- State hypotheses: H₀: All populations have same distribution
- Check conditions: All expected frequencies ≥ 5
- Calculate expected frequencies: E = (row total × col total) / grand total
- Calculate test statistic: χ² = Σ[(O-E)²/E]
- Make decision: Compare p-value to α
Populations: 3 institution types
Categories: Yes/No preference
Contingency Table: 3×2 table
Testing homogeneity of preference distribution across institution types
| Yes | No | Total | |
|---|---|---|---|
| Public 2-Year | 120 | 80 | 200 |
| Public 4-Year | 150 | 50 | 200 |
| Private | 80 | 70 | 150 |
| Total | 350 | 200 | 550 |
H₀: Preference distribution is the same across all institution types
H₁: At least one institution type has a different preference distribution
For each cell: E = (Row Total × Column Total) / Grand Total
Public 2-Year Yes: E = (200 × 350) / 550 = 127.27
Public 2-Year No: E = (200 × 200) / 550 = 72.73
Public 4-Year Yes: E = (200 × 350) / 550 = 127.27
Public 4-Year No: E = (200 × 200) / 550 = 72.73
Private Yes: E = (150 × 350) / 550 = 95.45
Private No: E = (150 × 200) / 550 = 54.55
All expected frequencies ≥ 5: ✓
Conditions satisfied
χ² = [(120-127.27)²/127.27] + [(80-72.73)²/72.73] + [(150-127.27)²/127.27] + [(50-72.73)²/72.73] + [(80-95.45)²/95.45] + [(70-54.55)²/54.55]
χ² = [52.85/127.27] + [53.37/72.73] + [515.55/127.27] + [515.55/72.73] + [238.70/95.45] + [238.70/54.55]
χ² = 0.415 + 0.734 + 4.051 + 7.088 + 2.501 + 4.376 = 19.165
df = (r-1)(c-1) = (3-1)(2-1) = 2 × 1 = 2
For χ² = 19.165 and df = 2: p-value < 0.001
Since p-value < α (0.05), reject H₀
There is significant evidence that preference distribution differs across institution types.
χ² = 19.165, df = 2, p-value < 0.001
Reject H₀: Preference distributions differ significantly across institution types
• Expected Calculation: E = (Row Total × Col Total) / Grand Total
• Degrees of Freedom: df = (r-1)(c-1)
• Decision Rule: Reject H₀ if p-value ≤ α
Populations: 3 regions (Northeast, South, West)
Categories: 3 party affiliations (Dem, Rep, Ind)
Contingency Table: 3×3 table
| Democrat | Republican | Independent | Total | |
|---|---|---|---|---|
| Northeast | 180 | 120 | 50 | 350 |
| South | 150 | 180 | 70 | 400 |
| West | 120 | 100 | 80 | 300 |
| Total | 450 | 400 | 200 | 1050 |
H₀: Voting distribution is the same across all regions
H₁: At least one region has a different voting distribution
NE Dem: E = (350 × 450) / 1050 = 150
NE Rep: E = (350 × 400) / 1050 = 133.33
NE Ind: E = (350 × 200) / 1050 = 66.67
South Dem: E = (400 × 450) / 1050 = 171.43
South Rep: E = (400 × 400) / 1050 = 152.38
South Ind: E = (400 × 200) / 1050 = 76.19
West Dem: E = (300 × 450) / 1050 = 128.57
West Rep: E = (300 × 400) / 1050 = 114.29
West Ind: E = (300 × 200) / 1050 = 57.14
All expected frequencies ≥ 5: ✓
Conditions satisfied
χ² = [(180-150)²/150] + [(120-133.33)²/133.33] + [(50-66.67)²/66.67] + [(150-171.43)²/171.43] + [(180-152.38)²/152.38] + [(70-76.19)²/76.19] + [(120-128.57)²/128.57] + [(100-114.29)²/114.29] + [(80-57.14)²/57.14]
χ² = [900/150] + [177.69/133.33] + [277.89/66.67] + [459.24/171.43] + [762.05/152.38] + [38.30/76.19] + [73.44/128.57] + [204.08/114.29] + [524.41/57.14]
χ² = 6 + 1.33 + 4.17 + 2.68 + 5.00 + 0.50 + 0.57 + 1.79 + 9.18 = 31.02
df = (r-1)(c-1) = (3-1)(3-1) = 2 × 2 = 4
For χ² = 31.02 and df = 4: p-value < 0.001
Since p-value < α (0.01), reject H₀
There is significant evidence that voting distribution differs across regions.
χ² = 31.02, df = 4, p-value < 0.001
Reject H₀: Voting distributions differ significantly across regions
• Contingency Analysis: 3×3 table with multiple comparisons
• Political Context: Important for electoral analysis
• Large Sample: Adequate expected frequencies guaranteed
Populations: 3 education levels (HS, College, Graduate)
Categories: 3 satisfaction levels (Satisfied, Neutral, Dissatisfied)
Contingency Table: 3×3 table
| Satisfied | Neutral | Dissatisfied | Total | |
|---|---|---|---|---|
| High School | 60 | 40 | 30 | 130 |
| College | 80 | 50 | 20 | 150 |
| Graduate | 45 | 35 | 20 | 100 |
| Total | 185 | 125 | 70 | 380 |
H₀: Satisfaction distribution is the same across all education levels
H₁: At least one education level has a different satisfaction distribution
HS Satisfied: E = (130 × 185) / 380 = 63.29
HS Neutral: E = (130 × 125) / 380 = 42.76
HS Dissatisfied: E = (130 × 70) / 380 = 24.05
College Satisfied: E = (150 × 185) / 380 = 72.90
College Neutral: E = (150 × 125) / 380 = 49.34
College Dissatisfied: E = (150 × 70) / 380 = 27.63
Graduate Satisfied: E = (100 × 185) / 380 = 48.68
Graduate Neutral: E = (100 × 125) / 380 = 32.89
Graduate Dissatisfied: E = (100 × 70) / 380 = 18.42
All expected frequencies ≥ 5: ✓
Conditions satisfied
χ² = [(60-63.29)²/63.29] + [(40-42.76)²/42.76] + [(30-24.05)²/24.05] + [(80-72.90)²/72.90] + [(50-49.34)²/49.34] + [(20-27.63)²/27.63] + [(45-48.68)²/48.68] + [(35-32.89)²/32.89] + [(20-18.42)²/18.42]
χ² = [10.82/63.29] + [7.62/42.76] + [35.40/24.05] + [50.41/72.90] + [0.44/49.34] + [58.58/27.63] + [13.47/48.68] + [4.45/32.89] + [2.50/18.42]
χ² = 0.171 + 0.178 + 1.472 + 0.692 + 0.009 + 2.120 + 0.277 + 0.135 + 0.136 = 5.190
df = (r-1)(c-1) = (3-1)(3-1) = 2 × 2 = 4
For χ² = 5.190 and df = 4: p-value ≈ 0.268
Since p-value (0.268) > α (0.05), fail to reject H₀
There is insufficient evidence to conclude that satisfaction distribution differs across education levels.
χ² = 5.190, df = 4, p-value ≈ 0.268
Fail to reject H₀: Satisfaction distributions appear similar across education levels
• Workplace Application: Important for HR and organizational analysis
• Education Context: Relevant for career counseling and workforce planning
• Conservative Alpha: α = 0.05 balances Type I and II errors
Populations: 3 age groups (Young, Middle, Senior)
Categories: 3 shopping methods (Online, In-store, Both)
Contingency Table: 3×3 table
| Online | In-store | Both | Total | |
|---|---|---|---|---|
| Young Adults | 45 | 35 | 20 | 100 |
| Middle Age | 30 | 40 | 30 | 100 |
| Seniors | 15 | 50 | 35 | 100 |
| Total | 90 | 125 | 85 | 300 |
H₀: Shopping method distribution is the same across all age groups
H₁: At least one age group has a different shopping method distribution
Since all row totals are 100, E = (100 × Column Total) / 300
Each age group Online: E = (100 × 90) / 300 = 30
Each age group In-store: E = (100 × 125) / 300 = 41.67
Each age group Both: E = (100 × 85) / 300 = 28.33
All expected frequencies ≥ 5: ✓
Conditions satisfied
χ² = [(45-30)²/30] + [(35-41.67)²/41.67] + [(20-28.33)²/28.33] + [(30-30)²/30] + [(40-41.67)²/41.67] + [(30-28.33)²/28.33] + [(15-30)²/30] + [(50-41.67)²/41.67] + [(35-28.33)²/28.33]
χ² = [225/30] + [44.44/41.67] + [69.39/28.33] + [0/30] + [2.78/41.67] + [2.78/28.33] + [225/30] + [69.39/41.67] + [44.44/28.33]
χ² = 7.50 + 1.07 + 2.45 + 0 + 0.07 + 0.10 + 7.50 + 1.67 + 1.57 = 21.93
df = (r-1)(c-1) = (3-1)(3-1) = 2 × 2 = 4
For χ² = 21.93 and df = 4: p-value < 0.001
Since p-value < α (0.05), reject H₀
There is significant evidence that shopping method distribution differs across age groups.
χ² = 21.93, df = 4, p-value < 0.001
Reject H₀: Shopping method distributions differ significantly across age groups
• Market Research: Important for targeted marketing strategies
• Age Demographics: Shows generational differences in behavior
• Equal Row Totals: Simplifies expected frequency calculation
Populations: 2 hospitals (A and B)
Categories: 2 outcomes (Success, Failure)
Contingency Table: 2×2 table
| Success | Failure | Total | |
|---|---|---|---|
| Hospital A | 180 | 20 | 200 |
| Hospital B | 150 | 30 | 180 |
| Total | 330 | 50 | 380 |
H₀: Treatment success distribution is the same for both hospitals
H₁: Hospitals have different treatment success distributions
A Success: E = (200 × 330) / 380 = 173.68
A Failure: E = (200 × 50) / 380 = 26.32
B Success: E = (180 × 330) / 380 = 156.32
B Failure: E = (180 × 50) / 380 = 23.68
All expected frequencies ≥ 5: ✓
Conditions satisfied
χ² = [(180-173.68)²/173.68] + [(20-26.32)²/26.32] + [(150-156.32)²/156.32] + [(30-23.68)²/23.68]
χ² = [40.14/173.68] + [40.14/26.32] + [40.14/156.32] + [40.14/23.68]
χ² = 0.231 + 1.525 + 0.257 + 1.695 = 3.608
df = (r-1)(c-1) = (2-1)(2-1) = 1 × 1 = 1
For χ² = 3.608 and df = 1: p-value ≈ 0.057
Since p-value (0.057) > α (0.05), fail to reject H₀
There is insufficient evidence to conclude that success rates differ between hospitals.
χ² = 3.608, df = 1, p-value ≈ 0.057
Fail to reject H₀: Success rates appear similar between hospitals
• Medical Context: Important for healthcare quality assessment
• 2×2 Table: Single degree of freedom, simpler interpretation
• Marginally Significant: p-value close to α suggests need for larger study