Skip to content
Statculator

Topic

Types of Statistical Tests: Which Test to Use and When

What a statistical test does, the four main types and their nonparametric alternatives, a table that matches each test to your data, and one test run from start to finish.

By Hira Noor, BS Mathematics · Updated · 11 min read

Definition

A statistical test uses sample data to decide between two hypotheses about a population: the null hypothesis (no effect or no difference) and the alternative. The main types of statistical tests are comparison tests (t-tests, ANOVA and their nonparametric versions), correlation tests (Pearson, Spearman), regression tests (linear and logistic), and tests of categorical data (chi-square, Fisher’s exact). Each type is either parametric, assuming a distribution such as the normal, or nonparametric, working on ranks or counts.

Key takeaways

  • Every statistical test turns your data into a test statistic (t, F, χ², r or z) and a p-value, then compares the p-value with a significance level such as 0.05.
  • Comparison tests ask whether groups differ, correlation tests ask whether two variables move together, regression tests ask whether one variable predicts another, and chi-square tests ask whether categories are related.
  • Parametric tests (t-test, ANOVA, Pearson r) assume roughly normal data; each has a nonparametric alternative (Mann-Whitney U, Kruskal-Wallis, Spearman) for skewed data, ranks or small samples.
  • The right test depends on three things: your goal, the type of your outcome variable, and how many groups you have and whether they are paired.
  • A t-test is a special case of ANOVA: with two groups, one-way ANOVA gives F = t² and the same p-value.
  • A p-value says how surprising the data are under H₀. Report it with an effect size, because a significant result can still be a tiny effect.
On this page
  1. What is a statistical test?
  2. The main types of statistical tests
  3. Parametric vs nonparametric tests
  4. Statistical tests at a glance
  5. How to choose the right statistical test
  6. Worked example: choosing and running a test
  7. Is a t-test an ANOVA?
  8. One-tailed vs two-tailed tests
  9. How to interpret and report a statistical test
  10. Common mistakes with statistical tests
  11. Statistical tests guides
  12. FAQ

What is a statistical test?

A statistical test (also called a hypothesis test or significance test) is a formal way to decide whether a pattern in a sample is strong enough to say it exists in the population, or whether chance alone could easily explain it. You start with a null hypothesis (H₀), which says there is no effect: two means are equal, two variables are unrelated, a proportion equals some value. The alternative hypothesis (H₁) says there is an effect.

The test then summarizes how far your data sit from what H₀ predicts in one number, the test statistic, and converts it to a p-value: the probability of a result at least this extreme if H₀ were true. If the p-value is at or below your significance level α (usually 0.05), you reject H₀. What Is a P-Value? Meaning, Calculation and Common Mistakes explains what that number does and does not mean.

  1. 1. State H₀ and H₁For example, H₀: μ₁ = μ₂ and H₁: μ₁ ≠ μ₂.
  2. 2. Choose α and the testUsually α = 0.05; the test follows from your data type and design.
  3. 3. Compute the statistict, F, χ², r or z from your sample.
  4. 4. Get the p-valueOr compare the statistic with a critical value.
  5. 5. Decide and reportReject H₀ if p ≤ α; add an effect size.
The five steps are the same for every statistical test. Only the test statistic and its distribution change.

Statistical tests belong to inferential statistics: they use a sample to say something about a population. Summaries of the sample itself, such as a mean or a standard deviation, are descriptive. Descriptive vs Inferential Statistics: Differences and Examples covers the difference.

The main types of statistical tests

Textbooks group statistical tests by the question they answer. Four families cover almost every test you will meet in an introductory or applied course, and a fifth group checks the assumptions the others rely on.

Types of statistical tests by the question they answer
TypeQuestion it answersCommon tests
Comparison of meansDo groups differ on a numeric outcome?t-tests, z-test, ANOVA; Mann-Whitney U, Wilcoxon, Kruskal-Wallis
CorrelationDo two numeric variables move together?Pearson’s r test, Spearman’s rank correlation
RegressionDoes one or more variables predict an outcome?Simple and multiple linear regression, logistic regression
Categorical (frequency)Are categories related, or do counts match expectations?Chi-square test of independence, chi-square goodness of fit, Fisher’s exact test, proportion z-tests
Assumption checksAre the data normal? Are variances equal?Shapiro-Wilk, Kolmogorov-Smirnov, Levene’s test, F-test for variances
The four main types of statistical tests: comparison (t-test and ANOVA, or Mann-Whitney U and Kruskal-Wallis), correlation (Pearson’s r or Spearman’s ρ), regression (linear for a numeric outcome, logistic for a binary one) and categorical (chi-square and z-tests, or Fisher’s exact test for small samples)
The four main families of statistical tests and the usual choice within each: parametric or nonparametric for comparison and correlation, by outcome type for regression, and by sample size for categorical data.

