Hypothesis Testing Statistical Tests Test Selection 24 min read July 20, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Chi-Square Test vs T-Test: How to Choose

A researcher wants to know whether smoking rates differ between men and women. Another researcher wants to know whether men and women differ in average blood pressure. Both ask about differences between two groups — yet these questions require completely different statistical tests. The first calls for a Chi-Square test; the second calls for a T-test. Understanding which to use, and why, is one of the most practical decisions in applied statistics.

This guide explains the logic behind both tests, walks through their assumptions and formulas, provides a step-by-step decision framework, and includes fully worked examples from healthcare, education, marketing, and social science. An interactive test selector below lets you find the right test for your data in under a minute.

What You'll Learn
  • ✓ The single most important question for choosing between these two tests
  • ✓ Definitions, formulas, and assumptions for both the Chi-Square test and all three T-test types
  • ✓ A complete comparison table covering data type, sample size, parametric status, and more
  • ✓ A step-by-step decision tree covering seven common statistical tests
  • ✓ Four fully worked examples from real research scenarios
  • ✓ The CHOOSE framework — an original six-step selection method
  • ✓ APA reporting templates for both tests
  • ✓ Software syntax for R, Python, and SPSS

The One-Question Answer

💡
Featured Snippet — Chi-Square Test vs T-Test

Ask this: Is your outcome variable categorical (counts in groups) or continuous (measured numbers)? If categorical → Chi-Square test. If continuous → T-test. This single question settles the choice in most research scenarios.

The Chi-Square test and the T-test both evaluate whether a real difference or relationship exists in your data. They differ in what kind of "difference" they measure. The Chi-Square test counts how often observations fall into categories and asks whether those counts match what you'd expect by chance. The T-test measures numerical values and asks whether the average of those values differs between groups or from a target.

Before diving into formulas and assumptions, the table below gives you the complete comparison at a glance:

Chi-Square Test vs T-Test: Complete Comparison

Feature Chi-Square Test (χ²) T-Test (t)
Data typeCategorical (nominal or ordinal counts)Continuous (interval or ratio)
What it comparesObserved vs. expected frequenciesGroup means or mean vs. a fixed value
Parametric?No — nonparametricYes — parametric
Distribution assumptionNone for the populationNormal distribution (or n > 30)
Typical outputχ² statistic, degrees of freedom, p-valuet statistic, degrees of freedom, p-value
Number of groupsTwo or more categoriesOne or two groups
Effect size measureCramér's V, phi (φ)Cohen's d
Minimum expected frequency≥ 5 per cellNo frequency requirement
InventorKarl Pearson (1900)William Sealy Gosset ("Student", 1908)
Software function (R)chisq.test()t.test()
Software function (Python)scipy.stats.chi2_contingency()scipy.stats.ttest_ind()
When to consider alternativesExpected count < 5 → Fisher's Exact TestNon-normal, small n → Mann-Whitney U
Chi-Square test invented by Karl Pearson. See: Pearson, K. (1900). On the criterion that a given system of deviations from the probable in the case of a correlated system of variables is such that it can be reasonably supposed to have arisen from random sampling. Philosophical Magazine, 50(302), 157–175. T-test developed by William Sealy Gosset, publishing as "Student." See: Student (1908). The probable error of a mean. Biometrika, 6(1), 1–25.

What Is the Chi-Square Test?

Definition — Chi-Square Test (χ²)
The Chi-Square test is a nonparametric statistical test that measures the discrepancy between observed categorical frequencies and the frequencies expected under a null hypothesis. A large χ² value means the observed counts deviate substantially from what chance predicts.
χ² = Σ [(O − E)² / E]

In the formula, O is the observed count in each cell, E is the expected count under the null hypothesis, and the summation runs over all cells. Larger departures from expected frequencies produce larger χ² values. The resulting statistic is compared to a chi-square distribution table with the appropriate degrees of freedom to obtain a p-value.

There are two main versions. The Chi-Square Test of Independence asks whether two categorical variables are related — for example, whether voting preference depends on age group. The Chi-Square Goodness-of-Fit Test asks whether one categorical variable follows a specific distribution — for example, whether a die is fair.

