10-estimators-pre-lecture
10-estimators-pre-lecture
Easter 2024
Outline
Introduction
More Examples
Setting: We can take random samples in the form of i.i.d. random vari-
ables X1 , X2 , . . . , Xn from an unknown distribution.
Setting: We can take random samples in the form of i.i.d. random vari-
ables X1 , X2 , . . . , Xn from an unknown distribution.
Setting: We can take random samples in the form of i.i.d. random vari-
ables X1 , X2 , . . . , Xn from an unknown distribution.
Physical Experiments:
Measurement = Quantity of Interest + Measurement Error
Setting: We can take random samples in the form of i.i.d. random vari-
ables X1 , X2 , . . . , Xn from an unknown distribution.
Setting: We can take random samples in the form of i.i.d. random vari-
ables X1 , X2 , . . . , Xn from an unknown distribution.
Setting: We can take random samples in the form of i.i.d. random vari-
ables X1 , X2 , . . . , Xn from an unknown distribution.
Remark
The Weak Law of Large Numbers implies that for any > 0 and a ∈ R,
Remark
The Weak Law of Large Numbers implies that for any > 0 and a ∈ R,
Example 1
Consider throwing an unbiased dice 8 times, and let the realisation be:
Example 1
Consider throwing an unbiased dice 8 times, and let the realisation be:
1
7/8
6/8
5/8
F8 (a)
4/8
3/8
2/8
1/8
0 a
1 2 3 4 5 6
Example 1
Consider throwing an unbiased dice 8 times, and let the realisation be:
1
7/8 5/6
6/8
5/8 4/6
F8 (a)
F (a)
4/8 3/6
3/8 2/6
2/8
1/8 1/6
0 a
1 2 3 4 5 6
Source: Wikipedia
Source: Wikipedia
Source: Wikipedia
minutes
0 1 2 3 4 5 6
Source: Wikipedia
minutes
0 1 2 3 4 5 6
Source: Wikipedia
minutes
0 1 2 3 4 5 6
Source: Wikipedia
minutes
0 1 2 3 4 5 6
Source: Wikipedia
minutes
0 1 2 3 4 5 6
Source: Wikipedia
minutes
0 1 2 3 4 5 6
Source: Wikipedia
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
Source: Wikipedia
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
λk
P [ X = k ] = e−λ ·
Source: Wikipedia
k!
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
λk
P [ X = k ] = e−λ ·
Source: Wikipedia
k!
∆ ∼ Exp(λ)
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
λk
P [ X = k ] = e−λ ·
Source: Wikipedia
k!
∆ ∼ Exp(λ)
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
λk
P [ X = k ] = e−λ ·
Source: Wikipedia
k!
∆ ∼ Exp(λ)
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
λk
P [ X = k ] = e−λ ·
Source: Wikipedia
k!
∆ ∼ Exp(λ)
minutes
0 1 2 3 4 5 6
X ∼ Poi(λ)
λk
P [ X = k ] = e−λ ·
Source: Wikipedia
k!
Definition of Estimator
An estimate is a value t that only depends on the dataset x1 , x2 , . . . , xn , i.e.,
t = h(x1 , x2 , . . . , xn ).
Definition of Estimator
An estimate is a value t that only depends on the dataset x1 , x2 , . . . , xn , i.e.,
t = h(x1 , x2 , . . . , xn ).
T = h(X1 , X2 , . . . , Xn ),
Definition of Estimator
An estimate is a value t that only depends on the dataset x1 , x2 , . . . , xn , i.e.,
t = h(x1 , x2 , . . . , xn ).
T = h(X1 , X2 , . . . , Xn ),
Questions:
Definition of Estimator
An estimate is a value t that only depends on the dataset x1 , x2 , . . . , xn , i.e.,
t = h(x1 , x2 , . . . , xn ).
T = h(X1 , X2 , . . . , Xn ),
Questions:
What makes an estimator suitable? unbiased (later: MSE)
Does an unbiased estimator always exist? How to compute it?
If there are several unbiased estimators, which one to choose?
Introduction
More Examples
Example 2
Example 2
We have
X1 + X2 + · · · + Xn
X n := ,
n
h i
and E X n = E [ X1 ] = λ.
Example 2
We have
X1 + X2 + · · · + Xn
X n := ,
n
h i
and E X n = E [ X1 ] = λ. This suggests the estimator:
h(X1 , X2 , . . . , Xn ) := X n .
Example 2
We have
X1 + X2 + · · · + Xn
X n := ,
n
h i
and E X n = E [ X1 ] = λ. This suggests the estimator:
h(X1 , X2 , . . . , Xn ) := X n .
Example 3a
Example 3a
Yi := 1Xi =0 .
Example 3a
Yi := 1Xi =0 .
Then
E [ Yi ] = P [ Xi = 0 ] = e−λ ,
Example 3a
Yi := 1Xi =0 .
Then
E [ Yi ] = P [ Xi = 0 ] = e−λ ,
and thus we can define an estimator by
Y1 + Y2 + · · · + Yn
h1 (X1 , X2 , . . . , Xn ) := = Yn .
n
Example 3b
Example 3b
Example 3b
Example 3b
h2 (X1 , X2 , . . . , Xn ) := e−X n .
1
⇒ The first estimator can only attain values 0, , 2 ,...,1
30 30
−1/30 −2/30
⇒ The second estimator can only attain values 1, e ,e ,...
1
⇒ The first estimator can only attain values 0, , 2 ,...,1
30 30
−1/30 −2/30
⇒ The second estimator can only attain values 1, e ,e ,...
Definition
An estimator T is called an unbiased estimator for
the parameter θ if
E [ T ] = θ,
Definition
An estimator T is called an unbiased estimator for
the parameter θ if
E [ T ] = θ,
Definition
An estimator T is called an unbiased estimator for
the parameter θ if
E [ T ] = θ,
Definition
An estimator T is called an unbiased estimator for
the parameter θ if
E [ T ] = θ,
Example 4a
Y1 +Y2 +···+Yn
Is h1 (X1 , X2 , . . . , Xn ) = n
an unbiased estimator for e−λ ?
Answer
Example 4a
Y1 +Y2 +···+Yn
Is h1 (X1 , X2 , . . . , Xn ) = n
an unbiased estimator for e−λ ?
Answer
Example 4a
Y1 +Y2 +···+Yn
Is h1 (X1 , X2 , . . . , Xn ) = n
an unbiased estimator for e−λ ?
Answer
E [ h1 (X1 , X2 , . . . , Xn ) ]
Example 4a
Y1 +Y2 +···+Yn
Is h1 (X1 , X2 , . . . , Xn ) = n
an unbiased estimator for e−λ ?
Answer
n · E [ Y1 ]
E [ h1 (X1 , X2 , . . . , Xn ) ] =
n
Example 4a
Y1 +Y2 +···+Yn
Is h1 (X1 , X2 , . . . , Xn ) = n
an unbiased estimator for e−λ ?
Answer
n · E [ Y1 ]
E [ h1 (X1 , X2 , . . . , Xn ) ] =
n
= P [ X1 = 0 ]
Example 4a
Y1 +Y2 +···+Yn
Is h1 (X1 , X2 , . . . , Xn ) = n
an unbiased estimator for e−λ ?
Answer
n · E [ Y1 ]
E [ h1 (X1 , X2 , . . . , Xn ) ] =
n
= P [ X1 = 0 ]
= e−λ .
2
≥ E [ X ]2 )
No! (recall: E X
2
≥ E [ X ]2 )
No! (recall: E X
Jensen’s Inequality
For any random variable X , and any convex function g : R → R, we have
2
≥ E [ X ]2 )
No! (recall: E X
2
≥ E [ X ]2 )
No! (recall: E X
We have
h i
E e−X n > e−E[ X n ] = e−λ
2
≥ E [ X ]2 )
No! (recall: E X
We have
h i
E e−X n > e−E[ X n ] = e−λ
2
≥ E [ X ]2 )
No! (recall: E X
We have
h i
E e−X n > e−E[ X n ] = e−λ
Introduction
More Examples
2
is an unbiased estimator for σ .
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1
(n − 1) · E [ Sn ] =
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1 h i h i
Let us now take expectations:
By Lec. 8, Slide 21: E (X − µ)2 = V X n = σ 2 /n
n
n h i 2
2
X
(n − 1) · E [ Sn ] = E (Xi − µ) − n · E Xn − µ
i=1
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1 h i h i
Let us now take expectations:
By Lec. 8, Slide 21: E (X − µ)2 = V X n = σ 2 /n
n
n h i 2
2
X
(n − 1) · E [ Sn ] = E (Xi − µ) − n · E Xn − µ
i=1
2 2
= n · σ − n · σ /n
We need to prove: E [ Sn ] = σ 2 .
Answer
Multiplying by n − 1 yields:
X n 2
(n − 1) · Sn = Xi − X n
i=1
n
X 2
= Xi − µ + µ − X n
i=1
n n 2 n
2
X X X
= (Xi − µ) + Xn − µ − 2 (Xi − µ) X n − µ
i=1 i=1 i=1
n 2
2
X
= (Xi − µ) + n X n − µ − 2 X n − µ · n · X n − µ
i=1
n 2
2
X
= (Xi − µ) − n X n − µ .
i=1 h i h i
Let us now take expectations:
By Lec. 8, Slide 21: E (X − µ)2 = V X n = σ 2 /n
n
n h i 2
2
X
(n − 1) · E [ Sn ] = E (Xi − µ) − n · E Xn − µ
i=1
2 2
= n · σ − n · σ /n
2
= (n − 1) · σ .
1
Hence this estimator does not work for p < M
, since then
E [ T (X ) ] ≤ M < p1 (negative bias!)
1
Hence this estimator does not work for p < M
, since then
E [ T (X ) ] ≤ M < p1 (negative bias!)
The next proof will work even if p ∈ [a, b] for 0 < a < b ≤ 1.