Upload
hadley-wickham
View
536
Download
0
Tags:
Embed Size (px)
Citation preview
Hadley Wickham
Stat310Confidence intervals
Thursday, 15 April 2010
Quiz
• Pick up quiz on your way in
• Start at 1pm
• Finish at 1:10pm
• Closed book
Thursday, 15 April 2010
1. Test extra credit
2. Inference roadmap
3. Steps for making a confidence interval
4. One more sampling distribution (the t-distribution)
Thursday, 15 April 2010
Homework graded out 104% of overall grade (= 20% of two tests)
Will act as extra credit for the test. (i.e. there is no penalty you don’t do it)
Due next Thursday.
The extra 5% of the grade will be distributed across all other assessment.
Test makeupI still need one
party planner!
Thursday, 15 April 2010
What we want to do
Given data:
• Estimate true value of parameter (last week)
• Quantify uncertainty of estimate (today)
• Test whether true value is a certain value (Thursday)
Thursday, 15 April 2010
• Construct an estimator
• Method of moments
• Maximum likelihood
• Work out its distribution
• Sampling distribution of mean
• Sampling distribution of variance
• General properties of ML (not in this course)
Tools
Thursday, 15 April 2010
Set up
I repeated an experiment defined by Poisson(λ) 10 times, and recorded the following results: 6 11 10 6 12 7 8 5 7 10
The MLE of λ is 8.2, and its standard deviation is 0.90.
What is the distribution of the estimate? (Remember that it’s a mean) Can you construct an interval that will contain λ 95% of the time?
Thursday, 15 April 2010
Steps
1. Identify distribution that connects estimator and true value (4 choices).
2. Form confidence interval for known (sampling) distribution, and work out bounds.
3. Back transform.
4. Write as interval.
5. Plug in sample estimates (actual numbers).
Thursday, 15 April 2010
Your turn
Work through the steps on the handout.
Thursday, 15 April 2010
Confidence interval
A confidence interval is a simple numerical summary of the uncertainty of an estimate.
A 95% confidence interval will contain the true value 95% of the time.
An additional constraint is that we want the confidence interval to be a short as possible.
Thursday, 15 April 2010
expt
8
9
10
11
12
50 100 150 200
Each line = 95% confidence interval from one experiment
Thursday, 15 April 2010
expt
8
9
10
11
12
50 100 150 200
Horizontal line = true value
Thursday, 15 April 2010
expt
8
9
10
11
12
50 100 150 200
Red intervals don’t include true value
There are 13 red lines and 200 experiments. Is this an ok interval?
Thursday, 15 April 2010
Your turn
What’s wrong with a statement like this:
P(2 < μ < 6) = 0.95
?
Thursday, 15 April 2010
StepsIdentify distribution that connects estimator and true value.
Form confidence interval for known (sampling) distribution.
Write as probability statement.
Back transform.
Write as interval.
Thursday, 15 April 2010
X̄n − µ
σ/√
n∼ Z
Xi iid, and n large:
.
Thursday, 15 April 2010
(n− 1)S2
σ2∼ χ2(n− 1)
X̄n − µ
σ/√
n∼ Z
X̄n − µ
s/√
n∼ tn−1
Xi ∼ Normal(µ,σ2)iid
Thursday, 15 April 2010
x
dens
0.1
0.2
0.3
−3 −2 −1 0 1 2 3
df1215Inf
Thursday, 15 April 2010
Properties of the t-dist
Heavier tails compared to the normal distribution.
Practically, if n > 30, the t distribution is practically equivalent to the normal.
limn→∞
tn = Z
Thursday, 15 April 2010
t-tablesBasically the same as the standard normal. But one table for each value of degrees of freedom.
Easiest to use calculator or computer: http://www.stat.tamu.edu/~west/applets/tdemo.html
(For homework, use this applet, for final, I’ll give you a small table, if necessary)
Thursday, 15 April 2010
Thursday, 15 April 2010
Your turnWe perform the experiment an experiment to measure the speed of sound and repeat it 10 times: 340 333 334 332 333 336 350 348 331 344 (mean: 338, sd: 7.01)
Assuming Xi ~ Normal(μ, σ2), what is an estimate of the speed of sound? What is the error (sd) of this estimate? Give an interval that we’re 95% certain the true speed of sound lies in.
Thursday, 15 April 2010
Example
340 333 334 332 333 336 350 348 331 344 (mean: 338, sd: 7.01)
If not known: (333, 342) (2.23)
Thursday, 15 April 2010
StepsIdentify distribution that connects estimator and true value.
Form confidence interval for known (sampling) distribution.
Write as probability statement.
Back transform.
Write as interval.
Thursday, 15 April 2010
Steps
Want P(a < Q < b) = 1 - α, and b - a to be as small as possible.
If Q is symmetric, P(-a < Q < a) = 1 - α. So a = F(α/2), and there is no interval smaller.
If Q isn’t symmetric, pick a = F(α/2), b = F(1 - α/2), but there might be a shorter interval.
Thursday, 15 April 2010
Example
We want a 90% confidence interval, then two possible ends for the interval are F(0.05) and F(0.95)
Thursday, 15 April 2010
Reading
Read the rest of chapter 6.
Everything else is just examples of the general method we learned today.
Thursday, 15 April 2010