Download Unit09 PowerPoint for statistics class

Document related concepts
Transcript
Welcome to
Week 09
College Statistics
http://media.dcnews.ro/image/201109/w670/statistics.jpg
Hypothesis Tests
So far, we have tested:
Does µ = a value
(Confidence Intervals)
Hypothesis Tests
Today we test whether means
from different samples are
different
No Difference?
Difference Between Means
Remember the guy who drew
the “leptokutic/platykurtic”
pics?
Difference Between Means
William Sealy Gosset
Difference Between Means
Comparisons of means of two
groups are called “t-Tests”
Difference Between Means
There are a variety of t-Tests
Tests between two unrelated
groups, each with its own
treatment
Tests between two related
(paired) groups, each with its
own treatment
Difference Between Means
To compare two paired group's
means, use a:
“Paired t-test”
Difference Between Means
“Paired”:
two measurements on the same
person
measurements on twins
two measurements for
the same date, etc
Difference Between Means
We have two batches of stout:
F5_10 and N25_5
Tasters are tasting each to see
if they are the same
Mr Gosset thinks they are not!
Difference Between Means
These are paired data because
each analyst tasted each of the
batches –
two measurements BY the same
person
Difference Between Means
H0:
(what we want to disprove)
There is no difference in the
flavor of the two batches
Ha:
(what we want to prove)
There is a difference in the
flavor of the two batches
Difference Between Means
We hope to disprove H0
and thereby to prove Ha
Paired t-Test
PROJECT QUESTION
Step 1:
Paired t-Test
PROJECT QUESTION
Step 1: Set the α-level
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2:
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2: Set the practicallysignificant difference
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2: practically-significant
difference =
Mr Gosset says: 2 rating points
Step 3:
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2: practically-significant
difference = 2 rating levels
Step 3: Set Ha (they are
different)
Ha: μF5_10 ≠ μN25_5
Step 4:
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2: practically-significant
difference = 2 rating levels
Step 3: Ha: μF5_10 ≠ μN25_5
Step 4: Set H0
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2: practically-significant
difference = 2 rating levels
Step 3: Ha: μF5_10 ≠ μN25_5
Step 4: Set H0 (they are the
same)
H0: μF5_10 - μN25_5 = 0
Paired t-Test
PROJECT QUESTION
Step 1: α-level = 0.05
Step 2: practically-significant
difference = 2 rating levels
Step 3: Ha: μF5_10 ≠ μN25_5
Step 4: H0: μF5_10 - μN25_5 = 0
Difference Between Means
Because each taster tastes
each of the two batches, the
data are paired
Difference Between Means
use:
Data/
Data
Analysis/
t-Test:
Paired Two
Sample for
Means
POOF!
OK… now
what?
Difference Between Means
If you had any
reason to
believe that
one batch would
be better than
the other you
would use:
P(T<=t) one tail
Difference Between Means
We didn’t, so
you would use:
P(T<=t) two tail
Difference Between Means
The probability
is .03
Will you reject
H0?
Difference Between Means
How all the inferential tests
work:
Difference Between Means
How all the inferential tests
work:
Excel calculates a probability
that you would get the data you
got if the null hypothesis were
true
Difference Between Means
How all the inferential tests
work:
Excel calculates a probability
that you would get the data you
got if the null hypothesis were
true
If it’s ≤ α-level, reject H0
Paired t-Test
PROJECT QUESTION
The probability
is .03
Do you reject
H0?
Paired t-Test
PROJECT QUESTION
The probability
is .03
Do you reject
H0?
Yup!
Difference Between Means
CELEBRATE!
Difference Between Means
Remember –
Reject the hypothesis if the
statistic is smaller than 0.05
Paired t-Test
PROJECT QUESTION
Reject H0 !
Conclusion?
Paired t-Test
PROJECT QUESTION
Reject H0 !
Conclusion:
The batches do
taste different!
Paired t-Test
PROJECT QUESTION
Which tastes
better?
Paired t-Test
PROJECT QUESTION
For tests of differences
between means, what would
happen if you had a bigger
sample size?
Difference Between Means
Demo of sample size in t-test
Difference Between Means
The P comes from a standardized
t-distribution:
Questions?
Difference Between Means
We use the t-test when we
have paired data because it is
more powerful
We could use it for other twogroup comparisons, but we
usually use another analysis:
Difference Between Means
Comparing Several Group's
Means:
“ANOVA”
“Analysis of Variance”
Difference Between Means
t-tests can only be used for
comparing two groups
ANOVA can be used to compare
two or more groups
Difference Between Means
A paired t-test is more
powerful
A non-paired t-test is THE
SAME as an ANOVA
(ANOVA’s Excel output page is
better)
Difference Between Means
“ANOVA” stands for
“ANalysis Of VAriance”
Difference Between Means
The analysis assigns the
variability in the data to:
the difference between the
groups
the difference between
individuals
Difference Between Means
Sir Ronald Aylmer Fisher
Difference Between Means
Salaries for Criminal
Justice Jobs
Difference Between Means
There are four classifications
of jobs: probation,
administration, correctional and
patrol
We want to compare the
average salaries to see if they
are the same
ANOVA
PROJECT QUESTION
What would be a good value for
α?
ANOVA
PROJECT QUESTION
α = .05
What would be a good level of
practical significance?
ANOVA
PROJECT QUESTION
What is Ha?
ANOVA
PROJECT QUESTION
Alternative hypothesis Ha:
There are differences in the
salaries of the four job
classifications:
μprobation ≠ μadministration ≠ μcorrectional ≠ μpatrol
What is H0?
ANOVA
PROJECT QUESTION
Null (no difference) hypothesis
H0:
There is no difference in
salaries for the four job
classifications:
μprobation = μadministration = μcorrectional = μpatrol
Difference Between Means
Our strategy:
We hope to disprove H0
and thereby to prove Ha
ANOVA
PROJECT QUESTION
Why can’t you use a t-test for
this data?
Difference Between Means
use: Data
Data Analysis
ANOVA:
Single Factor
Difference Between Means
The first output table is just
descriptive statistics:
Difference Between Means
The second table is
the ANOVA table …
EEK!
Difference Between Means
Don’t panic! Just look
at the P-value
Difference Between Means
The P-value is the likelihood of
our pattern of differences in
the means IF H0 was TRUE
Difference Between Means
The probability is 1.28 E-5
or 0.0000128 (0.00128%)
Is that very likely?
ANOVA
PROJECT QUESTION
We said we would reject H0 if
it was only 0.05 (5%) likely to
be true
Can we reject H0?
Difference Between Means
Remember –
Reject the null hypothesis if
the statistic is smaller than
0.05
Difference Between Means
YES!
If we are willing to be wrong in
rejecting H0 5% of the time,
0.00128% is a whole lot less
likely to be wrong!
ANOVA
PROJECT QUESTION
What is your conclusion?
Difference Between Means
We conclude there is a
significant difference between
the average pay of the CJ job
categories
Difference Between Means
Remember –
Reject the null hypothesis if
the statistic is smaller than
0.05
Questions?
Difference Between Means
For the CJ job classifications,
we rejected H0 and concluded
the salaries are different
Difference Between Means
But…
Are they all
different, or is
just one different
or two or …
Difference Between Means
Do a HI-Lo-Close Confidence
Interval graph!
Difference Between Means
Difference Between Means
Difference Between Means
ANOVA
PROJECT QUESTION
Which means are significantly
different?
ANOVA
PROJECT QUESTION
Is the difference practically
significant?
Difference Between Means
Now do you see why we’ve been
doing Hi-Lo-Close graphs once a
week since we learned them?
Difference Between Means
BTW: pre-Excel, this comparison
used to be REALLY hard to do!
Difference Between Means
Yay Excel!
Difference Between Means
PROJECT QUESTION
What would happen if you had a
bigger sample size?
Difference Between Means
PROJECT QUESTION
What would happen if you had a
bigger sample size?
You would be able to show more
statistically significant
differences
Difference Between Means
PROJECT QUESTION
Difference Between Means
t-tests and ANOVAs are
designed to be VERY powerful
for small sample sizes
Difference Between Means
That’s why we include a level of
practical significance
Difference Between Means
Similar to previous tests, the P
comes from a standardized
F-distribution:
Difference Between Means
Because “z” and “t” are based
on 𝒙 , they have similar shapes
F is based on a variance, so it
is in squared units!
Questions?