Statistics 203 - SFU Mathematics and Statistics Web Server

advertisement
Topics for Today
Hypothesis tests for comparing 2 means
Stat203
Fall 2011 – Week 8 Lecture 3
Page 1 of 21
A Clarification
The assignment and most of my in-class
examples will present the ________
Hypothesis.
The textbook usually describes a situation and
specifies the ____ Hypothesis to be tested.
This is a conscious choice on my part as the
Research Hypothesis (ie: scientific question) is
almost always the easiest thing to identify in a
real problem.
Consider which of these you’d be more likely
to hear:
Test the null hypothesis that Treatment A works
vs
Does Treatment A work?
Stat203
Fall 2011 – Week 8 Lecture 3
Page 2 of 21
Comparison of Two Means
All of the hypothesis tests done up until now
have considered evaluation of hypotheses for
a ______ population and based on results
from a ______ sample.
eg:
students in a school district
members of a union
children aged 3-5
But we can also consider comparing means of
___ (or more) populations to see if they’re
different.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 3 of 21
Let’s consider some examples and write
research hypotheses for them:
Example 1 (Q18 from the text): A social
psychologist is interested in social differences
between teenaged girls and boys. Specifically,
he believes the number of ‘good friends’ is
different.
Research Hypothesis:
Individuals:
Populations:
Variables:
Stat203
Fall 2011 – Week 8 Lecture 3
Page 4 of 21
Parameters:
Statistical Null and Alternative Hypotheses:
Example 2 (Q19 from the text): A personnel
consultant wants to compare the absenteeism
(days absent during a 1 year period) among
hourly and salaried workers because she
thinks they may be different.
Research Hypothesis:
Individuals:
Populations:
Stat203
Fall 2011 – Week 8 Lecture 3
Page 5 of 21
Variables:
Parameters:
Statistical Null and Alternative Hypotheses:
Stat203
Fall 2011 – Week 8 Lecture 3
Page 6 of 21
Why are we always testing the mean?
Before we review the relevant
_______________ for these hypotheses, let’s
address this question.
The textbook questions, and most research
hypotheses, don’t necessarily specifically
identify the ____ (µ) as the _________ to test.
How do we know that’s what we should use?
The answer is probably not very satisfying:
If you have interval or ratio data, it turns
out that the mean is usually the best
thing to compare!
Basically, if you can legally calculate an
average, do it.
If not (you have _______ or _______ data),
you may have to test a __________ …
Stat203
Fall 2011 – Week 8 Lecture 3
Page 7 of 21
Rearranging Hypotheses for 2 Means
Here are the three pairs of hypotheses we
could test for 2-means:
 H0: µ1 = µ2
vs
Ha: _______
 H0: µ1 = µ2
vs
Ha: µ1 ≤ µ2
 H0: µ1 = µ2
vs
Ha: _______
These can all be rearranged as follows:
 H0: µ1 - µ2 = 0 vs
Ha: ___________
 H0: µ1 - µ2 = 0 vs
H a : µ1 - µ2 ≤ 0
 H0: µ1 - µ2 = 0 vs
Ha: ___________
These two sets of hypotheses are equivalent.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 8 of 21
Test Statistic for the Difference of Means
This is a more complicated test statistic than
the one-sample (ie: 1-mean) t-test.
The key point is that you now have two of
everything have:
 two ___________
o with means µ1 and µ2
 two ____________
o 𝑋̅1 and 𝑋̅2
 two __________________________
o s1 and s2
and
 two ____________
o n1 and n2
Stat203
Fall 2011 – Week 8 Lecture 3
Page 9 of 21
So, our old test statistic for 1-sample t-test:
𝑋̅ − 𝜇 𝑋̅ − 𝜇
𝑡𝑛−1 =
= 𝑠
𝑠𝑋̅
⁄ 𝑛
√
now becomes the 2-sample test statistic
(equal variances)
_____________________
where the 𝑠𝑋̅1−𝑋̅2 part is the big ugly
expression on page 229.
We won’t calculate 𝑠𝑋̅1−𝑋̅2 by hand, but will use
SPSS to evaluate.
(on the assignment, you are free to calculate 𝑠𝑋̅1 −𝑋̅2 by
hand if you choose not to use SPSS or want to check
your SPSS results, but I won’t do this in class …
though is an example in the textbook in Box 7.1)
Stat203
Fall 2011 – Week 8 Lecture 3
Page 10 of 21
An Assumption
Note that the test statistic on the preceeding
page is only if the two populations have
“_______________”.
Essentially we can only use this equation if
we’re pretty confident that the variability in the
two populations is ______________.
How do we do this if we don’t know the true
population variances?
[ Note on slide 9, I didn’t say we have 𝝈𝟏 and 𝝈𝟏 … cause we don’t! ]
We do have our sample variances, s1 and s2,
and can use these to see whether it’s possible
σ1 and σ1 could be _______.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 11 of 21
Checking for Equal Variances
There are mathematical ways to check, but we
will use the same rule of thumb as in the
textbook.
Assume the variance in the two groups is
_____ if unless one sample standard deviation
is ______________ of the other.
For example, _________
Let’s redo the example in Box 7.1using SPSS.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 12 of 21
Example (from the text Box 7.1): A survey of
new graduates asking about job prospects. Is
there a difference in concern between men
and women?
Research Hypothesis:
Individuals:
Populations:
Variables:
Parameters:
Statistical Hypotheses:
Stat203
Fall 2011 – Week 8 Lecture 3
Page 13 of 21
In SPSS, note that we
have to enter the data
differently than shown
in the textbook.
We enter each
__________ on a
separate line, and each
________ in a
separate column
(this is why I’ve been so
stringent in listing these for
every example)
Sex is Nominal, so you
can enter any values
you want, but 0 and 1
are easiest.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 14 of 21
Commmands for performing the 2-sample ttest (more on determining ‘Independent’ and
‘paired’ later)
Stat203
Fall 2011 – Week 8 Lecture 3
Page 15 of 21
Dialogue box for a 2-sample t-test.
Note that the variable associated with the parameter we’re
testing (ie: mean prospect) goes in the ‘test variable’ box.
The variable which distinguishes populations goes in the
‘Grouping Variable’.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 16 of 21
Click on ‘Define Groups’ and select the values of
the Grouping Variable (in this case Sex) which
define your two populations.
…. Select continue and you’re back to the
main dialogue.
Stat203
Fall 2011 – Week 8 Lecture 3
Page 17 of 21
Results of the test!
Stat203
Fall 2011 – Week 8 Lecture 3
Page 18 of 21
Some questions to answer based on this
output:
What are the sample means for the two
groups?
What is the p-value?
For α=0.05 is there a statistically significant
difference in concern over job prospects
between the two groups?
Conclusion:
Stat203
Fall 2011 – Week 8 Lecture 3
Page 19 of 21
A video recap:
http://www.youtube.com/watch?v=BX9iMIC6mcg
(a choco-nutty is just chocolate covered nuts)
Stat203
Fall 2011 – Week 8 Lecture 3
Page 20 of 21
Today’s Topics
2-sample t-test for equal variances
- Hypotheses are similar to 1-sample test
but involve 2 means
- Test statistic is similar to 1-sample test
but more complicated
- Sample standard deviations must be
comparable (ie: one is not twice the other
one)
- Interpretation of p-values is same (reject
or don’t reject the null)
New Reading
Chapter 7 up to page 241
Stat203
Fall 2011 – Week 8 Lecture 3
Page 21 of 21
Download