Term 2 · Module 4 of 4

Hypothesis Testing

Business Statistics for Entrepreneurs II

Practise this module in Claude, ChatGPT or Gemini

Set it up free
Mind map

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 (H0H_0): the tentative or status quo statement.
  • Alternative hypothesis (HaH_a): the specific claim the test seeks evidence for.

The test has two possible decisions: reject H0H_0 or do not reject H0H_0. Failure to reject is not proof that H0H_0 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 HaH_a; put its opposite in H0H_0. By convention, equality belongs in the null hypothesis.

Claim in HaH_a Null hypothesis Test
heta<heta0 heta < heta_0 heta≥θ0 heta \geq \theta_0 Lower tail
heta>θ0 heta > \theta_0 heta≤θ0 heta \leq \theta_0 Upper tail
heta≠θ0 heta \neq \theta_0 heta=θ0 heta = \theta_0 Two tail

Here θ\theta stands for the parameter being tested, such as μ\mu, pp, or σ2\sigma^2.

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: Ha:μ<500H_a: \mu<500, H0:μ≥500H_0: \mu\geq500. 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: Ha:μ>48H_a: \mu>48, H0:μ≤48H_0: \mu\leq48. 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: Ha:μ≠30H_a: \mu\neq30, H0:μ=30H_0: \mu=30. 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 HaH_a; equality goes in H0H_0.
  • “Do not reject” means insufficient evidence against H0H_0, not proof of it.
  • The direction of HaH_a 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 H0H_0 Do not reject H0H_0
H0H_0 true Type I error Correct decision
HaH_a 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 α\alpha is the chosen maximum probability of Type I error at the boundary case where H0H_0 is true at equality. Common choices mentioned are 0.05 and 0.10. The test conductor chooses α\alpha; 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 H0H_0; Type II: do not reject a false H0H_0.
  • α\alpha controls the Type I error probability at the null boundary.
  • A smaller α\alpha 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

  1. State H0H_0 and HaH_a from the claim and context.
  2. Choose significance level α\alpha.
  3. Assume H0H_0 is true at equality and calculate the test statistic.
  4. Use either the p-value approach or the critical-value approach to decide. Both should give the same decision.
  5. 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 HaH_a. Reject H0H_0 when p-value≤αp\text{-value}\leq\alpha; otherwise do not reject it.

For a mean with unknown population standard deviation and a sufficiently large sample, the lecture uses the statistic

t=xˉ−μ0s/n,df=n−1t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}},\qquad df=n-1

where xˉ\bar{x} is the sample mean, ss the sample standard deviation, and μ0\mu_0 the null-boundary value. If population σ\sigma is known, use

z=xˉ−μ0σ/nz=\frac{\bar{x}-\mu_0}{\sigma/\sqrt{n}}

and the standard normal distribution. The lecture invokes the approximate normality of xˉ\bar{x} for the examples with sample sizes above 30.

Alternative p-value from test statistic tt
Ha:μ<μ0H_a:\mu<\mu_0 P(Tn−1≤t)P(T_{n-1}\leq t)
Ha:μ>μ0H_a:\mu>\mu_0 P(Tn−1≥t)P(T_{n-1}\geq t)
Ha:μ≠μ0H_a:\mu\neq\mu_0 Double the tail probability beyond $

Worked mean examples

Lentil packets. The sample has n=50n=50, xˉ=497\bar{x}=497 g, and the stated sample standard deviation is 7 g; the null boundary is μ0=500\mu_0=500 g. The test is lower-tail, Ha:μ<500H_a:\mu<500, H0:μ≥500H_0:\mu\geq500, with α=0.04\alpha=0.04. The transcript's calculation instead uses s=8s=8 g:

SE=850≈1.13,t=497−5001.13≈−2.65SE=\frac{8}{\sqrt{50}}\approx1.13,\qquad t=\frac{497-500}{1.13}\approx-2.65

It reports P(T49≤−2.65)=0.005P(T_{49}\leq-2.65)=0.005. Since 0.005<0.040.005<0.04, its reported decision is to reject H0H_0 and conclude that the evidence supports a population mean below 500 g. The transcript has an unresolved mismatch: the sample summary says s=7s=7 g, but the worked arithmetic uses s=8s=8 g. The numerical p-value and decision above are the transcript's reported calculation.

