0% found this document useful (0 votes)
87 views40 pages

Ksjahcdgcfkusdhcgy 6769

The document discusses topics related to linear algebra including inner products, orthogonality of vectors, Gram-Schmidt process, and orthogonal transformations. It provides examples and questions related to these topics.

Uploaded by

Gaming Sukant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views40 pages

Ksjahcdgcfkusdhcgy 6769

The document discusses topics related to linear algebra including inner products, orthogonality of vectors, Gram-Schmidt process, and orthogonal transformations. It provides examples and questions related to these topics.

Uploaded by

Gaming Sukant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

GA of WEEK 7-8

MATHS 2
STATS 2
For such content or any doubt
related these subject you msg me on
my whatsapp group
whatsapp link
Made by – Unknown
Week-7
Mathematics for Data Science - 2
Affine subspace, Equivalence and Similarity of the matrices,
Length of a vector, Inner products
Graded Assignment

1 Multiple Select Questions (MSQ)


1. Consider the vector spaces V and functions ⟨., .⟩ : V × V → R defined as follows:

i) V = R2 and ⟨(x1 , x2 ), (y1 , y2 )⟩ = x1 y1 − x2 y1 − x1 y2 + 2x2 y2 .


ii) V = M2×2 (R) and ⟨A, B⟩ = T r(AB),
where T r(M ) denotes the trace of a matrix M , i.e., the sum of the diagonal elements
of M .
iii) V = M2×1 (R) and ⟨A, B⟩ = T r(AB t ),
where T r(X) denotes the trace of a matrix X, i.e., the sum of the diagonal elements
of X. Y t denotes the transpose of matrix Y .
iv) V = R2 and ⟨(x1 , x2 ), (y1 , y2 )⟩ = x1 y2 + x2 y1 .
⃝ Option 1: (i) is an inner product.
⃝ Option 2: (ii) is an inner product.
⃝ Option 3: (iii) is an inner product.
⃝ Option 4: (iv) is an inner product.
2. Consider two linear transformations T and S from R2 → R2 defined as T (x, y) = (2x +
y, x + y) and S(x, y) = (x + cy, x + 2y). Let A and B be matrix representations of linear
transformations T and S with respect to the standard bases of R2 respectively.
Consider the following statements:

• P: If c = 1, then A and B are similar matrices.


• Q: If c = 2, then A and B are similar matrices.

1 0
• R: If c = 1 and P AP = B, then P can be the matrix
−1
.
1 2
 
1 2
• S: If c = 1 and P AP = B, then P can be the matrix
−1
.
1 1
• T: If c = 1, then there are infinitely many P satisfying the equation P −1 AP = B.

Which of the following options are true?


⃝ Option 1: P is true but Q is false.
⃝ Option 2: Both P and Q are true.
⃝ Option 3: Both R and S are true.
⃝ Option 4: R is false but S is true.
⃝ Option 5: T is true.

2
3. Let ⟨., .⟩ denote the standard inner product on R2 , i.e., ⟨(x1 , x2 ), (y1 , y2 )⟩ = x1 y1 + x2 y2 .
Which one of the following options is (are) true for the vector γ ∈ R2 , such that ⟨α, γ⟩ = 4
and ⟨β, γ⟩ = 8, where α = (3, 1) and β = (6, 2).
⃝ Option 1: No such γ exists.
⃝ Option 2: There are infinitely many such vectors which satisfy the properties
of γ.
⃝ Option 3: γ is unique in R2 .
⃝ Option 4: Any vector in the set {(t, 4 − 3t) | t ∈ R} satisfies the properties
of γ.
⃝ Option 5: (1, 1) is the only vector which satisfies the properties of γ.

3
4. Let ⟨., .⟩ denote the standard inner product on R2 , i.e., ⟨(x1 , x2 ), (y1 , y2 )⟩ = x1 y1 + x2 y2
and let v ∈ R2 . Consider a linear transformation Tv : R2 → R defined as:

