0% found this document useful (0 votes)
21 views5 pages

Week2 Tutorial Solutions

The document outlines exercises related to common distributions, transformations, and random samples in data science. It includes problems on identifying distributions for random variables, calculating probabilities for a basketball player's free throw performance, and deriving probability density functions for transformed variables. Additionally, it discusses the distributions of sums and averages of independent random samples from normal distributions.

Uploaded by

satstudy2310
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)
21 views5 pages

Week2 Tutorial Solutions

The document outlines exercises related to common distributions, transformations, and random samples in data science. It includes problems on identifying distributions for random variables, calculating probabilities for a basketball player's free throw performance, and deriving probability density functions for transformed variables. Additionally, it discusses the distributions of sums and averages of independent random samples from normal distributions.

Uploaded by

satstudy2310
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/ 5

DATA9001 Fundamentals of Data Science

Term 2, 2025

Week 2 - Tutorial

1 Common Distributions
Exercise 1
Give the appropriate distribution for each random variable.

1. Roll a fair die 12 times. Let X be the number of times the die shows 4.

2. Suppose the literacy rate for Gabon is 84%. A randomly selected person is observed and
their literacy is tested.

3. On average, suppose 2.3 students visit me during my consultation hour on Monday. Let S
be the number of students who visit during Monday’s consultation hour.

4. Let T be the waiting time until the next student arrives during the consultation hour as
above.

5. Let M be the number of minutes past the hour at the time a volcanic eruption is recorded.

Solution:

1. Binomial(12, 1/6)

2. Bernoulli(0.84)

3. Poisson(2.3)

4. Exponential(1/2.3)

5. Uniform(0, 60)

Exercise 2
A basketball player has made 80% of his free throw shots during the season. Assuming he maintains
this form in tonight’s game, find the:

1. Probability that he misses for the first time on his fifth attempt.

2. Probability that he makes his first basket on his fourth shot.

3. Probability that he makes his first basket on one of his first 3 shots.

1
Solution:

1. This means he must make his first four shots, and miss the fifth. Let X denote the first shot
missed. Since these are independent, the probability is given as follows:

P (X = 5) = (0.8)4 (0.2)
= 0.08192

2. This means that he must miss his first three shots, and make the fourth. The probability is
given as follows:

P (3 misses then 1 make) = (0.2)3 (0.8)


= 0.0064

3. It’s easier to consider the compliment- that he misses each of the first three shots. Therefore,

P (makes one of the first 3) = 1 − P (misses each of first 3)


= 1 − (0.2)3
= 1 − 0.008
= 0.992

Exercise 3
Let X ∼ N (−2, 9). Find the following probabilities:
1. P (X < −1)
2. P (X ≥ −3.5)
3. P (−7 < X < 6)
Solution:

1.
 
X − (−2) −1 − (−2)
P (X < −1) = P <
3 3
 
1
= P Z<
3
≈ 0.6293

2.
 
X − (−2) −3.5 − (−2)
P (X ≥ −3.5) = P ≥
3 3
= P (Z ≥ −0.5)
≈ 1 − 0.3085
= 0.6915

2
3.
 
−7 − (−2) X − (−2) 6 − (−2)
P (−7 < X < 6) = P < <
3 3 3
 
5 8
= P − <Z<
3 3
≈ 0.9962 − 0.0475
= 0.9487

2 Transformations
Exercise 1
A random variable X has PDF
fX (x) = 2x, 0 < x < 1.
Find fY (y) where Y = X 1/3 .

Solution:

First, note that Y = X 1/3 is monotonic over the interval [0, 1]. Therefore, we can apply the
standard technique:

dx
fY (y) = fX (x) .
dy
dx
Note that X = Y 3 and therefore dy
= 3y 2 . Also, 0 < x < 1 implies that 0 < y 3 < 1, and therefore
0 < y < 1.

dx
fY (y) = fX (x)
dy
= 2(y )|3y 2 |
3

