STA 111 Lab 6

Complete all Questions, and submit final documents in html or PDF form on Canvas.

The Goal

In the last lab, we learned how to build and interpret confidence intervals for a population proportion. This allows us to report a range of plausible values for a population parameter. In this lab, we are going to see how to use hypothesis tests as another tool for using sample statistics to make conclusions about population parameters.

The Data

As in our last lab, we are going to use data from Gallup. The Gallup organization released an article ( https://news.gallup.com/poll/358364/religious-americans.aspx) that claims that:

  • 45% of Americans say religion is very important
  • 26% of Americans say that religion is fairly important
  • 28% of Americans say religion is not important

Question 1

You will notice that these three values do not add up to 100%. Why do you think that happened? Hint: It has nothing to do with data collection and everything to do with how values are reported!!

Question of Interest

We have a researcher who wants to claim that the proportion of all Americans who feel that religion is not important is more than 25%. In other words, about 1 in 4 Americans believe that religion is not important.

We have information that says that 28% of Americans in the sample believe that religion is not important. We want to conclude that because this number is greater than 25%, more than 25% of all Americans in the population believe that religion is not important. This means we need to use inference to answer our client’s question.

You will see this done in two ways:

  1. build a confidence interval
  2. conduct a hypothesis test.

We did (1) in the last lab, so today, let’s do (2).

Conducting a Hypothesis Test: Steps 1 - 3

Hypothesis tests have a few steps.

Step 1 is state the hypotheses. In other words, what are you trying to test?

Question 2

State the hypotheses our researcher has asked us to test. To produce the necessary mathematical notation for the 5 steps, copy and paste the following into the white space in your Markdown and add in the necessary pieces to reflect your hypotheses.

Step 1: $$H_0: (add pieces here), H_a: (add pieces here)$$

Step 2 involves checking to make sure the CLT holds for these data.

Question 3

Does the CLT hold for these data? Explain why or why not.

Step 3 involves building a test statistic. A test statistic is a value whose distribution we know. For a population proportion, our test statistic is

\[z = \frac{\hat{p} - p_0}{SE_{p_0}},\]

where \(\hat{p}\) is the sample statistic, \(p_0\) is the population proportion assumed in the null hypothesis, and \(SE_{p_0}\) is the standard error of \(\hat{p}\) if the null hypothesis is correct, where

\[SE_{\hat{p}} = \sqrt{\frac{{p_0}(1-{p_0})}{n}}.\]

Question 4

Find \(SE_{\hat{p}}\). Round to 3 decimal places.

Question 5

Compute and interpret \(z\). Make sure to show your work.

Okay, what have we done so far? We have clearly stated what we are trying to test. We then looked at our sample data and determined what pieces of information would be helpful for trying to test those hypotheses.

We then took those pieces of information and built a test statistic. Let’s focus on this last step. The test statistic we have just computed is a z-score. A z-score tells us how many standard errors above/below \(p_0\) our sample statistic \(\hat{p}\) is.

Conducting a Hypothesis Test: Steps 4 and 5

Okay, Steps 1-3 are done and we have a z-score. Now what? Well, we are going to try to use this to argue that if \(p_0\) is true, it would be unlikely to see something \(z\) standard errors above/below \(p_0\). To do this last bit, we are going to need to know something about the distribution of \(z\).

When certain conditions are met, *and assuming the null hypothesis is true**, we can assume that the sampling distribution of \(\hat{p}\) is a normal distribution with mean \(p_0\) and standard error (standard deviation)

\[SE_{\hat{p}} = \sqrt{\frac{{p_0}(1-{p_0})}{n}}.\]

We also know that when we are dealing with normal distributions, we can convert to z-scores so that we can use our tables to solve for probabilities. This is why we need the test statistic in Step 3 - this is the z-score we will use to get the probability in Step 4.

Question 6

Suppose \(z = 3\). In a normal distribution with mean 0 and standard deviation 1, what is the probability of getting a value greater than or equal to 3? In other words, what is \(P(z \geq 3)\)?

\(z\) tells us that, if \(p = .2\), how many standard deviations above or below \(p\) is our \(\hat{p}\). If we can assume that \(z\) has a normal distribution, we can actually express the probability that, if \(p = .2\), we would get a sample statistic \(z\) standard deviations above or below .2. We call this value a p-value.

Question 7

Step 5 in a hypothesis test is to compute a p-value. In this case, our p-value is \[P( z \geq TestStatistic ~ |~ p = .25) = .01617738\] Interpret this value in words.

Nearly there!! The final step is to use this p-value to make a decision.

If our p-value is very small, this means that if the null hypothesis were true, then it would be very, very surprising to get a sample that yielded our sample statistic. However…we did get our sample statistic, and so therefore it is likely that the null hypothesis is not true.

If our p-value is not very small, this means that if the null hypothesis were true, then it would be typical/expected/common/likely that we would get a sample that yielded our sample statistic. This means we don’t have any reason to claim that the null hypothesis is not correct.

Question 8

Step 5 involves giving a clear response to our client’s research question: Do these data provide convincing evidence that the true percent of Americans who believe religion is not very important is more than 25%? Explain your reasoning.

Note: Here, we define “convinving” as less than a 5% chance.

And there you go! That is all the steps we need to complete this z-test.

A Second Method: Confidence Interval

We could also use a confidence interval to answer our client’s research question.

Question 9

Build and interpret a 95% confidence interval for the proportion of Americans who believe that religion is not very important.

Question 10

Respond to our client’s research question using the confidence interval: Do these data provide evidence that the true percent of Americans who believe religion is not very important is more than 25%? Explain your reasoning.

Question 11

Did you get the same answer in Question 8 and Question 10?

While we can use both hypothesis tests and confidence intervals to evaluate claims, confidence intervals provide more information than a hypothesis test. Hypothesis tests allow you to evaluate a claim and make a statement such as “There is strong evidence the population proportion is less than .7.” Confidence intervals still provide this information, but they also provide you a range of values for where the population parameter might lie. For instance, with a confidence interval, we can make claims such as “We are 95% confident that the population proportion is between .4 and .5.” Hypothesis tests are widely used in practice, but you should ALWAYS prefer reporting a confidence interval to reporting a p-value when given the choice.

Wrapping Up

We have now seen how confidence intervals and hypothesis tests can be used to make claims about population proportions using information found in a sample. For our next steps in this course, we will start to see what happens when we have multiple proportions that we want to compare.

Creative Commons License
This work was created by Nicole Dalzell is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Last updated 2025 July 2.