20 Day 20
Announcements
Exam grades will take longer to publish
- Some people (with proper excusal) still have to take it
Homework corrections for HW 1-8 close this Friday
- Zero exceptions or extensions. Don’t even try.
Hypothesis Testing for Population Means
We’ve spoken about staging hypotheses
Now we’ll learn how to perform the actual test
Starting with a hypothesis test for population mean μ
- When population standard deviation σ is unknown
We do need the Central Limit Theorem to hold in order for us to proceed
if n>30 then ˉX∼N(μ,σ2)
There are two hypothesis test methods
- They produce the same results:
Critical value method
P-value method
We’re going to learn the P-value method:
- State the null and alternate hypotheses
- Choose a significance level α= (allowed probability of Type I error).
- Compute the test statistic:
t=ˉx−μ0s/√n
Since σ is unknown, we replace it with the sample standard deviation s
We use the t statistic, which comes from the t distribution with df=n−1
- Compute the P-value of the test statistic t.
Left-tailed test: P-value = area under the t distribution to the left of t, i.e., P(T<t)
Right-tailed test: P-value = area under the t distribution to the right of t, i.e., P(T>t)
Two-tailed test: P-value = sum of the areas under the t distribution to the left of −|t| and right of |t|, i.e., 2∗P(T<−|t|)
The degrees of freedom for the t distribution is df=n−1
- Determine whether to reject H0:
Reject H0 if P-value ≤α
Do not reject H0 if P-value >α
- State a conclusion
Example 1
In a recent medical study, 76 subjects were placed on a low-fat diet. After 12 months, their sample mean weight loss was ˉx=2.2 kilograms, with a sample standard deviation of s=6.1 kilograms. Use the α=0.05 level of significance to test the claim that the mean weight loss is greater than 0.
Step 1: State the null and alternate hypotheses
H0:μ=0H1:μ>0(right-tailed test)
Step 2: Choose a significance level α
α=0.05
Step 3: Compute the value of the test statistic
t=ˉx−μ0s/√n=2.2−06.1/√76≈3.144
Step 4: Use the t-table to compute the P-value
Since H1:μ>0 is right-tailed, the P-value is P(T>3.144)
The degrees of freedom are df=75, which does not appear in the t-table, so we round it down to the nearest whole number, df=60
In the t-table with df=60, we find that P(T>3.144) is between P(T>3.232) and P(T>2.915), so the P-value is between 0.001 and 0.0025
Step 5: Determine whether to reject H0
Our P-value is between 0.0025 and 0.001
Since the P-value is less than α=0.05, we reject H0
Step 6: State your conclusion
- We conclude that the mean weight loss of people who were placed on a low-fat diet for 12 months is greater than 0
Example 2
A type of steel used by a manufacturing company is supposed to have an average hardness of 62 on the Rockwell hardness index. If the steel is too hard or too soft, defects can appear in the final product. A random sample of 10 specimens for a new steel supplier had a mean hardness of 64 with a standard deviation of 4. Test at the 5% significance level whether the mean hardness of the new supplier’s steel is different from the desired hardness of 62. (Assume that the population is normally distributed).
Step 1: State the null and alternate hypotheses
H0:μ=62H1:μ≠62(two-tailed test)
Step 2: Choose a significance level
α=0.05
Step 3: Compute the test statistic
Given:
Sample mean ˉx=64
Population mean μ0=62
Sample standard deviation s=4
Sample size n=10
The test statistic is: t=ˉx−μ0s/√n=64−624/√10≈1.581
Step 4 & 5: Determine the P-value (two-tailed test)
Using the t-table with df=9, we find: - P(T>1.581) is between P(T>1.833) and P(T>1.383), so P(T>1.581) is between 0.05 and 0.10
Therefore, the two-tailed P-value is: P-value=2∗P(T>1.581)≈between 0.1 and 0.2
Since the P-value is greater than α=0.05, we fail to reject H0
Step 6: State the conclusion
There is not enough evidence to conclude that the mean hardness of the new supplier’s steel is different from 62
Hypothesis Testing for Proportions
Now, we want to test a hypothesis for population proportion p
- We still need the Central Limit Theorem for proportions to hold:
np0≥10andn(1−p0)≥10,
Where p0 is the population proportion specified by H0
- We will use the P-value method to perform the hypothesis test.
Step 1: State the null and alternate hypotheses
The null hypothesis is of the form:
H0:p=p0
The alternate hypothesis is in one of the three forms:
Left-tailed: H1:p<p0
Right-tailed: H1:p>p0
Two-tailed: H1:p≠p0
Step 2: Choose a significance level α
Step 3: Compute the test statistic:
z=ˆp−p0√p0(1−p0)n
Step 4: Compute the P-value of the test statistic z
Left-tailed: P-value = area under the standard normal distribution to the left of z
- i.e., P(Z<z)
Right-tailed: P-value = area under the standard normal distribution to the right of z
- i.e., P(Z>z)
Two-tailed: P-value = sum of the areas under the standard normal distribution to the left of −|z| and right of |z|
- i.e., 2∗P(Z<−|z|)
Step 5: Determine whether to reject H0:
Reject H0 if P-value ≤α
Do not reject H0 if P-value >α
Step 6: State a conclusion
Example 3
Suppose that 67% of all auto damage insurance claims in the US are made by singles under 25 years old. Also suppose that in a random sample of 53 auto damage claims in Manhattan, KS, there were 42 made by singles under 25.
Test at the 5% significance level whether the proportion of auto damage claims made by singles under 25 in Manhattan is different than the proportion for the entire US.
a. State the null and alternate hypotheses
H0:p=0.67H1:p≠0.67(two-tailed test)
b. Compute the value of the test statistic
Given:
Sample proportion ˆp=4253≈0.7925
Population proportion p0=0.67
The test statistic is:
z=ˆp−p0√p0(1−p0)n=0.7925−0.67√0.67(1−0.67)53≈1.90
c. Determine whether to reject H0
Using a two-tailed z-table:
P-value=2⋅P(Z<−1.90)=2(0.0287)=0.0574
Since the P-value >α(=0.05), we fail to reject H0
d. State your conclusion
There is not enough evidence to conclude that the proportion of auto damage claims made in Manhattan by singles under 25 is different from the national proportion
Example 4
An educational technology specialist is studying attitudes of teachers about the use of virtual reality in the classroom. She samples 500 teachers and finds that 471 of them believe that virtual reality would have a positive effect. Can she conclude that the proportion of teachers who believe that virtual reality would have a positive effect is greater than 0.90? Use the α=0.05 level of significance.
Step 1: State the null and alternate hypotheses
H0:p=0.90H1:p>0.90(right-tailed test)
Step 2: Choose a significance level
α=0.05
Step 3: Compute the test statistic
Given:
Sample proportion ˆp=471500=0.942
Population proportion p0=0.90
The test statistic is: z=ˆp−p0√p0(1−p0)n=0.942−0.90√0.90(1−0.90)500≈3.13
Step 4: Determine the P-value
P-value=P(Z>3.13)=0.0009
Since the P-value <α, we reject H0
Step 5: State the conclusion
We conclude that more than 90% of teachers believe that virtual reality would have a positive effect on education