0% found this document useful (0 votes)
52 views9 pages

Notes of Linear Algebra

1. The joint distribution of two random variables X and Y is given in a table. The question asks to find the value of fY|X=1(2), which is calculated to be 1/2. 2. A joint distribution describes the number of sandwiches and drinks customers purchase. The question asks for the probability that a customer buys 2 sandwiches given they bought 3 drinks, which is calculated to be 1. 3. The question considers a coin tossed 4 times, with X being heads and Y being heads before the first tail. The value of fY|X=2(0) is calculated to be 1/6.

Uploaded by

Xylo Marty
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)
52 views9 pages

Notes of Linear Algebra

1. The joint distribution of two random variables X and Y is given in a table. The question asks to find the value of fY|X=1(2), which is calculated to be 1/2. 2. A joint distribution describes the number of sandwiches and drinks customers purchase. The question asks for the probability that a customer buys 2 sandwiches given they bought 3 drinks, which is calculated to be 1. 3. The question considers a coin tossed 4 times, with X being heads and Y being heads before the first tail. The value of fY|X=2(0) is calculated to be 1/6.

Uploaded by

Xylo Marty
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/ 9

Statistics for Data Science - 2

Week 1 Graded Assignment


Multiple random variables

1. Joint distribution of two random variables X and Y is given as:

X
0 1
Y
1 1
1
4 8
1
2 k
4
1
3 0
8

Table 1.1.G: Joint distribution of X and Y .

Find the value of fY |X=1 (2).


Solution:
We know that
X
fXY (x, y) = 1
x∈TX ,y∈TY

1 1 1 1
⇒ + + +k+0+ =1
4 8 4 8
3 1
⇒k = 1 − =
4 4
Now,
fXY (1, 2)
fY |X=1 (2) =
fX (1)
fXY (1, 2)
=
fXY (1, 1) + fXY (1, 2) + fXY (1, 3)

1
4
= 1 1 1
8
+ + 4 8

1
4 1
= 1 =
2
2
2. Customers at a fast-food restaurant buy both sandwiches and drinks. The following
joint distribution summarizes the numbers of sandwiches (X) and drinks (Y ) purchased
by customers.

X
1 2
Y

1 0.4 0.2

2 0.1 0.25

3 0 0.05

Table 1.2.G: Joint distribution of X and Y .

Find the probability that a customer will buy two sandwiches given that he has bought
three drinks.
Solution:
X denotes the number of sandwiches purchased by a customer and Y denotes the num-
ber of drinks purchased by a customer.
To find: fX|Y =3 (2)

Now,
fXY (2, 3)
fX|Y =3 (2) = =
fY (3)
fXY (2, 3)
=
fXY (1, 3) + fXY (2, 3)

0.05
=
0 + 0.05
=1

3. A fair coin is tossed 4 times. Let X be the total number of heads and Y be the number
of heads before the first tail (If there is no tail in all the four tosses, then Y = 4). What
is the value of fY |X=2 (0)? [2 marks]
5
(a)
16
1
(b)
8
9
(c)
16

Page 2
1
(d)
2
Solution:
A fair coin is tossed four times. X denotes the number of heads and Y denotes the
number of heads before first tail (If there is no tail in all the four tosses, then Y = 4).
Clearly, X ∼ Binomial(4, 21 ).

Now,

fXY (2, 0)
fY |X=2 (0) =
fX (2)
fX|Y =0 (2).fY (0)
= ..(1)
fX (2)

Now, event Y = 0 shows that there is no head before first tail that is first outcome is
tail.
It implies that fY (0) = 21

fX|Y =0 (2) = P (two heads in the next three tosses)


 3
3 1
= C2
2

And 4
fX (2) = 4 C2 12
Putting the values in the equation (1), we get

1 3 1
3

C2 2
.2
fY |X=2 (0) = 4
1

4C
2 2
3 1
= =
6 2

4. Which of the following options is/are always correct?

(a) fXY Z (x, y, z) = fX|(Y =y,Z=z) (x).fY Z (y, z)


(b) fXY Z (x, y, z) = fX|(Y =y,Z=z) (x).fX (x)
P
(c) fX (x) = fXY (x, y) where RY is the range of Y .
y∈RY

