Term 1 · Module 5 of 8

Statistical Inference

Business Statistics for Entrepreneurs

Intuition and Construction

The sampling distribution of the sample mean xˉ\bar{x} is approximately normal (Central Limit Theorem) with mean μ\mu and standard error σxˉ=σn\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}. For a normal distribution, 95% of all xˉ\bar{x} values lie within ±1.96σxˉ\pm 1.96\sigma_{\bar{x}} of μ\mu.

Now consider forming an interval around any observed xˉ\bar{x}: xˉ±1.96σxˉ\bar{x} \pm 1.96\sigma_{\bar{x}}

If that particular xˉ\bar{x} is within 1.96σxˉ1.96\sigma_{\bar{x}} of μ\mu, then the interval will contain μ\mu; if xˉ\bar{x} is farther away (in the 5% tails), the interval will not contain μ\mu. Because 95% of all possible xˉ\bar{x} are close enough, 95% of all such intervals will capture the true population mean. This is the core idea of a confidence interval.

Formal definition (σ known): A 100(1−α)%100(1-\alpha)\% confidence interval for μ\mu is xˉ±zα/2 σn\bar{x} \pm z_{\alpha/2}\,\frac{\sigma}{\sqrt{n}} where 1−α1-\alpha is the confidence coefficient and zα/2z_{\alpha/2} is the critical value from the standard normal distribution (area α/2\alpha/2 in the upper tail).

The term zα/2 σnz_{\alpha/2}\,\frac{\sigma}{\sqrt{n}} is the margin of error.

Worked Example: Basavaraju's Customer Satisfaction Scores

  • Population standard deviation σ=5\sigma = 5 (historical value)
  • Sample size n=36n = 36 → σxˉ=536=0.833\sigma_{\bar{x}} = \frac{5}{\sqrt{36}} = 0.833
  • Sample mean xˉ=57.31\bar{x} = 57.31

For any confidence level, the interval is xˉ±zα/2×0.833\bar{x} \pm z_{\alpha/2} \times 0.833.

Confidence Levelzα/2z_{\alpha/2}Margin of ErrorConfidence Interval
80%1.281.07(56.24, 58.38)(56.24,\,58.38)
90%1.641.37(55.94, 58.68)(55.94,\,58.68)
95%1.961.63(55.68, 58.94)(55.68,\,58.94)
99%2.582.15(55.16, 59.46)(55.16,\,59.46)

How to obtain zα/2z_{\alpha/2}: Use the standard normal table (or inverse‑normal function).

  • For 95% confidence, α=0.05\alpha = 0.05, α/2=0.025\alpha/2 = 0.025 → z0.025=1.96z_{0.025} = 1.96
  • For 99% confidence, α=0.01\alpha = 0.01, α/2=0.005\alpha/2 = 0.005 → z0.005=2.58z_{0.005} = 2.58
  • For 90% confidence, α=0.10\alpha = 0.10, α/2=0.05\alpha/2 = 0.05 → z0.05=1.64z_{0.05} = 1.64
  • For 80% confidence, α=0.20\alpha = 0.20, α/2=0.10\alpha/2 = 0.10 → z0.10=1.28z_{0.10} = 1.28

Effect of the Confidence Coefficient

  • Higher confidence → wider interval (larger zα/2z_{\alpha/2}). A 99% interval is wider than a 90% interval because we need to cover more of the sampling distribution.
  • 100% confidence would require z=∞z = \infty, producing an interval (−∞,∞)(-\infty, \infty) → useless.
  • Choosing a confidence level is a trade‑off: higher confidence gives more assurance that the interval contains μ\mu, but at the cost of precision (wider interval). The decision depends on the cost of being wrong:
    • Critical applications (e.g., FDA drug approval) often require 95% or 99% intervals.
    • For exploratory or low‑stakes decisions, 80% or 90% may be acceptable.
  • Consistency: When comparing different intervals, always use the same confidence coefficient.

Exam tip: A 95% confidence interval does not mean “there is a 95% probability that μ\mu lies in this particular interval.” It means that if we repeated the sampling process many times, 95% of the resulting intervals would contain μ\mu.

Effect of Sample Size

The margin of error is zα/2⋅σnz_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}.

  • Larger nn → smaller margin of error (more precise estimate).
  • Because n\sqrt{n} appears in the denominator, doubling nn reduces the margin by a factor of 2\sqrt{2} (not by half).
  • Conversely, to achieve a desired margin of error, we can solve for the required sample size (covered later).

Key Takeaways

  • The confidence interval for μ\mu (σ known) is xˉ±zα/2σn\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}.
  • 95% of all intervals constructed this way contain μ\mu; the confidence level describes the long‑run success rate.
  • Increasing the confidence level widens the interval; increasing sample size narrows it.
  • The choice of confidence level (80%, 90%, 95%, 99%) depends on the context and the cost of being wrong.
  • Always compute intervals with a fixed confidence coefficient when comparing results.

Confidence Intervals for the Mean (σ Known)

A confidence interval (CI) for the population mean μ\mu quantifies the uncertainty around the sample mean xˉ\bar{x}. When the population standard deviation σ\sigma is known, the interval is built using the standard normal (zz) distribution.

The formula:

xˉ±zα/2⋅σn\bar{x} \pm z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}
  • 1−α1-\alpha = confidence coefficient (e.g., 0.95).
  • zα/2z_{\alpha/2} = zz-value that cuts off area α/2\alpha/2 in the upper tail of the standard normal.
  • σn\frac{\sigma}{\sqrt{n}} = standard error of xˉ\bar{x}, denoted σxˉ\sigma_{\bar{x}}.

Why it works

Because xˉ\bar{x} is normally distributed (exactly if population is normal, approximately by the CLT for n≥30n \geq 30) with mean μ\mu and SD σxˉ\sigma_{\bar{x}}, the standardized variable

z=xˉ−μσxˉz = \frac{\bar{x} - \mu}{\sigma_{\bar{x}}}

follows a standard normal distribution. Hence, for a given 1−α1-\alpha, we can find zα/2z_{\alpha/2} such that P(−zα/2≤z≤zα/2)=1−αP(-z_{\alpha/2} \leq z \leq z_{\alpha/2}) = 1-\alpha, which rearranges to the CI above.

Assumptions

  • Independent random sample.
  • σ\sigma known (e.g., from historical data).
  • Either n≥30n \geq 30 or the population itself is normally distributed.

Worked Example 1 – Large Sample (n=50n=50)

Amit’s laddu shop: n=50n=50, xˉ=2200\bar{x}=2200, σ=84\sigma=84 (known).

Confidence Levelzα/2z_{\alpha/2}Margin of Error =zα/2⋅σn= z_{\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}CI
80%1.281.28×8450=15.221.28 \times \frac{84}{\sqrt{50}} = 15.22(2184.78, 2215.22)(2184.78,\ 2215.22)
95%1.961.96×11.88=23.281.96 \times 11.88 = 23.28(2176.72, 2223.28)(2176.72,\ 2223.28)

Exam tip: Increasing the confidence level (e.g., 80% → 95%) widens the interval because the margin of error grows with zα/2z_{\alpha/2}.

Worked Example 2 – Small Sample, Known σ\sigma (n=10n=10)

Puneet’s spa: n=10n=10, xˉ=3600\bar{x}=3600, σ=500\sigma=500 (known). Since nn is small, we must assume the population is normally distributed for xˉ\bar{x} to be normal.

σxˉ=50010≈158.11\sigma_{\bar{x}} = \frac{500}{\sqrt{10}} \approx 158.11
Confidence Levelzα/2z_{\alpha/2}Margin of ErrorCI
95%1.961.96×158.11≈309.901.96 \times 158.11 \approx 309.90(3290.10, 3909.90)(3290.10,\ 3909.90)
99%2.582.58×158.11≈407.272.58 \times 158.11 \approx 407.27(3192.73, 4007.27)(3192.73,\ 4007.27)

Interpretation: “99% of such intervals will contain the true population mean μ\mu.” The margin of error increases with higher confidence.

Verifying normality: Plot sample data or use prior knowledge.

