Suppose 10% of the general population is left-handed. In a sample of 100 patients with carpal tunnel syndrome, 16 are found to be left-handed. Is this evidence that the proportion of left-handedness is higher among carpal tunnel syndrome patients than among the general population?
We would like to develop a framework through which we can analyze whether data weβve collected provides evidence for a particular hypothesis. In fact, we will generally consider two hypotheses:
The null hypothesis, often denoted \(H_0\text{,}\) is the assumption that an effect being studied or proposed does not exist. The alternative hypothesis, \(H_a\text{,}\) is the claim that the effect does exist.
In the previous example, if we write \(\theta\) for the true proportion of left-handed people among the population with carpal tunnel syndrome, the null hypothesis would be that this proportion is the same as the general population. The alternative hypothesis might be, for example, that the proportion is higher than among the general population:
Weβll use the notation \(\alpha\) for the probability of making a type I error, also called the significance level, and \(\beta\) for the probability of making a type II error. The power of a test is the probability of correctly rejecting \(H_0\text{,}\) i.e., \(1 - \beta\text{.}\)
Continuing the previous example, under \(H_0\) that \(\theta = 0.1\text{,}\) the probability of seeing at least 16 left-handed people in a sample of 100 people would be:
The goal of our calculation is to control the chance of making a type I error by choosing a significance level cutoff, often 0.05. If our calculated \(p\)-value is below the cutoff, then reject \(H_0\text{.}\) Otherwise, accept \(H_0\text{.}\) In the previous example, we would reject \(H_0\text{,}\) because it appears that the data we collected is pretty unlikely to see if the null hypothesis were true. We would accept that, about 4% of the time if the null hypothesis is true, we would see data at least this extreme, and therefore make a mistake by rejecting \(H_0\text{.}\)
The test we just applied is called 1-tailed. The alternative hypothesis \(\theta \gt 0.1\) proposed that \(\theta\) was different from 0.1 in a specific direction. For a 2-tailed test, we could use the alternative hypothesis that \(\theta \neq 0.1\text{.}\) In this setting, the idea of data "at least as extreme" as what was measured is reframed. We measured 16 left-handed people in a sample of 100, which is 6 more than we would expect under the null hypothesis. So we should also include the possibility of seeing at least 6 fewer left-handed people in the sample than expected:
We find a coin on the street and wonder if itβs a fair coin. We flip it 100 times and see 62 heads. Is this strong evidence to reject the null hypothesis of a fair coin at a 0.05 significance level?
Let \(S\) be the random variable which counts the number of heads in 100 flips. The null hypothesis \(H_0\) of a fair coin would mean the parameter \(\theta = \Pr(\text{heads}) = 0.5\text{.}\) (Weβll avoid the letter \(p\) for the parameter to prevent confusion with the new term, \(p\)-value.) So:
We have a coin which weβve flipped many times, seeing an above-average number of heads. We suspect the coin comes up heads more often than a fair coin would.
In a medical study, a group of patients are gathered and the proportion experiencing particular symptoms is measured. A new drug intended to eliminate these symptoms is administered, after which the proportion experiencing symptoms is measured again.
Suppose we find a coin and wonder whether itβs fair. As a first test, we decide to flip the coin 200 times and count the number of heads. If we see 112 heads, should we accept or reject the null hypothesis of a fair coin at a significance level of 0.05?
Suppose we have a coin which we suspect comes up heads more often than a fair coin would. As a first test, we decide to flip the coin 200 times and count the number of heads. If we see 112 heads, should we accept or reject the null hypothesis of a fair coin at a significance level of 0.05?
Suppose we find a six-sided die and wonder whether itβs fair. As a first test, we decide to roll the die 100 times and count the number of times it comes up 1. If we roll 22 1βs, should we accept or reject the null hypothesis of a fair die at a significance level of 0.05?
Suppose a particular plant when grown outdoors has an average height of 39 in with a variance of 20 in\(^2\text{.}\) We suspect that growing this plant in a greenhouse will increase its height. A sample of 50 plants grown in a greenhouse has an average height of 40 in. Is this significant enough data to reject the null hypothesis of equal means at the \(p = 0.05\) significance level?