Tv (u) = ⟨u, v⟩,

where v ∈ R2 . Which of the following options is (are) true for Tv ?


⃝ Option 1: Tv is one-one for all v ̸= 0 ∈ R2 .
⃝ Option 2: Tv is onto for all v ̸= 0 ∈ R2 .
⃝ Option 3: Tv is onto for all v ∈ R2 .
⃝ Option 4: Tv is not one-one for every v ∈ R2 .
⃝ Option 5: There exists a v ∈ R2 such that Tv is not onto.

4
5. Let L and L′ be affine subspaces of R3 , where L = (0, 1, 1) + U and L′ = (0, 1, 0) + U ′ , for
some vector subspaces U and U ′ of R3 . Let a basis for U be given by {(1, 1, 0), (1, 0, 1)}
and a basis for U ′ be given by {(1, 0, 0)}. Suppose there is a linear transformation
T : U → U ′ such that (1, 0, 1) ∈ ker(T ) and T (1, 1, 0) = (1, 0, 0). An affine mapping
f : L → L′ is obtained by defining f ((0, 1, 1) + u) = (0, 1, 0) + T (u), for all u ∈ U . Which
of the following options are true?
⃝ Option 1: L = {(x, y + 1, x − y + 1) | x, y ∈ R}.
⃝ Option 2: L′ = {(x, y + 1, 0) | x, y ∈ R}.
⃝ Option 3: L = {(x − y, y + 1, x − y + 1) | x, y ∈ R}.
⃝ Option 4: L = {(x, x + 1, y + 1) | x, y ∈ R}.
⃝ Option 5: f (x, y + 1, x − y + 1) = (y, 1, 0)
⃝ Option 6: f (x − y, y + 1, x − y + 1) = (x, y + 1, 0)
⃝ Option 7: f (x, x + 1, y + 1) = (y, 1, 0)
⃝ Option 8: f (x, y + 1, x − y + 1) = (0, 1, y)

5
2 Numerical Answer Type (NAT)
6. Let θ be the angle between the vectors u = (4, 7, 3) and v = (1, 2, −6), then what will
be the value of cos(θ)? [Answer: 0]

6
7. Consider a basis
{v1 = (1, 2, 0), v2 = (2, −1, 0), v3 = (0, 0, 2)}
of R3 with usual inner product. Suppose v = (x, y, 3x+y 5
) ∈ V is written as v = c1 v1 +
c2 v2 + c3 v3 , such that c1 + c2 = 4. What will be the value of c3 ? [Answer: 2]

7
8. Let V = R2 be a vector space. Consider two inner products ⟨., .⟩1 and ⟨., .⟩2 on V defined
as
⟨(x1 , y1 ), (x2 , y2 )⟩1 = x1 x2 − x1 y2 − x2 y1 + 4y1 y2
and
⟨(x1 , y1 ), (x2 , y2 )⟩2 = 3x1 x2 + 2y1 y2 .
If ⟨(a, b), (8, 9)⟩1 = 215 and ⟨(a, b), (8, 9)⟩2 = 360, then find the value a + 2b. [Ans: 25]

8
9. Let V = R3 be the inner product space with usual inner product. If θ is the angle
between (14, 11, 5) and (a, b, c) where 14a + 11b + 5c = 0 and (a2 + b2 + c2 ) ̸= 0, then
find the value of cos θ. [Ans 0]

9
10. Consider a vector v = (x − 11, 2, 1) ∈ R3 . Find the value of x so that the length of the
vector v is minimum. [Ans: 11]

10
Week-8
Mathematics for Data Science - 2
Projection, Gram-Schmidt process, Orthogonal transformation
Graded Assignment-Solutions

1 Multiple Select Questions (MSQ)


1. An inner product on R3 is defined as:

