SigmaForge
Article · Statistics

Choosing the right hypothesis test

A practical guide to picking a hypothesis test from the type of data and the question: t-tests, ANOVA, proportion tests, chi-square, correlation and regression.

All articles

By SigmaForge · · 3 min read

Most hypothesis testing mistakes are made before any calculation: the wrong test was chosen for the data. The good news is that the choice follows from two questions. What kind of data is the output, and what are you comparing? Answer those and the list of candidate tests becomes short.

Step 1: what type is the output (Y)?

  • Continuous: measured on a scale, such as time, weight, temperature, length or cost.
  • Attribute or discrete: counted or categorized, such as pass or fail, defective or not, or a category like supplier A, B or C.

Where you can, collect continuous data. A measurement carries more information than a pass or fail result, so you need fewer samples to detect the same change.

Step 2: what are you comparing?

QuestionOutput typeTypical test
Is one group’s mean different from a target?ContinuousOne-sample t-test
Are two independent groups’ means different?ContinuousTwo-sample t-test
Did the same items change, before and after?ContinuousPaired t-test
Are three or more groups’ means different?ContinuousOne-way ANOVA
Are two groups’ variances different?ContinuousF-test, or Levene’s test
Is a proportion different from a target?AttributeOne-proportion test
Are two proportions different?AttributeTwo-proportion test
Are two categorical variables related?AttributeChi-square test of independence
Does Y change as a continuous X changes?ContinuousCorrelation and regression

Step 3: check the assumptions

Each test rests on assumptions. Check them before trusting the p-value.

  • Independence: each observation should not influence the next. Data collected in time order may need a check for trends or autocorrelation.
  • Normality: t-tests and ANOVA assume the data, or the differences for a paired test, are roughly normal. With moderate sample sizes they are fairly tolerant of mild departures. A normal probability plot is a quick check.
  • Equal variances: the classic two-sample t-test and ANOVA assume similar spread in each group. If spreads differ, use Welch’s version of the t-test or ANOVA.
  • Expected counts: chi-square tests need enough observations in each cell. A common guideline is an expected count of at least 5 in each cell.

When normality clearly fails and a transformation does not help, non-parametric tests such as Mann-Whitney (two groups) or Kruskal-Wallis (three or more) compare medians instead of means.

Step 4: state the hypotheses and the risk

The null hypothesis (H0) is the "no difference" position. The alternative (Ha) is what you are trying to show. Choose a significance level, usually 0.05, before looking at the result. If the p-value is below it, you reject H0. If it is above, you have not shown a difference, which is not the same as proving there is none.

Three short examples

Two shifts, one cycle time

A team suspects night shift takes longer to complete an assembly. Cycle time is continuous, and the two shifts are independent groups of operators. That points to a two-sample t-test, after checking each group for normality and comparing their spreads.

A new training method

The same twelve operators are timed before and after new training. Each operator provides a pair of measurements, so the right test is a paired t-test on the differences. Treating the two sets as independent would throw away the pairing and make a real improvement harder to detect.

Defects by supplier

Incoming lots are classed as accepted or rejected, for three suppliers. Both variables are categorical, so a chi-square test of independence asks whether rejection rate depends on supplier.

Statistical versus practical significance

With very large samples, tiny differences become statistically significant. With small samples, important differences can be missed. Always report the size of the difference and a confidence interval alongside the p-value, and ask whether the difference is large enough to matter to the customer or the business.

Put it into practice

Start with the free White Belt.

Learn the language of improvement and earn a certificate anyone can check at sigmaforge.ai/verify.