Home ›
Statistics Help ›
Chi-Square Tests
Chi-Square Tests Explained: Testing Categorical Data
📊 Quick Answer
Chi-square tests analyze categorical (count) data to determine if observed frequencies differ significantly from expected frequencies. The three main types are the goodness-of-fit test (does data match an expected distribution?), the test of independence (are two categorical variables related within one sample?), and the test of homogeneity (do two or more populations share the same distribution?). All three compare what you observed to what you’d expect if the null hypothesis were true.
📑 In This Guide
- What Is a Chi-Square Test?
- The Chi-Square Distribution
- Chi-Square Goodness-of-Fit Test
- Chi-Square Test of Independence
- Chi-Square Test of Homogeneity
- Assumptions and Requirements
- Calculating Expected Frequencies
- Interpreting Results
- Chi-Square Critical Value Table
- Common Student Mistakes
- Platform-Specific Tips
- Practice Problems
- FAQs
What Is a Chi-Square Test?
A chi-square test (written χ² and pronounced “kai-square”) is a hypothesis test for categorical data. Unlike t-tests and ANOVA which compare means of numerical data, chi-square tests compare counts or frequencies.
The core question: Do the observed counts differ significantly from what we’d expect by chance?
The chi-square statistic measures the discrepancy between observed (O) and expected (E) frequencies:
χ² = Σ (O − E)² / E
Sum across all categories
A larger χ² value means greater discrepancy between observed and expected—making it less likely the null hypothesis is true.
The Chi-Square Distribution
The chi-square distribution is the sampling distribution used to determine p-values for chi-square tests. It has several important properties:
- Always positive: Since we square the differences, χ² can never be negative
- Always right-skewed: Though it becomes more symmetric with higher degrees of freedom
- Shape depends on degrees of freedom: Different df values produce different distributions
The chi-square distribution is always right-skewed and becomes more symmetric as df increases
For chi-square tests:
- Goodness-of-fit: df = (number of categories) − 1
- Test of independence / homogeneity: df = (rows − 1) × (columns − 1)
Chi-Square vs. T-Test vs. ANOVA: Which Test Do I Use?
| Question Type | Data Type | Test to Use |
|---|---|---|
| Compare means of 2 groups | Numerical (continuous) | T-test |
| Compare means of 3+ groups | Numerical (continuous) | ANOVA |
| Does data fit expected distribution? | Categorical (counts) | Chi-square goodness-of-fit |
| Are two categorical variables related? | Categorical (counts) | Chi-square independence |
| Do 2+ populations share the same distribution? | Categorical (counts) | Chi-square homogeneity |
| Compare proportions between groups | Categorical (counts) | Chi-square or z-test for proportions |
Key rule: If your data is counts/frequencies in categories, use chi-square. If your data is measurements/scores you can average, use t-test or ANOVA.
Chi-Square Goodness-of-Fit Test
The goodness-of-fit test determines whether observed data matches an expected distribution. It answers: “Do the frequencies in my sample match what I’d expect based on some theory or claim?”
When to Use It
- Testing if a die is fair (each face should appear 1/6 of the time)
- Checking if customer preferences match market research predictions
- Verifying if genetic ratios match Mendelian expectations (3:1 ratio)
- Testing if days of the week have equal accident rates
Hypotheses
H₀: The observed frequencies match the expected frequencies (data fits the expected distribution)
H₁: The observed frequencies do not match the expected frequencies
Goodness-of-fit compares what you observed to what you’d expect if the null hypothesis were true
Example: Testing a Die
You roll a die 60 times and want to test if it’s fair. If fair, each face should appear about 10 times (60 ÷ 6 = 10).
| Face | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| Observed (O) | 8 | 12 | 7 | 15 | 9 | 9 |
| Expected (E) | 10 | 10 | 10 | 10 | 10 | 10 |
χ² = (8-10)²/10 + (12-10)²/10 + (7-10)²/10 + (15-10)²/10 + (9-10)²/10 + (9-10)²/10
χ² = 0.4 + 0.4 + 0.9 + 2.5 + 0.1 + 0.1 = 4.4
df = 6 − 1 = 5
Looking up χ² = 4.4 with df = 5 gives p ≈ 0.49. Since p > 0.05, we fail to reject H₀—the die appears fair.
📝 Chi-Square Calculation Steps
- State hypotheses: H₀ (frequencies match expected) vs. H₁ (they don’t)
- Calculate expected frequencies: Based on hypothesis or using (row × column)/total
- Check assumptions: All expected frequencies ≥ 5
- For each cell, calculate: (O − E)² / E
- Sum all cells: χ² = Σ (O − E)² / E
- Find degrees of freedom: df = k − 1 (goodness-of-fit) or df = (r−1)(c−1) (independence/homogeneity)
- Find p-value: Use chi-square table or calculator
- Compare to α: If p < α, reject H₀
🧬 Goodness-of-Fit in Biology: Testing a Dihybrid Cross
Problem: Mendelian genetics predicts a 9:3:3:1 ratio for a dihybrid cross between two heterozygous pea plants (round/yellow, round/green, wrinkled/yellow, wrinkled/green). You count 160 offspring. Do the observed counts fit the expected 9:3:3:1 ratio?
| Phenotype | Ratio | Observed (O) | Expected (E) |
|---|---|---|---|
| Round, Yellow | 9/16 | 98 | 90 |
| Round, Green | 3/16 | 28 | 30 |
| Wrinkled, Yellow | 3/16 | 26 | 30 |
| Wrinkled, Green | 1/16 | 8 | 10 |
Expected counts come from multiplying each ratio fraction by n = 160 (e.g., 9/16 × 160 = 90).
χ² = (98−90)²/90 + (28−30)²/30 + (26−30)²/30 + (8−10)²/10
χ² = 0.711 + 0.133 + 0.533 + 0.400 = 1.78
df = 4 − 1 = 3
Looking up χ² = 1.78 with df = 3 gives p ≈ 0.62. Since p > 0.05, we fail to reject H₀ — the offspring counts are consistent with the expected 9:3:3:1 Mendelian ratio.
Note: Biology courses (genetics, ecology) are one of the most common places chi-square shows up outside a stats class proper. The math is identical to any other goodness-of-fit problem — only the source of your expected ratios changes.
Chi-Square Test of Independence
The test of independence determines whether two categorical variables are related or independent within a single sample. It uses a contingency table (cross-tabulation) to organize the data.
When to Use It
- Is smoking status related to lung disease? (smoker/non-smoker vs. disease/no disease)
- Does gender affect voting preference? (male/female vs. candidate A/B/C)
- Is treatment effectiveness related to age group?
- Are education level and income bracket associated?
💡 Which Chi-Square Test Do I Need?
- One categorical variable, comparing to expected distribution → Goodness-of-fit test
- Two categorical variables measured on one sample, testing if they’re related → Test of independence
- Two or more separate samples, comparing the same categorical variable across them → Test of homogeneity
- “Is this die/spinner/distribution fair?” → Goodness-of-fit test
- “Is Variable A associated with Variable B?” (one sample) → Test of independence
- “Do these groups look the same on this variable?” (pre-defined groups) → Test of homogeneity
- Data in a single row/column of counts → Goodness-of-fit test
- Data in a contingency table (rows × columns) → Test of independence or homogeneity, depending on sampling design
Hypotheses
H₀: The two variables are independent (no association)
H₁: The two variables are not independent (there is an association)
A contingency table organizes counts for two categorical variables
Example: Treatment and Age
A study examines whether treatment effectiveness depends on age group. 120 patients are classified by age (young/old) and outcome (improved/not improved).
If age and outcome are independent, we’d expect the improvement rate to be the same in both age groups. The expected frequencies are calculated from row and column totals.
Using the data from the contingency table above:
- χ² = (45-40)²/40 + (15-20)²/20 + (35-40)²/40 + (25-20)²/20
- χ² = 0.625 + 1.25 + 0.625 + 1.25 = 3.75
- df = (2-1)(2-1) = 1
With χ² = 3.75 and df = 1, p ≈ 0.053. This is borderline—at α = 0.05, we’d barely fail to reject H₀, but at α = 0.10, we’d reject it.
📊 Complete Worked Example: Test of Independence
Problem: A survey of 200 people asks about exercise habits (Regular/None) and stress level (High/Low). Is exercise associated with stress level?
| High Stress | Low Stress | Total | |
|---|---|---|---|
| Regular Exercise | 30 | 50 | 80 |
| No Exercise | 60 | 60 | 120 |
| Total | 90 | 110 | 200 |
Step 1: State hypotheses
H₀: Exercise and stress are independent (no association)
H₁: Exercise and stress are associated
Step 2: Calculate expected frequencies
E = (row total × column total) / grand total
- E(Regular, High) = (80 × 90) / 200 = 36
- E(Regular, Low) = (80 × 110) / 200 = 44
- E(None, High) = (120 × 90) / 200 = 54
- E(None, Low) = (120 × 110) / 200 = 66
Step 3: Check assumptions
All expected values ≥ 5 ✓
Step 4: Calculate χ²
χ² = (30−36)²/36 + (50−44)²/44 + (60−54)²/54 + (60−66)²/66
χ² = 1.00 + 0.82 + 0.67 + 0.55 = 3.04
Step 5: Degrees of freedom
df = (2−1)(2−1) = 1
Step 6: Find p-value and conclude
χ² = 3.04 with df = 1 gives p ≈ 0.081
Since p = 0.081 > α = 0.05, we fail to reject H₀.
Conclusion: There is not sufficient evidence to conclude that exercise and stress level are associated at the 0.05 significance level.
Chi-Square Test of Homogeneity
The test of homogeneity looks like a test of independence — same formula, same df = (r−1)(c−1), same contingency table layout — but it answers a different question: “Do two or more separate populations have the same distribution of a categorical variable?” instead of “are two variables related within one population?”
🔍 Independence vs. Homogeneity: The Real Difference Is Sampling Design
| Test of Independence | Test of Homogeneity | |
|---|---|---|
| Sampling | One sample, drawn once | Two or more samples, drawn separately (group sizes are fixed in advance) |
| Variables measured | Two categorical variables on each subject | One categorical variable, compared across groups |
| Question | Are the two variables related? | Is the distribution the same across groups? |
| Example | Survey 200 people on both exercise habit and stress level | Survey 100 freshmen and 100 seniors (pre-selected groups) on favorite study method |
Hypotheses
H₀: The distribution of the categorical variable is the same across all populations
H₁: At least one population has a different distribution
Example: Study Method by Class Standing
A researcher surveys 100 freshmen and 100 seniors (samples drawn separately, with sample sizes decided in advance) on their preferred study method: flashcards, re-reading notes, or practice problems.
| Flashcards | Re-reading | Practice Problems | Total | |
|---|---|---|---|---|
| Freshmen | 40 | 35 | 25 | 100 |
| Seniors | 20 | 30 | 50 | 100 |
| Total | 60 | 65 | 75 | 200 |
Expected frequencies use the same formula as independence: E = (row total × column total) / grand total. For example, E(Freshmen, Flashcards) = (100 × 60) / 200 = 30.
Working through all six cells gives χ² ≈ 12.82 with df = (2−1)(3−1) = 2. This gives p ≈ 0.0016, well below α = 0.05, so we reject H₀ — freshmen and seniors do not share the same distribution of preferred study methods.
⚠️ Why This Trips Students Up
Because the calculation is identical, many courses don’t bother distinguishing homogeneity from independence — they just call everything “the chi-square test for a two-way table.” If your course or platform uses that language, you can usually treat this section as background rather than a separately tested topic. But if a problem explicitly says something like “researchers surveyed a fixed number from each group,” that’s your cue it’s a homogeneity setup, not independence.
Assumptions and Requirements
Chi-square tests have specific requirements that must be met for valid results:
✅ Chi-Square Requirements
- Random sampling: Data should come from a random sample
- Independence: Observations must be independent of each other
- Categorical data: Variables must be categorical (counts/frequencies)
- Expected frequency rule: All expected frequencies should be ≥ 5
- Mutually exclusive categories: Each observation fits in exactly one cell
⚠️ The Expected Frequency Rule
If any expected frequency is less than 5, the chi-square approximation may be inaccurate. Solutions: combine categories, collect more data, or use Fisher’s exact test (for 2×2 tables with small expected counts).
📘 Yates’ Continuity Correction (2×2 Tables)
Some courses require Yates’ correction for 2×2 contingency tables, which adjusts for the fact that chi-square is a continuous distribution but counts are discrete. The corrected formula subtracts 0.5 from each |O − E| before squaring:
χ²(Yates) = Σ (|O − E| − 0.5)² / E
Yates’ correction produces a more conservative (larger) p-value. Check your course requirements—some instructors require it, others don’t. Modern practice often skips it in favor of Fisher’s exact test for small samples.
Calculating Expected Frequencies
Goodness-of-Fit Test
Expected frequencies come from the hypothesized distribution:
- Equal distribution: E = n / (number of categories)
- Specified proportions: E = n × (hypothesized proportion)
Test of Independence / Homogeneity
Expected frequencies assume the variables are independent (or, for homogeneity, that the groups share the same distribution):
E = (Row Total × Column Total) / Grand Total
This formula calculates what we’d expect in each cell if the row and column variables were completely unrelated.
Interpreting Results
Decision Rule
Compare your calculated χ² to the critical value from the chi-square table (based on df and α), or use the p-value:
- If p < α: Reject H₀. For goodness-of-fit, data doesn’t match expected distribution. For independence, variables are associated. For homogeneity, groups differ.
- If p ≥ α: Fail to reject H₀. For goodness-of-fit, data is consistent with expected distribution. For independence, no evidence of association. For homogeneity, no evidence groups differ.
Effect Size: Cramér’s V
A significant chi-square tells you there’s an association, but not how strong. Cramér’s V measures effect size for chi-square tests of independence:
V = √(χ² / (n × (min(r,c) − 1)))
where r = rows, c = columns
Interpretation: V ranges from 0 to 1. Generally: V < 0.1 is negligible, V = 0.1–0.3 is small, V = 0.3–0.5 is medium, V > 0.5 is large.
Chi-Square Critical Value Table
Use this table to find the critical value for your df and significance level (α). If your calculated χ² exceeds the critical value, reject H₀.
| df | α = 0.10 | α = 0.05 | α = 0.025 | α = 0.01 | α = 0.001 |
|---|---|---|---|---|---|
| 1 | 2.706 | 3.841 | 5.024 | 6.635 | 10.828 |
| 2 | 4.605 | 5.991 | 7.378 | 9.210 | 13.816 |
| 3 | 6.251 | 7.815 | 9.348 | 11.345 | 16.266 |
| 4 | 7.779 | 9.488 | 11.143 | 13.277 | 18.467 |
| 5 | 9.236 | 11.070 | 12.833 | 15.086 | 20.515 |
| 6 | 10.645 | 12.592 | 14.449 | 16.812 | 22.458 |
| 7 | 12.017 | 14.067 | 16.013 | 18.475 | 24.322 |
| 8 | 13.362 | 15.507 | 17.535 | 20.090 | 26.125 |
| 9 | 14.684 | 16.919 | 19.023 | 21.666 | 27.877 |
| 10 | 15.987 | 18.307 | 20.483 | 23.209 | 29.588 |
| 11 | 17.275 | 19.675 | 21.920 | 24.725 | 31.264 |
| 12 | 18.549 | 21.026 | 23.337 | 26.217 | 32.910 |
| 13 | 19.812 | 22.362 | 24.736 | 27.688 | 34.528 |
| 14 | 21.064 | 23.685 | 26.119 | 29.141 | 36.123 |
| 15 | 22.307 | 24.996 | 27.488 | 30.578 | 37.697 |
| 16 | 23.542 | 26.296 | 28.845 | 32.000 | 39.252 |
| 17 | 24.769 | 27.587 | 30.191 | 33.409 | 40.790 |
| 18 | 25.989 | 28.869 | 31.526 | 34.805 | 42.312 |
| 19 | 27.204 | 30.144 | 32.852 | 36.191 | 43.820 |
| 20 | 28.412 | 31.410 | 34.170 | 37.566 | 45.315 |
Reminder: goodness-of-fit uses df = (categories − 1); independence and homogeneity use df = (rows − 1)(columns − 1).
Common Student Mistakes
❌ Mistake #1: Using percentages instead of counts
Chi-square tests require raw frequency counts, not percentages or proportions. If your data is in percentages, convert back to counts before running the test.
❌ Mistake #2: Ignoring the expected frequency rule
If any expected frequency is below 5, your results may be invalid. Always check expected values before interpreting. If some are too small, combine categories or use an alternative test.
❌ Mistake #3: Using chi-square on numerical data
Chi-square is for categorical data only. If your variables are continuous (height, weight, test scores), you need a different test like correlation or t-test. The data must be counts in categories.
❌ Mistake #4: Confusing goodness-of-fit with test of independence
Goodness-of-fit: One categorical variable, comparing to a hypothesized distribution. Test of independence: Two categorical variables, testing if they’re related. The setup and df calculations differ.
❌ Mistake #5: Misinterpreting “independence”
Failing to reject H₀ doesn’t prove the variables ARE independent—it just means you don’t have enough evidence to say they’re related. Statistical tests can’t prove the null hypothesis.
❌ Mistake #6: Wrong degrees of freedom
For goodness-of-fit: df = categories − 1. For independence/homogeneity: df = (rows − 1)(columns − 1). Using the wrong df gives wrong p-values and wrong conclusions.
❌ Mistake #7: Assuming independence and homogeneity are always tested separately
The calculation is identical, so many courses (and platforms) never distinguish them explicitly. Don’t assume a problem is “wrong” just because it uses independence language for what looks like a homogeneity setup — check your course’s terminology before flagging a discrepancy.
Platform-Specific Tips
ALEKS
ALEKS frequently asks you to identify the correct test before calculating. Know the difference between goodness-of-fit and independence problems from the wording. ALEKS is strict about rounding—follow their instructions exactly, and double-check your expected values calculation.
MyStatLab (Pearson)
StatCrunch handles chi-square tests well. For goodness-of-fit, go to Stat → Goodness-of-fit → Chi-Square Test. For independence, use Stat → Tables → Contingency → With Summary (if you have counts). MyStatLab often asks for both the test statistic and expected values—show your work.
WebAssign
WebAssign chi-square problems often give you a contingency table and ask for expected frequencies, χ², df, and conclusion. Calculate expected values carefully—they sometimes ask for specific cells. Pay attention to whether they want a one-tailed interpretation (rare for chi-square) or the standard right-tailed test.
Excel
Excel has no built-in “Chi-Square Test” menu button like StatCrunch, so most of the pain is manual setup:
- Build the expected frequency table using
=($rowtotal*$coltotal)/$grandtotalfor each cell — reference the totals with$so you can drag the formula across the table without the references shifting - Calculate the test statistic with
=CHISQ.TEST(observed_range, expected_range)— this returns the p-value directly, not χ² itself, which surprises a lot of students - To get χ² itself, either sum
(O-E)^2/Emanually across every cell, or use=CHISQ.INV.RT(p_value, df)to work backward from the p-value CHISQ.TEST already gave you - Common mistake:
CHISQ.TESTrequires the observed and expected ranges to be the exact same shape (same number of rows and columns). A mismatched range doesn’t throw an error — it just silently returns a wrong number
SPSS
- Independence/homogeneity: Analyze → Descriptive Statistics → Crosstabs → move variables into Row(s)/Column(s) → Statistics → check “Chi-square” → Cells → check “Expected” (to verify the ≥5 rule)
- Goodness-of-fit: Analyze → Nonparametric Tests → Legacy Dialogs → Chi-square
- SPSS reports “Pearson Chi-Square” in the output table — that’s your test statistic. “Asymp. Sig. (2-sided)” is your p-value
- Watch for the footnote “X cells have expected count less than 5” that SPSS prints automatically underneath the Chi-Square Tests table — that’s your assumption check, already run for you
Calculator Tips (TI-83/84)
- Enter observed data: Matrix [A] (MATRIX → EDIT)
- Run test: STAT → TESTS → χ²-Test
- Expected values: Automatically stored in Matrix [B] after running the test
- Goodness-of-fit: Use χ²GOF-Test if available, or calculate manually
Need help with these platforms? Our tutors work with ALEKS statistics, MyStatLab, WebAssign, Hawkes Learning, and WileyPLUS every day. If chi-square showed up in a specific course like PSYC 340, we’ve likely seen that exact assignment before.
Practice Problems
Try these on your own before checking the answer.
Problem 1 (Goodness-of-Fit): A bag of candy claims 20% red, 30% blue, 30% green, 20% yellow. You count 100 candies: 15 red, 35 blue, 28 green, 22 yellow. Test the claim at α = 0.05.
Expected: Red = 20, Blue = 30, Green = 30, Yellow = 20
χ² = (15−20)²/20 + (35−30)²/30 + (28−30)²/30 + (22−20)²/20 = 1.25 + 0.833 + 0.133 + 0.20 = 2.42
df = 4 − 1 = 3. Critical value at α = 0.05, df = 3 is 7.815 (see table above).
Since χ² = 2.42 < 7.815, we fail to reject H₀ — the candy color claim is consistent with the data.
Problem 2 (Independence): 150 employees are surveyed on department (Sales/IT) and preferred work arrangement (Remote/Hybrid/Office). Is department associated with work preference?
Data (Sales: 30 Remote, 20 Hybrid, 25 Office, total 75; IT: 15 Remote, 20 Hybrid, 40 Office, total 75).
Expected for each cell = (row total × column total) / 150. E(Sales, Remote) = (75×45)/150 = 22.5, and so on for the remaining five cells.
Working through all six cells gives χ² ≈ 10.0, df = (2−1)(3−1) = 2. Critical value at α = 0.05, df = 2 is 5.991.
Since χ² = 10.0 > 5.991, we reject H₀ — department and work-arrangement preference are associated.
Problem 3 (Homogeneity vs. Independence — Concept Check): A researcher samples exactly 50 dog owners and 50 cat owners (decided in advance) and asks each which brand of pet food they prefer. Is this independence or homogeneity?
Homogeneity. The two groups (dog owners, cat owners) were sampled separately with sizes fixed in advance (50 and 50) — that’s the signature of a homogeneity design. If instead the researcher had surveyed 100 random pet owners and recorded both “pet type” and “food brand” on each person without pre-fixing the group sizes, it would be a test of independence. The chi-square calculation is identical either way.
Frequently Asked Questions
What’s the difference between chi-square goodness-of-fit and test of independence?
Goodness-of-fit tests one categorical variable against a hypothesized distribution (e.g., “Is this die fair?”). Test of independence tests whether two categorical variables are related (e.g., “Is smoking related to lung disease?”). Different setup, different df formula, but same χ² formula.
What’s the difference between the test of independence and the test of homogeneity?
They use the exact same formula and df calculation. The difference is sampling design: independence applies when you draw one sample and measure two categorical variables on each subject. Homogeneity applies when you draw two or more separate samples (with group sizes fixed in advance) and compare one categorical variable across them. Many courses don’t distinguish the two by name and just call it “the chi-square test for a two-way table.”
What if my expected frequencies are less than 5?
The chi-square approximation becomes unreliable when expected frequencies are too small. Options: combine categories to increase expected counts, collect more data, or use Fisher’s exact test (for 2×2 tables). Some sources say E ≥ 5 in all cells; others allow up to 20% of cells with E between 1 and 5. Check your course requirements.
Why is chi-square always a right-tailed test?
Because we square the differences (O − E)², the χ² value is always positive. Large χ² values indicate large discrepancies between observed and expected—which is what makes us doubt the null hypothesis. We never care about “too small” χ² values because they just mean observed matches expected well.
How do I calculate degrees of freedom?
Goodness-of-fit: df = k − 1, where k is the number of categories. Test of independence/homogeneity: df = (r − 1)(c − 1), where r is rows and c is columns. For a 3×4 table, df = (3-1)(4-1) = 6.
Can chi-square tell me which cells are different?
The overall chi-square test just tells you whether there’s a significant association, not where. To identify which specific cells contribute most to the chi-square value, examine the standardized residuals: (O − E) / √E. Residuals greater than ±2 indicate cells that differ significantly from expected.
What’s the relationship between chi-square and other tests?
For a 2×2 table, the chi-square test of independence is equivalent to a z-test for two proportions (χ² = z²). Chi-square is also related to the G-test (likelihood ratio test), which some courses prefer. For paired categorical data, use McNemar’s test instead of the standard chi-square.
When should I use Fisher’s exact test instead?
Fisher’s exact test is preferred when sample sizes are small and expected frequencies fall below 5, especially in 2×2 tables. It calculates the exact probability rather than using the chi-square approximation. Most statistical software offers this option—look for “Fisher’s exact” when running chi-square on small samples.
How do I run a chi-square test in Excel?
Build an expected frequency table using =($rowtotal*$coltotal)/$grandtotal, then use =CHISQ.TEST(observed_range, expected_range) to get the p-value directly. Note that CHISQ.TEST returns the p-value, not χ² itself — use =CHISQ.INV.RT(p_value, df) if you need the test statistic.
Can you help with my chi-square homework?
Absolutely. Chi-square tests are a common topic in intro statistics, and our tutors handle them regularly. Whether you’re working on goodness-of-fit problems, independence tests, homogeneity comparisons, or need help interpreting contingency tables in Excel, SPSS, ALEKS, MyStatLab, or WebAssign, we work with these platforms daily. Get a free quote to get started.
Quick Reference Summary
📊 Goodness-of-Fit
Purpose: Data vs. expected distribution
Data: One categorical variable
df = k − 1
H₀: Observed = Expected
🔗 Independence
Purpose: Are 2 variables related?
Data: One sample, 2 variables
df = (r − 1)(c − 1)
H₀: Variables independent
🧬 Homogeneity
Purpose: Do groups share a distribution?
Data: 2+ samples, 1 variable
df = (r − 1)(c − 1)
H₀: Same distribution across groups
🧮 Key Formulas
| Chi-square statistic: | χ² = Σ (O − E)² / E |
| Expected (independence/homogeneity): | E = (row total × column total) / n |
| Yates’ correction: | χ² = Σ (|O − E| − 0.5)² / E |
| Cramér’s V: | V = √(χ² / (n × (min(r,c) − 1))) |
⚠️ Requirements Checklist
- Random sample ✓
- Independent observations ✓
- Categorical data (counts, not percentages) ✓
- All expected frequencies ≥ 5 ✓
- Each observation in exactly one cell ✓
Decision rule: If p-value < α (usually 0.05), reject H₀. Chi-square tests are always right-tailed.
Related Resources
Statistics Foundations
- Hypothesis Testing Guide
- T-Tests and ANOVA Explained
- Descriptive Statistics Explained
- Normal Distribution Guide
Statistics Help
- Statistics Homework Help
- ALEKS Statistics Answers
- MyStatLab Answers
- Hawkes Learning Answers
- WileyPLUS Answers
- PSYC 340 Statistics Help
Need Help With Chi-Square Tests?
Our tutors handle chi-square problems daily—from setting up contingency tables to calculating expected frequencies and interpreting results.