1. Comparison tests

Comparison tests check whether the mean (or median) of a numeric outcome differs between groups, or from a known value. Which one you use depends on how many groups you have and whether the measurements are independent or paired.

Comparison tests and when to use each
TestUse it whenCalculator
One-sample t-testOne group’s mean against a known or target valueOne-sample t-test
Independent samples t-testTwo separate groups, roughly equal variancesIndependent t-test
Welch’s t-testTwo separate groups, unequal variances or sizesWelch’s t-test
Paired t-testThe same subjects measured twice (before and after, matched pairs)Paired t-test
z-testMeans with a known population SD, or large samplesz-test
One-way ANOVAThree or more independent groups, one factorANOVA
Two-way ANOVATwo factors at once, plus their interactionTwo-way ANOVA guide

The step-by-step guides cover each one with a worked example: One-Sample t-Test: Formula, Assumptions and Worked Example, Independent Samples t-Test: Formula, Assumptions and Worked Example, Paired t-Test: Formula, Assumptions and Worked Example and One-Way ANOVA: Definition, Formulas and a Worked Example by Hand.

2. Correlation tests

A correlation test asks whether the relationship between two numeric variables in your sample is strong enough to say it exists in the population (H₀: ρ = 0). Pearson’s r measures straight-line association and assumes both variables are roughly normal. Spearman’s rank correlation works on ranks, so it handles skewed data, outliers and ordinal scales, and detects any monotonic trend. Use the Pearson’s Correlation Test Calculator or the Spearman Correlation Calculator.

3. Regression tests

Regression goes one step past correlation: it models how an outcome changes as a predictor changes, and tests whether each slope differs from zero. Simple linear regression has one numeric predictor, multiple linear regression has several, and logistic regression is used when the outcome is binary (yes or no, pass or fail). Try the Linear Regression Calculator, Multiple Linear Regression Calculator or Logistic Regression Calculator.

4. Tests for categorical data

When the outcome is a category rather than a number, you test counts or proportions. The chi-square test of independence checks whether two categorical variables are related, using a contingency table. The chi-square goodness-of-fit test checks whether one variable’s counts match an expected distribution. Fisher’s exact test replaces the chi-square test for small 2 × 2 tables (expected counts under 5). The one- and two-proportion z-tests compare a single proportion with a target, or two proportions with each other. See the Chi-Square Test of Independence Calculator, Chi-Square Goodness of Fit Calculator, Fisher’s Exact Test Calculator and Two Proportion Z-Test Calculator.

5. Tests that check assumptions

Some tests are run before the main analysis to check whether its assumptions hold. The Shapiro-Wilk test and Kolmogorov-Smirnov test check normality; Levene’s test and the F-test for two variances check whether groups have equal spread. A significant result here is a warning sign, not a finding: it points you to Welch’s t-test or a nonparametric test instead.

Parametric vs nonparametric tests

Parametric tests assume the data (or the sampling distribution of the mean) follow a known distribution, usually the normal, and test parameters such as the mean. Nonparametric tests make fewer assumptions: most of them rank the data and compare ranks or medians. Parametric tests are more powerful when their assumptions hold. Nonparametric tests are safer for small samples, clear skew, outliers or ordinal data such as Likert ratings.

Common parametric tests and their nonparametric alternatives
SituationParametric testNonparametric alternative
One group against a valueOne-sample t-testWilcoxon signed-rank test (one-sample)
Two independent groupsIndependent samples t-testMann-Whitney U test (Wilcoxon rank-sum)
Two paired measurementsPaired t-testWilcoxon signed-rank test
Three or more independent groupsOne-way ANOVAKruskal-Wallis H test
Three or more repeated measurementsRepeated measures ANOVAFriedman test
Association of two numeric variablesPearson’s rSpearman’s ρ or Kendall’s τ

Statistical tests at a glance

This table lists the tests by the kind of data they need. Find the row that matches your outcome and predictor, then open the calculator to run the test with every step shown.

