Chapter9 - Inf - Varaince - Student
Chapter9 - Inf - Varaince - Student
STAT 190
Introduction to Statistical Methodology
1
Hypothesis Tests for Two Population Variances
• Primarily, inference tends to be focused on means (and proportions, which we will learn later).
• Variances, though, are essential to inference of means.
• We may be interested in determining whether two population variances are equal.
• Consider the case of wanting to compare two populations.
• We have talked about testing whether two means of these independent populations are equal to each
other.
• We also can test whether the variances of the two populations are equal to each other.
2
Hypothesis Tests for Two Population Variances
• Null hypothesis: population variances are equal.
• We attempt to see if there is a difference in variances.
• Two-tailed test:
H0: 𝜎12 = 𝜎22 vs H1: 𝜎12 ≠ 𝜎22
3
F distribution
4
Hypothesis Tests for Two Population Variances
• To test such hypotheses, we use an F test statistic.
• In order to perform a F test of two variances, it is important that the following are true:
• The populations from which the two samples are drawn are approximately normally distributed.
• The two populations are independent of each other.
• Take 𝜎12 and 𝜎22 be the unknown population variances and 𝑠12 and 𝑠22 be the sample variances. Let
the sample sizes be 𝑛1 and 𝑛2 .
• We are interested in comparing the two sample variances, we use the F ratio:
𝑠12 /𝜎12
𝐹𝑜𝑏𝑠 = 2 2
𝑠2 /𝜎2
• This F statistic follows F distribution with (𝑛1 – 1) is the degrees of freedom for the numerator and
(𝑛2 – 1) is the degrees of freedom for the denominator.
5
Hypothesis Tests for Two Population Variances
𝑠12
𝐹𝑜𝑏𝑠 = 2 ~𝐹𝑛1−1,𝑛2−1
𝑠2
• Once we have our test statistic, we can compare to the F distribution to calculate a p-value and critical
value.
6
Hypothesis Tests for Two Population Variances
R codes: P-values
• One-tailed, lower (left) tail:
𝑝 = 𝑃 𝐹 < 𝐹𝑜𝑏𝑠
pf(F_obs, n1-1, n2-1)
• Two-tailed :
if 𝐹𝑜𝑏𝑠 ≤ 1; 2*pf(F_obs, n1-1, n2-1)
if 𝐹𝑜𝑏𝑠 > 1 ; 2* (1-pf(F_obs, n1-1, n2-1))
7
Hypothesis Tests for Two Population Variances
• If the p−𝐯𝐚𝐥𝐮𝐞 ≤ 𝜶 , reject 𝑯𝟎 and conclude that the population variances are unequal to each other.
• If the p−𝐯𝐚𝐥𝐮𝐞 > 𝜶 , fail to reject 𝑯𝟎 and conclude that that population variances are equal to each
other.
8
Hypothesis Tests for Two Population Variances
Also, Instead of p-values, we can use critical values for rejection.
R codes: Critical Values
• One-tailed, lower (left) tail:
Reject if 𝐹 ∗ ≤ 𝐹𝑛1−1,𝑛2−1,𝛼
qf(alpha, n1-1, n2-1)
• Two-tailed:
Reject if 𝐹 ∗ ≤ 𝐹𝑛1−1,𝑛2−1,𝛼/2 or Reject if 𝐹 ∗ ≥ 𝐹𝑛1−1,𝑛2−1,1−𝛼/2
qf(alpha/2, n1-1, n2-1) or qf(1-alpha/2, n1-1, n2-1) 9
Hypothesis Tests for Two Population Variances
Example:
We are interested in exploring daily caloric intake for two populations: college professors and college
students. In particular, we want to explore the hypothesis,
Since 𝐹𝑜𝑏𝑠 ≤ 1;
10
Hypothesis Tests for Two Population Variances
Example:
11