Question 1 – Finding P-values

Using a standard normal distribution N(0,1) find the p-value associated with the following Z test-statistic and alternate hypothesis. We used R to calculate normal probabilities with the pnorm() function. Remember that right-tail probabilities need lower.tail=F in pnorm(). Be sure to sketch a graph to verify your p-value makes sense.

Part A: Z = -1.35, left-tailed test

Part B: Z = 2.48, right-tailed test

Part C: Z = -.4, two-tailed test

Part D: Z = 1.87, two-tailed test

pnorm(-1.35)
## [1] 0.08850799
pnorm(2.48, lower.tail = F)
## [1] 0.006569119
2*pnorm(-0.4)
## [1] 0.6891565
2*pnorm(0.4, lower.tail=F)
## [1] 0.6891565
2*pnorm(-1.87)
## [1] 0.06148382
2*pnorm(1.87, lower.tail=F)
## [1] 0.06148382

Question 2 – Monday Breakups (Revisited)

Verify the coniditions are met to use Normal distribution to conduct a hypothesis test for this scenario in HT Lab 1. Compute Z and the p-value. Is the p-value you calculate similar to what you had for Question 4? Does your conclusion to the question change?

# random sample = questionable, good for facebook users
# np0 = 75/7 > 10 (Success condition met)
# n(1-p0) = 75*6/7 > 10 (Failure condition met)

Z = (20/75 - 1/7) / sqrt((1/7)*(6/7)/75)
Z
## [1] 3.064129
pnorm(Z, lower.tail=F)
## [1] 0.001091522

P-val and conclusion should not change by using the test-stat method.


Question 3 – Lady Tasting Tea (Revisited)

Explain why the conditions to use the Normal Distribution for this problem in HT Lab 1 are not met. (You could instead calculate the p-value directly using the Hypergeometric distribution, but I am not making you do this)

# sample size is way too small for conditions to be met. 

Question 4 – Do Aliens Exist?

Do aliens exist? In May 2021, YouGov asked 4,839 adult Great Britain residents whether they think aliens exist, and if so, if they have or have not visited Earth. You want to evaluate if more than a quarter (25%) of Great Britain adults think aliens don’t exist.

In the survey 22% responded “I think they exist, and have visited Earth”, 28% responded “I think they exist, but have not visited Earth”, 29% responded “I don’t think they exist”, and 22% responded “Don’t know”. A friend of yours offers to help you with setting up the hypothesis test and comes up with the following hypotheses. Indicate any errors you see.

H\(_0\): \(\widehat{p} = .29\), H\(_A\): \(\widehat{p} > .29\)

# Value in H0 should be 0.25, that's what we want to test
# HA should also use 0.25 (what we are testing)
# Neither hypothesis should mention sample statistic at all
# they will use p instead of p-hat's because we are trying
# to learn about the population proportion

Question 5 – Legalization of Marijuana

The General Social Survey asked a random sample of 1,563 US adults: “Do you think the use of marijuana should be made legal, or not?” 60% of the respondents said it should be made legal. (NORC 2022)

Part A: Is 60% a sample statistic or a population parameter? Explain.

Answer: Sample statistics. This value is calculated from my sample of 1,563 adults.

Part B: A news piece on this survey’s findings states, “Majority of US adults think marijuana should be legalized.” Perform a hypothesis test to see if this claim is justified (state hypotheses, find test-statistic, p-value, strength of evidence, conclusion)

H\(_0\): p = 0.5

H\(_A\): p > 0.5

Test-statistic

(0.6 - 0.5) / sqrt(0.5 * 0.5 / 1563)
## [1] 7.906959

P-value

pnorm(7.907, lower.tail=F)
## [1] 1.318328e-15

Strength of evidence in favor of alternate hypothesis:

Answer: Overwhelmingly strong

Part D: Is the news piece claim justified by the hypothesis test results? Explain.

Answer: Yes. We have overwhelming evidence that the majority support legalization.

Part D: A critic points out that this hypothesis testing method is only accurate if the test-statistic follows a normal distribution, or if the normal model is a good approximation. Do the conditions hold for this data? Explain.

Answer: Yes. The sample size is large enough that the Success and Failure conditions are met. Normal distribution will be a good enough approximation.

Question 6 – Practicing Interpretations and Conclusions

Some people claim that they can tell the difference between a diet soda and a regular soda in the first sip. A researcher wanting to test this claim randomly sampled 80 such people. He then filled 80 plain white cups with soda, half diet and half regular through random assignment, and asked each person to take one sip from their cup and identify the soda as diet or regular. 53 participants correctly identified the soda.

The test-statistic is 2.91 with a p-value of

2*pnorm(2.91, lower.tail=F)
## [1] 0.003614288

Interpret the p-value in this context.

Answer: The probability of getting a test-statistic of 2.91 or more extreme in this setup when people are unable to tell the sodas apart is 0.004.

Write a conclusion that answer the researcher’s question.

There is overwhelming evidence from the results of our study to suggest people can tell apart the regular and diet sodas.


Nearsightedness (myopia) is a common vision condition in which you can see near objects clearly, but farther away objects blurry. It is believed that nearsightedness affects about 8% of all children. In a random sample of 194 children, 21 are nearsighted. The following comes from conducting a hypothesis test to see if the 8% value is inaccurate. The test-statistic and p-value are given by the following:

Z = (21/194 - .08) / sqrt(0.08 * (1-0.08) / 194)
Z
## [1] 1.450243
2*pnorm(Z, lower.tail=F)
## [1] 0.1469908

Explain why we want to use a two-tailed test.

We are trying to see if the value is accurate, which means we most consider both ways it could be inaccurate: too low or too high.

Write up a conclusion to whether or not the 8% value is inaccurate.

We have little to no evidence to suggest the true proportion of myopia is different than 8%. That is, our data largely agrees with the 8% value.