Beruflich Dokumente
Kultur Dokumente
Spring 2017
Sebastian Wai
Main textbook:
I
Sebastian Wai
Statistics review
Sebastian Wai
These slides introduce our first tools for working with data samples.
Because of this, this slide show is quite math and stats-heavy.
We will learn some very important tools here that we will use for
the rest of the course.
Sebastian Wai
Random Variables
Sebastian Wai
Draws
Sebastian Wai
Sebastian Wai
Bernoulli Distribution
Sebastian Wai
Binomial Distribution
Sebastian Wai
Binomial Distribution
Sebastian Wai
Example: Roulette
It was obvious that all this ritual and all the mechanical minutiae
of the wheel, of the numbered slots and the cylinder, had been
devised and perfected over the years so that neither the skill of the
croupier nor any bias in the wheel could affect the fall of the ball.
And yet it is a convention among roulette players, and Bond rigidly
adhered to it, to take careful note of the peculiarities in the run of
the wheel... Bond didnt defend the practice. He simply
maintained that the more effort and ingenuity you put into
gambling, the more you took out.
Ian Fleming, Casino Royale (1953)
Sebastian Wai
Example: Roulette
18 black slots
18 red slots
From the passage, we know James has concluded the wheel is fair.
Suppose he decides to bet on black for 10 spins. Betting on black
pays out the initial bet for a win.
Sebastian Wai
Exercises
Sebastian Wai
Solution
Sebastian Wai
Solution
Based on this, we can construct the table:
k
0
1
2
3
4
5
6
7
8
9
10
Pr (x = k)
0.0013
0.0121
0.0515
0.1301
0.2157
0.2452
0.1936
0.1048
0.0372
0.0078
0.0007
Pr (x k)
1
0.9987
0.9866
0.9352
0.8051
0.5894
0.3442
0.1506
0.0458
0.0086
0.0007
Sebastian Wai
Pr (x k)
0.0013
0.0134
0.0648
0.1949
0.4106
0.6558
0.8494
0.9542
0.9914
0.9993
1
Solution
Sebastian Wai
Custom Distribution
Sebastian Wai
Author
Rushdie
Dick
Abnett
Fleming
Sebastian Wai
Sebastian Wai
Normal Distribution
0.2
0.1
0.0
Density
0.3
0.4
Sebastian Wai
Normal Distribution
Sebastian Wai
Normal Distribution
1
2 2
(x)2
2 2
Sebastian Wai
F (x) =
f (k)dk
k=
Sebastian Wai
Draw a sample!
Sebastian Wai
Notation
Sample notation:
I
Sebastian Wai
Sample Statistics
Sample mean:
N
1 X
X =
Xi
N
i=1
Sample variance:
N
2
1 X
Xi X
S =
N 1
2
i=1
S=
S2
Sample Statistics
N 1 in denominator instead of N
Sebastian Wai
Estimators
Sebastian Wai
Unbiasedness
When the draws are i.i.d., sample statistics are unbiased estimators
for the population parameters. Formally, the sample statistic is
unbiased when the mean of the statistic equals the population
parameter:
E X =
E S 2 = 2
E [S] =
Sebastian Wai
Unbiasedness
X an unbiased estimator for .
Proof.
E [Xi ] =
N
1 X
Xi
X =
N
i=1
N
N
1 X
1 X
E X =
E [Xi ] =
N
N
i=1
i=1
1
E X = N =
N
Sebastian Wai
Confidence Intervals
Sebastian Wai
Variance of X
In order to construct a confidence interval for the mean estimate,
we need to know how X is distributed. We already know its mean
is , but what is the variance?
!
N
X
1
Var X = Var
Xi
N
i=1
1
Var X = 2 Var
N
N
X
!
Xi
i=1
1
Var X = 2 N Var (Xi )
N
2
Var X =
N
Sebastian Wai
Theorem
When N is sufficiently large (conventionally, N 30), the sample
mean is normally distributed. That is,
X Normal ,
N
Sebastian Wai
CLT Example
Sebastian Wai
CLT Example
Experiment:
I
Results:
I
E X = 18.47
Var X = 4.02
4.02 30 = 120.67
Sebastian Wai
CLT Example
Histogram of sample means with fitted Normal density:
1000
500
0
Frequency
1500
2000
Histogram of Means
15
20
Means
Sebastian Wai
25
Confidence Intervals
You can use a computer or table to do this for CIs of any size.
Sebastian Wai
Confidence Intervals
, + 1.65
1.65
N
N
and so forth for the other intervals.
But wait, this looks a bit backward. We dont actually know and
we were trying to find estimates for those parameters in the
first place.
Sebastian Wai
Confidence Intervals
Sebastian Wai
Confidence Intervals
Sebastian Wai
Hypothesis Testing
Sebastian Wai
Sebastian Wai
Hypothesis Testing
Sebastian Wai
Sebastian Wai
Recall that since N > 30, by the CLT, the sample mean is
normally distributed
Sebastian Wai
X $35, 000
Sebastian Wai
X $35, 000
S
N
But, when N > 30, the t and normal distributions are very
similar
Sebastian Wai
100
= 1.452
Sebastian Wai
Sebastian Wai
Sample Size
I Note the
N in the t-stat
I
All other things equal, larger sample sizes make larger t-stats
Sebastian Wai
P-Values
Sebastian Wai
P-Values
Graphical representation of the p-value
Sebastian Wai
P-Values
Sebastian Wai
t Distribution in Excel
T.DIST.2T(t, df )
t is our t-stat
Sebastian Wai
Sebastian Wai
Summary
Important takeaways:
I
Sebastian Wai
Up Next
Sebastian Wai