Key Takeaways (σ Known)

  • CI for μ\mu when σ\sigma is known: xˉ±zα/2⋅σ/n\bar{x} \pm z_{\alpha/2} \cdot \sigma/\sqrt{n}.
  • Rely on normal distribution of xˉ\bar{x} (CLT for large nn, population normality for small nn).
  • Larger confidence level → larger zα/2z_{\alpha/2} → wider interval.
  • Standard error σxˉ=σ/n\sigma_{\bar{x}} = \sigma/\sqrt{n}.

Confidence Intervals for the Mean (σ Unknown)

In most real problems σ\sigma is unknown and must be estimated from the sample. Using the sample standard deviation ss in place of σ\sigma introduces extra uncertainty. The correct sampling distribution is the Student’s tt-distribution, not the standard normal.

Why can’t we just replace σ\sigma with ss and keep using zz? The quantity xˉ−μs/n\frac{\bar{x} - \mu}{s/\sqrt{n}} is not standard normal because ss is a random variable. Its distribution is a tt-distribution with n−1n-1 degrees of freedom.

Formula

xˉ±tα/2, n−1⋅sn\bar{x} \pm t_{\alpha/2,\ n-1} \cdot \frac{s}{\sqrt{n}}
  • tα/2, n−1t_{\alpha/2,\ n-1} = critical value from a tt-distribution with n−1n-1 degrees of freedom (df).
  • ss = sample standard deviation.
  • Margin of error: t⋅s/nt \cdot s/\sqrt{n}.

Properties of the tt-distribution

  • Bell-shaped, symmetric about 0 (like zz).
  • Flatter (more spread) than the standard normal, reflecting the extra uncertainty.
  • As df increases (nn grows), the tt-distribution converges to the standard normal.
  • Developed by William Gosset (working at Guinness).

Assumptions for Valid Use of tt

  • Random sample.
  • Population is approximately normally distributed (the tt procedure is robust to mild deviations, especially for n≥30n \geq 30).
  • No requirement to know σ\sigma.

Comparison: σ\sigma Known vs. σ\sigma Unknown

Aspectσ\sigma Knownσ\sigma Unknown
Critical valuezα/2z_{\alpha/2}tα/2, n−1t_{\alpha/2,\ n-1}
Std. errorσ/n\sigma/\sqrt{n}s/ns/\sqrt{n}
Distribution of xˉ−μSE\frac{\bar{x}-\mu}{\text{SE}}Standard normaltt with n−1n-1 df
Sample size requirementn≥30n \geq 30 or normal pop.nn any size (but normality important for small nn)

Exam tip: Always check whether σ\sigma is known. If “population standard deviation is given” → zz. If “sample standard deviation ss” → tt with n−1n-1 df. The exam will often test this distinction.

Key Takeaways (σ Unknown)

  • Use tt-distribution with n−1n-1 df when σ\sigma is unknown and estimated by ss.
  • Formula: xˉ±tα/2, n−1⋅s/n\bar{x} \pm t_{\alpha/2,\ n-1} \cdot s/\sqrt{n}.
  • tt-distribution is wider than zz, giving larger margins of error for the same confidence level (especially for small nn).
  • Assumption of population normality is important for small samples; the procedure is robust for larger nn.
  • As nn increases, t≈zt \approx z and the two methods converge.

Confidence Intervals for Population Mean: σ Unknown

When the population standard deviation σ is unknown — the realistic case — we replace σ with the sample standard deviation ss and use the t-distribution with n−1n-1 degrees of freedom instead of the standard normal. The structure remains identical: point estimate ± margin of error.

Margin of error (σ unknown): E=tα/2, n−1⋅snE = t_{\alpha/2, \, n-1} \cdot \frac{s}{\sqrt{n}}

Confidence interval: xˉ±tα/2, n−1⋅sn\bar{x} \pm t_{\alpha/2, \, n-1} \cdot \frac{s}{\sqrt{n}}

The t‑distribution is slightly wider than the normal for small nn (heavy tails), reflecting the extra uncertainty from estimating σ.


Worked Example 1: Joti Hegde’s Salary Survey

Data summary (n = 103)

  • Sample mean xˉ=25.92\bar{x} = 25.92 lakhs
  • Sample standard deviation s=3.66s = 3.66 lakhs
  • Standard error: sn=3.66103=0.361\displaystyle \frac{s}{\sqrt{n}} = \frac{3.66}{\sqrt{103}} = 0.361

90% confidence interval (α=0.10\alpha = 0.10, α/2=0.05\alpha/2 = 0.05, df = 102)

  • t0.05,102=1.66t_{0.05, 102} = 1.66
  • E=1.66×0.361=0.60E = 1.66 \times 0.361 = 0.60
  • Interval: 25.92±0.60→[25.32,  26.52]25.92 \pm 0.60 \rightarrow [25.32,\; 26.52] lakhs

95% confidence interval (α=0.05\alpha = 0.05, α/2=0.025\alpha/2 = 0.025, df = 102)

  • t0.025,102=1.98t_{0.025, 102} = 1.98
  • E=1.98×0.361=0.72E = 1.98 \times 0.361 = 0.72
  • Interval: 25.92±0.72→[25.20,  26.64]25.92 \pm 0.72 \rightarrow [25.20,\; 26.64] lakhs

Exam tip: The only change from σ known to σ unknown is swapping zα/2z_{\alpha/2} for tα/2,n−1t_{\alpha/2, n-1} and using ss in place of σ. The mechanics are identical.


Worked Example 2: Hanumantha Pai’s Credit Card Expenditure

Data summary (n = 55)

  • Sample mean xˉ=3, ⁣852.11\bar{x} = 3,\!852.11 ₹
  • Sample standard deviation s=1, ⁣454.23s = 1,\!454.23 ₹
  • Standard error: sn=1, ⁣454.2355=196.09\displaystyle \frac{s}{\sqrt{n}} = \frac{1,\!454.23}{\sqrt{55}} = 196.09

80% confidence interval (α=0.20\alpha = 0.20, α/2=0.10\alpha/2 = 0.10, df = 54)

  • t0.10,54=1.3t_{0.10, 54} = 1.3
  • E=1.3×196.09=254.41E = 1.3 \times 196.09 = 254.41
  • Interval: 3, ⁣852.11±254.41→[3, ⁣597.70,  4, ⁣106.52]3,\!852.11 \pm 254.41 \rightarrow [3,\!597.70,\; 4,\!106.52] ₹

95% confidence interval (α=0.05\alpha = 0.05, α/2=0.025\alpha/2 = 0.025, df = 54)

  • t0.025,54=2.0t_{0.025, 54} = 2.0
  • E=2.0×196.09=393.13E = 2.0 \times 196.09 = 393.13
  • Interval: 3, ⁣852.11±393.13→[3, ⁣458.98,  4, ⁣245.24]3,\!852.11 \pm 393.13 \rightarrow [3,\!458.98,\; 4,\!245.24] ₹

Notice: a higher confidence level (95% vs. 80%) produces a wider margin of error, as expected.


When Is the t‑Interval Exact? (Reliability & Sample Size)

Population shapeSample sizeValidity of t‑interval
NormalAny nnExact – the formula is exact.
Approximately symmetric, bell‑shapedSmall (n≥15n \geq 15)Good approximation – often adequate.
Moderately skewed, no outliersn≥30n \geq 30Adequate approximation – safe rule of thumb.
Highly skewed or contains outliersn≥50n \geq 50Needed approximation – increase nn to improve.

In practice, for n≥30n \geq 30 the t‑interval works well for most populations unless the distribution is severely non‑normal.


Determining the Sample Size for a Desired Margin of Error (σ Known)

Sample size planning happens before data collection. We want the smallest nn that yields a pre‑specified margin of error EE at a chosen confidence level.

For σ known: n=(zα/2⋅σE)2n = \left( \frac{z_{\alpha/2} \cdot \sigma}{E} \right)^2

Since σ is usually unknown before sampling, use a planning value for σ:

  1. Historical data – σ from a previous study.
  2. Pilot study – collect a small preliminary sample and use its ss.
  3. Range/4 rule – σ≈(max−min)/4\sigma \approx (\text{max} - \text{min}) / 4 (crude but simple).

Example: Basavaraju’s Customer Satisfaction

  • Historical σ = 5
  • Desired 99% confidence interval (z0.005=2.58z_{0.005} = 2.58)
  • Desired margin of error E=1E = 1

n=(2.58×51)2=(12.9)2=166.41→n=166n = \left( \frac{2.58 \times 5}{1} \right)^2 = (12.9)^2 = 166.41 \rightarrow n = 166

