Statistics · easy

Explain p-value in plain language.

Asked in Data Scientist interviews, in the Statistics round.

Short answer

Probability of observing data as extreme as this, assuming the null hypothesis is true.

How to answer it

Start with the sentence, then the thing it is not.

The p-value is the probability of seeing a result at least this extreme if there were really no effect. Small p means "this would be surprising under no effect"; that is all it means.

Three things it is not, because the interviewer is listening for at least one of them:

A worked line helps: "We ran the new checkout for 50,000 users each side. Conversion was 3.2% vs 3.0%, p = 0.01. If the two pages really converted the same, we would see a gap this big about 1 time in 100. So we are fairly confident the gap is real; whether 0.2 points is worth shipping is a separate question."

from scipy import stats
# two-proportion z-test, the usual A/B shape
count = [1600, 1500]; nobs = [50_000, 50_000]
from statsmodels.stats.proportion import proportions_ztest
z, p = proportions_ztest(count, nobs)

Related questions

Practice this for real