Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Handout 4

Testing the Difference Between Two Means and Two Variances

Testing the Difference Between Two Means Using z -test

Suppose Teacher A wants to determine the mean scores of a problem-solving test given to two
groups of students, A and B. In this case, the researcher is not interested in the average scores of all
students; instead, he is interested in comparing the means of the two groups. His research question is,
Does the mean score of the students in Group A differ from the mean score of students in Group B?

Here, the hypotheses are:

H 0 : μ A =μ B
H 1: μ A ≠ μB

where
μ A : mean score of students in Group A
μ B : mean score of students in Group B.

Another way of stating the hypotheses for this situation is:

H 0 : μ A −μ B =0
H 1 : μ A−μ B ≠0

If there is no difference in population means, subtracting them will give a difference of zero. If they
are different, subtracting will give a number other than zero. Both methods of stating hypotheses are
correct.

---------------------------------------------------------------------------------------------------------------------------------------
Assumptions for the z Test to Determine the Difference Between Two Means

1. Both samples are random samples.


2. The samples must be independent of each other. That is, there can be no relationship between the
subjects in each sample.
3. The standard deviations of both populations must be known, and if the sample sizes are less than
30, the populations must be normally or approximately normally distributed.
---------------------------------------------------------------------------------------------------------------------------------------

Formula for the z -test for Comparing Two Means from Independent Population

( X 1 −X 2 )−( μ 1−μ2 )
z=

√ σ 21 σ 22
+
n1 n2

where:
  X 1 =¿ sample mean of the first group
  X 2 =¿ sample mean of the second group
μ1=¿ population mean of the first group
μ2=¿ population mean of the second group
σ 1=¿ standard deviation of the first group
σ 2=¿ standard deviation of the second group
n1 =¿ sample size of the first group
n2 =¿ sample size of the second group
Hypothesis Testing Situation in the Comparison of Means

These tests can also be one-tailed, using the following hypothesis:

Right-tailed Test Left-Tailed Test


H 0 : μ1=μ2 H 0 : μ1−μ2=0 H 0 : μ1=μ2 H 0 : μ1−μ2=0
H 1 : μ 1> μ 2 H 1 : μ 1−μ2 >0 H 1 : μ 1< μ 2 H 1 : μ 1−μ2 <0

Steps in Hypothesis Testing

Traditional Method p−¿value Method


Step 1:State the hypotheses and identify the claim. Step 1:State the hypotheses and identify the claim.
Step 2:Find the critical value(s) using Table E. Step 2:Compute the test value.
Step 3:Compute the test value. Step 3:Find the P-value.
Step 4:Make the decision. Step 4:Make the decision.
Step 5:Summarize the results. Step 5:Summarize the results.

Examples:

1. A researcher hypothesizes that the average number of sports that colleges offer for males is greater
than the average number of sports that colleges offer for females. A sample of the number of sports
offered by colleges is shown. At α =0.10 , is there enough evidence to support the claim? Assume σ 1
and σ 2 is 3.3.

2. A survey found that the average five-star hotel room rate in Manila is $88.42 and the average five-star
room rate in Baguio is $80.61. Assume that the data were obtained from two samples of 50 hotels
each and that the standard deviations of the populations are $5.62 and $4.83, respectively. At α =0.05 ,
can it be concluded that there is a significant difference in the rates?

3. A professor claimed that the scores of computer science majors in a problem solving test is lower than
that of mathematics major students. Two groups of students are given a problem-solving test, and the
results are compared. Using α =0.05 , is their sufficient evidence to support the claim?

Mathematics Major Computer Science Major


X 1 =83.6   X 2 =79.2
σ 1=4.3 σ 2=3.8
n1 =36 n2 =36
Testing the Difference Between Two Variances ( F -test)

To determine if two population have statistically the same, or almost equal, variances the F -test of
equality of variances is used. An F -test of equality of variances is a test for the null hypothesis that two
normal populations have the same variance. The sampling distribution of the variances is called the F
distribution.

Characteristics of the F Distribution


1. The values of F cannot be negative, because variances are always positive or zero.
2. The distribution is positively skewed.
3. The mean value of F is approximately equal to 1.
4. The F distribution is a family of curves based on the degrees of freedom of the variance of the
numerator and the degrees of freedom of the variance of the denominator.