Thus Basavaraju should have collected a sample of 166 (instead of 36) to achieve a 99% CI with margin ±1.

Exam tip: Always round the sample size up to the next integer (e.g., 165.8 → 166). A fraction gives a margin larger than desired.


Key Takeaways

  • When σ is unknown, use the t‑distribution with n−1n-1 degrees of freedom and ss in the margin of error.
  • The t‑interval is exact if the population is normal; for non‑normal populations, n≥30n \geq 30 (or n≥50n \geq 50 for strong skew/outliers) produces good approximations.
  • To plan sample size for a desired margin of error EE (σ known case), use n=(zα/2⋅σ/E)2n = (z_{\alpha/2} \cdot \sigma / E)^2, with a planning value for σ.
  • A higher confidence level or a smaller desired EE requires a larger sample size.

Confidence Interval for Population Proportion

A confidence interval for a population proportion pp estimates the unknown true proportion of "successes" in the population based on a sample. Intuitively: if 47% of sampled customers are satisfied, the true proportion is likely within a range around that value, with a stated level of confidence.

The general form is the same as for the mean:

Sample estimate±Margin of error\text{Sample estimate} \pm \text{Margin of error}

Here the sample estimate is the sample proportion pˉ=xn\bar{p} = \frac{x}{n} (where xx = number of successes in the sample), and the margin of error depends on the sampling distribution of pˉ\bar{p}.

Sampling Distribution of pˉ\bar{p}

  • pˉ\bar{p} is a binomial random variable (xx successes out of nn trials).
  • For large nn, the binomial is approximated by a normal distribution.
  • Condition for approximation: np≥5np \ge 5 and nq≥5nq \ge 5, where q=1−pq = 1-p.
  • The sampling distribution is centered at the population proportion pp with standard error:
σpˉ=p(1−p)n\sigma_{\bar{p}} = \sqrt{\frac{p(1-p)}{n}}

Exam tip: Always check npˉ≥5n\bar{p} \ge 5 and n(1−pˉ)≥5n(1-\bar{p}) \ge 5 to validate the normal approximation. If the condition fails, the confidence interval may be unreliable.

Margin of Error and Confidence Interval

If pˉ\bar{p} is approximately normal, the margin of error for a confidence level (1−α)(1-\alpha) is zα/2⋅σpˉz_{\alpha/2} \cdot \sigma_{\bar{p}}. However, σpˉ\sigma_{\bar{p}} depends on the unknown pp. The solution is to use pˉ\bar{p} as an estimate for pp in the standard error:

Margin of error=zα/2⋅pˉ(1−pˉ)n\text{Margin of error} = z_{\alpha/2} \cdot \sqrt{\frac{\bar{p}(1-\bar{p})}{n}}

Thus, a (1−α)(1-\alpha) confidence interval for pp is:

pˉ±zα/2pˉ(1−pˉ)n\bar{p} \pm z_{\alpha/2} \sqrt{\frac{\bar{p}(1-\bar{p})}{n}}

where zα/2z_{\alpha/2} is the zz-score cutting off area α/2\alpha/2 in the upper tail of the standard normal distribution.

Worked Example 1: Basavaraju's Customer Satisfaction

  • Sample size n=36n = 36, number of successes x=17x = 17 (score ≥60\ge 60).
  • pˉ=17/36=0.47\bar{p} = 17/36 = 0.47.
  • For a 95% confidence interval (α=0.05\alpha = 0.05): z0.025=1.96z_{0.025} = 1.96.
  • Compute pˉ(1−pˉ)/n=0.47×0.53/36≈0.08\sqrt{\bar{p}(1-\bar{p})/n} = \sqrt{0.47 \times 0.53 / 36} \approx 0.08.
  • Margin of error =1.96×0.08=0.16= 1.96 \times 0.08 = 0.16.
  • 95% CI: 0.47±0.16⇒(0.31,  0.64)0.47 \pm 0.16 \Rightarrow (0.31,\;0.64).

Worked Example 2: Hanumantha's Credit Card Spend

  • n=55n = 55 customers. Number spending less than ₹3000: x=16x = 16.
  • pˉ=16/55≈0.29\bar{p} = 16/55 \approx 0.29.
  • pˉ(1−pˉ)/n=0.29×0.71/55≈0.06\sqrt{\bar{p}(1-\bar{p})/n} = \sqrt{0.29 \times 0.71 / 55} \approx 0.06.

80% confidence interval (α=0.20\alpha=0.20, z0.10=1.28z_{0.10}=1.28):

  • Margin of error =1.28×0.06=0.08= 1.28 \times 0.06 = 0.08.
  • CI: 0.29±0.08⇒(0.21,  0.37)0.29 \pm 0.08 \Rightarrow (0.21,\;0.37).

99% confidence interval (α=0.01\alpha=0.01, z0.005=2.58z_{0.005}=2.58):

  • Margin of error =2.58×0.06≈0.16= 2.58 \times 0.06 \approx 0.16.
  • CI: 0.29±0.16⇒(0.13,  0.45)0.29 \pm 0.16 \Rightarrow (0.13,\;0.45).

The 99% interval is much wider – a trade-off between higher confidence and precision.

Sample Size Determination for a Desired Margin of Error

To achieve a desired margin of error EE (e.g., 0.050.05) at a given confidence level, solve for nn in the margin-of-error formula:

n=(zα/2)2⋅pˉ(1−pˉ)E2n = \frac{(z_{\alpha/2})^2 \cdot \bar{p}(1-\bar{p})}{E^2}

But pˉ\bar{p} is unknown before sampling. A planning value p∗p^* must be used. Options:

  1. Use the sample proportion from a previous study.
  2. Conduct a pilot study and use its pˉ\bar{p}.
  3. Use a best guess / judgment.
  4. If no information, use p∗=0.5p^* = 0.5 (the most conservative – gives the largest nn).

Exam tip: Using p∗=0.5p^* = 0.5 yields the maximum possible sample size for a given EE and zz, because p(1−p)p(1-p) is maximized at p=0.5p=0.5. This ensures the actual margin of error will not exceed EE even if the true proportion is far from 0.5.

Example: Hanumantha's desired margin E=0.05E=0.05 at 99% confidence

  • z0.005=2.58z_{0.005} = 2.58, E=0.05E = 0.05.
  • Use planning value p∗=0.5p^* = 0.5 (conservative).
  • n=(2.58)2×0.5×0.5(0.05)2=6.6564×0.250.0025=665.64→666n = \frac{(2.58)^2 \times 0.5 \times 0.5}{(0.05)^2} = \frac{6.6564 \times 0.25}{0.0025} = 665.64 \rightarrow 666.

With only n=55n=55, the margin of error was 0.16; a sample of 666 would achieve the desired 0.05.

Key takeaways

  • Confidence interval for pp: pˉ±zα/2pˉ(1−pˉ)/n\bar{p} \pm z_{\alpha/2}\sqrt{\bar{p}(1-\bar{p})/n}, valid when npˉ≥5n\bar{p} \ge 5 and n(1−pˉ)≥5n(1-\bar{p}) \ge 5.
  • The margin of error uses pˉ\bar{p} as a substitute for unknown pp in the standard error.
  • Higher confidence levels widen the interval; larger sample sizes narrow it.
  • To determine sample size, use a planning value p∗p^* (previous data, pilot, guess, or 0.50.5).
  • p∗=0.5p^* = 0.5 is the safest (most conservative) choice, maximizing the required nn.

Confidence Interval for Population Variance

We now construct a confidence interval (CI) for the population variance σ2\sigma^2 (or standard deviation σ\sigma). The key insight: while the sample variance s2s^2 is our best point estimate, its sampling distribution is not symmetric, so the CI cannot be written as “s2±s^2 \pm margin of error”. Instead we use the chi-square distribution.

Intuition and the Sampling Distribution

If the population is normally distributed, the random variable

(n−1)s2σ2\frac{(n-1)s^2}{\sigma^2}

follows a chi-square distribution with n−1n-1 degrees of freedom:

(n−1)s2σ2∼χn−12.\frac{(n-1)s^2}{\sigma^2} \sim \chi^2_{n-1}.

This is the pivot we invert to obtain a CI for σ2\sigma^2.

Formula for the Confidence Interval