⟨., .⟩ : R3 × R3 → R
⟨(x1 , x2 , x3 ), (y1 , y2 , y3 )⟩ = x1 y1 + x2 y2 + x3 y3 .

Match the sets of vectors in column A with their properties of orthogonality or orthonor-
mality in column B with respect to the above inner product.

Set of vectors Properties


(Column A) (Column B)

a) {(2, 3, 4), (−1, 2, −1)} i) Forms a basis but not orthogonal

b) { √12 (1, 0, −1), √12 (−1, 0, −1)} ii) Forms an orthogonal basis

c) {(2, 3, 4), (−1, 2, −1), (0, 4, −3)} iii) Orthogonal but not orthonormal,
and does not form a basis of R3

d) {(2, 3, 4), (−1, 2, −1), (11, 2, −7)} iv) Orthonormal,


but does not form a basis of R3

Table : M2W6G1

Choose the correct options.


⃝ Option 1: a → iv)
⃝ Option 2: a → iii)
⃝ Option 3: b → iv)
⃝ Option 4: b → iii)
⃝ Option 5: c → ii)
⃝ Option 6: c → i)
⃝ Option 7: d → i)
⃝ Option 8: d → ii)
Solution: Note that if x, y ∈ V are non-zero and orthogonal, then {x, y} is a linearly
independent set. Also, since dimension of R3 is 3, any set of 3 linearly independent
vectors forms a basis.

a) ⟨(2, 3, 4), (−1, 2, −1)⟩ = −2 + 6 − 4 = 0 and ⟨(2, 3, 4), (2, 3, 4)⟩ ̸= 1. so the set is
orthogonal but not orthonormal. Also, since there are only 2 vectors, it cannot
form a basis for R3 . This matches with iii).

b) ⟨ √12 (1, 0, −1), √12 (−1, 0, 1)⟩ = 0. Also ⟨ √12 (1, 0, −1), √12 (1, 0, −1)⟩ = 1 and
⟨ √12 (−1, 0, 1), √12 (−1, 0, 1)⟩ = 1. Thus these vectors are orthonormal. But this does
not form a basis for R3 , since there are only two vectors. This matches with iv).

c) ⟨(−1, 2, −1), (0, 4, −3)⟩ = 11 ̸= 0, so the set is not orthogonal. If we show that
the set is linearly independent, then it forms a basis for R3 (this is because a lin-
early independent set with number of elements equal to dim(V ) is a basis for V ).
To show that the set is linearly independent. show that the system α(2, 3, 4) +
β(−1, 2, −1) + γ(0, 4, −3) = 0 has only one solution α = β = γ = 0. This matches
with i).

d) ⟨(2, 3, 4), (−1, 2, −1)⟩ = ⟨(2, 3, 4), (11, 2, −7)⟩ = ⟨(−1, 2, −1), (11, 2, −7)⟩ = 0. So
the set is orthogonal and hence is linearly independent. Thus it forms a basis (since
the linearly independent set has 3(=dim(R3 )) elements). This matches with ii).

2
2. Choose the set of correct options.
⃝ Option 1: Suppose β = {v1 , v2 , . . . , vn } is an orthogonal basis of an inner
product space V . If there exists some v ∈ V , such that ⟨v, vi ⟩ = 0 for all
i = 1, 2, . . . , n, then v = 0.
⃝ Option 2: There exists an orthonormal basis for Rn with the standard inner
product.
⃝ Option 3: If PW denotes the linear transformation which projects the vec-
tors of an inner product space V to a subspace W of V , then range(PW ) ∩
null space(PW ) = {0}, where 0 denotes the zero vector of V .
 
1 −1
⃝ Option 4: cannot represent a matrix corresponding to some projec-
0 1
tion.
Solution: A linear transformation P is a projection if P 2 = P .

• Option 1: Since β is a basis, v ∈ V can be written as v = α1 v1 + α2 v2 + ... + αn vn .


