ConceptComplete

Hypothesis Testing Framework

Hypothesis testing provides a formal framework for making decisions about population parameters based on sample data, controlling the probability of erroneous conclusions.


Basic Concepts

Definition

A hypothesis test involves:

  • Null hypothesis H0H_0: the default assumption (e.g., θ=θ0\theta = \theta_0)
  • Alternative hypothesis H1H_1 (or HaH_a): the claim to be supported (e.g., θθ0\theta \neq \theta_0, θ>θ0\theta > \theta_0, or θ<θ0\theta < \theta_0)
  • Test statistic T=T(X1,,Xn)T = T(X_1, \ldots, X_n): a function of the data
  • Rejection region RR: the set of values of TT that lead to rejecting H0H_0
Definition

The two types of errors are:

  • Type I error: Rejecting H0H_0 when it is true. The probability α=P(reject H0H0 true)\alpha = P(\text{reject } H_0 | H_0 \text{ true}) is the significance level.
  • Type II error: Failing to reject H0H_0 when it is false. The probability β=P(fail to reject H0H1 true)\beta = P(\text{fail to reject } H_0 | H_1 \text{ true}).
  • Power: 1β=P(reject H0H1 true)1 - \beta = P(\text{reject } H_0 | H_1 \text{ true}) measures the ability to detect a true effect.

The Testing Procedure

ExampleZ-test for the mean

Test H0:μ=μ0H_0: \mu = \mu_0 vs. H1:μμ0H_1: \mu \neq \mu_0 with known σ\sigma at level α\alpha:

  • Test statistic: Z=Xˉμ0σ/nZ = \frac{\bar{X} - \mu_0}{\sigma/\sqrt{n}}
  • Under H0H_0: ZN(0,1)Z \sim N(0,1)
  • Rejection region: Z>zα/2|Z| > z_{\alpha/2}

For α=0.05\alpha = 0.05: reject if Z>1.96|Z| > 1.96. The type II error depends on the true μ\mu: β(μ)=Φ(zα/2μμ0σ/n)Φ(zα/2μμ0σ/n)\beta(\mu) = \Phi\left(z_{\alpha/2} - \frac{\mu - \mu_0}{\sigma/\sqrt{n}}\right) - \Phi\left(-z_{\alpha/2} - \frac{\mu - \mu_0}{\sigma/\sqrt{n}}\right).


P-Values

RemarkP-value interpretation

The pp-value is the probability, under H0H_0, of observing a test statistic as extreme as or more extreme than the one actually observed. We reject H0H_0 when p<αp < \alpha. The pp-value quantifies the strength of evidence against H0H_0: smaller pp means stronger evidence. However, the pp-value is NOT the probability that H0H_0 is true, a common misinterpretation.