= 6y 5 , 0 < y < 1.

Exercise 2
2
Let X ∼ N (0, 1), X has PDF fX (x) = √1 e−x /2 , −∞ < x < ∞.

Find the density of Y = |X| and hence find E|X|.

Solution:

Note that y = |x| is not monotonic over −∞ < x < ∞ so the formula fY (y) = fX (x) dx dy
can’t
be used. We need to derive fY (y) through direct arguments involving the cumlative distribution
function of Y . For y > 0,

FY (y) = P (Y ≤ y) = P (|X| ≤ y) = P (−y ≤ X ≤ y) = FX (y) − FX (−y).

3
Hence,
d d
fY (y) = FY (y) = {FX (y) − FX (−y)}
dy dy
0 0
= FX (y) − FX (−y)(−1) (chain rule of differentiation)
= fX (y) + fX (−y)
r
2 −y2
= e 2 , y > 0.
π

E(|X|) = E(Y )
Z ∞r
2 −y2 /2
= ye dy
0 π
We will make a substitution. Let t = y 2 /2. Then dt = ydy. When y = 0, t = 0, and as y → ∞,
t → ∞.
Z ∞r r Z ∞
2 −y2 /2 2
ye dy = e−t dt
0 π π 0
r
2  −t ∞
= −e 0
π
r
2
= [0 − (−1)]
π
r
2
=
π

3 Random Samples
Exercise 1
Suppose X1 , X2 , . . . , Xn and Y1 , Y2 , . . . , Yn are two independent random samples of independent
N (0, 1) random variables.

Determine the distributions of the following random variables.


Pn 2
1. i=1 Xi ,
Pn
Xi
2. √Pi=1
n 2
,
i=1 Yi

nX 2
3. Pn 1 2 .
i=1 Yi

Solutions:

Each of the required distributions can be found using the results for the χ2 , t and F distributions.

1. n
X
X12 ∼ χ2n
i=1

4
2. Pn
n √1
Pn
X i n i=1 Xi
X
Xi ∼ N (0, n) =⇒ pPi=1
n 2
= p P n 2
∼ tn .
i=1 i=1 Yi i=1 Yi /n

3.
nX 2 X 2 /1
Pn 1 2 = Pn 1 2 ∼ F1,n .
i=1 Yi i=1 Yi /n

Exercise 2
Suppose X1 , X2 , . . . , Xn and Y1 , Y2 , . . . , Yn are independent random samples with Xi ∼ N (µ, 1)
and Yi ∼ N (0, 1).

Determine the distributions of the following random variables.


n n n n
1X X X X
Xi , (Xi − µ)2 + Yi2 and (Xi − X)2 .
n i=1 i=1 i=1 i=1

Solutions:

The fundamental results needed here are:

N1 ∼ N (µ1 , σ12 ), N2 ∼ N (µ2 , σ22 ) and independent

=⇒ a1 N1 + a2 N2 ∼ N (a1 µ1 + a2 µ2 , a21 σ12 + a22 σ22 )


and n
ind
X
Z1 , . . . , Zn ∼ N (0, 1) =⇒ Zi2 ∼ χ2n .
i=1

Through repeated application of the first result we see that


n
1X
Xi ∼ N (µ, n1 ).
n i=1

Next, note that Xi − µ ∼ N (0, 1) so application of the second result leads to


n
X n
X
(Xi − µ)2 + Yi2 ∼ χ22n .
i=1 i=1

For the third, we could use the result established in the notes that says

(n − 1)S 2 /σ 2 ∼ χ2n−1

for a general random sample from the N (µ, σ 2 ) distribution. In this instance σ 2 = 1. Noting that
1 n
S 2 = n−1 2
P
i=1 (Xi − X̄) it follows that

n
X
2
(n − 1)S = (Xi − X̄)2 ∼ χ2n−1 .
i=1

You might also like