Choose a confidence coefficient 1−α1-\alpha. Let χα/22\chi^2_{\alpha/2} and χ1−α/22\chi^2_{1-\alpha/2} be the critical values from the χn−12\chi^2_{n-1} distribution such that

P ⁣(χ1−α/22≤(n−1)s2σ2≤χα/22)=1−α.P\!\left(\chi^2_{1-\alpha/2} \le \frac{(n-1)s^2}{\sigma^2} \le \chi^2_{\alpha/2}\right) = 1-\alpha.

Rearranging (taking reciprocals, multiplying by (n−1)s2(n-1)s^2) gives the CI:

Definition (n−1)s2χα/22≤σ2≤(n−1)s2χ1−α/22\frac{(n-1)s^2}{\chi^2_{\alpha/2}} \le \sigma^2 \le \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}} where χα/22\chi^2_{\alpha/2} and χ1−α/22\chi^2_{1-\alpha/2} are from χn−12\chi^2_{n-1}.

To obtain a CI for σ\sigma, take square roots of the endpoints.

Worked Example: Basavaraju’s Customer Satisfaction Survey (95% CI)

Given: n=36,  s=6.38,  s2=40.7,  1−α=0.95n=36,\; s=6.38,\; s^2=40.7,\; 1-\alpha=0.95.

Step 1 – Degrees of freedom: df=n−1=35df = n-1 = 35.

Step 2 – Critical values (from chi-square table or template):

Tail probability (α\alpha)Value
α/2=0.025\alpha/2 = 0.025χ0.0252=53.20\chi^2_{0.025}=53.20
1−α/2=0.9751-\alpha/2 = 0.975χ0.9752=20.57\chi^2_{0.975}=20.57

Thus 95%95\% of χ352\chi^2_{35} lies between 20.5720.57 and 53.2053.20.

Step 3 – Plug into formula:

(35)(40.7)53.20≤σ2≤(35)(40.7)20.57\frac{(35)(40.7)}{53.20} \le \sigma^2 \le \frac{(35)(40.7)}{20.57} 26.79≤σ2≤69.30.26.79 \le \sigma^2 \le 69.30.

Step 4 – CI for σ\sigma: Take square roots:

26.79≤σ≤69.30⇒5.18≤σ≤8.33.\sqrt{26.79} \le \sigma \le \sqrt{69.30} \quad\Rightarrow\quad 5.18 \le \sigma \le 8.33.

Exam tip: Because the chi‑square distribution is not symmetric, we cannot write the interval as s2±s^2 \pm something. This is a common trick – the CI for variance is always of the form ((n−1)s2 / χupper2,  (n−1)s2 / χlower2)( (n-1)s^2\,/\,\chi^2_{\text{upper}} ,\; (n-1)s^2\,/\,\chi^2_{\text{lower}} ).

Varying Confidence Levels: 80% and 90% CI

For the same Basavaraju data, we can compute intervals at other confidence levels. The process and critical values change.

80% CI (1−α=0.801-\alpha=0.80)

α/2=0.10\alpha/2=0.10, 1−α/2=0.901-\alpha/2=0.90.

Tail probabilityValue
0.900.90χ0.902=24.8\chi^2_{0.90}=24.8
0.100.10χ0.102=46.06\chi^2_{0.10}=46.06

Computation:

35×40.746.06≤σ2≤35×40.724.8\frac{35 \times 40.7}{46.06} \le \sigma^2 \le \frac{35 \times 40.7}{24.8} 30.95≤σ2≤57.49⇒5.56≤σ≤7.58.30.95 \le \sigma^2 \le 57.49 \quad\Rightarrow\quad 5.56 \le \sigma \le 7.58.

90% CI (1−α=0.901-\alpha=0.90)

α/2=0.05\alpha/2=0.05, 1−α/2=0.951-\alpha/2=0.95.

Tail probabilityValue
0.950.95χ0.952=22.47\chi^2_{0.95}=22.47
0.050.05χ0.052=49.80\chi^2_{0.05}=49.80

Computation:

35×40.749.80≤σ2≤35×40.722.47\frac{35 \times 40.7}{49.80} \le \sigma^2 \le \frac{35 \times 40.7}{22.47} 28.62≤σ2≤63.46⇒5.35≤σ≤7.97.28.62 \le \sigma^2 \le 63.46 \quad\Rightarrow\quad 5.35 \le \sigma \le 7.97.

Observation: As confidence increases, the interval widens, just as with means and proportions.

Example: Jyothi Hegde’s Salary Data

Given: n=103,  xˉ=25.92 lakhs,  s=3.66 lakhs,  s2=13.39 lakhs2n=103,\; \bar{x}=25.92\ \text{lakhs},\; s=3.66\ \text{lakhs},\; s^2=13.39\ \text{lakhs}^2, 1−α=0.951-\alpha=0.95.

df=102df = 102. Critical values:

Tail probabilityValue
α/2=0.025\alpha/2=0.025χ0.0252=131.84\chi^2_{0.025}=131.84
1−α/2=0.9751-\alpha/2=0.975χ0.9752=75.95\chi^2_{0.975}=75.95

CI for σ2\sigma^2:

102×13.39131.84≤σ2≤102×13.3975.95\frac{102 \times 13.39}{131.84} \le \sigma^2 \le \frac{102 \times 13.39}{75.95} 10.36≤σ2≤17.98.10.36 \le \sigma^2 \le 17.98.

CI for σ\sigma:

3.22≤σ≤4.24 lakhs.3.22 \le \sigma \le 4.24\ \text{lakhs}.

Process Overview

Key Takeaways

  • Assumption: Population must be normally distributed for the chi‑square pivot to be exact.
  • Formula: (n−1)s2χα/22≤σ2≤(n−1)s2χ1−α/22\displaystyle \frac{(n-1)s^2}{\chi^2_{\alpha/2}} \le \sigma^2 \le \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}}.
  • Asymmetry: Because χ2\chi^2 is not symmetric, the CI is not of the form s2±s^2 \pm margin of error.
  • Critical values: Always use the upper‑tail critical value χα/22\chi^2_{\alpha/2} in the denominator of the left endpoint and the lower‑tail value χ1−α/22\chi^2_{1-\alpha/2} in the denominator of the right endpoint.
  • Standard deviation CI: Simply take square roots of the variance CI endpoints.
  • Interpretation: Over repeated sampling, 100(1−α)%100(1-\alpha)\% of such intervals will contain the true σ2\sigma^2.

Hypothesis Testing – Introduction

Statistical inference goes beyond confidence intervals. Hypothesis tests use sample data to decide whether a claim about a population parameter (mean μ\mu, proportion pp, or variance σ2\sigma^2) is plausible. The logic mirrors confidence intervals: we make an inference about a population from limited sample evidence, because the decisions that follow will affect the entire population, not just the sample.

Purpose and logic

The core question: Does the sample provide enough evidence to support a specific statement about a population parameter? Typical claims:

  • Is μ\mu greater than a certain value?
  • Is μ\mu equal to a certain value?
  • Is μ\mu less than a certain value?

If the evidence is strong, we can confidently act on that claim for the population. If not, we must be cautious.

Null and alternative hypotheses

Every test involves two competing statements:

  • Null hypothesis (H0H_0) – the tentative assumption about the parameter. It represents the status quo or the default position.
  • Alternative hypothesis (HaH_a) – the opposite of H0H_0; it is the claim the test is designed to support.

The test then evaluates whether sample data can reject H0H_0 in favour of HaH_a.

Important: The outcome is never “accept H0H_0”. It is reject H0H_0 or do not reject H0H_0. “Do not reject” means the evidence is insufficient to prove H0H_0 false – it does not prove H0H_0 true.

Two possible outcomes

Sample evidenceDecisionMeaning
Definitive evidence that H0H_0 is falseReject H0H_0The claim (HaH_a) is supported beyond reasonable doubt.
Not definitive; too risky to rejectDo not reject H0H_0Sample is inconclusive; status quo remains.

Legal analogy (Innocent until proven guilty)

The logic of hypothesis testing is exactly the logic of a criminal trial.

  • Null hypothesis (H0H_0): The accused is innocent.
  • Alternative hypothesis (HaH_a): The accused is guilty (the claim brought by the prosecution).
  • Evidence: Sample data (video footage, fingerprints, alibi).
  • Test outcome:
    • If the evidence is convincing beyond reasonable doubt → reject H0H_0 → guilty.
    • If the evidence is not convincing (reasonable doubt remains) → do not reject H0H_0 → innocent until proven guilty.

