Download Ch 8A Statistical Intervals

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

Foundations of statistics wikipedia , lookup

History of statistics wikipedia , lookup

Degrees of freedom (statistics) wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

Taylor's law wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Misuse of statistics wikipedia , lookup

German tank problem wikipedia , lookup

Student's t-test wikipedia , lookup

Transcript
Statistical Intervals
for a Single Sample
From only one sample,
An interval has been found.
Because the sample was ample,
The results were quite profound!
- author unknown circa 2007
Chapter 8A
What to Look Forward to this Week
Today only!
A Diversion – the sampling distributions
or distributions arising from the normal
If Z1, Z2, ..., Zn are independent standard normal
random variables, then
  Z  Z  ...  Z
2
1
T
2
2
Z
2 / n
2
n
 ( n)
chi-square distribution
with n degrees freedom
t-distribution
with n degrees freedom
t ( n)
 ( n) / n
F 2
 (m) / m
2
2
F (n, m)
F-distribution
with n degrees freedom in
the numerator and m degrees
of freedom in the denominator
What will be Chi-square?
Let Xi be the ith sample value from a normal population
Xi
n(  ,  2 )
Z
Xi  
n(0,1)

Therefore
n
 Xi   


 
 
i 1 
n
2
 X
i 1
 
i

However
(n  1) S

2

 n
2
n
2
2
 X
i 1
i

X
2
2
  n  1
The Chi-square Distribution
k = degrees of
freedom
The t-distribution
also known as Student’s t
f(x) =
v = k = df
More about Student

The t statistic was introduced by William Sealy Gosset
for cheaply monitoring the quality of beer brews.



"Student" was his pen name.
Gosset was a statistician for the Guinness brewery in
Dublin, Ireland, and was hired due to Claude
Guinness's innovative policy of recruiting the best
graduates from Oxford and Cambridge to apply
biochemistry and statistics to Guinness' industrial
processes.
Gosset published the t test in Biometrika in 1908, but
was forced to use a pen name by his employer who
regarded the fact that they were using statistics as a
trade secret.
The F-distribution
f(x)
B(m,n) is the
Beta function
an interesting
property:
F-Distribution named after
R.A. Fisher
Born 17 February 1890(1890-02-17)
East Finchley, London , England
Died 29 July 1962 (aged 72) Adelaide, Australia
Residence England, Australia
Nationality British,
Field Statistics, Genetics, Natural selection
Institutions Rothamsted Experimental Station
University College London, Cambridge University
Alma mater Cambridge University
Academic advisor Sir James Jeans
F.J.M. Stratton
Notable students C.R. Rao
Known for Maximum likelihood
Fisher information
Analysis of variance
Notable prizes Royal Medal (1938)
Copley Medal (1955)
Three types of Intervals
-Confidence Interval – bound population
parameter or distribution parameter.
-Tolerance Interval – bound a proportion of
the distribution at a certain confidence level.
- Prediction Interval – bound a single
observation => assumptions on population
distribution critical here.
Overheard at a rest stop
I know that my average driving time on
this daily route has been 2.3 hours over
the last 7 days. However, that is based on
a sample and therefore is unlikely to equal
my population mean. What I really need is
some way to measure how precise this
estimate is.
A typical prob-stat graduate
I am 95% confident
that my mean driving
time to work is
between 37.4 minutes
and 41.2 minutes.
41.2 – 37.4 = 3.8
Best estimate is midpoint = 39.3
Error = 1.9 minutes