(d) fXY (x, y) = fX (x).fY (y)

Page 3
Solution:
fXY Z (x, y, z)
We know that fX|(Y =y,Z=z) (x) =
fY Z (y, z)
⇒ fXY Z (x, y, z) = fX|(Y =y,Z=z) (x).fY Z (y, z)
Hence, option (a) is correct and option (b) is incorrect.

We know Pby the definition of marginal pmf that


fX (x) = fXY (x, y) where RY is the range of Y .
y∈RY

Hence, option (c) is correct.

fXY (x, y) = fX (x).fY (y) is true only when X and Y are independent. Therefore, option
(d) need not to be always true.

5. Two random variables X and Y are jointly distributed with joint pmf

fXY (x, y) = a(bx + y),

where x and y are integers in 0 ≤ x ≤ 2 and 0 ≤ y ≤ 3 such that P (X ≥ 1, Y ≤ 2) = 47 .


Find the value of fXY (2, 1). [2 marks]
1
1.
21
5
2. 42
1
3. 42
9
4. 42

Solution: We know that


X
fXY (x, y) = 1
x∈TX ,y∈TY

⇒fXY (0, 0) + fXY (0, 1) + fXY (0, 2) + fXY (0, 3) + fXY (1, 0) + fXY (1, 1) + fXY (1, 2)
+ fXY (1, 3) + fXY (2, 0) + fXY (2, 1) + fXY (2, 2) + fXY (2, 3) = 1

⇒a + 2a + 3a + ab + (ab + a) + (ab + 2a) + (ab + 3a)+


(2ab) + (2ab + a) + (2ab + 2a) + (2ab + 3a) = 1
⇒18a + 12ab = 1 ...(1)

Page 4
Now, using the given condition,
4
P (X ≥ 1, Y ≤ 2) =
7
⇒P (X = 1, Y = 0) + P (X = 1, Y = 1) + P (X = 1, Y = 2) + P (X = 2, Y = 0)+
4
P (X = 2, Y = 1) + P (X = 2, Y = 2) =
7
4
⇒ab + ab + a + ab + 2a + 2ab + 2ab + a + 2ab + 2a =
7
4
⇒6a + 9ab = ....(2)
7

Solving equation (1) and (2), we get


1 1
ab = and a =
21 42
It implies that
1
a= and b = 2
42
Therefore, the joint pmf of X and Y will be
1
fXY (x, y) = (2x + y)
42
1 5
Now, fXY (2, 1) = 42
(4 + 1) = 42
.