Note: A “not guilty” verdict does not prove innocence; it only means the prosecution failed to prove guilt. Similarly, failing to reject H0H_0 does not prove H0H_0 is true.

Setting up the hypotheses correctly

Two questions guide the setup:

  1. Who is conducting the test and trying to make a claim about the parameter?
  2. What specific claim are they making?

The claim being argued for is always placed in the alternative hypothesis HaH_a. The opposite statement becomes H0H_0.

Example: A manufacturer claims the mean battery life exceeds 100 hours. – Claim: μ>100\mu > 100 (what they want to prove) → Ha:μ>100H_a: \mu > 100. – Default (null): μ≤100\mu \leq 100.

Exam tip: The way hypotheses are stated depends entirely on context. Always identify who wants to prove what before writing H0H_0 and HaH_a.

Errors in hypothesis testing

Because sample evidence is probabilistic, two types of errors can occur:

  • Type I error: Rejecting H0H_0 when it is actually true (false positive).
  • Type II error: Not rejecting H0H_0 when it is actually false (false negative).

The goal is to minimise both, but a trade-off always exists. Quantifying and controlling these errors (similar to confidence level in interval estimation) will be covered in later sections.


Key takeaways

  • Hypothesis tests decide whether a claim about μ\mu, pp, or σ2\sigma^2 is supported by sample data.
  • H0H_0 is the tentative assumption (status quo); HaH_a is the claim being tested.
  • The only decisions are reject H0H_0 (strong evidence) or do not reject H0H_0 (insufficient evidence). Never “accept H0H_0”.
  • Legal analogy: H0H_0 = innocent (presumed true); HaH_a = guilty (must be proven); the verdict mirrors the test outcome.
  • To set hypotheses: ask who is making a claim and what the claim is – the claim goes in HaH_a.
  • Two unavoidable errors exist (Type I and Type II); they will be formalised later.

Types of Hypothesis Tests

Hypothesis tests about a population parameter (here the mean μ\mu) take one of three forms depending on the direction of the claim being tested:

  • Lower‑tail test – claim is μ<A\mu < A
  • Upper‑tail test – claim is μ>A\mu > A
  • Two‑tail test – claim is μ≠A\mu \neq A

The null hypothesis (H0H_0) always contains the equality (≥\geq, ≤\leq, or ==). The alternate hypothesis (H1H_1) is the claim the researcher wants to support using sample data.

Test TypeH0H_0H1H_1When to use
Lower‑tailμ≥A\mu \geq Aμ<A\mu < AWant to prove μ\mu is less than AA
Upper‑tailμ≤A\mu \leq Aμ>A\mu > AWant to prove μ\mu is greater than AA
Two‑tailμ=A\mu = Aμ≠A\mu \neq AWant to prove μ\mu is different from AA (not specifically smaller or larger)

Exam tip: The equality sign always belongs in H0H_0. Identify the claim first; then write H1H_1 as that claim, and H0H_0 as its opposite (including the equality).

Setting up the hypotheses – two guiding questions

  1. Who is making the claim? (the party using the sample data)
  2. What is the specific claim about μ\mu? (less than, greater than, not equal to)

The answer to question 2 determines the form of H1H_1 and, consequently, the test type.


Worked examples

Example 1: Under‑filling of lentil packets (Lower‑tail test)

  • Context: Consumer Affairs Department suspects packets labelled “500 g” contain less.
  • Claim: μ<500\mu < 500 (the average weight of all packets is deliberately below the label).
  • Sample: n=50n = 50, xˉ=497\bar{x} = 497 g, s=7s = 7 g, significance level α=0.04\alpha = 0.04.
  • Hypotheses: H0:μ≥500,H1:μ<500H_0: \mu \geq 500, \quad H_1: \mu < 500
  • Decision rule: If the p‑value (probability of observing a sample mean ≤497\leq 497 when H0H_0 is true) is less than 0.040.04, reject H0H_0 and conclude under‑filling is occurring. Otherwise, the test is inconclusive – the sample does not prove under‑filling.
  • Key point: “Not rejecting H0H_0” does not prove the packets contain 500 g; it only means the evidence is insufficient.

Example 2: Service response time (Upper‑tail test)

  • Context: Geeta Kumari wants to check if mean response time has increased beyond the advertised 48 hours.
  • Claim: μ>48\mu > 48 (the average time exceeds the policy).
  • Sample: n=40n = 40, xˉ=52\bar{x} = 52 h, s=10s = 10 h, α=0.03\alpha = 0.03.
  • Hypotheses: H0:μ≤48,H1:μ>48H_0: \mu \leq 48, \quad H_1: \mu > 48
  • Decision rule: Reject H0H_0 if p‑value <0.03< 0.03; then corrective action is needed. Otherwise, the data do not prove that response time has increased.

Example 3: Petrol dispensing accuracy (Two‑tail test)

  • Context: Ibrahim Khan worries the pumps dispense an amount different from the requested 30 L (over‑filling hurts profit, under‑filling cheats customers).
  • Claim: μ≠30\mu \neq 30 (the average amount dispensed is not 30 L).
  • Sample: n=32n = 32, xˉ=30.3\bar{x} = 30.3 L, s=0.5s = 0.5 L, α=0.05\alpha = 0.05.
  • Hypotheses: H0:μ=30,H1:μ≠30H_0: \mu = 30, \quad H_1: \mu \neq 30
  • Decision rule: Reject H0H_0 if p‑value <0.05< 0.05; then recalibration is required. If not, the sample does not provide enough evidence of a deviation.

What does the p‑value mean?

The p‑value is the probability of observing a sample result as extreme as the one obtained (or more extreme) assuming the null hypothesis is true. A small p‑value (smaller than the chosen α\alpha) indicates that such an extreme result is unlikely under H0H_0, leading to rejection of H0H_0.


Key takeaways

  • Three test forms: lower‑tail (μ<A\mu < A), upper‑tail (μ>A\mu > A), two‑tail (μ≠A\mu \neq A).
  • The claim being tested always goes into H1H_1; equality always stays in H0H_0.
  • The test type determines the direction of “extremeness” for the p‑value calculation.
  • “Not rejecting H0H_0” does not prove H0H_0 is true – only that the evidence is insufficient to support H1H_1.
  • Use the two‑guiding‑question method to set up hypotheses correctly: who is making the claim, and what is the claim?

Hypotheses, Errors, and the Testing Procedure

Every hypothesis test pits two competing claims about a population parameter against each other: the null hypothesis H0H_0 and the alternative hypothesis HaH_a (or H1H_1). Only one of them is true. The test uses sample evidence to decide whether to reject H0H_0 in favour of HaH_a. Because decisions rest on a sample, errors are possible.

Type I and Type II Errors

Decision →
Truth ↓
Reject H0H_0Do not reject H0H_0
H0H_0 trueType I error (false positive)Correct
HaH_a trueCorrectType II error (false negative)
  • Type I error: rejecting H0H_0 when it is actually true. Probability = level of significance α\alpha, chosen by the analyst (common: 0.05, 0.10, 0.01). Intuition: crying “wolf” when there is none.

  • Type II error: failing to reject H0H_0 when HaH_a is true. Probability = β\beta (not directly controlled, depends on sample size, effect size, and α\alpha). Intuition: missing a real effect.

Trade-off: lowering α\alpha reduces Type I error but increases β\beta (and vice‑versa). The only way to reduce both is to increase the sample size.

Exam tip: If the cost of a false claim (Type I) is high – e.g. convicting an innocent person – choose a small α\alpha. If missing a real effect is more costly (Type II), use a larger α\alpha or a bigger sample.

Example – Geeta’s response time H0:μ≤48H_0: \mu \le 48 hr, Ha:μ>48H_a: \mu > 48 hr.

  • Type I error: concluding that mean time exceeds 48 hr when it actually is ≤\le48 hr.
  • Type II error: concluding that mean time is ≤\le48 hr when it actually exceeds 48 hr.

Key takeaways

  • Type I = false rejection of H0H_0; probability = α\alpha.
  • Type II = false acceptance of H0H_0 (failure to reject HaH_a); probability = β\beta.
  • α\alpha is set by the analyst; β\beta depends on α\alpha, sample size, and true effect.
  • Trade‑off: small α\alpha → large β\beta; increase sample size to control both.

