Wiki Page, Math 13 - Perez Sandbox : Module 20 - Introduction to Hypothesis Testing (2a of 5)

Wiki Page
2026-01-17T21:15:29-08:00

In this section, our focus is hypothesis testing, which is part of inference. On the previous page, we practiced stating null and alternative hypotheses from a research question. Forming the hypotheses is the first step in a hypothesis test. Here are the general steps in the process of hypothesis testing.

Step 1: Determine the hypotheses.

The hypotheses come from the research question.

Step 2: Collect the data.

Ideally, we select a random sample from the population. We use data from the random sample to calculate a statistic (a mean or a proportion) to summarize the data.

Step 3: Assess the evidence.

Next step is to determine if the sample result could reasonably occur when selecting random samples from the population described by the null hypothesis. We use simulation or a mathematical model to describe the probability distribution of sample statistics expected when the null hypothesis is true.

Step 4: State a conclusion.

We use what we find in the previous step to make a decision. Remember that the simulation or the mathematical model is based on the assumption that the null hypothesis is true. Based on this assumption, one of two outcomes can occur:

One possibility is that our sample result is unlikely to occur in random samples from the population described by the null hypothesis. If we think in terms of statistical error (distance from the hypothesized parameter), the probability is small that a sample statistics has this much error. We conclude that the sample provides strong evidence against the null hypothesis. We reject the null hypothesis in favor of the alternative hypothesis.

For example, a sample proportion of 0.68 or greater might be rare when the population proportion is 0.50. Therefore, we conclude that our hypothesis that the population proportion is 0.50 is incorrect.

The other possibility is that our sample results are likely to occur in random samples from the population described by the null hypothesis. If we think in terms of statistical error (distance from the hypothesized parameter), the probability is large that sample statistics have a small amount of error. We conclude that the sample does not provide strong evidence against the null hypothesis, so we cannot reject it in favor of the alternative hypothesis.

For example, a sample proportion of 0.52 or greater is common in random sampling when the population proportion is 0.50. Therefore, we conclude that the sample does not provide strong evidence against our hypothesis that the population proportion is 0.50. We cannot reject the possibility that the population proportion is 0.50 (even though the sample proportion was a little larger.)

EXAMPLE Data use on smartphones

According to an article by Andrew Berg (“Report: Teens Texting More, Using More Data,” Wireless Week, October 15, 2010), a study found significant growth in data usage, particularly among teens, stating that “94 percent of teen subscribers self-identify as advanced data users, turning to their cellphones for messaging, Internet, multimedia, gaming, and other activities like downloads.”

The study found that the mean cell phone data usage was 62 MB among teens ages 13 to 17. A researcher is curious whether cell phone data usage has increased for this age group since the original study was conducted. She plans to conduct a hypothesis test.

Step 1: Determine the hypotheses.

The null hypothesis is often a statement of “no change,” so the null hypothesis will state that there is no change in the mean cell phone data usage for this age group since the original study. In this case, the alternative hypothesis is that the mean has increased from 62 MB.

: The mean data usage for teens with smartphones is still 62 MB.

: The mean data usage for teens with smartphones is greater than 62 MB.

Step 2: Collect the data.

The next step is to obtain a sample and collect data that will allow the researcher to test the hypotheses. The sample must be representative of the population and should be a random sample. In this case, the researcher must randomly sample teens who use smart phones.

For the purposes of this example, imagine that the researcher randomly samples 50 teens who use smart phones. She finds that the mean data usage for these teens was 75 MB with a standard deviation of 45 MB.

Since the sample mean is greater than 62 MB, it provides some evidence in favor of the alternative hypothesis. But we know that random samples will vary. So how much of a difference will make her doubt the null hypothesis? Does she have evidence strong enough to reject the null hypothesis?

Step 3: Assess the evidence.

To assess the evidence, the researcher needs to know how much variability to expect in random samples when the null hypothesis is true.

She begins with the assumption that H₀ is true—in this case, that the mean data usage for teens is still 62 MB. She then determines how unusual the results of the sample are: If the mean for all teens with smart phones actually is 62 MB, what is the chance that a random sample of 50 teens will have a sample mean of 75 MB or higher? Obviously, this probability depends on how much variability there is in random samples of this size from this population.

The probability of observing a sample mean at least this high if the population mean is 62 MB is approximately 0.023 (later topics explain how to calculate this probability). The probability is quite small. It tells the researcher that if the population mean is actually 62 MB, a sample mean of 75 MB or higher will occur only about 2.3% of the time. This probability is called the P-value.

Note: The P-value is a conditional probability. The condition is the assumption that the null hypothesis is true.

Step 4: Conclusion.

The small P-value indicates that it is unlikely for a sample mean to be 75 MB or higher if the population has a mean of 62 MB. It is therefore unlikely that the data from these 50 teens came from a population with a mean of 62 MB. The evidence is strong enough to make the researcher doubt the null hypothesis, so she rejects the null hypothesis in favor of the alternative hypothesis. The researcher concludes that the mean data usage for teens with smartphones has increased since the original study. It is now greater than 62 MB. (P = 0.023)

Comment

Notice that the P-value is included in the preceding conclusion, which is a common practice. It allows the reader to see the strength of the evidence used to draw the conclusion.

Why do we need a P-value?

In the previous example about cell phone usage by teenagers, the sample mean was greater than 62 MB. This fact alone does not suggest that the data supports the alternative hypothesis. We have to determine that the data is not only larger than 62 MB but larger than we would expect to see in random sampling if the population mean is 62 MB. We therefore need to determine the P-value.

If the sample mean were less than or equal to 62 MB, it would not support the alternative hypothesis. We wouldn't need to find a P-value in this case. The conclusion would be clear without it.

Mark this page as done, then click the "Next" or > button to continue.

Content by the Open Learning Initiative and licensed under CC BY.