Statistics · medium

What is the difference between parametric and non-parametric tests, and when do you choose each?

Asked in Data Analyst interviews, in the Statistics round.

Short answer

Parametric tests assume a distribution for the data or its errors, like the t-test assuming roughly normal means. Non-parametric tests like Mann Whitney or a permutation test work on ranks or resampling. Choose non-parametric for small skewed samples, ordinal data or heavy outliers.

ParametricNon-parametric
AssumesA distribution, usually normalVery little about shape
ExamplesT-test, ANOVA, PearsonMann-Whitney, Wilcoxon, Kruskal-Wallis, Spearman
TestsMeansRanks or medians
Power when assumptions holdHigherLower
With outliers or skewMisleadingRobust
Choose it whenThe data is roughly normal or n is largeSmall n, heavy skew, ordinal data
Parametric tests assume a shape and are stronger when the assumption holds.

How to answer it

Definition

Parametric tests assume the data follows a distribution with parameters, usually normal, and test statements about those parameters. Non-parametric tests assume very little about shape and generally work on ranks. The table above compares them.

Example

Comparing two groups' revenue

Parametric      Welch's t-test on the means
                needs the sample MEANS to be roughly normal, which the CLT
                usually delivers at a decent n

Non-parametric  Mann-Whitney U on the ranks
                needs almost nothing about shape
                tests whether one group tends to exceed the other

The tradeoff

When the assumptions hold, the parametric test has more power: it uses the actual values rather than only their order, so it needs a smaller sample for the same detection ability. When the assumptions fail, that extra power is illusory and the p-value is not trustworthy.

They answer different questions

This is the subtlety worth raising. A t-test compares means. Mann-Whitney asks whether a randomly chosen value from one group tends to exceed one from the other. With symmetric distributions those nearly coincide; with badly skewed ones they can disagree, and the mean may not even be the quantity you care about.

Key points

FAQ

The 30-second answer

Parametric tests assume the data comes from a particular distribution, usually normal, and test its parameters. Non-parametric tests make almost no assumption about shape and generally work on ranks.
The tradeoff is power. When the assumption holds the parametric test needs less data for the same sensitivity, because it uses the values rather than just their order. When it fails, that power is illusory.
I choose based on sample size and shape. At a large n the central limit theorem usually rescues a t-test even on skewed data. With a small sample, heavy skew or ordinal data I would use Mann-Whitney or a bootstrap. And I would note that they answer different questions, so if they disagree that tells me something about the distribution rather than one being wrong.

In the interview

Practice this for real