The Five‑Step Hypothesis Test

Step 1 – Hypotheses Identify H0H_0 (the status quo, often an equality or “≤”/“≥”) and HaH_a (the claim the test seeks to support). Three common forms:

  • Lower‑tail test: H0:μ≥μ0H_0: \mu \ge \mu_0, Ha:μ<μ0H_a: \mu < \mu_0
  • Upper‑tail test: H0:μ≤μ0H_0: \mu \le \mu_0, Ha:μ>μ0H_a: \mu > \mu_0
  • Two‑tail test: H0:μ=μ0H_0: \mu = \mu_0, Ha:μ≠μ0H_a: \mu \neq \mu_0

Step 2 – Significance level Set α\alpha (maximum acceptable Type I error probability).

Step 3 – Test statistic Assume H0H_0 true at the boundary (μ=μ0\mu = \mu_0). Use the sample to compute t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} which follows a tt‑distribution with df=n−1df = n-1 (valid when n≥30n\ge30 or the population is normal).

Step 4 – Decision

  • P‑value approach: Compute pp = probability, under H0H_0, of observing a test statistic as extreme as (or more extreme than) the one obtained.
    • If p<αp < \alpha → reject H0H_0.
    • If p≥αp \ge \alpha → do not reject H0H_0.
  • Critical value approach: Determine the rejection region from α\alpha; reject if tt falls in that region. Both approaches yield the same decision.

Step 5 – Conclusion Translate the statistical decision into a real‑world interpretation for the decision maker.

Exam tip: “Do not reject H0H_0” is not the same as “accept H0H_0”. It means the sample lacked sufficient evidence to support HaH_a. The test result is inconclusive about H0H_0 being true.

Worked Examples

Example 1 – Jalan Supermarket (lower‑tail) n=50n=50, xˉ=497\bar{x}=497 g, s=7s=7 g, α=0.04\alpha=0.04 (4%).

  • H0:μ≥500H_0: \mu \ge 500 (labelling claim), Ha:μ<500H_a: \mu < 500 (underfilling).
  • Standard error: s/n=7/50≈0.99s/\sqrt{n} = 7/\sqrt{50}\approx0.99. t=497−5007/50≈−3.03t = \frac{497-500}{7/\sqrt{50}} \approx -3.03
  • df=49df = 49, lower‑tail p=P(T49≤−3.03)≈0.002p = P(T_{49} \le -3.03) \approx 0.002.
  • p<0.04p < 0.04 → reject H0H_0.
  • Conclusion: Sufficient evidence that the mean packet weight is below 500 g; the chain is likely underfilling.

Example 2 – Geeta Kumari (upper‑tail, two scenarios)

  1. Strong evidence (xˉ=52\bar{x}=52, s=10s=10, α=0.03\alpha=0.03): s/n=10/40=1.58s/\sqrt{n} = 10/\sqrt{40} = 1.58 t=52−481.58=2.53t = \frac{52-48}{1.58} = 2.53 df=39df=39, upper‑tail p=P(T39≥2.53)≈0.008p = P(T_{39} \ge 2.53) \approx 0.008 0.008<0.030.008 < 0.03 → reject H0H_0 → mean response time exceeds 48 hr.

  2. Weak evidence (xˉ=50\bar{x}=50, s=10s=10, α=0.03\alpha=0.03): s/n=1.58s/\sqrt{n}=1.58 (unchanged) t=50−481.58=1.26t = \frac{50-48}{1.58} = 1.26 df=39df=39, p=P(T39≥1.26)≈0.107p = P(T_{39} \ge 1.26) \approx 0.107 0.107>0.030.107 > 0.03 → do not reject H0H_0 → insufficient evidence that mean time exceeds 48 hr.

Example 3 – Ibrahim’s petrol pumps (two‑tail) n=32n=32, xˉ=30.3\bar{x}=30.3 L, s=0.5s=0.5 L, α=0.05\alpha=0.05.

  • H0:μ=30H_0: \mu = 30, Ha:μ≠30H_a: \mu \neq 30 (pumps may over‑ or under‑fill).
  • s/n=0.5/32=0.0884s/\sqrt{n}=0.5/\sqrt{32}=0.0884 t=30.3−300.0884=3.39t = \frac{30.3-30}{0.0884} = 3.39
  • df=31df=31, two‑tail p=2×P(T31≥3.39)≈0.002p = 2 \times P(T_{31} \ge 3.39) \approx 0.002.
  • p<0.05p < 0.05 → reject H0H_0.
  • Conclusion: Evidence that the mean dispensed amount is not 30 L; recalibration is needed.

Key takeaways

  • Hypothesis tests always involve two errors; α\alpha controls Type I, β\beta is managed through design.
  • The five‑step framework works for any population mean test: state hypotheses, choose α\alpha, compute tt‑statistic, obtain pp‑value, draw conclusion.
  • A pp‑value smaller than α\alpha means the observed sample is unlikely under H0H_0 → reject.
  • Three test directions: lower‑tail (negative extreme), upper‑tail (positive extreme), two‑tail (both extremes).
  • Always finish with a real‑world statement of what the decision means for the decision maker.

Hypothesis Testing for Population Mean

Hypothesis testing is a formal procedure to decide whether sample data provide enough evidence to reject a claim about a population parameter. For the mean μ\mu, the process always follows the same skeleton: state hypotheses, compute a test statistic, find the p-value, and compare it to the significance level α\alpha. The test statistic measures how far the sample mean xˉ\bar{x} is from the claimed value under the null hypothesis, in units of standard error.

Three types of tests

The alternative hypothesis (H1H_1 or HaH_a) determines the type of test. The claim being tested is usually placed in H1H_1.

TestH1H_1 formH0H_0 formWhen used
Lower-tail testμ<A\mu < Aμ≥A\mu \ge AClaim that mean is less than a threshold (e.g., average lentil weight below labelled weight)
Upper-tail testμ>A\mu > Aμ≤A\mu \le AClaim that mean is greater than a threshold (e.g., average service work order completion time exceeds target)
Two-tail testμ≠A\mu \neq Aμ=A\mu = AClaim that mean differs from a specific value (e.g., average petrol pump fill is not exactly 5 litres)

Test statistic (unknown population σ\sigma)

When the population standard deviation σ\sigma is unknown (the usual case), the test statistic follows a tt-distribution with n−1n-1 degrees of freedom:

t=xˉ−As/nt = \frac{\bar{x} - A}{s / \sqrt{n}}

where ss is the sample standard deviation and AA is the value under H0H_0 at equality.

Computing the p-value

The p-value is the probability, under H0H_0, of obtaining a test statistic as extreme as (or more extreme than) the observed value, in the direction(s) specified by H1H_1.

  • Lower-tail test: p-value=P(Tn−1<tobs)\text{p-value} = P(T_{n-1} < t_{\text{obs}})
  • Upper-tail test: p-value=P(Tn−1>tobs)\text{p-value} = P(T_{n-1} > t_{\text{obs}})
  • Two-tail test: If tobs>0t_{\text{obs}} > 0: p-value=2×P(Tn−1>tobs)\text{p-value} = 2 \times P(T_{n-1} > t_{\text{obs}}) If tobs<0t_{\text{obs}} < 0: p-value=2×P(Tn−1<tobs)\text{p-value} = 2 \times P(T_{n-1} < t_{\text{obs}}) (By symmetry of the tt-distribution, the two-tail p-value is double the one-tail probability in the tail of the observed statistic.)

Decision rule: Reject H0H_0 if p-value≤α\text{p-value} \le \alpha (including exact equality). Otherwise, do not reject H0H_0.

Special case: known σ\sigma

If the population standard deviation σ\sigma is known, replace ss with σ\sigma. The test statistic becomes a zz-statistic (standard normal):

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

The p-value is computed from the standard normal distribution (N(0,1)N(0,1)) instead of the tt-distribution. All other steps remain identical.

Key takeaways

  • Hypothesis tests for μ\mu are lower-tail, upper-tail, or two-tail depending on the claim in H1H_1.
  • Test statistic is t=(xˉ−A)/(s/n)t = (\bar{x} - A) / (s/\sqrt{n}) with n−1n-1 df (unknown σ\sigma) or zz (known σ\sigma).
  • p-value = tail probability of the test statistic; two-tail p-value doubles the one-tail probability.
  • Reject H0H_0 if p-value≤α\text{p-value} \le \alpha; otherwise fail to reject.