Service response times. With n=40n=40, s=10s=10 hours and null boundary μ0=48\mu_0=48, the test is upper-tail: Ha:μ>48H_a:\mu>48, H0:μ≤48H_0:\mu\leq48, α=0.03\alpha=0.03.

For xˉ=52\bar{x}=52 hours:

SE=1040≈1.58,t=52−481.58≈2.53SE=\frac{10}{\sqrt{40}}\approx1.58,\qquad t=\frac{52-48}{1.58}\approx2.53

The transcript reports P(T39≥2.53)=0.008P(T_{39}\geq2.53)=0.008. Since 0.008<0.030.008<0.03, reject H0H_0: the evidence supports a population mean response time above 48 hours.

For the revised sample mean xˉ=50\bar{x}=50 hours, keeping n=40n=40 and s=10s=10:

t=50−481.58≈1.26,P(T39≥1.26)=0.107t=\frac{50-48}{1.58}\approx1.26,\qquad P(T_{39}\geq1.26)=0.107

Since 0.107>0.030.107>0.03, do not reject H0H_0; the evidence is insufficient to claim a population mean above 48 hours.

Petrol dispensing. With n=32n=32, xˉ=30.3\bar{x}=30.3 litres, s=0.5s=0.5 litres and μ0=30\mu_0=30, test Ha:μ≠30H_a:\mu\neq30 against H0:μ=30H_0:\mu=30 at α=0.05\alpha=0.05:

SE=0.532≈0.09,t=30.3−300.09≈3.39SE=\frac{0.5}{\sqrt{32}}\approx0.09,\qquad t=\frac{30.3-30}{0.09}\approx3.39

For a two-tail test, double the upper-tail probability beyond 3.393.39 (equivalently, double the lower-tail probability below −3.39-3.39). The transcript reports the p-value as 0.00. Since it is below 0.05, reject H0H_0: the evidence supports a mean dispensed amount different from 30 litres, so recalibration is warranted.

Key takeaways

  • Use a tt statistic with n−1n-1 degrees of freedom when σ\sigma is unknown; use zz when σ\sigma is known.
  • Compute the p-value from the alternative's direction, then compare it with α\alpha.
  • The decision needs a practical interpretation in the original context and units.
  • The packet example's stated s=7s=7 and worked s=8s=8 conflict; preserve that uncertainty when using its reported result.

5.8 Hypothesis Tests for a Population Proportion

For a population proportion pp, the null and alternative take the same lower-tail, upper-tail, and two-tail forms. Let p0p_0 be the hypothesized boundary and p^\hat p the sample proportion. Under the null boundary, the lecture uses

