5.5 Hypothesis Testing: Logic and Setup
Hypothesis testing uses a random sample to assess a claim about a population parameter. Decisions based on sample data often affect the whole population, so the question is whether the observed evidence is strong enough to support a claim about the population mean, proportion, or variance.
Every test compares two competing statements:
- Null hypothesis (): the tentative or status quo statement.
- Alternative hypothesis (): the specific claim the test seeks evidence for.
The test has two possible decisions: reject or do not reject . Failure to reject is not proof that is true; the sample may simply be inconclusive. A legal analogy captures the logic: innocence is the null, guilt is the alternative, and insufficient evidence to prove guilt does not prove innocence.
To set up a test, ask who is making the claim and exactly what they want to establish about the population parameter. Put that claim in ; put its opposite in . By convention, equality belongs in the null hypothesis.
| Claim in | Null hypothesis | Test |
|---|---|---|
| Lower tail | ||
| Upper tail | ||
| Two tail |
Here stands for the parameter being tested, such as , , or .
Setting up a claim in context
- Underfilling lentil packets: Consumer Affairs investigates whether the population mean weight of packets labeled 500 g is below 500 g: , . The test concerns all such packets, not only the sample. If the null is not rejected, underfilling has not been established; the packets have not been proved to contain at least 500 g.
- Service response time: The service-centre manager asks whether mean response time exceeds 48 hours: , . Rejecting the null would support corrective action; not rejecting it does not prove the mean is at most 48 hours.
- Petrol dispensing: The station owner needs to detect dispensing either more or less than the requested 30 litres: , . A two-sided claim fits because either direction matters.
Key takeaways
- A test evaluates a population claim from limited sample evidence.
- Put the decision maker's specific claim in ; equality goes in .
- “Do not reject” means insufficient evidence against , not proof of it.
- The direction of determines whether the test is lower-tail, upper-tail, or two-tail.
5.6 Errors in Hypothesis Testing
Because a test uses a random sample, its decision can be wrong. The two errors depend on the true state of the population and the decision made:
| Reality | Reject | Do not reject |
|---|---|---|
| true | Type I error | Correct decision |
| true | Correct decision | Type II error |
A Type I error wrongly rejects a true null. A Type II error does not reject the null even though the alternative is true. In the service-time example, Type I means concluding the mean exceeds 48 hours when it is 48 or less; Type II means failing to identify that the mean exceeds 48 hours.
The significance level is the chosen maximum probability of Type I error at the boundary case where is true at equality. Common choices mentioned are 0.05 and 0.10. The test conductor chooses ; smaller values are preferred when a Type I error is costly. Controlling Type I error alone does not control Type II error, so the two error risks must be balanced.
Key takeaways
- Type I: reject a true ; Type II: do not reject a false .
- controls the Type I error probability at the null boundary.
- A smaller is appropriate when a false alarm has high cost.
- Reducing Type I risk does not automatically reduce Type II risk.
5.7 Hypothesis Tests for a Population Mean
Five-step testing process
- State and from the claim and context.
- Choose significance level .
- Assume is true at equality and calculate the test statistic.
- Use either the p-value approach or the critical-value approach to decide. Both should give the same decision.
- Explain what the decision means for the manager or decision maker.
The p-value is the probability, assuming the null boundary is true, of observing a test statistic at least as extreme in the direction specified by . Reject when ; otherwise do not reject it.
For a mean with unknown population standard deviation and a sufficiently large sample, the lecture uses the statistic
where is the sample mean, the sample standard deviation, and the null-boundary value. If population is known, use
and the standard normal distribution. The lecture invokes the approximate normality of for the examples with sample sizes above 30.
| Alternative | p-value from test statistic |
|---|---|
| Double the tail probability beyond $ |
Worked mean examples
Lentil packets. The sample has , g, and the stated sample standard deviation is 7 g; the null boundary is g. The test is lower-tail, , , with . The transcript's calculation instead uses g:
It reports . Since , its reported decision is to reject and conclude that the evidence supports a population mean below 500 g. The transcript has an unresolved mismatch: the sample summary says g, but the worked arithmetic uses g. The numerical p-value and decision above are the transcript's reported calculation.
Service response times. With , hours and null boundary , the test is upper-tail: , , .
For hours:
The transcript reports . Since , reject : the evidence supports a population mean response time above 48 hours.
For the revised sample mean hours, keeping and :
Since , do not reject ; the evidence is insufficient to claim a population mean above 48 hours.
Petrol dispensing. With , litres, litres and , test against at :
For a two-tail test, double the upper-tail probability beyond (equivalently, double the lower-tail probability below ). The transcript reports the p-value as 0.00. Since it is below 0.05, reject : the evidence supports a mean dispensed amount different from 30 litres, so recalibration is warranted.
Key takeaways
- Use a statistic with degrees of freedom when is unknown; use when is known.
- Compute the p-value from the alternative's direction, then compare it with .
- The decision needs a practical interpretation in the original context and units.
- The packet example's stated and worked conflict; preserve that uncertainty when using its reported result.
5.8 Hypothesis Tests for a Population Proportion
For a population proportion , the null and alternative take the same lower-tail, upper-tail, and two-tail forms. Let be the hypothesized boundary and the sample proportion. Under the null boundary, the lecture uses
The statistic is approximately standard normal when both and are at least 5. The p-value follows the same tail logic as for a mean; reject when it is at most .
Coupon redemption: upper tail
Anil tests whether more than 10% of coupon recipients redeem a coupon. In a sample of 80, 12 redeem:
At , the null-based standard error and test statistic are
The upper-tail p-value is reported as . Because , do not reject . A 15% sample redemption rate is not enough evidence to claim the population rate exceeds 10%; the lecture points to the relatively large standard error.
Sleeper arrangements: lower tail
Pushpa tests whether fewer than half of long-distance travellers consider sleeper arrangements inadequate. Of 510 respondents, 280 say adequate, so success for the stated claim means inadequate: respondents.
At :
The lower-tail p-value is reported as . Since , reject : evidence supports that fewer than 50% find the arrangements inadequate.
Hotel bookings: two tails
Sangeetha tests Dinesh's claim that 90% of hotels are booked. Of 70 hotels, 12 have vacancies and 58 are booked:
At :
The transcript reports the two-tail p-value as . Since , reject : evidence refutes the 90% claim and indicates the population proportion is lower than 90% in this sample context.
Key takeaways
- Define “success” to match the claim before computing .
- Use the null proportion in the standard error, not .
- Check that and are at least 5 for the stated normal approximation.
- Match the p-value tail(s) to and compare with .
5.9 Hypothesis Tests for Population Variance
For a random sample from a normal population, the variance test uses a chi-square statistic. Let be the hypothesized variance:
The alternatives are (lower tail), (upper tail), or (two tail); equality remains in . Compute the p-value from the appropriate chi-square tail(s), and reject when . The normal-population condition is required for this sampling distribution.
Bus arrival variability
Rakesh wants variance of arrival times at 4 or less. With , , and , the stated claim corresponds to , :
The transcript labels this an upper-tail test, reports , and concludes there is insufficient evidence to claim the variance is more than 4. Those statements conflict with the stated alternative : that alternative calls for a lower-tail p-value and a conclusion about variance below 4. The transcript does not resolve this mismatch, so its reported p-value should not be used as the valid p-value for the stated claim.
Exam-score variability
Ram tests whether the new exam variance differs from the historical value 100. With , , , , and :
For the two-tail test, the transcript reports twice the upper-tail probability as . Since , reject : the evidence supports a variance different from the historical value.
Key takeaways
- The chi-square variance test assumes a normal population.
- Use in the statistic and degrees of freedom.
- Tail direction comes from the alternative, including for variance claims.
- The bus-arrival example's stated alternative and reported tail do not agree; its p-value is unresolved.
Connecting the Inference Methods
Confidence intervals estimate a plausible range for a population parameter; hypothesis tests assess a specified claim about it. Both use sample information and sampling distributions. In this module, mean tests use (or when population is known), proportion tests use the standard normal approximation under the stated count condition, and variance tests use chi-square under population normality.
| Parameter | Sample evidence | Test statistic distribution in the stated setup |
|---|---|---|
| Mean | and | if unknown; if known |
| Proportion | Approximately standard normal if both null expected counts are at least 5 | |
| Variance | for a normal population |
Key takeaways
- Inference moves from a sample statistic to a population claim through its sampling distribution.
- Identify the parameter, set the hypotheses, choose , calculate the statistic, and evaluate the matching tail probability.
- Rejecting supports the alternative; not rejecting it leaves the claim unestablished.
Revise before your examAll 1 exam tip from this module in one list
- For a two-sided alternative, count evidence in both tails; for a one-sided alternative, use only the tail named by the claim.
Test yourself on this module
Questions from these notes, one at a time, with feedback. Your weak topics are saved.