Now ⟨v, vi ⟩ = αi ⟨vi , vi ⟩ for all i = 1, 2, ..., n. Since it is given that v is such that
⟨v, vi ⟩ = 0 for all i, we have αi ∥vi ∥2 = 0 for all i. But ∥vi ∥ ≠ 0 (since vi ̸= 0). Thus
αi = 0 for all i and hence v = 0.
• Option 2: {e1 , e2 , ..., en } is an orthonormal basis for V .
• Option 3: Since PW is a projection, PW2
= PW . Let x ∈ range(PW ) ∩ null space(PW ).
Since x ∈ range(PW ), x = PW y for some y ∈ V . But x ∈ null space(PW ) implies
2 2
that PW x = 0, i.e., PW y = 0. But PW = PW and hence x = PW y = 0. Thus
range(PW ) ∩ null space(PW ) = {0}.
 2    
1 −1 1 −2 1 −1
• Option 4: Note that = ̸= . So the matrix cannot
0 1 0 1 0 1
represent a projection.

2 Numerical Answer Type (NAT)


3. If A is an orthogonal matrix of order 5, then find nullity of the matrix A. [Ans: 0]

Solution: A is orthogonal of order 5 =⇒ A is invertible. Therefore nullity of A is 0.

4. Let v ∈ R3 be a vector such that ||v|| = 5. If u is the vector obtained from v after the
anti- clock wise rotation of XY-plane with angle 70◦ about the Z- axis, then find the
length of the vector u. [Ans: 5]

Solution: Rotation matrix is an orthogonal matrix. It preserves the length of a vector,


that is, ||Av|| = ||v|| for all v. Therefore ||v|| = ||u|| = 5.

3
5. Let v = (1, 2, 2) be a vector in R3 . If (a, b, c) is the vector obtained from v after the anti-
clock wise rotation of YZ-plane with angle 60◦ about the X- axis, then find the value of
a + b + c. [Ans: 3]
 
1 0 0
Solution: A = 0 cos(60) sin(60)  represents the rotation matrix of XY -plane with
0 sin(60) cos(60)

angle 60 about the X-axis.
      
1 0 0 1 a 1√
0 cos(60) − sin(60) 2 =  b  = 1 − 3 .

0 sin(60) cos(60) 2 c 1+ 3
Hence a + b + c = 3.
6. Consider a vector space M2×2 (R) and a norm on the  vectorspace defined as
a a
∥A∥ = max{|a11 | + |a21 |, |a12 | + |a22 |}, where A = 11 12 ∈ M2×2 (R).
a21 a22
 √ 
x 2x
Let B =  be an orthogonal matrix i.e. BB T = B T B = I and assume


− 2y y
x, y > 0.
√ √ 
3x 3x
Then find the norm of the matrix C = √  (i.e., ||C||) [Ans: 2]

3y 3y
 √  √   2 
x 2x x − 2y 3x 0
Solution: Note that BB T =  √ 

 =  . But
2
− 2y y 2x y 0 3y
T 2 2
√ √
since B is an orthogonal matrix, BB = I. So 3x = 3y = 1. Thus 3x = 3y = ±1.
This gives ∥C∥ = max{2, 2} = 2.
7. Let V = R2 be the inner product space with usual inner product and a linear transfor-
mation T : R2 → R2 defined as T (x, y) = ( √aa2 +4 x + √b21+1 y, √a22 +4 x + √b2b+1 y). If T is an
orthogonal linear transformation, then find the value of a + 2b. [Ans: 0]

Solution: If T is an orthogonal transformation, then ⟨T u, T v⟩ = ⟨u, v⟩, for all u =


(u1 , u2 ) and v = (v1 , v2 ). Thus we have
⟨T u, T v⟩ = ⟨(u1 , u2 ), (v1 , v2 )⟩
a 1 a 1
(√ u1 + √ u2 )( √ v1 + √ v2 )
2
a +4 2
b +1 2
a +4 2
b +1
2 b 2 b
+ (√ u1 + √ u2 )( √ v1 + √ v2 ) = u1 v1 + u2 v2
a2 + 4 b2 + 1 a2 + 4 b2 + 1