z=p^−p0p0(1−p0)nz=\frac{\hat p-p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

The statistic is approximately standard normal when both np0np_0 and n(1−p0)n(1-p_0) are at least 5. The p-value follows the same tail logic as for a mean; reject when it is at most α\alpha.

Coupon redemption: upper tail

Anil tests whether more than 10% of coupon recipients redeem a coupon. In a sample of 80, 12 redeem:

p^=1280=0.15,Ha:p>0.10,H0:p≤0.10\hat p=\frac{12}{80}=0.15,\qquad H_a:p>0.10,\quad H_0:p\leq0.10

At α=0.05\alpha=0.05, the null-based standard error and test statistic are

SE=0.10(0.90)80≈0.03,z=0.15−0.100.03=1.49SE=\sqrt{\frac{0.10(0.90)}{80}}\approx0.03,\qquad z=\frac{0.15-0.10}{0.03}=1.49

The upper-tail p-value is reported as P(Z≥1.49)=0.068P(Z\geq1.49)=0.068. Because 0.068>0.050.068>0.05, do not reject H0H_0. 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: 510−280=230510-280=230 respondents.

p^=230510≈0.45,Ha:p<0.50,H0:p≥0.50\hat p=\frac{230}{510}\approx0.45,\qquad H_a:p<0.50,\quad H_0:p\geq0.50

At α=0.03\alpha=0.03:

SE=0.50(0.50)510≈0.022,z=0.45−0.500.022≈−2.21SE=\sqrt{\frac{0.50(0.50)}{510}}\approx0.022,\qquad z=\frac{0.45-0.50}{0.022}\approx-2.21

The lower-tail p-value is reported as P(Z≤−2.21)=0.013P(Z\leq-2.21)=0.013. Since 0.013<0.030.013<0.03, reject H0H_0: 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:

p^=5870≈0.83,Ha:p≠0.90,H0:p=0.90\hat p=\frac{58}{70}\approx0.83,\qquad H_a:p\neq0.90,\quad H_0:p=0.90

At α=0.05\alpha=0.05:

SE=0.90(0.10)70≈0.036,z=0.83−0.900.036≈−1.99SE=\sqrt{\frac{0.90(0.10)}{70}}\approx0.036,\qquad z=\frac{0.83-0.90}{0.036}\approx-1.99

The transcript reports the two-tail p-value as 2P(Z≤−1.99)=0.0462P(Z\leq-1.99)=0.046. Since 0.046<0.050.046<0.05, reject H0H_0: 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 p^\hat p.
  • Use the null proportion p0p_0 in the standard error, not p^\hat p.
  • Check that np0np_0 and n(1−p0)n(1-p_0) are at least 5 for the stated normal approximation.
  • Match the p-value tail(s) to HaH_a and compare with α\alpha.

5.9 Hypothesis Tests for Population Variance

For a random sample from a normal population, the variance test uses a chi-square statistic. Let σ02\sigma_0^2 be the hypothesized variance:

χ2=(n−1)s2σ02,df=n−1\chi^2=\frac{(n-1)s^2}{\sigma_0^2},\qquad df=n-1

The alternatives are Ha:σ2<σ02H_a:\sigma^2<\sigma_0^2 (lower tail), Ha:σ2>σ02H_a:\sigma^2>\sigma_0^2 (upper tail), or Ha:σ2≠σ02H_a:\sigma^2\neq\sigma_0^2 (two tail); equality remains in H0H_0. Compute the p-value from the appropriate chi-square tail(s), and reject when p-value≤αp\text{-value}\leq\alpha. The normal-population condition is required for this sampling distribution.

Bus arrival variability

Rakesh wants variance of arrival times at 4 or less. With n=24n=24, s2=4.9s^2=4.9, and α=0.05\alpha=0.05, the stated claim corresponds to Ha:σ2<4H_a:\sigma^2<4, H0:σ2≥4H_0:\sigma^2\geq4:

χ2=(24−1)(4.9)4=28.18,df=23\chi^2=\frac{(24-1)(4.9)}{4}=28.18,\qquad df=23

The transcript labels this an upper-tail test, reports P(χ232≥28.18)=0.209P(\chi^2_{23}\geq28.18)=0.209, and concludes there is insufficient evidence to claim the variance is more than 4. Those statements conflict with the stated alternative σ2<4\sigma^2<4: 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 n=30n=30, s2=162s^2=162, α=0.05\alpha=0.05, Ha:σ2≠100H_a:\sigma^2\neq100, and H0:σ2=100H_0:\sigma^2=100:

χ2=(30−1)(162)100=46.98,df=29\chi^2=\frac{(30-1)(162)}{100}=46.98,\qquad df=29

For the two-tail test, the transcript reports twice the upper-tail probability as 0.0370.037. Since 0.037<0.050.037<0.05, reject H0H_0: the evidence supports a variance different from the historical value.

Key takeaways

  • The chi-square variance test assumes a normal population.
  • Use σ02\sigma_0^2 in the statistic and n−1n-1 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 tt (or zz when population σ\sigma 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 μ\mu xˉ\bar{x} and ss tn−1t_{n-1} if σ\sigma unknown; ZZ if known
Proportion pp p^\hat p Approximately standard normal if both null expected counts are at least 5
Variance σ2\sigma^2 s2s^2 χn−12\chi^2_{n-1} 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 α\alpha, calculate the statistic, and evaluate the matching tail probability.
  • Rejecting H0H_0 supports the alternative; not rejecting it leaves the claim unestablished.
Revise before your examAll 1 exam tip from this module in one list
  1. 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.

Set it up free Takes about a minute. Free plans work.