0% found this document useful (0 votes)
55 views

Answer: B

The document provides solutions to practice problems on probability and statistics concepts: 1) It finds the probability P(-ε < X < 0) for a continuous random variable X with a given PDF. The solution is 0. 2) It identifies which statements are true for a continuous random variable with PDF fX(x), including that P(X = x0) = 0 and the CDF FX(x) is continuous. 3) It calculates the probability P(X ≤ 4) for a random variable X with a given PDF defined on the interval [1,7]. The solution is 0.5.

Uploaded by

Arpit Agrawal
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)
55 views

Answer: B

The document provides solutions to practice problems on probability and statistics concepts: 1) It finds the probability P(-ε < X < 0) for a continuous random variable X with a given PDF. The solution is 0. 2) It identifies which statements are true for a continuous random variable with PDF fX(x), including that P(X = x0) = 0 and the CDF FX(x) is continuous. 3) It calculates the probability P(X ≤ 4) for a random variable X with a given PDF defined on the interval [1,7]. The solution is 0.5.

Uploaded by

Arpit Agrawal
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/ 10

Statistics for Data Science - 2

Week 4 Practice Assignment Solution

1. The probability density function of a continuous random variable X is shown in Figure


4.1.P.

Figure 4.1.P: Probability Density Function graph of X

The PDF is defined as follows:


