Question 1163233: H0: μ = 73
HA: μ ≠ 73
Find the p-value for this test based on the following sample information. (You may find it useful to reference the appropriate table: z table or t table)
1. x¯ = 70; s = 6.9; n = 35
A. p-value < 0.01
B. p-value > or equal to 0.10
C. 0.01 < or equal to p-value < 0.02
D. 0.05 < or equal to p-value < 0.10
E. 0.02 < or equal to p-value < 0.05
2. x¯ = 76; s = 6.9; n = 35
A. 0.01 < or equal to p-value < 0.02
B. p-value < 0.01
C. p-value > or equal to 0.10
D. 0.05 < or equal to p-value < 0.10
E. 0.02 < or equal to p-value < 0.05
Answer by CPhill(2264) (Show Source):
You can put this solution on YOUR website! ```python?code_reference&code_event_index=2
import math
from scipy import stats
mu0 = 73
s = 6.9
n = 35
df = n - 1
# Scenario 1
xbar1 = 70
t1 = (xbar1 - mu0) / (s / math.sqrt(n))
p_value1 = 2 * stats.t.sf(abs(t1), df)
# Scenario 2
xbar2 = 76
t2 = (xbar2 - mu0) / (s / math.sqrt(n))
p_value2 = 2 * stats.t.sf(abs(t2), df)
print(f"{t1=}")
print(f"{p_value1=}")
print(f"{t2=}")
print(f"{p_value2=}")
```
```text?code_stdout&code_event_index=2
t1=-2.572208601347659
p_value1=0.014646137580801655
t2=2.572208601347659
p_value2=0.014646137580801655
```
To find the $p$-value for these hypothesis tests, we use the $t$-test for the population mean ($\mu$) because the population standard deviation is unknown and we are using the sample standard deviation ($s$).
### Common Variables
* **Null Hypothesis ($H_0$):** $\mu = 73$
* **Alternative Hypothesis ($H_A$):** $\mu \neq 73$ (This is a **two-tailed test**)
* **Sample size ($n$):** $35$
* **Degrees of freedom ($df$):** $n - 1 = 34$
---
### 1. Calculation for $\bar{x} = 70$, $s = 6.9$, $n = 35$
**Step 1: Calculate the Test Statistic ($t$)**
$$t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} = \frac{70 - 73}{6.9 / \sqrt{35}} = \frac{-3}{1.1663} \approx -2.57$$
**Step 2: Determine the $p$-value**
Since it is a two-tailed test, the $p$-value is $2 \times P(T > | -2.57 |)$ with $34$ degrees of freedom.
Looking at a $t$-table for $df = 34$:
* The area for $t = 2.441$ is $0.01$ (one tail).
* The area for $t = 2.728$ is $0.005$ (one tail).
* Our value ($2.57$) falls between these two, meaning $0.005 < \text{one-tail } p < 0.01$.
* Multiplying by $2$ for a two-tailed test: $0.01 < p\text{-value} < 0.02$.
**Correct Option: C. $0.01 \leq p\text{-value} < 0.02$**
---
### 2. Calculation for $\bar{x} = 76$, $s = 6.9$, $n = 35$
**Step 1: Calculate the Test Statistic ($t$)**
$$t = \frac{\bar{x} - \mu_0}{s / \sqrt{n}} = \frac{76 - 73}{6.9 / \sqrt{35}} = \frac{3}{1.1663} \approx 2.57$$
**Step 2: Determine the $p$-value**
Because the distribution is symmetric and the distance from the mean is the same as in the first problem ($|3|$ units), the test statistic magnitude and the $p$-value remain identical.
* $t = 2.57$
* $p\text{-value} = 2 \times P(T > 2.57)$
* Using the same $t$-table values for $df = 34$, we find $0.01 < p\text{-value} < 0.02$.
**Correct Option: A. $0.01 \leq p\text{-value} < 0.02$**
|
|
|