lesson34-comparing means of two groups

Download Report

Transcript lesson34-comparing means of two groups

Aim: How do we test hypotheses
that compare means of two groups?
HW: complete last two questions on
homework slides
Comparing the Means of Two Groups
• Example of such a senior
– Does the mean age of nursing students who enroll
at a community college differ from the mean age
of nursing students who enroll at a university?
• Here, the hypotheses are
H 0 : 1  2
H1 : 1  2
1 
2 
Mean age of those in community colleges
Mean age of those at university
Comparing the Means of Two Groups
• Two ways to state hypotheses
H 0 : 1  2
H 0 : 1  2  0
H1 : 1  2
H1 : 1  2  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.
Assumption for the Test to Determine
the Difference Between Two Means
1. The sample must be independent of each
other. That is, there can be no relationship
between the subjects in each sample.
2. The populations from which the samples
were obtained must be normally distributed,
and the standard deviations of the variable
must be known, or the sample size must be
greater than or equal to 30.
Theory Behind Testing…
• The difference between two means is based
on selecting pairs of samples and comparing
the means of the pairs
• The population means need not be known
Other Types of Hypotheses
• Right Tailed
• Left Tailed
H 0 : 1  2
H 0 : 1  2
H1 : 1  2
H1 : 1  2
Formula for the z Test for Comparing Two
Means from Independent Populations
X

z
1

 X 2   1  2 

2
1
n1


2
2
n2
Procedure
1.
2.
3.
4.
5.
State the hypotheses and identify the claim
Find the critical value(s)
Compute the test value
Make the decision
Summarize the results
Example
• A survey found that the average hotel room
rate in New Orleans is $88.42 and the average
room rate in Phoenix is $80.61. Assume the
data were obtained from two samples of 50
hotels each and the standard deviations were
$5.62 and $4.83, respectively. At α = 0.05, can
it be concluded that there is significant
difference in the rates?
Solution
1. State Hypothesis and identify claim
2. Find critical value
H 0 : 1  2
H1 : 1  2 (claim)
  .05
1.96
3. Calculate test value
X

z
4. Make a decision
1

 X 2   1  2 
 12
n1

 22

88.42  80.61   0   7.45
n2
5.622 4.832

50
50
Test value > critical value (reject null)
5. Summarize the results
There is enough evidence to support the claim that
the means are not equal to each other
Formula for Confidence Interval
X
1

 X 2  z
2
 12
n1

 22
n2


 1  2  X 1  X 2  z
2
 12
n1

 22
n2
Class Work
1. Explain the difference between testing a single mean
and testing the difference between two means.
2. A study conducted to see if there was a difference
between spouses and significant others in coping
skills when living with or caring for a person with
multiple sclerosis. These skills were measured by
questionnaire responses. The results of the two
groups are given on one factor, ambivalence. At α =
.10, is there a difference in the means of the two
groups?
v
spouse
Signficiant
X 1  2.0
X 2  1.7
s1  .6
n1  120
s2  .7
n2  34
Class Work
3. At age 9 the average weight (21.3kg) and the
average height (124.5 cm) for both boys and
girls are exactly the same. A random sample of
9-year-olds yielded these results. Estimate the
mean difference in height between boys and
girls with 95% confidence. Does your interval
support the given claim?
Boys
Girls
Sample Size
60
50
Mean Height
123.5
126.2
Sample Variance
98
120
Homework
Question 1
Homework
Question 2