(
e−x x≥0
fX (x) =
0 x<0
Find P (− < X < 0), where  is a very small positive number.

(a) e
(b) 0
(c) e−
(d) e−2

Answer: b
Solution: R0
We know that P (− < X < 0) = − fX (x)dx
But the value of fX (x) is zero in the range − to zero.
Therefore, P (− < X < 0) = 0.
Therefore, option b is the correct option.

1
2. Which of the following statements is/are true for a continuous random variable with
PDF fX (x)?

(a) If fX (2) = 2fX (1), then P (2 −  < X < 2 + ) = 2P (1 −  < X < 1 + ) for a small
.
(b) If fX (2) = 2fX (1), then P (2 −  < X < 2 + ) ≈ 2P (1 −  < X < 1 + ) for a small
.
(c) P (X = x0 ) = 0 for any value of x0 .
(d) CDF FX (x) is continuous in the domain [−∞, ∞].

Answer: b, c, and d

Solution:
Option a: We know that for small , P (x −  < X < x + ) ∝ fX (x).
Therefore, P (1 −  < X < 1 + ) ∝ fX (1) and P (2 −  < X < 2 + ) ∝ fX (2)
But P (x −  < X < x + ) is not exact linear function of fX (x).
Therefore when fX (2) = 2fX (1), then P (2 −  < X < 2 + ) 6= 2P (1 −  < X < 1 + )
but P (2 −  < X < 2 + ) ≈ 2P (1 −  < X < 1 + )
Hence option a is wrong but option b is correct.
Option c: The probability at an instant (PX (x)) for a continuous random variable is
zero as there is no sudden spike in the CDF function for any value of x. Hence option
c is correct.
Option d: For a continuous random variable CDF is always continuous.

3. If 
 1 (x2 − 8x + 16) 1 ≤ x ≤ 7
fX (x) = 18
0 otherwise
What is the value of P (X ≤ 4)? Enter the answer correct to one decimal accuracy.
R xa+1
( xa dx = )
a+1
Answer: 0.5

Solution: R
4
P (X ≤ 4) = −∞ fX (x)dx
R4
⇒ P (X ≤ 4) = 1 fX (x)dx, since fX (x) = 0 for x < 1.
R4 1 2
⇒ P (X ≤ 4) = 1 ( 18 (x − 8x + 16))dx
1 3
⇒ P (X ≤ 4) = (x /3 − 8x2 /2 + 16x/1)|41
18
1 1
⇒ P (X ≤ 4) = (43 /3 − 4 ∗ 42 + 16 ∗ 4) − (13 /3 − 4 ∗ 12 + 16 ∗ 1)
18 18
⇒ P (X ≤ 4) = 0.5

2
4. If X ∼ Normal(10, 25), what is the value of E[2X 2 ]?
Answer: 250

Solutions:
Given E[X]=10, Var(X)=25
We know that Var(X)= E[X 2 ] − E[X]2
⇒ E[X 2 ] = Var(X) + E[X]2
⇒ E[X 2 ] = 25 + 102 = 125
We know thatE[cX] = cE[X], where c is a constant.
⇒ E[2X 2 ] = 2E[X 2 ]
⇒ E[2X 2 ] = 2 × 125 = 250

5. If X ∼ Normal(10, 4), then what is the value of P (X ≥ 8|X ≤ 9)? Use the standard
normal distribution tables if necessary. Enter the answer up to two decimals accuracy.
Use the following CDF values of standard normal distribution.
FZ (−2) = 0.02275, FZ (−1.5) = 0.06681, FZ (−1) = 0.15866, FZ (−0.5) = 0.30854, FZ (0) =
0.5, FZ (0.5) = 0.69146, and FZ (1) = 0.84134
Answer: 0.485 accepted range 0.48 to 0.49

Solution:
Given µ = 10, σ 2 = 4 ⇒ σ = 2
We need to find P (X ≥ 8|X ≤ 9).
P (X ≥ 8 ∩ X ≤ 9)
P (X ≥ 8|X ≤ 9) =
P (X ≤ 9)
FX (9) − FX (8)
P (X ≥ 8|X ≤ 9) =
FX (9)
Converting present normal distribution to standard distribution to get values of FX (x).
x−µ 8 − 10
For x = 8, z = = = −1, ⇒ FX (8) = FZ (−1)
σ 2
x−µ 9 − 10
For x = 9, z = = = −0.5, ⇒ FX (9) = FZ (−0.5)
σ 2
FX (9) − FX (8)
P (X ≥ 8|X ≤ 9) =
FX (9)
0.30854 − 0.15866
⇒ P (X ≥ 8|X ≤ 9) = = 0.485
0.30854

6. A random variable X has the following PDF


(
2x 0 ≤ x ≤ 1
fX (x) =
0 otherwise

Define Y = eX . What is the PDF fY (y) of Y ?

3

 2 log(y) 1≤y≤e
(a) fY (y) = y
0 otherwise


 log(y)
1≤y≤e
(b) fY (y) = 2ey
0 otherwise

 log(y) 1≤y≤e
(c) fY (y) = y
0 otherwise


 log(y)
1≤y≤e
(d) fY (y) = ey
0 otherwise

 log(y) 1≤y≤e
(e) fY (y) = 2y
0 otherwise

Answer: a

Solution:
Given Y = g(X) = eX
⇒ log y = x = g −1 (y)
Therefore g −1 (y) = log(y)
d(ex )
g(x) = ex , ⇒ g 0 (x) = ex Since = ex
dx x
We know that in the range 0 to 1, e is monotonic (increasing function).
1
Therefore, we can use the formula, fY (y) = 0 −1 fX (g −1 (y))
|g (g (y))|
g 0 (g −1 (y)) = g 0 (log y) = elog y = y
|g 0 (g −1 (y))| = y since y is positive in the range [1, e]
fX (g −1 (y)) = fX (log y) = 2 log y
1
Therefore, fY (y) = log y
y
2 log y
fY (y) =
y
Hence option a is correct.

Use the following information to answer the questions 7 and 8.

4
The CDF of random variable X is given below:


 0 x≤0

2x2 0 ≤ x ≤ 12



FX (x) = 12 1
2
≤x≤1
 x
1≤x≤2




 2
1 x≥2

Use the following derivative formula:

d(xa )
= axa−1
dx
7. Which of the following statements is/are correct?

(a) X is a continuous random variable.


(b) X is a discrete random variable.
(c) The PDF of X is not defined as X is discrete random variable.


 0 x≤0
1

4x 0 ≤ x ≤ 2



1
(d) The PDF of random variable X is fX (x) = 0 2
≤x≤1
 x

 1≤x≤2
2



0 x>2


 0 x<0

2 1
2x 0 ≤ x ≤ 2



1
(e) The PDF of random variable X is fX (x) = 0 2
<x<1
 x
1≤x≤2




 4
0 x>2

Answer: a, d
Solution:
d(FX (x))
We know that fX (x) =
dx
Given 

 0 x≤0

2x2 0 ≤ x ≤ 12



1 1
FX (x) = 2 2
≤x≤1
 x
1≤x≤2




 2
1 x≥2

5
d(0


 =0 x≤0



 dx



d(2x2 )


1
= 4x 0≤x≤


2




 dx



 1
d( 2 )
⇒ fX (x) = =0 1
<x≤1
2


 dx



d( x2 )


= 12


 1<x≤2
dx







 d(1) = 0



x>2
 dx


 0 x≤0
1
4x 0 ≤ x ≤ 2




1
Therefore, fX (x) = 0 2
<x≤1
 1
1<x≤2





 2
0 x>2
Since, FX (x) is continuous in the given domain, hence X is a continuous random
variable.
8. What is the value of P (X ≥ 1|X ≤ 1.5)? Enter the answer correct to two decimals
accuracy.
Answer: 0.33, accepted range 0.31 to 0.35
Solution:
FX (1.5) − FX (1) 1.5/2 − 1/2
P (X ≥ 1|X ≤ 1.5) = = = 1/3
FX (1.5) 1.5/2
9. The time taken by Rohith to complete a race follows the exponential distribution with
expected time of completion of 10 minutes. What is the probability that Rohith takes
less than 20 minutes but more than 10 minutes to complete the race? Enter the answer
e−ax
correct to 2 decimals accuracy. ( e−ax dx =
R
)
−a
Answer: 0.2325, accepted range: 0.23 to 0.235
Solution:
Given E[X] = 10 minutes.
We know for a exponential distribution E[X] = λ1
⇒ λ1 = 10, λ = 0.1
For exponential distribution FX (x) = 1 − e−λx
The probability that athlete takes more than 10 minutes is,
FX (10) = 1 − e−0.1×10 = 1 − e−1
The probability that athlete takes more than 20 minutes is,

6
FX (20) = 1 − e−0.1×20 = 1 − e−2
The probability that athlete takes more than 10 minutes but less than 20 minutes to
complete race is FX (20) − FX (10) = e−1 − e−2 = 0.232 approximately.

10. The PDFs of random variables X1, X2, X3, X4, and X5 are shown in Figure 4.2.P.
Based on the information, choose the correct option(s) from below.

Figure 4.2.P: PDF of Normal Distributions for different variables.

(a) E(X1) ≈ E(X5) < E(X2) < E(X4) < E(X3)


(b) E(X1) < E(X5) < E(X2) < E(X4) < E(X3)
(c) E(X1) < E(X5) = E(X2) < E(X4) < E(X3)
(d) Var(X1) < Var(X3) < Var(X4) < Var(X5)
(e) Var(X1) ≈ Var(X2) < Var(X3) < Var(X4) < Var(X5)

Answer: a, d, and e
Solution:
We know that in the PDF of normal distribution, the peak value occurs at mean.
E[X] = µ(mean)
Also, the value of PDF at mean is inversely proportional to standard deviation
1
Since, fX (µ) = √ .
2πσ
The peak value, which is mean or E[X], of PDF occurs approximately for X1, X2, X3, X4,
and X5 at -10, 0, 20, 10, and -10 respectively.
Therefore, E(X1) ≈ E(X5) < E(X2) < E(X4) < E(X3)
The peak value (fX (µ)) for variables X1, X2, X3, X4, and X5 are such that fX1 (µ) ≈
fX2 (µ) > fX3 (µ) > fX4 (µ) > fX5 (µ).
Therefore, Var(X1) ≈ Var(X2) < Var(X3) < Var(X4) < Var(X5)
Hence, options a, d, and e correct.

7
11. The PDF of a continuous random variable is given as
(
4x3 0 ≤ x ≤ 1
fX (x) =
0 otherwise
R xa+1
What is the value of Var(X)? ( xa dx = )
a+1
1
(a)
75
2
(b)
75
3
(c)
75
4
(d)
75
Answer: b
We knowR that Var(X) = E[X 2 ] − E[X]2
E[X] = xfX (x)dx
R1
E[X] = 0 x ∗ 4x3 dx
R1
⇒ E[X] = 0 4x4 dx

4x5 1
⇒ E[X] = |
5 0

4 4
⇒ E[X] = 5
−0= 5
R
E[X 2 ] = x2 fX (x)dx
R1
E[X] = 0 x ∗ 4x4 dx
6
⇒ E[X] = 4x6 |10

4 2
⇒ E[X] = 6
−0= 3

Therefore, Var(X) = E[X 2 ] − E[X]2

2
Var(X) = 3
− ( 45 )2

2 16
Var(X) = 3
− 25

2
Var(X) = 75

12. Let X ∼ Uniform(a1 , b1 ) and Y ∼ Uniform(a2 , b2 ). Based on this information, choose


the correct option(s) from below.

8
(a) If b2 − a2 = b1 − a1 , then Var(X) = Var(Y ).
(b) If b2 + a2 = b1 + a1 , then Var(X) = Var(Y ).
(c) If b2 − a2 = b1 − a1 , then E(X) = E(Y ).
(d) If b2 − b1 = a1 − a2 , then E(X) = E(Y ).
Answer: a and d
Solution:
We know that mean (E(X)) and Variance (Var(X)) of uniform random variable (X ∼
a+b (b − a)2
Uniform(a, b) is and respectively.
2 12
Given X ∼ Uniform(a1 , b1 ) and Y ∼ Uniform(a2 , b2 ),
a1 + b 1 a2 + b 2
E(X) = , E(Y ) = . So, for E(X) to be equal to E(Y ), a1 + b1 = a2 + b2
2 2
or b2 − b1 = a1 − a2 . Hence option d is correct and option c is incorrect.
(b1 − a1 )2 (b2 − a2 )2
Similarly for Var(X) to be equal to Var(Y ), = or b1 −a1 = b2 −a2 ,
12 12
hence option a is correct and option b is incorrect.
13. The CDF of a random variable X is given as:

0 x x<0


FX (x) = 0 ≤ x ≤ ln 2
 ln 4
1 − e−x ln 2 ≤ x < ∞

Derivative formulas required to solve the problem:


d(ax)
=a
dx
d(e−ax )
= −ae−ax
dx
The PDF of the random variable X is:


 0 x<0
1

(a) fX (x) = 0 ≤ x < ln 2
 ln
 −x
 4
e ln 2 ≤ x < ∞

0
 x<0
(b) fX (x) = 1 0 ≤ x < ln 2

 −x
e ln 2 ≤ x < ∞


 0 x<0
1

(c) fX (x) = 0 ≤ x ≤ ln 2
 ln
 −x
 2
e ln 2 < x < ∞

9


 0 x<0
1

(d) fX (x) = 0 ≤ x < ln 2
 lnx 2


e ln 2 ≤ x < ∞

Answer: a
Solution:
d(FX (x))
We know that fX (x) =
dx
Given, 
0 x<0


x
FX (x) = 0 ≤ x ≤ ln 2
 ln 4
1 − e−x

ln 2 ≤ x < ∞
Therefore,
d(0)


 =0 x<0



 dx



 x
d( )

fX (x) = ln 4 = 1 0 ≤ x ≤ ln 2
dx ln 4







−x
 d(1 − e ) = e−x



ln 2 ≤ x < ∞
dx
Hence option a is correct.

10

You might also like