Confidence Interval - A statement
consisting of two values between
which the population parameter is
estimated to lie.
Reliability – degree of confidence –
the probability with which the
population parameter will be
“captured by the two values.
Precision – the length of the
confidence interval (a measure of the
error in estimating the parameter.
The Big Picture of a
Confidence Interval
(L,U) is 100(1-)% CI
for the population parameter 
The Bigger Picture of a
Confidence Interval
General Approach:
Estimate
our point
estimate

our precision
reliability Factor x Standard Error
our confidence
The Biggest Picture of a
Confidence Interval
population
parameter
Pr l  x1 ,..., xn     u  x1,..., xn   1  
Measure of Uncertainty (precision)
(Random Variables; i.e. statistics
Measure of Risk
(1 – )% of the C.I.s constructed this way contain the mean.
Watch the interpretation of this concept.
The length of a confidence interval is a measure of the precision of estimation.
Confidence Interval on Mean of Normal
Distribution Variance Known
X 
Z
has a standard normal distribution
/ n


X 
 P  z /2 
 z /2   1  
/ n


with a little algebra,


P X  z /2 / n    X  z /2 / n  1  
This is our 100(1   )% Confidence Interval on  .
z / 2 is the upper  /2 percentage point from standard normal
Our Very First Real Confidence
Interval

A sample of 100 batteries are tested for their operating life.
They averaged (mean) 10 hours before failing. The
manufacturer has assured us that the population variance is
16 hours. Find a 95 percent confidence interval for the
mean life of this particular type of battery.
N  100, x  10 hr.,   4 hr.
z.025  1.96
X  z /2

4
 10  1.96
 (9.216,10.784)
n
100
Sample Size and Precision


P X  z / 2 / n    X  z / 2 / n  1  
Equivalent ly :
x    z / 2 / n
Define the error by
x  E
Choose n as below and we can be 100(1 -  )%
confident that the error will not exceed E.
 z / 2 
n

 E 
2
Think of E as a measure
of practical significance.
Our Very First Real Confidence
Interval Revisited
For our battery problem, what sample size is required to
reduce the error to .5 hr. with a 99% confidence?
2

z

2.58
x16 
  /2 
n
  426.0096  426
 
2
 E   .5

2
Problem 8-12
Life of a 75 watt bulb is normally distributed with
std dev = 25 hrs. Suppose we want to be 95%
confident that the error in estimating mean life is
less than 5 hours. Find a sample size.
 z /2   1.96(25) 
n
  96.04  96
 
5

 E  
2
2
Problem 8-10
Diameter of holes for a cable harness is normally
distributed with a standard deviation of .01 in. A
random sample of 10 yields average diameter of
1.5045 in. Find a 99% two-sided confidence
interval.
x  z 0 . 005  /
n    x  z 0 .005  /
n
1 . 5045  2 . 58 ( 0 . 01 ) / 10    1 . 5045  2 . 58 ( 0 . 01 ) / 10
1 . 4963    1 . 5127
Interpreting a Confidence
Interval
 The confidence interval is a random interval


The appropriate interpretation of a confidence
interval (for example on ) is: The observed
interval [l, u] brackets the true value of , with
confidence 100(1-).
Examine Figure 8-1 on the next slide.
Figure 8-1 Repeated construction
of a confidence interval for 
Repeated Confidence Intervals, gen.
samples
Random samples from a standard normal
distribution, N(0,1).
Generated in Excel as NORMSINV(RAND())
Sample
1
2
3
4
5
6
1.886
1.040
1.091
-1.618
-1.246
0.301
1.014
-1.008
-0.447
0.874
-0.386
-1.002
-1.534
-0.225
1.393
0.484
0.222
1.791
0.192
0.374
1.105
-1.761
-0.326
-0.212
96
97
98
99
100
-0.778
0.277
0.725
-0.227
-0.425
-0.977
0.646
2.182
-1.575
-0.328
0.361
-0.693
-0.855
1.890
0.475
-1.247
-1.306
-0.831
0.497
1.241
0.801
0.168
-0.012
-0.653
0.969
1.403
-0.045
-1.311
0.359
0.211
0.210
-0.429
0.607
-1.986
-0.432
0.225
0.669
-0.213
-0.489
0.295
0.408
1.409
-0.579
-1.439
-1.518
1.695
0.824
-0.071
-1.772
0.743
-1.639
-0.542
0.641
0.647
-1.070
0.749
0.487
-1.450
-0.306
-0.052
-0.313
1.165
1.423
-2.964
0.149
1.355
1.244
-1.589
0.399
1.576
0.666
-0.219
-1.099
1.832
-1.120
1.015
0.994
-1.123
-0.908
0.566
-0.171
1.273
-1.278
0.090
-0.073
0.983
Repeated Confidence Intervals, hits
and misses
mean
std dev
90% lower 90% upper 95% lower 95% upper
-0.104
0.375
0.327
0.064
0.335
0.071
-0.346
0.403
0.217
0.717
0.807
0.929
1.117
1.426
1.214
1.080
0.531
1.124
-0.476
-0.044
-0.155
-0.515
-0.405
-0.559
-0.907
0.127
-0.366
0.268
0.793
0.809
0.643
1.074
0.701
0.214
0.678
0.800
-0.549
-0.125
-0.249
-0.628
-0.549
-0.681
-1.016
0.074
-0.480
0.340
0.875
0.903
0.756
1.219
0.823
0.324
0.732
0.914
0.534
0.387
-0.212
0.469
0.305
0.374
-0.024
1.022
0.750
1.253
0.759
0.612
0.745
0.489
0.004
-0.002
-0.862
0.076
-0.012
-0.013
-0.278
1.064
0.776
0.438
0.863
0.622
0.760
0.230
-0.099
-0.078
-0.988
-0.001
-0.074
-0.088
-0.327
1.168
0.852
0.564
0.940
0.684
0.836
0.279
Totals ->
90%
95%
misses misses
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
1
0
0
0
14
0
0
0
0
0
0
0
9
Since these are not 10 and 5,
respectively, is there an error?
Repeated Confidence Intervals, .90
n
p
100
How are these probabilities
being generated?
Let X = RV, number of
misses. Then X ~ Bin(100, .1)
E[X] = np = 10
misses
0.1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
prob(p) Cum Prob
0.0000
0.0000
0.0003
0.0003
0.0016
0.0019
0.0059
0.0078
0.0159
0.0237
0.0339
0.0576
0.0596
0.1172
0.0889
0.2061
0.1148
0.3209
0.1304
0.4513
0.1319
0.5832
0.1199
0.7030
0.0988
0.8018
0.0743
0.8761
0.0513
0.9274
0.0327
0.9601
0.0193
0.9794
0.0106
0.9900
0.0054
0.9954
0.0026
0.9980
0.0012
0.9992
Repeated Confidence Intervals, .95
n
p
100
misses
0.05
0
1
2
3
4
5
6
7
8
9
10
11
12
prob(p) Cum Prob
0.0059
0.0059
0.0312
0.0371
0.0812
0.1183
0.1396
0.2578
0.1781
0.4360
0.1800
0.6160
0.1500
0.7660
0.1060
0.8720
0.0649
0.9369
0.0349
0.9718
0.0167
0.9885
0.0072
0.9957
0.0028
0.9985
Major Point: Can you see how probability helps us assess the risk
associated with statistical inference?
One-sided Confidence Bounds
Our Very First Real Confidence
Interval Revisited Again
A One-Sided Confidence Interval
Based upon the sample of 100 batteries averaging (mean)
10 hours to failure. The manufacturer continues to assure
us that the population variance is 16 hours. Find a 95
percent lower confidence interval for the mean life of this
particular type of battery.
z.05  1.6449
X  z

4
 10  1.6449
 9.342 hr.
n
100
A Transition…
The previous development of a confidence
interval was limited in two ways:
- Needed a Normal population
- Needed to know the standard deviation of the
Normal distribution
The Central Limit Theorem eliminates the need to
explicitly know the population is normal – Z will
still be approximately standard normal
We can estimate  using the sample standard
deviation, s.
Confidence Interval on Mean of
Normal – Variance Unknown
Same form as for the normal – measure of risk is now from
the t distribution, and we boldly use the sample standard
deviation – protected by the heavy-tailed t distribution-even
when sample size is small!
Remember we are still assuming that observations from the
underlying population are normally distributed.
100(1   ) percent confidence interval :
x  t / 2,n 1s / n    x  t / 2,n 1s / n
where t / 2,n 1 is the upper 100 / 2 percentage
point of a t distributi on with n  1 d.f.' s.
Where Does it Come From? Do we
care?
From earlier:
X 
Z
n(0,1)
/ n
(n  1) S 2
X
  n  1
2

numerator is
standard normal
denominator is chisquare divided by
d.f. (n-1)
T
X 
 / n  X 
S/ n
(n  1) S 2
2
n

1

 
T has a t distribution with n-1 degrees of freedom.
Are we still caring?


X 
P t /2 
 t /2   1  
S/ n


with a little algebra,


P X  t /2 S / n    X  t /2 S / n  1  
This is our 100(1   )% Confidence Interval on .
t /2 is the upper  /2 percentage point from t-distribution
Confidence Interval on Mean of
Normal – Variance Unknown
For large samples the distributional assumption is
not critical. If sample size is not large use the t
distribution
X 
T
has a t distributi on with n - 1 degrees of freedom
S/ n
if X 1 , X 2 ,..., X n are a sample from a normal distributi on
with unknown mean and variance.
As n  ∞, t distribution becomes standard normal.
t Distribution Converges to Standard
Normal
For large sample size, use the normal
distribution even if the variance is unknown.
The t distribution
k  1 / 2
1
f ( x) 
  x  
( k 1) / 2
2
k k / 2 x / k   1


t ,k is the value of the random variable T with k degrees
of freedom above which we have area (probabili ty)  .
Usually k is the number of degrees of freedom associated
with the sample standard deviation (n - 1).
Our Very First CI
using the t-distribution

Sulfur dioxide and nitrogen oxide are products of fossil fuel
consumption. These compounds can be carried long distances
and converted to acid before being deposited in the form of “acid
rain.” The following sulfur dioxide concentrations (in micrograms
per cubic meter) were obtained from different locations in a forest
though to have been damaged by acid rain. Estimate the mean
52.7 43.9 41.7 71.5 47.6 55.1
concentration in the forest.
62.2
45.3
52.4
56.5
63.4
38.6
33.4
53.9
46.1
61.8
65.5
44.4
54.3
66.6
60.7
50
70
56.4
n  24, x  53.92, s 2  101.48, t.025,23  2.069
x  t /2,n 1s / n    x  t /2,n 1s / n
53.92  2.069
Average concentration
in undamaged areas
is 20 g/m3
10.07
10.07
   53.92  2.069
 (49.67,58.17)
24
24
It’s Official Now
Stay Tuned – next time…