Sub topic 4
Reading a p-value and making the decision
Assume you know the DMAIC cycle, basic descriptive statistics, and the difference between a sample and a population. This chapter focuses on how to interpret a p-value after you have chosen an appropriate hypothesis test.
Start with the hypotheses
A hypothesis test compares observed sample data with a baseline claim.
- The null hypothesis, written \(H_0\), describes no change, no difference, or no association.
- The alternative hypothesis, written \(H1\) or \(Ha\), describes the effect you want to investigate.
Suppose a process target is 50 seconds and the team suspects the average cycle time is higher:
- \(H_0: \mu = 50\) seconds
- \(H_a: \mu > 50\) seconds
Here, \(\mu\) is the true process mean. The direction of the alternative matters. A two-sided alternative, such as \(H_a: \mu \ne 50\), asks whether the mean differs in either direction.
What a p-value means
A p-value is the probability of observing results at least as extreme as the sample result, assuming that the null hypothesis is true.
A small p-value means the data would be unusual if \(H0\) were true. It gives evidence against \(H0\). It does not tell you the probability that \(H_0\) is true.
Choose the significance level, or alpha, before examining the result. Alpha is the maximum Type I error rate you are willing to accept. A Type I error means rejecting a true null hypothesis. Common choices are 0.05 or 0.01.
| Result | Decision at alpha = 0.05 | Meaning |
|---|---|---|
| p-value = 0.012 | Reject \(H_0\) | Evidence is strong enough to support \(H_a\) |
| p-value = 0.18 | Fail to reject \(H_0\) | Evidence is not strong enough to reject \(H_0\) |
“Fail to reject” does not prove that the null hypothesis is true. The sample may be too small, or the process variation may be too large to detect the effect.
Apply the decision rule
Use this sequence:
For a two-sided test of average cycle time, you might obtain a p-value of 0.012 with alpha = 0.05. Reject \(H_0\). Report that the sample provides statistically significant evidence that the mean differs from 50 seconds. Then report the estimated difference and its confidence interval. A p-value alone does not show how large or useful the difference is.
You can calculate a p-value with statistical software, but the software does not choose the hypotheses, alpha, or practical decision for you.
from scipy import stats
sample = [52, 49, 51, 53, 50, 54, 52, 51]
result = stats.ttest_1samp(sample, popmean=50)
alpha = 0.05
print("t =", result.statistic)
print("p =", result.pvalue)
if result.pvalue <= alpha:
print("Reject H0")
else:
print("Fail to reject H0")Report the finding responsibly
A useful project report includes:
- the null and alternative hypotheses
- the chosen alpha
- the test statistic and p-value
- the estimated effect and confidence interval
- whether the effect matters to the customer or process
Exercise
A test produces p = 0.08 using alpha = 0.05. What is the correct conclusion?
Show answer
Fail to reject the null hypothesis. The result does not provide enough evidence at alpha = 0.05, but it does not prove that the null hypothesis is true.