Skip to content
Statistics

What is a p-value?

The probability, if the null hypothesis were true, of getting a result at least as extreme as the one observed. A small p-value means the data would be surprising if there were no effect; it is not the probability that the null hypothesis is true.

datasciencetrivia.com

Card 1 of 263. Answer: The probability, if the null hypothesis were true, of getting a result at least as extreme as the one observed. A small p-value means the data would be surprising if there were no effect; it is not the probability that the null hypothesis is true.

Created by santiviquez

About · Quizzes · Tools · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

A p-value is the probability, assuming the null hypothesis is true, of getting a result at least as extreme as the one you observed.

To get one, pick a test statistic, work out how it would be distributed if the null were true, and see how far into the tail your value falls. If the p-value is below the significance level α, chosen in advance and often 0.05, the result is called statistically significant and the null is rejected. A two-sided test counts extreme results in both directions; a one-sided test counts only the direction you predicted beforehand.

Example: a coin lands heads 60 times in 100 flips. If it is fair, the chance of 60 or more heads is about 2.8%, and of a result at least that far from 50 in either direction about 5.7%. The two-sided p-value is 0.057, so the result is not significant at 0.05, even though the coin may well be biased. Absence of significance is not evidence of fairness.

In an A/B test with 5,000 users per arm, a conversion rate of 11.5% against 10% gives z ≈ 2.42 and a two-sided p-value of about 0.015. That says a gap this large would be rare if the two versions really converted equally. It doesn't say the lift is exactly 1.5 points; the 95% confidence interval for the lift runs from about 0.3 to 2.7 points.

Interviewers probe the misreadings. A p-value is not the probability that the null is true or that the result is a fluke, and it says nothing about the size of the effect: with a million users, a 0.1% lift can have p < 0.001. And p = 0.04 and p = 0.06 are almost the same evidence, even though one crosses 0.05 and the other doesn't.

When the null is true, p-values are spread evenly between 0 and 1, so testing 20 independent hypotheses with no real effects gives one result below 0.05 on average. That is why running many tests, or trying analyses until one works (p-hacking), produces false discoveries, and why corrections such as Bonferroni or Benjamini-Hochberg exist.

A p-value of 0.05 is also weaker evidence than it sounds. Sellke, Bayarri and Berger showed in 2001 that, starting from even odds, p = 0.05 still leaves the null with a probability of at least about 29%. The American Statistical Association's 2016 statement warns against basing conclusions on whether p crosses 0.05 alone, so report the effect size and a confidence interval with it.

Interview follow-ups: how you would explain p = 0.03 to a product manager (if there were truly no difference, a gap this big would show up about 3% of the time), why a non-significant result isn't proof of no effect (the test may lack statistical power), and what changes when you peek at a running A/B test and stop as soon as p < 0.05 (the false positive rate climbs well above 5%).

Try it with your own numbers: P-value calculator, Z-score calculator, Binomial distribution calculator, T-test calculator

All questions