Hypothesis Testing

Hypothesis testing assesses if data supports a claim (hypothesis) using statistical methods. It’s vital for drawing conclusions in data science. This article covers the process, p-value, an example, and applications.

Steps in Testing

  1. State Hypotheses: Null (\( H_0 \)) vs. Alternative (\( H_1 \)).
  2. Choose Significance Level: \( \alpha \) (e.g., 0.05).
  3. Calculate Test Statistic: E.g., \( z = \frac{\bar{x} - \mu}{\sigma / \sqrt{n}} \).
  4. Decision: Reject \( H_0 \) if p-value < \( \alpha \).

P-Value and Significance

P-value: Probability of observing data assuming \( H_0 \) is true.

  • < \( \alpha \): Reject \( H_0 \).
  • > \( \alpha \): Fail to reject \( H_0 \).

Measures evidence strength.

Example Test

Test if mean height = 170 cm (\( \sigma = 10 \), \( n = 25 \), \( \bar{x} = 175 \)):

  • \( H_0: \mu = 170 \), \( H_1: \mu \neq 170 \).
  • \( z = \frac{175 - 170}{10 / \sqrt{25}} = 2.5 \).
  • P-value ≈ 0.012 < 0.05, reject \( H_0 \).

Height differs significantly.

Applications

Used in:

  • Medicine: Drug efficacy tests.
  • Marketing: A/B testing campaigns.
  • Science: Validating theories.

Ensures reliable conclusions.