Professional Documents
Culture Documents
1-1
1-2
1-3
1-4
Parent Satisfacation
Performance on Standardized tests
Student personal development
Future adult welfare and/or earnings
1-5
1-6
1-7
1-8
1-9
Initial data analysis: Compare districts with small (STR < 20)
and large (STR 20) class sizes:
Class Size
Average score
( Y )
Standard deviation
(sBYB)
Small
657.4
19.4
238
Large
650.0
17.9
182
1-10
1. Estimation
Ysmall Ylarge =
1
nsmall
nsmall
Yi
i=1
1
nlarge
nlarge
Y
i=1
= 657.4 650.0
= 7.4
1-11
2. Hypothesis testing
Difference-in-means test: compute the t-statistic,
t=
Ys Yl
ss2
ns
sl2
nl
Ys Yl
=
SE(Ys Yl )
(remember this?)
Y
)
i
s
ns 1 i=1
2
s
1-12
t=
sY
19.4
17.9
Y
657.4
650.0
Ys Yl
ss2
ns
sl2
nl
657.4 650.0
19.42
238
17.92
182
n
238
182
7.4
= 4.05
=
1.83
1-13
3. Confidence interval
A 95% confidence interval for the difference between
the means is,
(
Ys Yl
) 1.96SE(
Ys Yl )
1-14
1-15
1-16
1-17
Population distribution of Y
The probabilities of different values of Y that occur
in the population, for ex. Pr[Y = 650] (when Y is
discrete)
or: The probabilities of sets of these values, for
ex. Pr[640 Y 660] (when Y is continuous).
1-18
standard deviation =
variance = Y
1-19
Moments, ctd.
3
E " Y Y %
$#
'&
skewness =
Y3
= measure of asymmetry of a distribution
skewness = 0: distribution is symmetric
skewness > (<) 0: distribution has long right (left) tail
E " Y Y %
$#
'&
kurtosis =
Y4
= measure of mass in tails
= measure of probability of large values
kurtosis = 3: normal distribution
skewness > 3: heavy tails (leptokurtotic)
1-20
1-21
1-22
So is the correlation
Copyright 2011 Pearson Addison-Wesley. All rights reserved.
1-23
cov( X , Z )
XZ
=
= rXZ
var( X ) var(Z ) X Z
1 corr(X,Z) 1
corr(X,Z) = 1 mean perfect positive linear association
corr(X,Z) = 1 means perfect negative linear association
corr(X,Z) = 0 means no linear association
1-24
1-25
1-26
1-27
1-28
1-29
Estimation
Y?
median(Y1,, Yn)
1-30
1-31
Y , ctd.
Then
E(Y) = p1 + (1 p) 0 = p = .78
[remember this?]
Y depends on n.
Y is,
1-32
1-33
is a consistent estimator of
1-34
Variance:
var( Y ) = E[ Y E(
= E[
)]2
Y ]2
n
)" 1
,
%
= E+
$# n Yi '& Y .
i=1
*
2
n
= E#1
&
% (Yi Y ) (
$ n i=1
'
Copyright 2011 Pearson Addison-Wesley. All rights reserved.
1-35
so
#1
&
var( Y ) = E % (Yi Y ) (
$ n i=1
'
*, # 1 n
& .,
& #1 n
= E + % (Yi Y ) ( % (Y j Y ) ( /
,- $ n i=1
' $ n j=1
' ,0
1 n n
= 2 E "#(Yi Y )(Y j Y ) $%
n
i=1 j=1
1 n n
= 2 cov(Yi ,Y j )
n i=1 j=1
1 n 2
= 2 Y
n i=1
Y2
=
n
Copyright 2011 Pearson Addison-Wesley. All rights reserved.
1-36
Implications:
Y2
n
Y) = Y)
1-37
Y when n is
1-38
Y| < ] 1 as n
p
1-39
) ( normal
(standard normal)
Y=
Y E(Y )
Y Y
is
var(Y )
Y / n
approximately distributed as N(0,1)
The larger is n, the better is the approximation.
1-40
1-41
Y E(Y )
var(Y )
1-42
Y E(Y )
1-43
To Estimate Y?
Y is unbiased: E( Y ) = Y
p
Y is consistent: Y Y
Y is the least squares
estimator of Y; Y solves,
n
min m (Yi m)2
i=1
d n
(Yi m)2
dm i=1
d
dm (Yi m)2
i=1
=
= 2 (Yi m)
i=1
Set derivative to zero and denote optimal value of m
:
by m
n
i=1
i =1
Y = m = nm or m =
Copyright 2011 Pearson Addison-Wesley. All rights reserved.
1 n
Yi =
n i=1
1-44
Why Use
To Estimate Y, ctd.
1 n
estimators: consider the estimator, Y = aiYi , where
n i =1
{ai} are such that Y is unbiased; then var( Y ) var( Y )
(proof: SW, Ch. 17)
1-45
Hypothesis Testing
The hypothesis testing problem (for the
mean): make a provisional decision based
on the evidence at hand whether a null
hypothesis is true, or instead that some
alternative hypothesis is true. That is, test
H0: E(Y) = Y,0 vs. H1: E(Y) > Y,0 (1-sided, >)
H0: E(Y) = Y,0 vs. H1: E(Y) < Y,0 (1-sided, <)
H0: E(Y) = Y,0 vs. H1: E(Y) Y,0 (2-sided)
1-46
Y act
Y:
is the value of
1-47
= PrH0 [|
= PrH [|
0
Y Y ,0
Y / n
Y Y ,0
|>|
|>|
Y act Y ,0
Y / n
Y act Y ,0
|]
|]
= Y/
n.
1-48
1-49
1 n
(Yi Y )2 = sample variance of Y
=
n 1 i=1
Fact:
If (Y1,,Yn) are i.i.d. and E(Y4) < , then
p
2
s Y
2
Y
1-50
= PrH [|
0
~ Pr [|
=
H
0
so
Y Y ,0
Y / n
Y Y ,0
sY / n
|>|
|>|
Y act Y ,0
Y / n
Y act Y ,0
sY / n
|]
|]
(large n)
1-51
1-52
1-53
1-54
degrees of freedom
(n 1)
5% t-distribution
critical value
10
2.23
20
2.09
30
2.04
60
2.00
1.96
1-55
1-56
1-57
t=
Ys Yl
ss2
ns
sl2
nl
Ys Yl
=
SE(Ys Yl )
1-58
1.
2.
3.
4.
1-59
Confidence Intervals
A 95% confidence interval for Y is an interval
that contains the true value of Y in 95% of
repeated samples.
Digression: What is random here? The values of
Y1,...,Yn and thus any functions of them
including the confidence interval. The confidence
interval will differ from one sample to the next.
The population parameter, Y, is not random; we
just dont know it.
1-60
Y Y
sY / n
Y Y
1.96
sY
sY
sY / n
Y+ 1.96
sY
n
1.96}
)}
2
Y
s Y2 .
1-61
Summary:
From the two assumptions of:
1. simple random sampling of a population, that is,
{Yi, i =1,,n} are i.i.d.
1-62
1-63