Download t - UC Davis

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Sufficient statistic wikipedia , lookup

Foundations of statistics wikipedia , lookup

Psychometrics wikipedia , lookup

Confidence interval wikipedia , lookup

Omnibus test wikipedia , lookup

Misuse of statistics wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
The Scientific Study of
Politics (POL 51)
Professor B. Jones
University of California, Davis
Hypothesis Testing
• H_0: Statistic ``no different’’ from
hypothesized value.
• Statistic could be: the mean or difference
in means between two groups.
• Hypothesized value could be anything.
• Often, hypothetical value is 0.
• Why?!!
The t-test
X 
t
s/ N
X-bar is the mean.
mu is the hypothetical value.
s is the sample standard deviation.
Sqrt(N) is the square root of the sample size.
t is the “test statistic.”
If mu is 0, what are we testing?
If mu is 80, what are we testing?
Alternatives
• Three possible alternatives to the null.
• Our test statistic (mean) could be:
– 1. Either greater or less than mu.
– 2. Greater than mu.
– 3. Lesser than mu.
• Statement 1: NONDIRECTIONAL
• Statements 2-3: DIRECTIONAL
• WHICH IS MORE PRECISE?
Two Ways to Do the Same Thing
• CONFIDENCE INTERVAL APPROACH
• Compute the p percent confidence interval around the
statistic.
• Often, this is the 95 percent c.i.
• Test example (the second one): mu=80
• Mean=84.61; s=9.71; n=31
• SEM: 9.71/sqrt(31)=1.74
• 95% CI: 84.61+/-[2.04*1.74]
• GIVES: (81.06, 88.16)
• QUESTION: DOES mu=80 FALL IN THIS INTERVAL?
• NO!!!
Confidence Interval Approach
• IMPLICATIONS: The confidence interval around are teststatistic suggests that our estimate of 84.61 significantly
departs from 80,
• We conclude this at the 95 percent confidence level.
• That is, in repeated samples (if I kept giving this exam
over and over again to this class!), 95% of all samples
would produce a c.i. like this one.
• SINCE THIS INTERVAL DOES NOT CONTAIN mu, I
AM 95% CONFIDENT IN MY DECISION TO REJECT
THE NULL HYPOTHESIS.
• PUT DIFFERENTLY, ONLY ABOUT 5% OF REPEATED
SAMPLES WOULD PRODUCE A C.I. CONTAINING
mu=80.
• “About 5% of the time I’d be wrong.”
The t-test approach
•
•
•
•
•
Remember my confidence interval?
95% CI: 84.61+/-[2.04*1.74]
Where did 2.04 come from???
We have 31 observations
Therefore we have 30 “degrees of
freedom”
• “We used 1 up for the mean”
Treasure Hunt
•
•
•
•
•
•
•
•
•
OPEN YOUR BOOK TO P. 479
Move your finger down to 30 d.f.
Move your finger to the RIGHT 2 Columns
What do you see?
2.04
Move your finger up to the top of this column.
What do you see? ALPHA levels.
When alpha=.05 (2-tail), the CRITICAL t=2.04.
ON 30 DEGREES of FREEDOM, the CENTRAL 95
PERCENT REGION of the t-DISTRIBUTION IS
CONTAINED BETWEEN -2.04 and +2.04
DF
Probability, p
0.1
0.05
0.01
0.001
16
1.75
2.12
2.92
4.02
17
1.74
2.11
2.90
3.97
18
1.73
2.10
2.88
3.92
19
1.73
2.09
2.86
3.88
20
1.72
2.09
2.85
3.85
21
1.72
2.08
2.83
3.82
22
1.72
2.07
2.82
3.79
23
1.71
2.07
2.82
3.77
24
1.71
2.06
2.80
3.75
25
1.71
2.06
2.79
3.73
26
1.71
2.06
2.78
3.71
27
1.70
2.05
2.77
3.69
28
1.70
2.05
2.76
3.67
29
1.70
2.05
2.76
3.66
30
1.70
2.04
2.75
3.65
The t-test approach
• ALL WE REALLY NEED TO KNOW IS t.
• TRUTH NOW REVEALED:
• If the t statistic from our test meets or exceeds the critical
t for alpha=.05 (or whatever you want alpha to be equal
to), we REJECT the NULL HYPOTHESIS at the p
percent level.
• If alpha=.05, our confidence level is .95 or 95 percent.
• If the t statistic from our test is less than the critical t we
FAIL to REJECT the NULL.
• The t-test approach gives same conclusion as c.i.
approach.
Only a few moving parts
• YOU DECIDE ALPHA
• YOU DECIDE 1-Tail or 2-Tail
• Examples (pretend we have 10 d.f.):
t statistic is -1.90
|-1.90|=1.90
Why is absolute value OK?
Mechanics
• t=1.90
• Reject null if t >= critical t
• Question: Would a t statistic like this one permit us to
reject the null hypothesis?
• Scenario 1: alpha=.05, two-tail
– What is critical t? (You must have your book)
– What is our decision (reject/accept null)?
• Scenario 2: alpha=.05, one-tail
– What is critical t?
– What is our decision (reject/accept null)?
• Scenario 3: alpha=.10, two-tail
– What is critical t?
– What is our decision (reject/accept null)?
ALL THIS HOLDS FOR TWOSAMPLE t
•
•
•
•
•
•
State Hypotheses
Compute t
Determine alpha
Is t>=critical t?
If yes: reject null at the (1-alpha)% level.
If no: fail to reject null at the (1-alpha)%
level.
Difference between 1- and 2-Tail
Tests
• It must now be OBVIOUS that 1-tail tests are more
“liberal.”
• The critical t is always smaller for the same alpha level in
a 1-tail test vs. 2-tail test.
• Critical t for alpha=.05, two-tail, 10 d.f.=2.23
• Critical t for alpha=.05, one-tail, 10 d.f.=1.81
• You tell me:
Which test makes it easier to reject the null?
WHEN DO YOU CHOOSE 1 vs. 2?
WHEN YOU SPECIFY DIRECTIONAL HYPOTHESIS,
THEN AND ONLY THEN DO YOU CHOOSE 1-TAIL.
IF YOU CANNOT SPECIFY DIRECTION, IT IS
DISHONEST TO USE 1-TAIL TEST (WHY???)