Hypothesis Testing for Population Proportion

Testing a claim about the population proportion pp follows the same logic as for the mean, but uses a different sampling distribution and test statistic. The sample proportion p^\hat{p} is approximately normal for large samples.

Hypotheses and test types

Again, H1H_1 determines the tail. Let p0p_0 be the hypothesized value under H0H_0 at equality.

TestH1H_1 formH0H_0 form
Lower-tailp<p0p < p_0p≥p0p \ge p_0
Upper-tailp>p0p > p_0p≤p0p \le p_0
Two-tailp≠p0p \neq p_0p=p0p = p_0

Test statistic

The sampling distribution of p^\hat{p} is approximately normal with mean pp and standard deviation p(1−p)/n\sqrt{p(1-p)/n}, provided nn is large. Under H0H_0 at equality (p=p0p = p_0), the test statistic is a zz-statistic:

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

p-value computation

The p-value is computed exactly as for the mean, but using the standard normal distribution N(0,1)N(0,1):

  • Lower-tail: p-value=P(Z<zobs)\text{p-value} = P(Z < z_{\text{obs}})
  • Upper-tail: p-value=P(Z>zobs)\text{p-value} = P(Z > z_{\text{obs}})
  • Two-tail: 2×2 \times the one-tail probability in the direction of zobsz_{\text{obs}}.

Exam tip: For proportions, the test statistic uses p0p_0 in the denominator (under H0H_0), not p^\hat{p}. This differs from the standard error used in confidence intervals for pp, where p^\hat{p} is used.

The decision rule remains the same: reject H0H_0 if p-value≤α\text{p-value} \le \alpha.

Key takeaways

  • Hypothesis tests for proportion pp mirror the structure for μ\mu: null vs. alternative, tail choice, p-value comparison.
  • Test statistic is z=(p^−p0)/p0(1−p0)/nz = (\hat{p} - p_0) / \sqrt{p_0(1-p_0)/n}, using p0p_0 in the denominator.
  • The zz-test is valid when the normal approximation holds (large nn).
  • Reject H0H_0 if p-value≤α\text{p-value} \le \alpha; otherwise fail to reject.

Hypothesis Testing for Population Proportion

Hypothesis testing for a population proportion answers whether the true proportion pp of a categorical outcome differs from a hypothesized value p0p_0. The sample proportion pˉ=x/n\bar{p} = x/n serves as the point estimate, and the test checks if the observed deviation from p0p_0 is statistically significant.

The test statistic and its distribution

Under the null hypothesis H0H_0 (assumed true at equality), the sampling distribution of pˉ\bar{p} is approximately normal if np0≥5andn(1−p0)≥5.n p_0 \ge 5 \quad\text{and}\quad n(1-p_0) \ge 5.

The standard error of pˉ\bar{p} under H0H_0 is σpˉ=p0(1−p0)n.\sigma_{\bar{p}} = \sqrt{\frac{p_0(1-p_0)}{n}}.

The test statistic z=pˉ−p0σpˉz = \frac{\bar{p} - p_0}{\sigma_{\bar{p}}} follows a standard normal distribution N(0,1)N(0,1).

Three forms of the test

Alternative hypothesis HaH_aTest typepp-value
p>p0p > p_0Upper‑tailP(Z>z)P(Z > z)
p<p0p < p_0Lower‑tailP(Z<z)P(Z < z)
p≠p0p \neq p_0Two‑tailed2×P(Z>∣z∣)2 \times P(Z > \lvert z \rvert)

Reject H0H_0 if the pp-value ≤α\le \alpha (the significance level).

Worked examples

Example 1 – Upper‑tail test (Swiggy coupons)

  • Claim (to test): more than 10 % of coupon recipients will use them → Ha:p>0.10H_a: p > 0.10 H0:p≤0.10H_0: p \le 0.10
  • Sample: n=80,  x=12n = 80,\; x = 12 used coupons → pˉ=12/80=0.15\bar{p} = 12/80 = 0.15
  • Conditions: 80×0.10=8≥580 \times 0.10 = 8 \ge 5, 80×0.90=72≥580 \times 0.90 = 72 \ge 5 ✓
  • Standard error: σpˉ=0.10×0.9080=0.03\sigma_{\bar{p}} = \sqrt{\frac{0.10 \times 0.90}{80}} = 0.03
  • Test statistic: z=0.15−0.100.03=1.49z = \frac{0.15 - 0.10}{0.03} = 1.49
  • pp-value: P(Z>1.49)=0.068P(Z > 1.49) = 0.068
  • Decision: 0.068>α=0.050.068 > \alpha = 0.05 → do not reject H0H_0.

Exam tip: Even though the sample proportion (15 %) is higher than the hypothesized value (10 %), the p‑value exceeds 5 %. The difference is not large enough given the standard error – a reminder that sample evidence must be weighed against sampling variability.

Example 2 – Lower‑tail test (Jhansi sleeper adequacy)

  • Claim (to test): less than 50 % of travellers find sleeper arrangements inadequate → Ha:p<0.50H_a: p < 0.50 H0:p≥0.50H_0: p \ge 0.50
  • Sample: n=510n = 510, 280 said adequate, so number finding inadequate = 510−280=230510-280 = 230. pˉ=230/510=0.45\bar{p} = 230/510 = 0.45 (watch the definition of “success” – here it is inadequate).
  • Conditions: 510×0.50=255≥5510 \times 0.50 = 255 \ge 5 ✓
  • Standard error: σpˉ=0.50×0.50510=0.022\sigma_{\bar{p}} = \sqrt{\frac{0.50 \times 0.50}{510}} = 0.022
  • Test statistic: z=0.45−0.500.022=−2.21z = \frac{0.45 - 0.50}{0.022} = -2.21
  • pp-value: P(Z<−2.21)=0.013P(Z < -2.21) = 0.013
  • Decision: 0.013<α=0.030.013 < \alpha = 0.03 → reject H0H_0.

Exam tip: Carefully define what “success” means for the proportion under test. In this problem the claim is about inadequate arrangements, but the raw data gave the count of adequate – always translate to the outcome of interest.

Example 3 – Two‑tailed test (Noida hotel bookings)

  • Claim (to test): the proportion of fully booked hotels is not 90 % → Ha:p≠0.90H_a: p \neq 0.90 H0:p=0.90H_0: p = 0.90
  • Sample: n=70n = 70, 12 have vacancies → 70−12=5870-12 = 58 booked → pˉ=58/70=0.83\bar{p} = 58/70 = 0.83
  • Conditions: 70×0.90=63≥570 \times 0.90 = 63 \ge 5, 70×0.10=7≥570 \times 0.10 = 7 \ge 5 ✓
  • Standard error: σpˉ=0.90×0.1070=0.036\sigma_{\bar{p}} = \sqrt{\frac{0.90 \times 0.10}{70}} = 0.036
  • Test statistic: z=0.83−0.900.036=−1.99z = \frac{0.83 - 0.90}{0.036} = -1.99
  • pp-value: 2×P(Z<−1.99)=2×0.023=0.0462 \times P(Z < -1.99) = 2 \times 0.023 = 0.046
  • Decision: 0.046<α=0.050.046 < \alpha = 0.05 → reject H0H_0.

Key takeaways

  • The test statistic for a proportion is z=(pˉ−p0)/p0(1−p0)/nz = (\bar{p} - p_0) \big/ \sqrt{p_0(1-p_0)/n}.
  • Valid only if np0≥5n p_0 \ge 5 and n(1−p0)≥5n(1-p_0) \ge 5.
  • Three alternatives: >>, <<, ≠\neq; compute the pp-value accordingly.
  • Reject H0H_0 when pp-value ≤α\le \alpha.
  • Watch the definition of success – it must align with the claim.

Hypothesis Testing for Population Variance

Hypothesis testing for a population variance σ2\sigma^2 uses the sample variance s2s^2 to judge whether σ2\sigma^2 differs from a hypothesized value σ02\sigma_0^2. The procedure requires the population to be normally distributed.

The test statistic and its distribution

If the population is normal, the quantity (n−1)s2σ2\frac{(n-1)s^2}{\sigma^2} follows a chi‑square distribution with n−1n-1 degrees of freedom.