4
a + 2b
Thus we get p p (u1 v2 +u2 v1 ) = 0. Since ⟨T u, T v⟩ = ⟨u, v⟩ is true for all
(a2+ 4) (b2 + 1)
a + 2b
u, v, we can choose u = v = (1, 1). For this choice of u, v, we have p p =
(a2 + 4) (b2 + 1)
0. Thus a + 2b = 0.

3 Comprehension Type Question:

With a particular frame of reference (in R3 ), position of a target is given as the vector
(3, 4, 5). Three shooters S1 , S2 , and S3 are moving along the lines x = y, x = −y, and
x = 2y, on the XY -plane (i.e., z = 0) to shoot the target. Suppose that, there is another
shooter S4 , who is moving on the plane x + y + z = 0. Suppose all of them shoot the target
so that the target is at the closest distance from the respective path or plane on which they
are travelling.
Answer questions 8,9 and 10 using the given information.

8. Choose the set of correct options.


⃝ Option 1: S1 will shoot the target from the point ( 27 , − 72 , 0).
⃝ Option 2: S1 will shoot the target from the point ( 72 , 27 , 0).
⃝ Option 3: S1 will shoot the target from the point (1, 1, 0).
⃝ Option 4: S2 will shoot the target from the point (− 21 , − 12 , 0).
⃝ Option 5: S2 will shoot the target from the point (1, −1, 0).
⃝ Option 6: S2 will shoot the target from the point (− 12 , 12 , 0).
⃝ Option 7: S3 will shoot the target from the point (4, 2, 0).
⃝ Option 8: S3 will shoot the target from the point (2, 1, 0).
⃝ Option 9: S3 will shoot the target from the point (0, 0, 0).
Solution: Note that the closest point to shoot the target can be obtained by finding
the orthogonal projection of (3,4,5) onto the subspace on which Si ’s are moving.

Equation of line of motion of S1 is x = y (x − y = 0). The subspace W1 = {(x, y, z)|x =


y, z = 0} is spanned by the vector (1, 1, 0). The projection of (3, 4, 5) onto W1 is
1
⟨(1,1,0),(1,1,0)⟩
⟨(3, 4, 5), (1, 1, 0)⟩(1, 1, 0) = ( 72 , 27 , 0).

Equation of line of motion of S2 is x = −y (x+y = 0). The subspace W2 = {(x, y, z)|x =


−y, z = 0} is spanned by the vector (1, −1, 0). The projection of (3, 4, 5) onto W2 is
1
⟨(1,−1,0),(1,−1,0)⟩
⟨(3, 4, 5), (1, −1, 0)⟩(1, −1, 0) = (− 21 , 21 , 0).

5
Equation of line of motion of S3 is x = 2y (x−2y = 0). The subspace W3 = {(x, y, z)|x =
2y, z = 0} is spanned by the vector (2, 1, 0). The projection of (3, 4, 5) onto W3 is
1
⟨(2,1,0),(2,1,0)⟩
⟨(3, 4, 5), (2, 1, 0)⟩(2, 1, 0) = (4, 2, 0).

9. If (a, b, c) is the point from which the shooter S4 will shoot the target, then find the
value of a + 2b + 3c. [Ans: 2]
Solution: Equation of line of motion of S4 is x + y + z = 0. The subspace W4 =
{(x, y, z)|x + y + z = 0} is spanned by the vectors (1, 0, −1) and (0, 1, −1). Using Gram
Schmidt orthogonalization, we can get an orthonormal (orthogonal is sufficient) basis for
W4 . {(1, 0, −1), (− 21 , 1, − 12 )} is an orthogonal basis for W4 . The projection of (3, 4, 5)
onto W4 is
1 1
⟨(1,0,−1),(1,0,−1)⟩
⟨(3, 4, 5), (1, 0, −1)⟩(1, 0, −1)+ ⟨(− 1 ,1,− 1 ),(− 1
,1,− 12 )⟩
⟨(3, 4, 5), (− 21 , 1, − 12 )⟩(− 12 , 1, − 12 )
2 2 2
= (−1, 0, 1) + (0, 0, 0) = (−1, 0, 1).

