W7GS

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Statistics for Data Science - 2

Week 7 Graded assignment

1. Let X1 , X2 , X3 are three independent and identically distributed random variables with
mean µ and variance σ 2 . Given below are 3 different formulations of sample mean.
(Observe that E[A] = E[B] = E[C]).
X1 + X2 + X3
A=
3
B =0.1X1 + 0.3X2 + 0.6X3
C =0.2X1 + 0.3X2 + 0.5X3

Choose the correct option from the following:

(a) Var(A) = Var(B) = Var(C)


(b) Var(A) ≥ Var(B) ≥ Var(C)
(c) Var(A) ≤ Var(B) ≤ Var(C)
(d) Var(A) ≤ Var(C) ≤ Var(B)

Solution:
Let X1 , X2 , X3 ∼ i.i.d.X, where E[X] = µ, Var(X) = σ 2
 
X1 + X 2 + X3
Var(A) =Var
3
1
= (Var[X1 ] + Var[X2 ] + Var[X3 ])
9
1 σ2
= (3σ 2 ) =
9 3

Var(B) =Var (0.1X1 + 0.3X2 + 0.6X3 )


=0.01Var[X1 ] + 0.09Var[X2 ] + 0.36Var[X3 ]
=0.46σ 2

Var(C) =Var (0.2X1 + 0.3X2 + 0.5X3 )


=0.04Var[X1 ] + 0.09Var[X2 ] + 0.25Var[X3 ]
=0.38σ 2

Therefore, Var(B) ≥ Var(C) ≥ Var(A).

1
2. A random sample of size 25 is collected from a normal population with mean of 50 and
standard deviation of 5. Find the variance of the sample mean.
Solution:
We know that variance of the sample mean X is given by

σ2
Var[X] =
n
52
= =1
25

3. A fair die is rolled 100 times. Let X denote the number of times six is obtained. Find
X 1
a bound for the probability that differs from by less than 0.1 using weak law of
100 6
large numbers.
5
(a) at least
36
31
(b) at least
36
5
(c) at most
36
31
(d) at most
36
Solution:
X denotes the number of times six is obtained on rolling a fair die 100 times.
Let X1 , X2 , . . . , X100 be 100 i.i.d. samples such that
(
1 if six appears on rolling a fair die
Xi =
0 otherwise

1
E[Xi ] = µ = and
6
5
Var(Xi ) = σ 2 =
36
Notice that X = X1 + X2 + X3 + . . . + X100
!
X 1
To find: Bound on P − < 0.1 .
100 6

2
By weak law of large numbers, we have

σ2
P (|X − µ| < δ) ≥ 1 − 2
! nδ
X 1 5
⇒P − < 0.1 ≥ 1 −
100 6 36 × 100 × 0.01
!
X 1 5 31
⇒P − < 0.1 ≥ 1 − =
100 6 36 36

4. Let X1 , X2 , . . . , X5 be i.i.d. samples whose distribution has mean 20 and variance 4.


Suppose the sample variance is defined as

(X1 − X)2 + · · · + (X5 − X)2


S2 =
5
X1 + X 2 + · · · + X 5
, where X = . Find the expected value of S 2 .
5

Solution:
σ2 4
E[X̄] = µ = 20 and Var[X̄] = = = 0.8.
n 5

3
 n 
2
P
2
 i=1(Xi − X̄) 
E[S ] =E  
 n 

" n #
1 X
= E (Xi − X̄)2
n
" i=1
n
#
1 X
= E (Xi2 + X̄ 2 − 2Xi X̄)
n
" i=1
n n
#
1 X X
= E Xi2 + nX̄ 2 − 2nX̄ Xi
n
" i=1
n
i=1
#
1 X
= E Xi2 + nX̄ 2 − 2nX̄ 2
n
" i=1
n
#
1 X
= E Xi2 − nX̄ 2
n
" ni=1 #
1 X
= E[Xi2 ] − nE[X̄ 2 ]
n i=1
" n  2 #
1 X 2 σ
= (σ + µ2 ) − n + µ2
n i=1 n
1
= (nσ 2 + nµ2 ) − (σ 2 + nµ2 )

n
(n − 1)σ 2
=
n
4
Here, n = 5, therefore, E[S 2 ] = × 4 = 3.2
5
 
1
5. Suppose Xi ∼ Normal 0, 2 , where i = 1, 2, . . . , 9 and X1 , X2 , . . . , X9 are indepen-
i
X 9
dent to each other. Let Y be a random variable defined as Y = iXi . Find the
i=1
variance of Y .
Answer: 9

4
Solution:

9
!
X
Var(Y ) =Var iXi
i=1
=Var(X1 + 2X2 + 3X3 + . . . + 9X9 )
=Var(X1 ) + Var(2X2 ) + . . . + Var(9X9 )
=Var(X1 ) + 4Var(X2 ) + . . . + 81Var(X9 )
   
1 1 1
= 2 + 4 2 + . . . + 81 2
1 2 9
=9

6. A random sample of size 50 is collected from a population P , where P ∼ Uniform[0,12].


Find a lower bound on the probability that the sample mean will be at most 3 units
away from the actual mean using the weak law of large numbers.
Answer: 0.733
Solution:
P ∼ Uniform[0, 12]
0 + 12 (12 − 0)2 144
E[P ] = µ = = 6, Var(P ) = σ 2 = = = 12
2 12 12

By weak law of large numbers, we have

σ2
P (|X − µ| < δ) ≥ 1 −
nδ 2
 12 73
⇒P |X − µ| < 3 ≥ 1 − = = 0.9733
50 × 9 75

7. Suppose a random sample is used to estimate the proportion of voters in a city. If the
sample proportion is roughly 0.45, what sample size is necessary so that the standard
deviation of the sample proportion is 0.02?
Answer: 619

Solution:
Let the random variable X represents that the selected candidate is a voter.

Let Xi be defined as
(
1, if the selected candidate is a voter
Xi =
0, otherwise

5
Define an event A as A : X = 1.
It is given that P (A) = 0.45.
P (A)(1 − P (A))
We know that Var(S(A)) =
n
r r
p(1 − p) (0.45)(0.55)
= 0.02 =⇒ = 0.02 =⇒ n = 618.75 ≈ 619
n n

8. The average life(in years) of an electronic watch follows an exponential distribution


1
with parameter . Find the lower bound on the probability that the mean life of a
2
random sample of 50 such watches falls between 1 and 3 years. Enter your answer
correct to two decimals.
Hint: Use weak law of large numbers.
Answer: 0.92

Solution:
Let the random variable X represents the life of an electronic watch.
It is given that X ∼ Exp(1/2) and 50 such samples are taken.
E[X] = µ = 2, Var(X) = σ 2 = 4

To find: a lower bound on P (1 < X < 3).

By weak law of large numbers, we have

σ2
P (|X − µ| < δ) ≥ 1 −
nδ 2
 4 23
⇒P |X − 2| < 1 ≥ 1 − = = 0.92
50 × 1 25

You might also like