Hypothesis Testing

Harold Nelson

2024-03-27

Hypothesis Testing

Hypothesis testing is an alternative to confidence interval construction.

Confidence intervals are easy to understand. You use a confidence interval to make an expanded statement on an estimate you’ve made.

Here’s my estimate, and here’s how good I think it. My estimate is WWW and I am XXX% confident that the true value is between YYY and ZZZ.

That’s a clean, clear statement. Hypothesis testing requires us to speak in a very twisted, awkward manner.

The Null Hypothesis

We focus on the null hypothesis and decide whether or not we are able to reject it and accept an alternative hypothesis instead.

The concept of the null hypothesis is not very intuitive. A better term might be “The claim of nothingness.” That probably isn’t a legitimate word, but it may be clearer than “null hypothesis.”

Typical null hypotheses?

The Alternative Hypothesis

The alternative is what we will accept if we decide to reject the null hypothesis. There are two possibilities:

The choice of the alternative must be made before data is analyzed. This is hard to do in the classroom environment where the results of the data analyis are presented in the problem statement.

The Process

  1. State the null and alternative hypotheses.

  2. Collect relevant data from a random sample and summarize them (using a test statistic).

  3. Find the p-value, the probability of observing data like those observed assuming that \(H_{o}\) is true.

  4. Based on the p-value, decide whether we have enough evidence to reject \(H_{o}\) (and accept \(H_{a}\)), and draw our conclusions in context.

The Conclusion

We need to make one of two statements.

  1. “I reject the null hypothesis.”

  2. “I don’t have enough evidence to reject the null hypothesis.”

The first statement is a double negative and the second statement is a triple negative.

Examples

For each of these state the null hypothesis and the alternative hypothesis. Note that to mimic the real-world process we must ignore the results of any data analysis at this stage.

Example

A professional gambler is concerned about the possibilty that a coin used in flipping rituals might not be fair. She really doesn’t have any particularly suspicion. She’s just uncomfortable that it’s never been formally examined. She asks that the coin be tested by flipping it many times to see if it really shows heads 50% of the time.

Solution

The null hypothesis is that the proportion is .5.

The alternative is two-sided.

Example

Another professional gambler is concerned that a coin has been showing heads more frequently than it should. He asks to have it examined for fairness by flipping it many times to see if it is really fair.

Solution

The null hypothesis is the same, but the alternative is 1-sided.

Example

New York is known as “the city that never sleeps”. The normal amount of sleep for the US population is eight hours per night.

Solution

The null hypothesis is that New Yorkers sleep eight hours per night.

The alternative hypothesis is that they sleep less. This is one-sided.

Example

A university president is concerned that students are extending break periods by staying home extra days after holidays. On a normal monday, 10% of students will be absent from class. He asks that professors take role in class the monday after Thanksgiving and report the results to him.

Solution

The null hypothesis is that 10% of students will be absent on the Monday after Thanksgiving.

The alternative is that the absentee rate will be greater than 10%. This is one-sided.