Var Mean Sample
Var Mean Sample
1
an abuse of notation, Y is used also for denoting a value of its range i.e. in
place of Y (r) (for some r ∈ Ω). The event notion can be extended to Y :
an event relatively to Y is a subset of |Y |. Considering an event e ⊆ |Y | the
probability that e is realized, noted P(Y ∈ e), is given by P(Y −1 (e)).
• |Z| = |Y |
• P(Z ∈ e) = P(Y ∈ e) for any e ⊂ |Z|.
1 Finite Population of R
We consider a finite population P of real values. Formally P is then a
map of RN with N ∈ N∗ that can be noted as a finite tuple of elements
of R. For the remainder we assume that P is the tuple (x1 , . . . , xN ). Some
elements of this population can be repeated i.e. we may have xi = xj with
i 6= j. Thus the number M of different values present in P i.e. the cardinal
of {v ∈ R | ∃i ∈ [1, N ], v = xi } is less or equal to N . Let us note ε1 , . . . , εM
the values present in P and η1 , . . . , ηM their respective repetition in P (ηi =
card({k ∈ [1, N ] | xk = εi })).
or equivalently :
i=M
1 X
m= ηi .εi
N i=1
ηi
Introducing pi = N
we have :
i=M
X
m= pi .εi
i=1
The variance υ of P is :
i=N
1 X
υ= (xi − m)2
N i=1
By König-Huygens Theorem :
i=N
1 X 2
υ=( xi ) − m 2
N i=1
Exploiting the repetition of elements we also have :
i=M
1 X 2
υ=( εi .ηi ) − m2
N i=1
Suppose that y1 , . . . , yηi are the indexes of the elements of P which are
equal to εi for some i ∈ [1, M ]. With the notations of the previous section
we have :
j=ηi
X 1 ηi
= P(k = y1 ) + . . . + P(k = yηi ) = = = pi
j=1
N N
X i = xs i
From those variables we can define the random variable X as follows :
i=n
1X
X= Xi
n i=1
From the linearity of the expected value we can easily prove that :
E[X] = E[X] = m
Indeed
i=n
1X
E[X] = E[ Xi ]
n i=1
i=n
1X
= E[Xi ]
n i=1
Since any Xi has the same distribution than X (this is established later
in Subsection 1.5), E[Xi ] = E[X]. Thus we have :
i=n
1X
E[X] = E[X]
n i=1
i=n
E[X] X
= . 1
n i=1
E[X]
.n = E[X] = m
n
1.4 What we want to prove
Concerning var[X], the variance of the sample mean, many books claim
without providing a proof that this equality holds :
N −n
var[X] = var[X].
n (N − 1)
The previous calculus subsumes an order for building the samples. The
first collected element is placed at the first place in the sample, the second at
the second place and so on. Indeed this order is totally arbitrary. One would
obtain the same sets of samples following another order.
More formally this amounts to say that the set of samples is preserved
by permutation. Suppose that si is permuted with sj in all samples, the set
of samples in globally preserved. In particular, for any i ∈ [2, n], si can be
permuted with s1 , leaving unchanged the set of all samples.
1.6 P(X1 = εi ), P(Xr = εi )
Let us consider the first element collected from P which determines X1 .
This element can be any element of P . So s1 can be any index k ∈ [1, N ]. It
follows that for k ∈ [1, N ] :
1
P(s1 = k) =
N
This can be confirmed by considering the samples satisfying s1 = k. Their
number is :
(N − 1)!
1 × (N − 1) × . . . × (N − n + 1) =
(N − n)!
So, as above
(N −1)!
(N −n)! (N − 1)!(N − n)! (N − 1)! 1
P(s1 = k) = N!
= = =
(N −n)!
N !(N − n)! N! N
Suppose that y1 , . . . , yηi are the indexes of the elements of P which are
equal to εi for some i ∈ [1, M ]. Then :
j=ηi
X 1 ηi
P(X1 = εi ) = P(s1 = y1 | . . . | s1 = yηi ) = =
j=1
N N
Now for r ∈ [2, n] and k ∈ [1, N ] what about P(sr = k) ? Indeed it is the
same than P(s1 = k). This has been justified in the previous Subsection : the
set of samples is preserved by the permutation of s1 with sr in all samples.
So for r ∈ [2, n] :
j=ηi
X 1 ηi
P(Xr = εi ) = P(sr = y1 | . . . | sr = yηi ) = =
j=1
N N
Now let us consider the join random variable (X1 , X2 ). It is not difficult
to see that for q 6= r,
ηq ηr
P(X1 = εq , X2 = εr ) =
N N −1
and that :
ηr ηr − 1
P(X1 = εr , X2 = εr ) =
N N −1
As for any couple (Xi , Xj ) with i 6= j this equality (named (A)) holds
we have also :
ηr ηr − 1
P(Xi = εr , Xj = εr ) =
N N −1
and for q 6= r,
ηq ηr
P(Xi = εq , Xj = εr ) =
N N −1
fqr = P(X1 = εq , X2 = εr )
and we have
ηr
frr = P(X1 = εr , X2 = εr ) +
N (N − 1)
thus
ηr
P(X1 = εr , X2 = εr ) = frr −
N (N − 1)
1.7 Covariance
Definition
Cov(Z, Y ) ≡ E[(Z − E[Z])(Y − E[Y ])
Useful Properties :
X X XX
Cov[ ai .Zi , bj .Yj ] = ai .bj .Cov[Zi , Yj ]
i j i j
Corollary :
Sub-Corollary :
i=n i=n
1X 1 X 1 X
var[ Zi ] = 2 var[Zi ] + 2 Cov[Zi , Zj ]
n i=1 n i=1 n
i6=j∈[1,n]
n.var[X] n − 1
var[X] = + Cov[X1 , X2 ]
n2 n
var[X] n − 1
var[X] = + Cov[X1 , X2 ]
n n
Using the last equality of Subsection 1.6 and the functions fqr
ηq
X X fqr N.(N −1)
E[X1 .X2 ] = εq .pq ( εr . ) − (εq . )
pq pq
q∈[1,M ] r∈[1,M ]
ηq
N.(N −1)
Notice that the term (εq . pq ) has been subtracted above because fqq
is not equal to P(X1 = εq , X1 = εq ) (see Subsection 1.6)
ηq ηr ηq
N.(N −1)
X X
= εq .pq ( εr . N ηNq−1 ) − (εq . ηq )
q∈[1,M ] r∈[1,M ] N N
X X ηr εq
= εq .pq ( εr . )−( )
N −1 N −1
q∈[1,M ] r∈[1,M ]
Since ηr = pr .N
X X pr .N εq
= εq .pq ( εr . )−( )
N −1 N −1
q∈[1,M ] r∈[1,M ]
X N X εq
= εq .pq ( εr .pr ) − ( )
N −1 N −1
q∈[1,M ] r∈[1,M ]
X N εq
= εq .pq .m − ( )
N −1 N −1
q∈[1,M ]
N.m X 1 X
= εq .pq − ε2q .pq
N −1 N −1
q∈[1,M ] q∈[1,M ]
N.m 1 X
=( .m) − ( ε2q .pq )
N −1 N −1
q∈[1,M ]
N.m2 1 X
= − ε2q .pq
N −1 N −1
q∈[1,M ]
N.m2 1 X ηq
= − ε2q .
N −1 N −1 N
q∈[1,M ]
N.m2 1 X
= − ε2q .ηq
N − 1 N.(N − 1)
q∈[1,M ]
hence
i=M
X
ε2i .ηi = N (υ + m2 )
i=1
So
N.m2 N (υ + m2 )
E[X1 .X2 ] = −
N −1 N.(N − 1)
N.m2 υ + m2
= −
N −1 N −1
N.m2 − υ − m2
=
N −1
(N − 1).m2 − υ
=
N −1
υ
= m2 −
N −1
Finally
υ
Cov[X1 , X2 ] = m2 − − m2
N −1
υ
Cov[X1 , X2 ] = −
N −1
var[X]
Cov[X1 , X2 ] = −
N −1
Let us plug this in the last equality of Subsection 1.7.
var[X] n − 1
var[X] = + Cov[X1 , X2 ]
n n
var[X] (n − 1) var[X]
var[X] = − .
n n N −1
var[X] n−1
var[X] = (1 − )
n N −1
var[X] N − 1 − n + 1
var[X] = ( )
n N −1
var[X] N −n
var[X] =
n N −1
That’s it !