Under H0H_0 (assuming σ2=σ02\sigma^2 = \sigma_0^2), the test statistic χ2=(n−1)s2σ02\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} has a χn−12\chi^2_{n-1} distribution.

Three forms of the test

Alternative hypothesis HaH_aTest typepp-value
σ2<σ02\sigma^2 < \sigma_0^2Lower‑tailP(χn−12<observed χ2)P(\chi^2_{n-1} < \text{observed } \chi^2)
σ2>σ02\sigma^2 > \sigma_0^2Upper‑tailP(χn−12>observed χ2)P(\chi^2_{n-1} > \text{observed } \chi^2)
σ2≠σ02\sigma^2 \neq \sigma_0^2Two‑tailed2×min⁡{P(χ2≤observed),  P(χ2≥observed)}2 \times \min\{P(\chi^2 \le \text{observed}),\;P(\chi^2 \ge \text{observed})\}

Reject H0H_0 if pp-value ≤α\le \alpha.

Worked examples

Example 1 (Upper‑tail test – Meerut bus arrival variance)

  • Claim (to test): variance of arrival times is below 4 minutes.
  • H0:σ2≥4,Ha:σ2<4H_0: \sigma^2 \ge 4,\qquad H_a: \sigma^2 < 4
  • Sample: n=24,  s2=4.9n = 24,\; s^2 = 4.9
  • Conditions: population assumed normal ✓
  • Test statistic: χ2=(24−1)×4.94=23×4.94=28.18\chi^2 = \frac{(24-1) \times 4.9}{4} = \frac{23 \times 4.9}{4} = 28.18
  • pp-value: P(χ232<28.18)≈0.791P(\chi^2_{23} < 28.18) \approx 0.791
  • Decision: 0.791>α=0.050.791 > \alpha = 0.05 → do not reject H0H_0.

Interpretation: The sample does not provide evidence that the variance is below 4 minutes.

Example 2 (Two‑tailed test – Gorakhpur driving test scores)

  • Claim (to test): variance of new exam scores differs from historical 100 → Ha:σ2≠100H_a: \sigma^2 \neq 100 H0:σ2=100H_0: \sigma^2 = 100
  • Sample: n=30,  s2=162n = 30,\; s^2 = 162
  • Test statistic: χ2=(30−1)×162100=29×162100=46.98\chi^2 = \frac{(30-1) \times 162}{100} = \frac{29 \times 162}{100} = 46.98
  • pp-value: 2×min⁡{P(χ292≤46.98),P(χ292≥46.98)}≈0.0372 \times \min\{P(\chi^2_{29} \le 46.98), P(\chi^2_{29} \ge 46.98)\} \approx 0.037
  • Decision: 0.037<α=0.050.037 < \alpha = 0.05 → reject H0H_0.

Key takeaways

  • Test on variance uses χ2=(n−1)s2/σ02\chi^2 = (n-1)s^2 / \sigma_0^2 with n−1n-1 degrees of freedom.
  • Requires normal population.
  • Three forms: lower‑tail, upper‑tail, two‑tailed.
  • For two‑tailed tests, double the smaller tail probability because the chi-square distribution is asymmetric.
  • Reject H0H_0 when pp-value ≤α\le \alpha.

Hypothesis Testing for Population Variance

Hypothesis tests for a population variance σ2\sigma^2 are used to judge claims about the dispersion of a normally distributed population – e.g., whether a production process has become too variable or whether a variance equals a specified target σ02\sigma_0^2. The test relies on the chi-square distribution because the sample variance s2s^2 scaled by degrees of freedom follows a χ2\chi^2 distribution under normality.

Test Statistic

Under the null hypothesis H0H_0, assuming a normal population:

χ2=(n−1)s2σ02∼χn−12\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} \sim \chi^2_{n-1}

where nn = sample size, s2s^2 = sample variance, σ02\sigma_0^2 = hypothesized value.

Three Types of Tests

The alternative hypothesis determines the type of test and how the p-value is computed.

TypeH0H_0HaH_aP‑value
Lower‑tailσ2=σ02\sigma^2 = \sigma_0^2σ2<σ02\sigma^2 < \sigma_0^2P(χn−12≤computed χ2)P(\chi^2_{n-1} \le \text{computed } \chi^2)
Upper‑tailσ2=σ02\sigma^2 = \sigma_0^2σ2>σ02\sigma^2 > \sigma_0^2P(χn−12≥computed χ2)P(\chi^2_{n-1} \ge \text{computed } \chi^2)
Two‑tailσ2=σ02\sigma^2 = \sigma_0^2σ2≠σ02\sigma^2 \neq \sigma_0^22×min⁡(2 \times \min(…)) (area in the smaller tail)

Decision Rule

Compute the test statistic from sample data. Obtain the p‑value based on the χn−12\chi^2_{n-1} distribution. Reject H0H_0 if p-value≤α\text{p-value} \le \alpha (the chosen significance level). Otherwise, do not reject H0H_0.

Worked Process (Flowchart)

Exam tip: The chi‑square test for variance is valid only when sampling from a normal population. Violating this assumption can severely distort the p‑value. Always check normality (e.g., histogram, normal probability plot) before applying this test.

Key takeaways

  • Test statistic: χ2=(n−1)s2σ02\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} with n−1n-1 degrees of freedom.
  • Three test types: lower‑tail, upper‑tail, two‑tail – choose based on the claim.
  • Decision: reject H0H_0 if p‑value ≤α\le \alpha.
  • Normality of the population is a critical assumption.

Module 5 Recap: Confidence Intervals and Hypothesis Tests

This module used sampling distributions (of xˉ\bar{x}, p^\hat{p}, s2s^2) to perform statistical inference via two complementary approaches: confidence intervals (estimation) and hypothesis tests (decision‑making).

1. Confidence Intervals

For each parameter, a confidence interval provides a range of plausible values at a chosen confidence level.

ParameterPoint estimateForm of intervalDistribution used
μ\muxˉ\bar{x}xˉ±margin of error\bar{x} \pm \text{margin of error}tn−1t_{n-1} (or zz if σ\sigma known)
ppp^\hat{p}p^±margin of error\hat{p} \pm \text{margin of error}Standard normal (zz)
σ2\sigma^2s2s^2Direct lower and upper bounds: ((n−1)s2χα/22,  (n−1)s2χ1−α/22)\left( \frac{(n-1)s^2}{\chi^2_{\alpha/2}},\; \frac{(n-1)s^2}{\chi^2_{1-\alpha/2}} \right)χn−12\chi^2_{n-1}
  • Sample size determination for μ\mu and pp: set nn to achieve a desired margin of error.

2. Hypothesis Tests

Hypothesis testing answers “Is the population parameter equal to, greater than, or less than a specific value?” Steps:

  1. Identify the claim and who is making it – this guides the structure of H0H_0 and HaH_a (not always symmetric).
  2. Write null and alternative hypotheses based on the claim.
  3. Choose the test statistic according to the parameter and sampling conditions:
    • μ\mu: t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s/\sqrt{n}} (or zz if σ\sigma known)
    • pp: z=p^−p0p0(1−p0)/nz = \frac{\hat{p} - p_0}{\sqrt{p_0(1-p_0)/n}}
    • σ2\sigma^2: χ2=(n−1)s2σ02\chi^2 = \frac{(n-1)s^2}{\sigma_0^2} (only under normality)
  4. Compute the p‑value – the probability of obtaining a test statistic as extreme as observed, assuming H0H_0 is true. This is the probability of a Type I error.
  5. Decision: Reject H0H_0 if p‑value ≤α\le \alpha; otherwise do not reject.

Exam tip: When setting up H0H_0 and HaH_a, remember that the claim is often placed in the alternative hypothesis unless it’s a statement of “no difference”. Also, H0H_0 always contains the equality (=,≤,≥=, \le, \ge).

Both confidence intervals and hypothesis tests draw conclusions about a population from a single random sample. The next module extends inference to regression – modelling relationships between variables.

Key takeaways

  • Confidence intervals give a range; hypothesis tests give a yes/no verdict.
  • Each parameter uses a specific sampling distribution (tt, zz, χ2\chi^2).
  • The p‑value quantifies the risk of a Type I error; reject H0H_0 when that risk is small (≤α\le \alpha).
  • Correct formulation of hypotheses is the most common pitfall – always ask “What claim is being tested?”