# Statistics with R

## Student Resources

# Chapter 10: Hypothesis Tests About u and p: Applications

1. Consider this lower-tail hypothesis test: H_{0}: μ ≥ 25 against H_{a}: μ < 25. If a random sample of n=36 results in a value of x̅ = 24, what is the test statistic Z? Assume that the population standard deviation is known to be α = 3.

- -1.645
- -2 X
- 2
- 1.645

**Solution:**

> z <- (24 - 25) / (3 / sqrt(36))

> z

[1] -2

2. For the previous question, what is the p-value?

- 0.01109069
- 0.04436276
- 0.02275013 X
- 0.03412520

**Solution:**

> pvalue <- pnorm((24 - 25) / (3 / sqrt(36)))

> pvalue

[1] 0.02275013

3. Given the p-value calculated for the previous question, what should be the correct conclusion if α = 0.01?

- Reject H
_{0}: μ ≥ 25 - Accept H
_{0}: μ ≥ 25 - Do not reject H
_{a}: μ < 25 - Do not reject H
_{0}: μ ≥ 25 X

**Solution:**

Since p-value = 0.02275013 > a = 0.01, we do not reject H_{0}: μ ≥ 25

4. Consider this two-tail hypothesis test: H_{0}: μ = -12 against H_{a}: μ ≠ -12. If a random sample of n=49 provides a value of x̅ = -9, what is the test statistic Z? Assume that the population standard deviation is known to be α = 10.50.

- 1.96
- -2
- 2 X
- -1.96

**Solution:**

> z <- (-9 - (-12)) / (10.50 / sqrt(49))

> z

[1] 2

5. For the previous question, what is the p-value?

- 0.04550026 X
- 0.06279036
- 0.03139518
- 0.05232530

**Solution:**

> pvalue <- 2 * pnorm((-9 - (-12)) / (10.50 / sqrt(49)), lower.tail = FALSE)

> pvalue

[1] 0.04550026

6. Given the p-value calculated for the previous question, what should be the correct conclusion if α = 0.05?

- Accept H
_{0}: μ = -12 - Reject H
_{0}: μ = -12 X - There is insufficient evidence to conclude one way or the other
- Reject H
_{a}: μ ≠ -12

**Solution:**

Since p-value = 0.04550026 < α = 0.05, we reject H_{0}: μ = -12

7. Consider this upper-tail hypothesis test: H_{0}: p ≤ 0.70 against H_{a}: p > 0.70. If a random sample of n = 800 provides a sample proportion 0.76 (i.e., 608 out of 800), what is the test statistic Z?

- 2.185478
- 2.384158
- 3.973597 X
- 3.377558

**Solution:**

> z <- (0.76 - 0.70) / (sqrt(0.76 * 0.24 / 800))

> z

[1] 3.973597

8. For the previous question, what is the p-value?

- 0.00002300847
- 0.00000849543
- 0.00004247717
- 0.00003539764 X

**Solution:**

> pvalue <- pnorm((0.76 - 0.70) / (sqrt(0.76 * 0.24 / 800)), lower.tail = FALSE)

> pvalue

[1] 0.00003539764

9. Given the p-value calculated for the previous question, what should be the correct conclusion if α = 0.10?

- Accept H
_{0}: p ≤ 0.70 - Reject H
_{0}: p ≤ 0.70 X - There is insufficient evidence to conclude one way or another
- H
_{a}: p > 0.70

**Solution:**

Since p-value = 0.00003539764 < α = 0.10, we reject H_{0}: p ≤ 0.70.

10. Consider this upper-tail hypothesis test: H_{0}: μ ≤ 220 against H_{a}: μ > 220. Suppose a random sample of n = 100 will be selected and the population standard deviation is σ = 25. What is the probability of making a Type II error β if the actual population mean is μ = 227. Use α = 0.05.

- 0.1240152 X
- 0.1364168
- 0.1736213
- 0.0868106

**Solution:**

> pnorm(((220 + qnorm(0.05, lower.tail = FALSE) * 25 / sqrt(100)) - 227) / (25 / sqrt(100)))

[1] 0.1240152