Basics

Hypothesis testing is a statistical method used to determine if there is enough evidence in sample data to support a specific assumption about a population.

Defining hypothesis -

  • Null Hypothesis : The starting assumption
  • Alternative Hypothesis : The opposite saying there is a difference

Let be a subset termed as the acceptance subset. If , then

  • Suppose , then
  • Subset a hypothesis test

If , we accept else we reject .

Metrics -

  • Significance Level -
    • Denoted as and corresponds to the probability of a Type I error.
    • Type I error: Rejecting when is true.
    • .
  • Power of a test -
    • Denoted as and corresponds to the probability of a Type II error.
    • Type II error: Accepting when is true.
    • .
    • .

The art of hypothesis testing is choosing the acceptance subset wisely, small enough such that the significance level is low but large enough such that the power is high.

Types of Hypothesis Testing

  1. Simple Hypothesis - A hypothesis that completely specifies the distribution of the samples. It’s a very well understood and the best approach known, but rarely occurs.
  2. Composite Hypothesis - A hypothesis that doesn’t completely specify the distribution of the samples. Well studied but multiple approaches are possible and is the most common.
    • One-tailed Test - Checks if the value is less than or greater than some threshold .
      • Left Tailed Test - .
      • Right Tailed Test - .
    • Two-tailed Test - Used when we want to see if there is a difference in either direction higher or lower.
      • Example -