A p-value is a number between 0 and 1 that tells you how surprising your data would be if nothing special were going on. It is one of the most used and most misunderstood ideas in statistics. To understand what a p-value is, you first need two smaller ideas: the null hypothesis and the alternative hypothesis. This article builds them step by step, with examples and one fully solved problem.
Why We Test Ideas With Data
Suppose a coaching institute claims that its students score 60 marks on average in a mock test. You collect the scores of a few students and find an average of 64. Does this prove the claim is wrong? Not necessarily. Small groups of students vary from one group to another, so a gap of 4 marks could be just luck.
Statisticians need a fair way to decide whether such a gap is a real difference or only chance. This method is called hypothesis testing. A hypothesis is simply a statement that can be checked with data. The p-value is the tool that helps us judge the result.
A courtroom is a useful comparison. A person on trial is assumed innocent until the evidence shows otherwise. Hypothesis testing works in the same way: we assume that nothing unusual is happening, and we ask whether the evidence is strong enough to doubt that assumption.
What Is the Null Hypothesis?
The null hypothesis, written as H₀ (read as H-naught), is the starting assumption. It says that there is no effect, no difference or no change. It is the 'innocent until proven guilty' position. The word 'null' means 'nothing', which is why it describes a situation where nothing special is happening.
Discipline is not willpower or robot-like routine. Learn how the brain builds habits, why boredom appears, and how to keep a routine that keeps working.
·10 min read
In our mock test example, the null hypothesis is that the true average score of all the institute's students is 60. In symbols, this is H₀: μ = 60. Here μ (the Greek letter mu) stands for the population mean, the average of the whole group we care about, not just the few students we measured.
What Is the Alternative Hypothesis?
The alternative hypothesis, written as H₁ or Hₐ, is the competing statement. It says that there is an effect or a difference. It is what we start to believe if the evidence is strong enough to reject the null hypothesis.
For the same example, the alternative hypothesis is that the true average is not 60. In symbols, this is H₁: μ ≠ 60. Because it allows the average to be either higher or lower than 60, this is called a two-tailed test. If you only wanted to check whether the average is higher than 60, you would write H₁: μ > 60, which is a one-tailed test.
The two hypotheses are compared below.
Feature
Null hypothesis (H₀)
Alternative hypothesis (H₁)
What it says
No effect, no difference
There is an effect or a difference
Role in the test
The starting assumption
The claim we look for evidence of
Example
μ = 60
μ ≠ 60
Remember that the two hypotheses never overlap. Exactly one of them is true, and the test tells us which one the data supports better.
What Is a P-Value?
The p-value is the probability of getting a result at least as extreme as the one you observed, assuming the null hypothesis is true. Read that sentence slowly. It does not say how likely the null hypothesis is. It says how likely your data would be if the null hypothesis were true.
A small p-value means your data would be very unusual in a world where H₀ is true. That makes you doubt H₀. A large p-value means your data would not be surprising at all, so you have no reason to doubt H₀.
Suppose you suspect that a coin is unfair. The null hypothesis is that the coin is fair, so heads and tails are equally likely. You toss it 10 times and get 9 heads.
How surprising is that if the coin is fair? There are 1,024 equally likely outcomes in 10 tosses (2 multiplied by itself 10 times). Only 11 of them give 9 or more heads: 10 outcomes with exactly 9 heads and 1 outcome with 10 heads. So the probability is 11 out of 1,024, which is about 0.011, or roughly 1.1 per cent.
This number, 0.011, is the p-value for the one-tailed test 'the coin favours heads'. A fair coin would give such a result only about once in 93 tries, so your doubt about the coin is reasonable.
The Formula Behind the P-Value
There is no single formula for the p-value, because it depends on the test you use. Most tests follow the same two steps, though.
Convert your data into a single number called the test statistic. This number shows how far your result is from what H₀ predicts.
Find the probability of getting a test statistic that extreme or more, using the matching probability table or distribution.
For a test about an average when the population standard deviation is known, the test statistic is the z-score:
z = (x̄ − μ₀) / (σ / √n)
Here is what each symbol means:
x̄ (x-bar) is the sample mean, the average of the students you actually measured.
μ₀ is the average claimed by the null hypothesis.
σ (sigma) is the standard deviation, a measure of how spread out the scores usually are.
n is the number of students in your sample.
σ / √n is called the standard error. It shows how much a sample average typically differs from the true average just by chance.
The z-score therefore tells you how many standard errors your sample average is away from the claimed average. The p-value is then read from the standard normal distribution, the bell-shaped curve that describes z-scores when H₀ is true. For a two-tailed test, the p-value is the area in both tails of the curve beyond your z-score:
p-value = 2 × P(Z ≥ |z|)
A Fully Solved Example
Let us finish the mock test problem with some numbers.
Problem. An institute claims its students average 60 marks in a mock test. The standard deviation of scores is known to be 10. A random sample of 25 students has an average of 64. Test the claim at the 5 per cent level.
Step 1: State the hypotheses. H₀: μ = 60 and H₁: μ ≠ 60.
Step 2: Find the standard error. σ / √n = 10 / √25 = 10 / 5 = 2.
Step 3: Find the z-score. z = (64 − 60) / 2 = 2. The sample average is 2 standard errors above the claimed average.
Step 4: Find the p-value. From the standard normal table, the area beyond z = 2 in one tail is about 0.0228. Because the test is two-tailed, we double it: p ≈ 2 × 0.0228 = 0.0456.
So there is about a 4.6 per cent chance of seeing a gap this large, in either direction, if the true average really is 60.
Significance Level and the Decision Rule
How small must the p-value be before we doubt H₀? We decide this in advance by choosing a significance level, written as α (alpha). The most common choice is α = 0.05, a convention often traced to the British statistician and geneticist Ronald Fisher, who helped popularise p-values in the 1920s. Some fields use stricter values such as 0.01.
The decision rule is simple:
If the p-value is less than or equal to α, reject H₀. The result is called statistically significant.
If the p-value is greater than α, fail to reject H₀. The data do not give enough evidence against it.
In our example, 0.0456 is smaller than 0.05, so we reject H₀ at the 5 per cent level. But at α = 0.01, we would not reject it. This shows that the conclusion depends on the level you set, which is why α must be chosen before looking at the data.
Notice the careful wording 'fail to reject' rather than 'accept'. A court can find a person 'not guilty' without proving that the person is innocent. In the same way, a large p-value only says the evidence was not strong enough.
Common Mistakes About the P-Value
The American Statistical Association, the main professional body of statisticians in the United States, issued a formal statement in 2016 because p-values are so often misread. Keep these points in mind:
A p-value is not the probability that H₀ is true. In our example, p = 0.0456 does not mean there is a 4.56 per cent chance that the claim is correct.
A small p-value does not mean a large effect. With a very large sample, even a tiny and useless difference can give a small p-value.
A large p-value does not prove H₀. It only means the data were not surprising enough.
p = 0.05 is not a magic line. A p-value of 0.049 and one of 0.051 carry almost the same amount of evidence.
The whole idea fits in four lines. Start by assuming the null hypothesis. Collect data and convert it into a test statistic. Use that statistic to find the p-value, which shows how surprising the data would be under H₀. Finally, compare the p-value with α and decide whether to reject H₀.
Questions on hypothesis testing appear in exams with statistics or research aptitude sections, such as UGC NET Paper 1 and the statistics papers of the Indian Statistical Service examination conducted by the Union Public Service Commission. Always confirm the current syllabus on the official notification of the exam you are preparing for.
The best way to make this topic stick is to solve a few problems yourself. Try changing the sample size or the sample average in the example above and see how the z-score and p-value move. A few minutes of daily practice on questions like these will turn a confusing topic into a routine one.