10. Let di be the distance of the target from the point where the shooter Si shoots the target,
for i = 1,2,3,4 and let d be the minimum amongst the di . Find the value of d2 . [Ans:
25.5]
p
Solution: Distanceq between the points can be calculated using (x1 − x2 )2 + (y1 − y2 )2 + (z1 − z2 )2 .
q √ √
Thus we have d1 = 51 2
, d2 = 99 2
, d3 = 30 and d4 = 4 3.

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

6
Statistics for Data Science - 2
Week 8 Graded assignment

50
P
1. Let X1 , X2 , . . . , X50 ∼ i.i.d. Poisson(0.04) and let Y = Xi . Use Central Limit
i=1
theorem to find P (Y > 3). Enter the answer correct to 2 decimal places.
Solution:
Let X ∼ Poisson(0.04).
Consider the samples X1 , X2 , . . . , X50 from X.
E[X] = Var[X]
 50 =0.04  50 
P P
E[Y ] = E Xi = 50 × 0.04 = 2, Var[Y ] = Var Xi = 50 × 0.04 = 2
i=1 i=1

To find: P (Y > 3).


By CLT, we know that
Y − nµ
√ ∼ Normal(0, 1)
σ n
 
Y −2
⇒ √ ∼ Normal(0, 1)
2
Now,

P (Y > 3) = P (Y − 2 > 1)
 
Y −2 3−2
=P √ > √
2 2
= P (Z > 0.707)
= 1 − FZ (0.707) = 1 − 0.76 = 0.24

2. Let the moment generating function of a random variable X be given by


         
1 −2λ 1 3 −λ 3 2λ 7
MX (λ) = e + + e + e + eλ
4 40 10 40 20
Find the distribution of X.

X −2 −1 0 1 2
1 3 3 1 7
P (X = x) 4 40 10 40 20

(a)

1
X −2 −1 0 1 2
1 1 3 3 7
P (X = x) 4 40 10 40 20

(b)

X −2 −1 0 1 2
1 3 1 7 3
P (X = x) 4 10 40 20 40

(c)

X −2 −1 0 1 2
1 3 1 7 3
P (X = x) 4 40 40 20 10

(d)

Solution:
The MGF of a discrete random variable X with the PMF fX (x) = P (X = x), x ∈ TX
is given by

MX (λ) = E[eλX ]
X
= P (X = x)eλx
x∈TX

Now, MGF of a random variable X is given as


         
1 −2λ 1 3 −λ 3 2λ 7
MX (λ) = e + + e + e + eλ
4 40 10 40 20

Therefore, distribution of X is given by

X −2 −1 0 1 2
1 3 1 7 3
P (X = x) 4 10 40 20 40