Chi-Square Test Assumptions

Chi-Square Test — Assumptions Checklist
  • Categorical data: Variables must be nominal or ordinal categories, not continuous measurements
  • Independent observations: Each participant or unit contributes to exactly one cell in the contingency table
  • Expected frequency ≥ 5: All expected cell counts must be at least 5. If not, use Fisher's Exact Test
  • Random sampling: Data should come from a random or representative sample
  • No paired data: Standard Chi-Square assumes independent groups. For paired categorical data, use McNemar's Test
Chi-Square Formula (Test of Independence)
χ² = Σ [(Oij − Eij)² / Eij]
Oij = observed count in row i, column j Eij = (row total × column total) / grand total df = (rows − 1)(columns − 1) p-value from χ² distribution

What Is the T-Test?

Definition — T-Test (Student's T-Test)
The T-test is a parametric statistical test that determines whether the mean of a continuous variable differs significantly from a reference value or between two groups, using the t-distribution to account for uncertainty when the population standard deviation is unknown.
t = (x̄ − μ₀) / (s / √n)

Three distinct T-tests cover most research scenarios. The one-sample T-test compares a sample mean to a known value (for example, testing whether average student performance equals the national benchmark of 70). The independent samples T-test compares means from two unrelated groups (treatment vs. control). The paired samples T-test compares the same group before and after an intervention, or two matched measurements. The formula changes slightly for each type, but the underlying logic — how far is the observed mean from the null hypothesis, measured in units of standard error — remains the same.

William Sealy Gosset, working at Guinness Brewery in Dublin, developed the t-distribution in 1908 while working with small samples of raw materials. He published under the pen name "Student" to protect trade secrets, which is why the test is sometimes called Student's t-test.

T-Test Assumptions

T-Test — Assumptions Checklist
  • Continuous outcome: The dependent variable must be measured on an interval or ratio scale
  • Normality: The data (or its sampling distribution) should be approximately normal. With n > 30, the Central Limit Theorem makes this assumption robust. Verify with the Shapiro-Wilk test
  • Independent observations: Responses from different participants should not influence each other (except in the paired version, where pairs are intentionally linked)
  • Homogeneity of variance (independent T-test only): The two groups should have similar variances. Check with Levene's test. If unequal, use Welch's correction
  • Random sampling: Data should come from a probability sample
Independent Samples T-Test Formula (equal variances)
t = (x̄₁ − x̄₂) / (sp · √(1/n₁ + 1/n₂))
x̄₁, x̄₂ = sample means sp = pooled standard deviation n₁, n₂ = sample sizes df = n₁ + n₂ − 2

The Three T-Test Types Explained

Choosing a T-test also means choosing which version. The data structure — not the research question alone — makes this decision.

T-Test Type When to Use Example
One-Sample T-Test Compare a single group mean to a fixed value (population benchmark) Does average student score differ from the national average of 75?
Independent Samples T-Test Compare means from two separate, unrelated groups Do men and women differ in average resting heart rate?
Paired Samples T-Test Compare two measurements from the same individuals or matched pairs Did blood pressure decrease after an 8-week exercise program?

If your study has more than two groups and a continuous outcome, the T-test is no longer appropriate — switch to ANOVA. See the T-Test vs ANOVA comparison for details.

Decision Tree: Chi-Square vs T-Test (and When to Use Alternatives)

Work through the questions below in order. Each answer points to the next question until you reach a test recommendation.

Statistical Test Selection — Decision Tree

Q1: What type is your outcome variable?
Categorical (counts, frequencies, proportions)
Q2: How many groups or variables?
2+ categories, 2 variables (independence)
Q3: All expected cells ≥ 5?
Yes →
✅ Chi-Square Test of Independence
No →
⚠️ Fisher's Exact Test (small expected counts)
1 variable, comparing to a known distribution
✅ Chi-Square Goodness-of-Fit Test
2 related (paired) categorical groups
✅ McNemar's Test
Continuous (measured numbers)
Q2: How many groups?
One group vs. a fixed value
✅ One-Sample T-Test
Two independent groups
Q3: Normally distributed?
Yes →
✅ Independent Samples T-Test
No →
⚠️ Mann-Whitney U Test (nonparametric alternative)
Two related/matched measurements
✅ Paired Samples T-Test
Three or more independent groups
✅ One-Way ANOVA

For a broader map of statistical tests beyond these two, visit the statistical test selector on Statistics Fundamentals.

The CHOOSE Framework: A Six-Step Selection Method

The decision tree above answers the core question quickly. The CHOOSE framework provides a more systematic walkthrough — useful in formal research contexts or when reviewing a colleague's analysis for correctness.

Original Framework — Statistics Fundamentals

CHOOSE: Six Steps to the Right Statistical Test

C
Classify Your Data Identify the scale of measurement for your outcome variable. Nominal and ordinal counts → Chi-Square family. Interval and ratio measurements → T-test family.
H
Hypothesis Identification Write out H₀ and H₁ explicitly. "Frequencies differ between groups" points to Chi-Square. "Means differ between groups" points to T-test. If you can't write the hypothesis in terms of means or frequencies, stop here and reconsider your research question.
O
Observe Variable Types Count your variables: how many groups, how many time points, are groups independent or related? Two independent groups with a continuous outcome → independent samples T-test. Two independent groups with a categorical outcome → Chi-Square test of independence.
O
Outline Assumptions Check every assumption for your candidate test. For the T-test: confirm normality (Shapiro-Wilk), equal variances (Levene's), and independence. For Chi-Square: confirm all expected cells ≥ 5 and observations are independent. If assumptions fail, identify the appropriate alternative test.
S
Select the Appropriate Test Apply your findings from steps C through O to pick the final test. Document your reasoning. If two tests are defensible, explain why you chose one over the other — reviewers and journal editors will ask.
E
Explain and Interpret Results Report the test statistic, degrees of freedom, p-value, and an effect size. For Chi-Square: report χ²(df) and Cramér's V. For T-tests: report t(df) and Cohen's d. State the conclusion in plain language linked to the original research question.

Worked Examples: Chi-Square vs T-Test in Practice

The following four examples come from different fields. In each case, the first task is identifying which test applies — then running through the full procedure.

Example 1 — Chi-Square Test: Do Treatment Outcomes Differ by Gender?

Worked Example 1 — Chi-Square Test of Independence

Problem: A clinical researcher records whether 200 patients responded to a new medication (yes/no) and their gender (male/female). Is there a statistically significant association between gender and treatment response? Use α = 0.05.

Observed frequency table (contingency table):

Gender Responded (Yes) Did Not Respond (No) Row Total
Male5545100
Female7030100
Column Total12575200
1

Why Chi-Square? Both variables are categorical: gender (male/female) and response (yes/no). The outcome is counts in categories, not a measured number. A T-test is not applicable here.

2

Hypotheses: H₀: Gender and treatment response are independent. H₁: Gender and treatment response are associated (α = 0.05).

3

Expected frequencies: E = (row total × column total) / grand total. E(Male, Yes) = (100 × 125)/200 = 62.5. E(Male, No) = 37.5. E(Female, Yes) = 62.5. E(Female, No) = 37.5. All ≥ 5, so Chi-Square is appropriate.

4

Test statistic:
χ² = [(55−62.5)²/62.5] + [(45−37.5)²/37.5] + [(70−62.5)²/62.5] + [(30−37.5)²/37.5]
χ² = [56.25/62.5] + [56.25/37.5] + [56.25/62.5] + [56.25/37.5]
χ² = 0.90 + 1.50 + 0.90 + 1.50 = 4.80

5

Degrees of freedom: df = (2 − 1)(2 − 1) = 1. From the chi-square table, the critical value at df = 1, α = 0.05 is 3.841.

6

Decision: χ² = 4.80 > 3.841 → Reject H₀. Approximate p-value ≈ 0.028. Effect size: φ = √(χ²/n) = √(4.80/200) = 0.155 (small-to-medium association).

✅ Conclusion: There is a statistically significant association between gender and treatment response, χ²(1) = 4.80, p = .028. Female patients responded at a higher rate (70%) than male patients (55%).

APA Reporting Template — Chi-Square Test A chi-square test of independence was performed to examine the relationship between gender and treatment response. The relationship was significant, χ²(1, N = 200) = 4.80, p = .028. Female patients were more likely to respond to treatment (70%) than male patients (55%).

Example 2 — Independent Samples T-Test: Do Two Teaching Methods Produce Different Scores?

Worked Example 2 — Independent Samples T-Test

Problem: An educational researcher compares two teaching methods. Method A (n = 30) produced a mean exam score of 74.2 (s = 9.1). Method B (n = 30) produced a mean score of 81.6 (s = 8.7). Is the difference significant at α = 0.05?

1

Why T-test? The outcome variable (exam score) is continuous. The research question is about means. Two independent groups are being compared — so an independent samples T-test applies, not Chi-Square.

2

Hypotheses: H₀: μ₁ = μ₂ (no difference in mean scores) | H₁: μ₁ ≠ μ₂ (two-tailed, α = 0.05). See the null and alternative hypothesis guide.

3

Assumption check: n = 30 for each group — the Central Limit Theorem supports normality. Levene's test assumed non-significant (p > .05), so we proceed with the equal-variance formula.

4

Pooled SD and test statistic:
p = [(30−1)(9.1²) + (30−1)(8.7²)] / (30 + 30 − 2) = [29(82.81) + 29(75.69)] / 58 = [2401.49 + 2195.01] / 58 = 78.56
sp = √78.56 = 8.86
t = (74.2 − 81.6) / (8.86 · √(1/30 + 1/30)) = −7.4 / (8.86 · 0.258) = −7.4 / 2.286 = −3.24

5

Critical value: df = 58. From the t-distribution table, t* = ±2.001 at α = 0.05, two-tailed. Our |t| = 3.24 exceeds this.

6

Decision: |t| = 3.24 > 2.001 → Reject H₀. Approximate p ≈ .002. Effect size: Cohen's d = 7.4 / 8.86 = 0.835 (large effect). See the Cohen's d guide.

✅ Conclusion: Method B produced significantly higher scores than Method A, t(58) = −3.24, p = .002, d = 0.84. The difference of 7.4 points represents a large practical effect.

APA Reporting Template — Independent Samples T-Test An independent samples t-test was conducted to compare exam scores across two teaching methods. Scores were significantly higher for Method B (M = 81.60, SD = 8.70) than for Method A (M = 74.20, SD = 9.10), t(58) = −3.24, p = .002, d = 0.84, 95% CI [−11.97, −2.83].

Example 3 — Spotting the Wrong Test Choice

Concept Check — Identifying the Correct Test

Which test is appropriate? Evaluate each research question below.

A

Question: "Is there a relationship between diet type (vegetarian/omnivore) and whether participants developed cardiovascular disease (yes/no) over 10 years?"
Answer: Chi-Square test of independence. Both variables are categorical — diet type and disease outcome are counts, not measurements.

B

Question: "Do vegetarians have a lower average BMI than omnivores?"
Answer: Independent samples T-test. BMI is a continuous measurement, and we are comparing two group means.

C

Question: "Did participants' blood pressure decrease after completing a mindfulness program?" (Same 40 participants measured before and after.)
Answer: Paired samples T-test. Blood pressure is continuous, and the same individuals are measured twice — creating paired (not independent) data.

D

Question: "Does the distribution of political party affiliation in a local sample match the national distribution?"
Answer: Chi-Square goodness-of-fit test. We are comparing an observed categorical frequency distribution to an expected theoretical one — not comparing means.

Example 4 — Chi-Square vs T-Test in A/B Testing

Case Study: E-Commerce A/B Test

When do you use Chi-Square vs T-test for website testing?

An e-commerce company runs two versions of a product page. Version A is seen by 1,200 visitors; Version B by 1,200 visitors. Two outcomes are tracked: (1) whether each visitor made a purchase (yes/no) and (2) the average order value in dollars for those who purchased.

For conversion rate (did they buy or not?): This is categorical. Use a Chi-Square test of independence to determine whether Version B had a significantly different conversion rate. The contingency table has two rows (version A vs B) and two columns (purchased vs not purchased).

For average order value (dollars spent): This is continuous. Use an independent samples T-test to determine whether the mean order value differed between the two page versions.

The same A/B test can legitimately require both tests, applied to different outcomes. See the detailed discussion in how statistics powers A/B testing.

Knowing when not to use these two tests is as important as knowing when to use them.

Scenario Chi-Square Alternative T-Test Alternative
Expected cell frequency < 5 Fisher's Exact Test N/A
Paired categorical data (before/after) McNemar's Test Paired Samples T-Test
Non-normal data, two independent groups Chi-Square (already nonparametric) Mann-Whitney U Test
Non-normal data, paired groups McNemar's Test Wilcoxon Signed-Rank Test
Three or more groups, continuous outcome Chi-Square (categorical) One-Way ANOVA
Ordinal outcome variable Chi-Square (if treating as categories) Mann-Whitney U or Wilcoxon (safer)

Understanding the full family of parametric and nonparametric tests is covered in the hypothesis testing hub on Statistics Fundamentals.

Running Chi-Square and T-Tests in R, Python, and SPSS

Below is the syntax for both tests across the three most widely used statistical software packages.

R Syntax

R — Chi-Square Test
# Chi-Square Test of Independence
table_data <- table(df$gender, df$response)
result <- chisq.test(table_data)
print(result) # Returns χ², df, p-value

# Goodness-of-Fit
chisq.test(x = observed_counts, p = expected_proportions)
R — T-Tests
# One-sample T-test
t.test(df$score, mu = 70)

# Independent samples T-test
t.test(score ~ group, data = df, var.equal = TRUE)

# Paired T-test
t.test(df$before, df$after, paired = TRUE)

Python Syntax (SciPy)

Python — scipy.stats
from scipy import stats
import numpy as np

# Chi-Square Test of Independence
chi2, p, dof, expected = stats.chi2_contingency(contingency_table)

# Independent samples T-test
t_stat, p_val = stats.ttest_ind(group1, group2)

# Paired T-test
t_stat, p_val = stats.ttest_rel(before, after)

# One-sample T-test
t_stat, p_val = stats.ttest_1samp(data, popmean=70)

SPSS Steps

χ²

Chi-Square in SPSS

Analyze → Descriptive Statistics → Crosstabs. Move your two categorical variables to Row(s) and Column(s). Click Statistics → Check "Chi-square." Click Cells → Check "Expected" to verify assumption. Output reports Pearson Chi-Square, df, and asymptotic significance (p-value).

t

Independent Samples T-Test in SPSS

Analyze → Compare Means → Independent-Samples T Test. Move the continuous variable to "Test Variable(s)" and the grouping variable to "Grouping Variable." Define the two group values. The output includes Levene's test (for equal variances) and both equal-variance and Welch-corrected t-test results.

t

Paired T-Test in SPSS

Analyze → Compare Means → Paired-Samples T Test. Select both the pre-measurement and post-measurement variables and move them as a pair. Output includes mean difference, standard deviation of difference, t statistic, df, and p-value.

Real-World Applications by Field

🏥

Healthcare

Chi-Square: Is the proportion of patients who recover different between drug A and drug B? T-Test: Does drug A reduce systolic blood pressure more than drug B?

🎓

Education

Chi-Square: Is pass/fail rate different between schools in two districts? T-Test: Do students who receive tutoring score higher on average?

📊

Marketing

Chi-Square: Does email click-through rate differ by customer segment? T-Test: Does average cart value differ between customers who saw ad A vs ad B?

🧠

Psychology

Chi-Square: Is anxiety diagnosis more common in one demographic group? T-Test: Does a 6-week therapy program reduce average depression scores?

🏭

Manufacturing

Chi-Square: Is the defect rate different across three production lines? T-Test: Does Machine B produce parts with smaller average measurement error?

🌐

Social Science

Chi-Square: Is voting preference associated with education level? T-Test: Do urban and rural residents differ in average weekly hours worked?

Common Mistakes When Choosing Between These Tests

Mistake What Goes Wrong Correct Approach
Using a T-test for binary outcomes (0/1 coded) Treating yes=1, no=0 as continuous and computing a mean — the "mean" of a binary variable has no intuitive meaning Use Chi-Square for categorical outcomes. Use logistic regression if you need to control for covariates.
Using Chi-Square when expected counts are below 5 The χ² approximation breaks down; p-values become unreliable, usually anti-conservative Switch to Fisher's Exact Test, which gives exact p-values for small samples
Applying an independent T-test to paired data Ignoring the correlation between paired measurements reduces statistical power substantially Use a paired T-test (or Wilcoxon signed-rank test if normality fails)
Using T-test for three or more groups Running multiple T-tests inflates the Type I error rate (multiple comparisons problem) Use one-way ANOVA, then a post-hoc test (Tukey's HSD) for pairwise comparisons
Confusing statistical significance with practical importance A p-value alone tells you nothing about the size of an effect — only whether it is detectable Always report an effect size: Cohen's d for T-tests, Cramér's V or φ for Chi-Square
Ignoring the normality assumption for small samples The T-test with n < 30 and strongly skewed data yields inaccurate p-values Check normality with Shapiro-Wilk; if violated, use the Mann-Whitney U test

Interactive Test Selector

Answer two questions below to get an immediate test recommendation for your data.

Chi-Square vs T-Test Selector

Practice Problems: Choose the Correct Test

For each scenario, decide whether a Chi-Square test or T-test is appropriate — and which specific variant. Reveal the answer after you have made your choice.

Practice Problem 1

Scenario: A survey of 500 adults asks whether they voted in the last election (yes/no) and their age group (18–34, 35–54, 55+). The researcher wants to know whether voting participation differs across age groups.

Which test is appropriate and why?

✅ Chi-Square Test of Independence. Both variables are categorical — voting (yes/no) and age group (three categories). The outcome is counts, not measurements. df = (2−1)(3−1) = 2.
Practice Problem 2

Scenario: A pharmaceutical company tests whether a new sleep aid reduces average nightly sleep latency (minutes to fall asleep). Forty participants are measured before and after 4 weeks of treatment.

Which test is appropriate and why?

✅ Paired Samples T-Test. Sleep latency (minutes) is a continuous measurement. The same 40 participants are measured twice (before/after), creating paired data. A Chi-Square test would be inappropriate because the outcome is not categorical.
Practice Problem 3

Scenario: A quality control team inspects 300 items from three production lines and records whether each item passes or fails inspection. They want to know whether defect rates differ across lines.

Which test is appropriate and why?

✅ Chi-Square Test of Independence. Defect status (pass/fail) is categorical, and production line (three categories) is categorical. The data is frequencies in a contingency table. Note: first verify that all expected cell counts are ≥ 5 — with 300 items across 3 lines and 2 outcomes, this will likely be satisfied.
Practice Problem 4

Scenario: A social scientist wants to know whether average annual household income is higher in urban areas than rural areas. Data is collected from 45 urban and 42 rural households.

Which test is appropriate and why?

✅ Independent Samples T-Test (or Mann-Whitney U if income is strongly skewed, which is typical). Income is continuous. Two independent groups (urban vs. rural) are being compared on their means. First run a Shapiro-Wilk normality test — if income is severely right-skewed and n is modest, Mann-Whitney U is safer than the T-test.

Glossary of Key Terms

Chi-Square Statistic
χ² = Σ [(O − E)² / E]
A measure of how much observed categorical frequencies deviate from expected frequencies. Larger values indicate greater deviation from the null hypothesis.
T-Statistic
t = (x̄ − μ) / (s / √n)
A measure of how many standard errors the sample mean is from the null hypothesis value. Used with the t-distribution to find the p-value.
Categorical Variable
A variable that takes values in distinct groups or categories (e.g., yes/no, blood type, marital status). Used with Chi-Square tests.
Continuous Variable
A variable measured on a numeric scale where any value within a range is possible (e.g., height, temperature, reaction time). Used with T-tests.
Contingency Table
r × c table
A cross-tabulation table showing the frequency distribution of two or more categorical variables simultaneously. The input for a Chi-Square test of independence.
Expected Frequency
E = (row total × col total) / n
The count predicted under the null hypothesis for each cell of a contingency table. All expected values must be ≥ 5 for the Chi-Square approximation to be valid.
Degrees of Freedom
df
The number of independent values that can vary in a calculation. For Chi-Square: df = (r−1)(c−1). For independent T-test: df = n₁ + n₂ − 2.
p-value
P(data | H₀)
The probability of observing a test statistic as extreme as the one calculated, given that H₀ is true. A small p-value (below α) constitutes evidence against H₀.
Effect Size
d (T-test) · V (Chi-Square)
A standardized measure of the magnitude of an effect, independent of sample size. Cohen's d for T-tests; Cramér's V or phi for Chi-Square. Necessary for practical interpretation.
Null Hypothesis
H₀
The default assumption being tested — typically "no effect," "no association," or "no difference." The test collects evidence against H₀, not in favor of it.
Parametric Test
A test that makes assumptions about population parameters and distribution (e.g., normality). The T-test is parametric. When assumptions are violated, use a nonparametric alternative.
Nonparametric Test
A test that makes no assumption about the population distribution. The Chi-Square test, Mann-Whitney U, and Wilcoxon Signed-Rank test are all nonparametric.

Frequently Asked Questions

The Chi-Square test analyzes categorical data by comparing observed and expected frequencies, whereas the T-test compares the means of a continuous variable between groups. Use a Chi-Square test for counts or categories and a T-test for numerical measurements. The Chi-Square test is nonparametric, while the T-test is a parametric test that assumes approximate normality.
No. A T-test requires a continuous dependent variable because it compares group means. Categorical outcomes should instead be analyzed using methods such as the Chi-Square test, Fisher's Exact Test, or logistic regression, depending on the research question and sample size.
No. The Chi-Square test evaluates frequencies or counts rather than numerical measurements. If your objective is to compare group means, use a T-test for two groups or ANOVA for three or more groups instead of a Chi-Square test.
The appropriate test depends on the type of survey variable being analyzed. Use a Chi-Square test for categorical responses, such as multiple-choice questions, and a T-test for continuous scale scores. For ordinal Likert-scale items, nonparametric tests such as the Mann-Whitney U or Wilcoxon Signed-Rank Test are often preferred, although T-tests are commonly used for composite Likert scores.
When expected cell frequencies are too small, the Chi-Square approximation may be inaccurate. In these situations, Fisher's Exact Test is recommended because it calculates an exact p-value without relying on the chi-square distribution. This approach is particularly useful for small samples and 2 × 2 contingency tables.
Yes. A single dataset can contain both categorical and continuous outcome variables. For example, a clinical study may use a Chi-Square test to compare treatment success rates and a T-test to compare average blood pressure between the same treatment groups. Each test is applied to the variable that matches its assumptions.
The Mann-Whitney U test (also called the Wilcoxon Rank-Sum Test) is the nonparametric alternative to the independent samples T-test. For paired observations, the Wilcoxon Signed-Rank Test replaces the paired T-test. These tests compare ranked observations instead of means and do not require normally distributed data.

Summary: Chi-Square Test vs T-Test at a Glance

χ²
For Categorical Data
t
For Continuous Data
1900
Chi-Square Invented
1908
T-Test Invented

The choice between a Chi-Square test and a T-test comes down to one question about your data: are your observations counts in categories, or measured numbers? That single distinction separates these two tests more clearly than any other consideration. Assumptions, formulas, and software functions follow from there.

When your outcome is categorical and you want to know whether two variables are related, the Chi-Square test of independence is the right choice. When your outcome is continuous and you want to compare means between one or two groups, the T-test is appropriate. When either test's assumptions are violated, Fisher's Exact Test (for small expected cell counts) and the Mann-Whitney U test (for non-normal continuous data) are the standard alternatives.

Statistical decisions do not exist in isolation. For a complete reference on all common hypothesis tests, visit the hypothesis testing section and the statistical test selector on Statistics Fundamentals.

External references: American Statistical Association. (2016). Statement on statistical significance and p-values. The American Statistician, 70(2), 129–133. Available at amstat.org. · NIST Engineering Statistics Handbook: Chi-Square test and t-test.