Which statistical test fits which data
Outcome variablePredictor or groupsTestExample question
NumericNone (one sample vs a value)One-sample t-testIs the mean fill weight 500 g?
Numeric2 independent groupsIndependent t-test or Mann-Whitney UDo two teaching methods give different scores?
Numeric2 paired measurementsPaired t-test or Wilcoxon signed-rankDid blood pressure fall after treatment?
Numeric3+ independent groupsOne-way ANOVA or Kruskal-WallisDo three fertilizers give different yields?
NumericNumericPearson’s r, linear regressionDoes study time predict exam score?
BinaryNumeric or several predictorsLogistic regressionDoes age predict whether a customer renews?
CategoricalCategoricalChi-square test or Fisher’s exactIs smoking status related to region?
CategoricalNone (counts vs expected)Goodness of fitIs a die fair?
Proportion1 or 2 groupsOne-proportion or two-proportion z-testDo two ad versions have different click rates?
Variance2 or more groupsF-test, Levene’s testIs one machine more variable than another?

How to choose the right statistical test

You can narrow the list to one test with three questions, asked in this order:

  1. What is your goal? Compare groups, measure a relationship, predict an outcome, or check whether counts match an expectation.
  2. What type is your outcome variable? Numeric (continuous), categorical (nominal), ordinal (ranked), or binary.
  3. How many groups, and are they independent or paired? One sample, two groups, or three or more; separate people or the same people measured twice.

Then check the assumptions (normality, equal variances, independence) and switch to Welch’s or a nonparametric test if they fail. How to Choose the Right Statistical Test walks through each decision with an interactive chooser and a 23-row decision table.

Try it: T-Test CalculatorNot sure which t-test you need? This calculator runs the one-sample, two-sample and paired versions from the same screen.

Worked example: choosing and running a test

Here is the whole process on one small dataset, from picking the test to reporting the result. Every number can be checked in the Independent Samples t-Test Calculator.

Exam scores under two teaching methods

Problem. Five students taught with method A score 72, 75, 78, 80 and 85. Five different students taught with method B score 80, 83, 86, 88 and 93. Do the two methods give different mean scores at α = 0.05?

  1. 01Choose the test. Goal: compare groups. Outcome: numeric (score). Design: two independent groups. That points to the independent samples t-test, with Mann-Whitney U as the fallback if the data look far from normal.
  2. 02Hypotheses. H₀: μ_A = μ_B. H₁: μ_A ≠ μ_B (two-tailed).
  3. 03Describe each group. Method A: mean 78, SD 4.95. Method B: mean 86, SD 4.95. The SDs are equal, so the pooled (Student) version fits.
  4. 04Pooled SD and standard error. s_p = √[(4 × 24.5 + 4 × 24.5) / 8] = 4.95. SE = s_p × √(1/5 + 1/5) = 4.95 × 0.632 = 3.13.
  5. 05Test statistic. t = (86 − 78) / 3.13 = 2.56, with df = 5 + 5 − 2 = 8.
  6. 06p-value. For t = 2.56 with 8 df, the two-tailed p = 0.034. The critical value is t* = 2.306, and 2.56 is beyond it.
  7. 07Effect size. Cohen’s d = 8 / 4.95 = 1.62, a large effect.

Answer. p = 0.034 is below 0.05, so reject H₀. Method B students scored 8 points higher on average, t(8) = 2.56, p = 0.034, d = 1.62. With only five students per group, the estimate is imprecise, so a larger study should confirm it.

Try it: Independent Samples t-Test CalculatorEnter the two groups of scores to get t, df, the p-value, the confidence interval for the difference and Cohen’s d, with every step.

Is a t-test an ANOVA?

Not by name, but mathematically a two-group t-test is a special case of one-way ANOVA. Run a one-way ANOVA on the two groups in the worked example and you get F = 6.53, which is exactly t² = 2.56², with the same p-value of 0.034. The difference is reach: a t-test compares only two means, while ANOVA compares any number of groups in one test.

That is why you should not run several t-tests on three or more groups. Each test carries a 5% chance of a false positive, so three pairwise tests push the overall chance of at least one Type I error to about 14%. ANOVA tests all groups at once at α = 0.05, and a post-hoc test such as Tukey’s HSD then shows which pairs differ. Type I vs Type II Errors (Type 1 vs Type 2): Definitions and Examples explains the two kinds of error, and One-Way vs Two-Way ANOVA: Differences and When to Use Each compares the two ANOVA designs.

One-tailed vs two-tailed tests