3. A fair coin is tossed 1000 times. Use CLT to compute the probability that head appears
at most 520 times. Enter the answer correct to 3 decimal places.
Solution:
Define a random variable X such that
(
1 if head appears on tossing a fair coin
X=
0 otherwise

2
1
Therefore, E[X] = µ = and
2
1 1 1
Var(X) = σ 2 = . =
2 2 4

Let X1 , X2 , . . . , X1000 be outcomes on tossing the fair coin 1000 times.


Notice that X1 + X2 + . . . + X1000 will denote the number of times head appears in
1000 tosses.
Let S = X1 + X2 + . . . + X1000
To find: P (S ≤ 520)
By CLT, we know that
S − 1000µ
√ ∼ Normal(0, 1)
σ n
S − 500
⇒ √ ∼ Normal(0, 1)
5 10
Now,

P (S ≤ 520) = P (S − 500 ≤ 20)


 
S − 500 20
=P √ ≤ √
5 10 5 10
= P (Z ≤ 1.26)
= 0.896

4. Let X1 , X2 , . . . , X500 ∼ i.i.d Normal(0, 1). Evaluate P (X12 + X22 + . . . + X500


2
> 550)
using Central Limit theorem. Enter the answer correct to 2 decimal places.
Hint: (X12 + X22 + . . . + X500 2
) ∼ Gamma (250, 0.5) .
Solution:
Given X1 , . . . , X500 ∼ i.i.d. Normal(0, 1).  
2 1 1
We know that if X ∼ Normal(0, 1) =⇒ X ∼ Gamma ,
2 2
Also, Sum of n independent  Gamma(α,
 β) is Gamma(nα, β).
1 1
Therefore, Xi2 ∼ Gamma , , for all i.
2 2
and (X12 + X22 + . . . + X500
2
) ∼ Gamma (250, 0.5)
Let Y = Y1 + Y2 + . . . + Y500 , where Yi = Xi2 for all i : 1 → 500

0.5 0.5
E[Yi ] = = 1 and Var[Yi ] = = 2, for i : 1 → 500
0.5 0.25

3
250 250
E[Y ] = = 500 and Var[Y ] = = 1000
0.5 0.52

To find: P (Y > 550)


By CLT, we know that
Y − 500µ
√ ∼ Normal(0, 1)
σ n
Y − 500
⇒ √ ∼ Normal(0, 1)
10 10
Now,

P (Y > 550) = P (Y − 500 > 50)


 
Y − 550 5
=P √ >√
10 10 10
= P (Z > 1.58)
= 1 − FZ (1.58) = 1 − 0.94 = 0.06

Use the below information to answer questions 5 and 6.

Let X be a random variable having the gamma distribution with the parameters α = 2n
and β = 1.
Hint:
α α
• If X ∼ Gamma(α, β), E[X] = and Var[X] = 2
β β
• Sum of n independent Gamma(α, β) is Gamma(nα, β)

5. Use the Weak Law of Large number to find the value of n such that
!
X
P − 1 > 0.01 < 0.01
2n

(a) 505000
(b) 470000
(c) 498000
(d) 482000

Solution:
Given X ∼ Gamma(2n, 1)
Let X = X1 + X2 + X3 + . . . + X2n , where Xi ∼ Gamma(1, 1).

4
E[X] = µ = 1 and Var(X) = σ 2 = 1
1
E[X̄] = 1 and Var[X̄] =
2n
!
X
To find: The value of n such that P − 1 > 0.01 < 0.01.
2n

By weak law of large numbers, we have

σ2
P (|X − µ| > δ) ≤ 2

!
X 1
⇒P − 1 > 0.01 ≤
2n 2n × 0.012

1 1
Therefore, 2
< 0.01 =⇒ 2n > =⇒ n > 500000.
2n × 0.01 0.013

6. Use CLT to find the value of n such that


!
X
P − 1 > 0.01 < 0.01
2n

Hint: Use FZ (2.58) = 0.995, FZ (1.96) = 0.975 if needed.

(a) 34570
(b) 33500
(c) 32500
(d) 30000

Solution:
E[X1 + . . . + X2n ] = 2n and Var[X1 + . . . + X2n ] = 2n
!
X
To find: The value of n such that P − 1 > 0.01 < 0.01.
2n

By CLT, we know that


X − 2nµ
√ ∼ Normal(0, 1)
σ n
X − 2n
⇒ √ ∼ Normal(0, 1)
2n

5
Now,
!
X
P − 1 > 0.01 < 0.01
2n
!
X1 + . . . + Xn
=⇒ P − 1 > 0.01 < 0.01
2n
!
X1 + . . . + Xn − 2n √
=⇒ P √ > 0.01 2n < 0.01
2n

=⇒ P (| Z |> 0.01 2n) < 0.01

=⇒ 2P (Z > 0.01 2n) < 0.01
√ 0.01
=⇒ 1 − FZ (0.01 2n) <
√ 2
=⇒ FZ (0.01 2n) > 0.995

=⇒ FZ (0.01 2n) > FZ (2.58)
=⇒ n > 33282

7. Let the time taken (in hours) for failure of an electric bulb follow the exponential distri-
bution with the parameter 0.05. Suppose that 100 such light bulbs say L1 , L2 , . . . , L100
are used in the following manner: For every i, as soon as the light Li fails, Li+1 be-
comes operative, where i : 1 → 99 (i.e. If L1 fails, L2 becomes operative, if L2 fails, L3
becomes operative, and so on). Let the total time of operation of 100 bulbs be denoted
by T. Using CLT, compute the probability that T exceeds 2500 hours.
(a) FZ (1.5)
(b) 1 − FZ (1.5)
(c) FZ (2.5)
(d) 1 − FZ (2.5)
Solution:
Given, time to failure (in hours) of an electric bulb has the exponential distribution
with the parameter λ = 0.05.
Since, the bulbs are used in such a way, that as soon as light L1 fails, L2 becomes
operative, L2 fails, L3 becomes operative, and so on.
We know that if X ∼ Gamma(α, β) with parameter α = 1, then X ∼ Exp(β).
Also, sum of n i.i.d. Exp(λ) is Gamma(n, λ).
Since each of the Li ’s are exponentially distributed with parameter = 0.05, therefore
L1 + . . . + L100 ∼ Gamma(nα, β) = Gamma(100, 0.05)

6
Let T = L1 + . . . + L100

1 1
E[Li ] = µ = = 20 and SD[Li ] = σ = = 20
0.05 0.05

To find: P (T ≥ 2500)
By CLT, we know that
T − 100µ
√ ∼ Normal(0, 1)
σ n
T − 2000
⇒ √ ∼ Normal(0, 1)
20 100
Now,

P (T ≥ 2500) = P (T − 2000 ≥ 500)


 
T − 2000 500
=P ≥
200 200
= P (Z ≥ 2.5)
= 1 − FZ (2.5)

8. Suppose speeds of vehicles on a particular road are normally distributed with mean 36
mph and standard deviation 2 mph. Find the probability that the mean speed X of
20 randomly selected vehicles is between 35 and 38 mph.
√ √
(a) FZ ( 5) − FZ (− 5)
√ √
(b) FZ ( 20) − FZ (− 20)
√ √
(c) FZ ( 38) − FZ (− 35)
√ √
(d) FZ ( 20) − FZ (− 5)

Solution:
Let X denote the speed of a vehicle on a particular road.
Given that X ∼ Normal(36, 22 ).
Therefore, µ = 36 and σ = 2
Select X1 , X2 , . . . X20 samples such that X1 , X2 , . . . X20 ∼ iid X

X1 + X2 + . . . + X20
Let X = and S = X1 + X2 + . . . + X20
20

To find: P (35 < X < 38) From CLT, we know that

7
X1 + X2 . . . + Xn − nE[X]
√ ∼ Normal(0, 1)

S − nµ
⇒ √ ∼ Normal(0, 1)

(S − 36(20))
⇒ √ ∼ Normal(0, 1)
(2 20)

Now,
S
P (35 < X < 38) = P (35 < < 38)
20
S
= P (−1 < − 36 < 2)
20
S − 36(20)
= P (−1 < < 2)
√ 20
− 20 S − 36(20) √
= P( < √ < 20)
2 2 20
√ S − 36(20) √
= P (− 5 < √ < 20)
2 20
√ √
= FZ ( 20) − FZ (− 5)

You might also like