Given below are some examples of F distribution.

Formula for the F -test.


2
s1
F= 2
s2

where the larger of the two variances is placed in the numerator regardless of the subscripts.

The F test has two terms for the degrees of freedom: that of the numerator, n1 −1, and that of the
denominator, n2 −1, where n1 is the sample size from which the larger variance was obtained.

Critical Value of the F -Test

To determine the critical F value, use Table H and follow the procedure given below.

1. Look for α and determine the type of test two be used (one-tailed or two-tailed). For one-tailed
test use the α value listed on the top of the table. For a two-tailed test, divide α by 2, then use the
appropriate table for α /2.
2. Determine the degree of freedom for the numerator (d.f.N.) The list for d.f.N. is given at the top of
Table H. Take note that the numerator should contain the larger variance.
3. Determine the degree of freedom for the denominator (d.f.D.). The list for d.f.D. is given on the left
of the table.
4. If the exact degrees of freedom are not specified in Table H, the closest smaller value should be
used.

Examples
Find the critical value(s) of the following (Assume that n1 has the larger variance):

1. α =0.05 , right-tailed test, n1 =16 and n2 =22.


2. α =0.05 , two-tailed test, n1 =22 and n2 =13.
s1=128 , n1 =23, s2=162 , n2 =16, α =0.01 , two-tailed test.
2 2
3.
4. s21=37 , n1 =14, s22=89, n2 =25, α =0.01 , right-tailed test.
2 2
5. s1=164 , n1 =21, s2=53 , n2 =17, α=0.10 , two-tailed test.

p-value of the F -Test

To find the p-value using Table H follow the given procedure:

1. Look for values falling under the d.f.N. and d.f.D for all α . It is suggested that you create a table for
the corresponding F values for each α .
2. Locate the two F values where the computed test value falls between. Hence, limits of the p-value
are the corresponding α values of the two F values.
3. For a two-tailed test, the limits of the p-value should be multiplied by 2.

Examples:
Find the p-value interval for each F test value

1. F=2.97 , d . f . N .=9, d . f . D.=14, right-tailed.


2. F=3.32 , d . f . N .=6, d . f . D.=12, two-tailed.
3. F=2.28 , d . f . N .=12 , d . f . D .=20, right-tailed
4. F=3.51 , d . f . N .=12 , d . f . D .=21, right-tailed
5. F=4.07 ,d . f . N .=6 , d . f . D .=10, two-tailed
6. F=1.65 , d . f . N .=19 , d . f . D .=28, right-tailed
7. F=1.77 , d . f . N .=28 ,d . f . D.=28, right-tailed
8. F=7.29 , d . f . N .=5 , d . f . D .=8, two-tailed

Hypothesis Testing for Difference Between Two Variances

Assumptions for Testing the Difference Between Two Variances


1. The samples must be random samples.
2. The populations from which the samples were obtained must be normally distributed. (Note: The
test should not be used when the distributions depart from normality.)
3. The samples must be independent of one another.

Examples:

1. A medical researcher wishes to see whether the variance of the heart rates (in beats per minute)
of smokers is different from the variance of heart rates of people who do not smoke. Two samples
are selected, and the data are as shown. Using α =0.05 , is there enough evidence to support the
claim?

Smokers Nonsmokers
n1 =26 n2 =18
2 2
s1=36 s2=10

2. The standard deviation of the average waiting time to see a doctor for non-life-threatening
problems in the emergency room at an urban hospital is 32 minutes. At a second hospital, the
standard deviation is 28 minutes. If a sample of 16 patients was used in the first case and 18 in the
second case, is there enough evidence to conclude at the 0.01 significance level that the standard
deviation of the waiting times in the first hospital is greater than the standard deviation of the
waiting times in the second hospital?

3. The CEO of an airport hypothesizes that the variance in the number of passengers for American
airports is greater than the variance in the number of passengers for foreign airports. At a 0.10, is
there enough evidence to support the hypothesis? The data in millions of passengers per year are
shown for selected airports. Assume the variable is normally distributed.

American Airports Foreign Airports


36.8 73.5 60.7 51.2
72.4 61.2 42.7 38.6
60.5 40.1

You might also like