6. Akshat draws a card randomly from a well-shuffled pack of 52 cards. If the drawn card
is a face card, then he draws two balls randomly from bag A which contains 5 Red, 6
Black and 4 Green balls. If the drawn card is not a face card, then he draws three balls
randomly from bag B which contains 7 Red, 8 Black and 5 Green balls. Let two random
variables X and Y are defined as:
(
0 if the drawn card is a face card
X=
1 if the drawn card is not a face card

and Y be the number of Red balls drawn. Find the value of fY (1). Write your answer
correct up to two decimal places.
Solution:
Akshat draws a card randomly from a well-shuffled pack of 52 cards. Random variable
X is defined as (
0 if the drawn card is a face card
X=
1 if the drawn card is not a face card
If the drawn card is a face card, then he draws two balls randomly from bag A which
contains 5 Red, 6 Black and 4 Green balls. If the drawn card is not a face card, then
he draws three balls randomly from bag B which contains 7 Red, 8 Black and 5 Green

Page 5
balls. Random variable Y is the number of Red balls drawn.
To find: fY (1)
We know that

fY (1) = fXY (0, 1) + fXY (1, 1)


= fY |X=0 (1).fX (0) + fY |X=1 (1).fX (1)
5
C1 10 C1 12 7 C1 13 C2 40
= 15 . + 20 .
C2 52 C3 52
= 0.109 + 0.368 = 0.47

7. Three fair coins are tossed. If the first head occurs on the first toss, you score 1 point.
If the first head occurs on toss 2 or on toss 3, you score 2 or 3 points, respectively. If
no heads appear, you lose 1 point (that is score −1 point). Let X denote the number
of heads and Y denote the points scored. What is the probability that fewer than three
heads will occur and you will score 1 or less? Write your answer correct to two decimal
places.
Solution:
Given that X denotes the number of heads and Y denotes the point scored.
Clearly, TX = {0, 1, 2, 3} and TY = {−1, 1, 2, 3}.
To find: P (X < 3, Y ≤ 1).

Outcome X Y

HHH 3 1

HHT 2 1

HTH 2 1

THH 2 2

HTT 1 1

THT 1 2

TTH 1 3

TTT 0 −1

The outcomes HHT, HTH, HTT, TTT correspond to the event (X < 3, Y ≤ 1).

Page 6
Therefore,

P (X < 3, Y ≤ 1) = P ({HHT, HTH, HTT, TTT})


4 1
= =
8 2

8. Contracts for two construction jobs are each assigned uniformly at random to one or
more of three firms, A, B, and C. Let X denote the number of contracts assigned to firm
A and Y the number of contracts assigned to firm B. Find the value of fX|Y =0 (2). Write
your answer correct to two decimal places.
Solution:
Given that X denotes the number of contracts assigned to firm A and Y denotes the
number of contracts assigned to firm B.
Since each job is randomly assigned to one or more of the three firms, probability of
1
assigning one job to any of the three firms is . (Notice that one firm can be assigned
3
either 0 or 1 or 2 jobs).
Clearly, TX = TY = {0, 1, 2} Therefore,

P (X = 2, Y = 0) = P (Both the jobs are assigned to firm A)


1 1 1
= . =
3 3 9

Similarly,

P (X = 1, Y = 0) = P (one job is assigned to firm A and no job is assigned to firm B)


= P (one job is assigned to firm A and other job is assigned to firm C)
 
1 1 2
=2 . =
3 3 9

and

P (X = 0, Y = 0) = P (Both the jobs are assigned to firm C)


1 1 1
= . =
3 3 9

Therefore,

P (Y = 0) = P (X = 0, Y = 0) + P (X = 1, Y = 0) + P (X = 2, Y = 0)
1 2 1
= + +
9 9 9
4
=
9

Page 7
Now,

P (X = 2, Y = 0)
fX|Y =0 (2) =
P (Y = 0)
1/9
=4
/9
1
=
4

9. A fair coin is tossed five times, and the number of heads, N , is counted. The coin is
then tossed N more times. Find the probability that heads will appear for a total of
four times in this process. Write your answer correct to two decimal places.
Solution:
Given that N denotes the number of heads in five tosses of a coin.
Clearly, N ∼ Binomial(5, 1/2).

Let X denotes the number of heads in N tosses.


Then, X|(N = n) ∼ Binomial(n, 1/2)

Heads will appear a total of four times if (N = 2, X = 2), (N = 3, X = 1), (N = 4, X =


0).

It implies that

P (Total four heads will appear) = P (N = 2, X = 2) + P (N = 3, X = 1) + P (N = 4, X = 0)


= P (N = 2).P (X = 2|N = 2) + P (N = 3).P (X = 1|N = 3)
+ P (N = 4).P (X = 0|N = 4)
        
5 1 2 1 5 1 3 1 5 1 4 1
= C2 5 C2 2 + C3 5 C1 3 + C4 5 C0 4
2 2 2 2 2 2
10 30 5
= 7 + 8 + 9
2 2 2
1
= 7 [10 + 15 + 1.25]
2
= 0.20

10. From a group of three members of party A, two members of party B, and one member
of party C, a committee of two people is to be selected uniformly at random. Let X
denote the number of party A members and Y denote the number of party B members
on the committee. Find the value of fXY (1, 1).
Solution:

Page 8
Given that X denotes the number of party A members in selected two member’s commit-
tee and Y denotes the number of party B members in selected two member’s committee.

To find: fXY (1, 1)

fXY (1, 1) = P (X = 1, Y = 1)
3
C 1 .2 C 1
= 6
C2
3×2
=
15
= 0.4

Page 9

You might also like