A two-tailed test asks whether there is a difference in either direction (H₁: μ₁ ≠ μ₂). A one-tailed test asks about one direction only (H₁: μ₁ > μ₂). A one-tailed test has more power in its chosen direction, but you must pick it before you see the data, and it cannot detect an effect the other way. Two-tailed tests are the default in most journals. A one-tailed p-value is half the two-tailed one when the effect points the predicted way, which is why switching after the fact is a common form of p-hacking.

How to interpret and report a statistical test

The decision rule is the same for every type of test: compare the p-value with the significance level you chose before the analysis.

  • p ≤ α: reject H₀. The data are unlikely under “no effect”. This does not prove H₁ or show that the effect is large.
  • p > α: fail to reject H₀. You did not find evidence of an effect; that is not the same as showing there is none, especially with a small sample.
  • Always add an effect size (Cohen’s d, η², r, an odds ratio) and, where possible, a confidence interval. The Effect Size Calculator computes the common ones.
  • Report the statistic, df and exact p, for example t(8) = 2.56, p = 0.034, rather than just “p < 0.05”. The P-Value Calculator turns any z, t, χ² or F into an exact p-value.

Common mistakes with statistical tests

  • Using an independent test on paired data. Before-and-after measurements on the same people need a paired test; an independent t-test throws away the pairing and loses power.
  • Running many t-tests instead of ANOVA. Multiple comparisons inflate the false-positive rate.
  • Treating “not significant” as “no difference”. A small sample can miss a real effect (a Type II error).
  • Ignoring assumptions. A t-test on heavily skewed data from 6 people, or a chi-square test with expected counts under 5, can give a misleading p-value.
  • Confusing the standard deviation with the standard error. SD describes spread in the data; SE describes the precision of the mean. Tests use the SE.
  • Choosing the test after seeing the results. Pick the test, the tails and α before the analysis.

Statistical tests guides

Each guide takes one part of statistical tests further, with formulas and worked examples.

Frequently asked questions

What are the main types of statistical tests?

The main types are comparison tests (t-tests, z-tests, ANOVA and their nonparametric versions such as Mann-Whitney U and Kruskal-Wallis), correlation tests (Pearson and Spearman), regression tests (linear and logistic regression), and tests for categorical data (chi-square and Fisher’s exact). Normality and equal-variance tests, such as Shapiro-Wilk and Levene’s test, are used to check assumptions.

What does a statistical test do?

A statistical test checks whether a pattern in sample data, such as a difference between group means or a correlation, is larger than chance alone would easily produce. It turns the data into a test statistic and a p-value. If the p-value is at or below the significance level (often 0.05), you reject the null hypothesis of no effect.

Is a t-test an ANOVA?

A two-group t-test is a special case of one-way ANOVA. With two groups, ANOVA gives an F statistic equal to t squared and exactly the same p-value. The difference is that a t-test handles only two groups, while ANOVA can compare three or more in a single test without inflating the Type I error rate.

What is the difference between parametric and nonparametric tests?

Parametric tests, such as the t-test, ANOVA and Pearson correlation, assume the data follow a distribution (usually normal) and test parameters like the mean. Nonparametric tests, such as Mann-Whitney U, Kruskal-Wallis and Spearman correlation, use ranks and make fewer assumptions. Parametric tests are more powerful when their assumptions hold; nonparametric tests are safer for small, skewed or ordinal data.

When should you use SD vs SEM?

Use the standard deviation (SD) to describe how spread out individual values are in your sample. Use the standard error of the mean (SEM = SD / √n) to describe how precisely the sample mean estimates the population mean, for example in confidence intervals and error bars for means. Statistical tests such as the t-test are built on the standard error.

What are the 5 basic statistics?

The phrase usually refers to the five-number summary: the minimum, first quartile (Q1), median, third quartile (Q3) and maximum, which a box plot draws. Some courses use it for five common summaries instead: the mean, median, mode, range and standard deviation. Both are descriptive statistics, which you calculate before running a statistical test.

What is the most common statistical test?

There is no single most common test, but a handful cover most introductory and applied work: the t-test for comparing two means, ANOVA for three or more groups, the chi-square test for categorical data, and Pearson correlation and linear regression for relationships between numeric variables. Most of them are shown with worked examples in the guides on this page.

Further reading

Cite this page

Statculator. (2026, November 14). Types of Statistical Tests: Which Test to Use and When. Retrieved November 14, 2026, from https://statculator.com/learn/topics/statistical-tests/