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

Solutions Set 7

The document contains 5 exercises involving probability distributions and calculations: 1) Defines a joint density function and calculates marginal distributions. 2) Defines another joint density and calculates the marginal densities, determining if the variables are independent. 3) Defines a binomial distribution related to a game with wins and losses and calculates properties. 4) Uses a normal approximation to a binomial to calculate snack selection probabilities on a flight. 5) Models an election using binomial distributions to calculate winning probabilities based on controlled votes.

Uploaded by

amircsgo4747
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 views6 pages

Solutions Set 7

The document contains 5 exercises involving probability distributions and calculations: 1) Defines a joint density function and calculates marginal distributions. 2) Defines another joint density and calculates the marginal densities, determining if the variables are independent. 3) Defines a binomial distribution related to a game with wins and losses and calculates properties. 4) Uses a normal approximation to a binomial to calculate snack selection probabilities on a flight. 5) Models an election using binomial distributions to calculate winning probabilities based on controlled votes.

Uploaded by

amircsgo4747
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/ 6

1

PROBLEM - SET 6
Exercise 1. Let (X,Y ) be a continuous random vector with joint density
(
e−x if 0 < x < y < x + 1
fX,Y (x, y) := .
0 altrimenti

(i) Show that X ∼ Exp(1).


(ii) Determine the marginal density of Y .

Solution 1. (i) We have, for x > 0


Z Z x+1 Z x+1
fX (x) = fX,Y (x, y) dy = e−x dy = e−x 1 dy = e−x ,
R x x

while fX (x) = 0 for x ≤ 0. So X ∼ Exp(1).


(ii) For y > 1 we have
Z Z y
fY (y) = fX,Y (x, y) dx = fX,Y (x, y) dx = e−(y−1) − e−y = (e − 1)e−y .
R y−1

For 0 < y ≤ 1 we have


Z Z y
fY (y) = fX,Y (x, y) dx = fX,Y (x, y) dx = 1 − e−y .
R 0

Finally, for y ≤ 0 We have fY (y) = 0.

Exercise 2. Let (X,Y ) be a continuous random vector with joint density


(
c y e−xy for x > 0 and 0 < y < 2
f (x, y) =
0 otherwise

(i) Determine c ∈ R such that f is indeed a density.


(ii) Determine the marginal densities of X and Y . Are they independent?

Solution 2. (i) For y > 0 fixed, the function h(x) := y Re−xy for x > 0, is the density
of a random variable with distribution Exp(y), so R h(x) dx = 1. Therefore
Z Z 2 Z ∞  Z 2 Z 
−xy
f (x, y) dx dy = c y e dx dy = c h(x) dx dy
R2 0 0 0 R
Z 2
=c 1 dy = 2c ,
0

so c = 12 .
(ii) For x < 0 clearly fX (x) = 0. For x > 0 we have
2

1 −e−xy y=2 1 2 e−xy


Z 2  
1
Z Z
−xy
fX (x) = f (x, y) dy = ye dy = y + dy
R 2 0 2 x y=0 2 0 x
e−2x 1 1 1 − e−2x − 2x e−2x
=− + 2 (1 − e−2x ) = .
x 2x 2x2
We now consider Y . We have fY (y) = 0 for y ̸∈ [0, 2], while for y ∈ (0, 2]

1 1
Z Z ∞
fY (y) = f (x, y) dx = y e−xy dx = .
R 2 0 2

Therefore fY (y) = 12 1(0,2] (y), so Y ∼ U[0, 2].


X and Y are not independent, since f (x, y) is not equal to g(x, y) := fX (x) fY (y).

Exercise 3. In a game of chance you win two Euros in case of success, and you lose
one Euro in case of failure. The probability of success is p = 0.4.
(a) Let X be the number of hits in n repetitions of the game. What is the density
of X?
(b) Let Y be the (relative) number of Euros won in n repetitions of the game. After
determining a relationship that links X and Y , determine the mean and variance
of Y .
(c) Calculate roughly the probability of winning at least 50 Euros in 220 repeti-
tions of the game.
(d) How many times, at least, is it necessary to repeat the game in order for the
probability of winning at least 50 Euros to be greater than 0.99?

Solution 3. (a) X ∼ B(n, p).


(b) Y = 2X − (n − X) = 3X − n, so

E(Y ) = 3np − n = 0.2n

Var(Y ) = 9Var(X) = 9np(1 − p) = 2.16n


(c) We have Y ≥ 50 if and only if X ≥ 90. Using the normal approximation for
a binomial (noting that min(np, n(1 − p)) = 220 · 0.4 > 5) with the continuity
correction
 
X − 220 · 0.4 89.5 − 220 · 0.4
P(X ≥ 90) = P(X > 89.5) = P √ > √
220 · 0.4 · 0.6 220 · 0.4 · 0.6
 
89.5 − 220 · 0.4
≃ 1−Φ √ ≃ 0.4182.
220 · 0.4 · 0.6
50+n
(d) Note that, now, Y ≥ 50 if and only if X ≥ 3 . Proceeding as above
3
   
50 + n 50 + n 1
P X≥ =P X ≥ −
3 3 2
!
50+n
X − n · 0.4 3√ − 12 − n · 0.4
=P √ >
n · 0.4 · 0.6 n · 0.4 · 0.6
!
−n · 0.4 − 50+n3 +2
1
≃Φ √
n · 0.4 · 0.6
!
1
15 n − 97
6
=Φ √ ≥ 0.99.
0.24n

This is equivalent to
1
n − 97
15
√ 6
≥ Φ −1 (0.99) ≃ 2.33
0.24n

that is, set x = n
1 2 √ 97
x − 2.33 0.24x − ≥0
15 6
hence x ≥ 26.331 which yields x ≥ 694.

Exercise 4. An airline offers its passengers the choice of two types of snacks: pre-
tzels or biscuits. Based on past experience, the company believes the two choices
are equally likely. Suppose there are 150 passengers on a given flight, each one
choosing independently of the others. Calculate, approximately,
(a) the probability that at least 60 passengers choose the pretzels;
(b) if there are 90 units of each of the two types of snacks on board, the probability
is that some passengers may not have the snack they want.

Solution 4. Let X be the number of passengers who choose the pretzels. Then X ∼
B(150.1/2). It is permissible to use the normal approximation since it is 150 · 21 > 5.
(a) Using also the continuity correction
 
X − 75 59.5 − 75
P(X ≥ 60) = P(X ≥ 59.5) = P √ ≥ √ ≃ 1−Φ(2.53) ≃ 0.9943.
37.5 37.5
(b) Some passengers will not get the snack they want if X > 90 or X < 60. By
symmetry

P(X > 90 or X < 60) = P(X > 90) + P(X < 60) = 2P(X < 60) = 2(1 − P(X ≥ 60))
≃ 2(1 − 0.9943) = 0.0114.

Exercise 5. In an election, one million people vote, who must choose between the
two candidates A and B. The vote of a certain number n of voters is under the control
of an criminal organization, which guarantees that they vote for the candidate A.
4

All the other voters vote “ at random ”, choosing the two candidates with equal
probability, each independently of the others.
(i) Suppose the criminal organization controls n = 2 000 votes. What is the
(approximate) probability that candidate A wins the election?
(ii) What is the minimum number n of individuals that the criminal organization
must control, to ensure that the probability of winning A is at least 99%?

Solution 5. (i) Let X be the number of votes received by A among the 998 000
uncontrolled voters. Note that X ∼ B(998 000, 1/2). Candidate A wins if
X > 498 000. Using the normal approximation (given the large numbers the
continuity correction is not relevant)
!
X − 499 000 1 000
P(X > 498 000) = P 1 √ > − 1√ ≃ Φ(2) = 0.977.
2 998 000 2 998 000

(ii) If X is the number of votes received by A among the 1 000 000 − n uncon-
trolled voters, we have X ∼ B(1 000 000 − n, 1/2). The candidate A wins if
X > 500000 − n, so proceed as above
!
X − 1 000 000−n
 
2 n/2 n
P(X > 500 000−n) = P 1 √ > − 1√ ≃Φ √ .
2 1 000 000 − n 2 1 000 000 − n 1 000 000 − n

So it must be √ n
1 000 000−n
> Φ −1 (0.99) ≃ 2.33. Squaring and solving, we find
n ≥ 2333.

Exercise 6. Let X be a continuous random variable with density



2x for 0 < x < 1
fX (x) =
0 otherwise

(i) Use the inversion method to write a code for simulating X.


1
(ii) Letting Y := 1−X , show that Y is a continuous random variable and determine
its density.
(iii) Let X1 , X2 , . . . , Xn . . . be a sequence of independent random variables with the
same distribution of X. Compute approximately P(X1 + X2 + · · · + X100 > 70).

Solution 6. (i) The distribution function of X is



 0R for x < 0
x 2
FX (x) = 2tdt = x for 0 ≤ x ≤ 1
 0
1 for x > 1.

So, using the inversion method we simulate X by


- generating a√uniform in (0, 1) U;
- setting X = U.
5

(ii)
  (0 for y < 1
1 1
FY (y) = P(Y ≤ y) = P( ≤ y) = P X ≤ 1 − =  2
1−X y 1 − 1y for y ≥ 1.

Note that FY is a continuous function, continuously differentiable except at


y = 1. It follows that Y is a continuous random variable, with density
(

0   for y < 1
fY (y) = FY (y) = 2 1
y2
1 − y for y ≥ 1.

(iii) Note that Z 1


2
µ = E(X) = 2x2 dx = ,
0 3
Z 1
1 4 1
σ 2 = Var(X) = 2x3 dx − µ 2 = − = .
0 2 9 18
So, by the normal approximation,
 
70 − 100µ
P(X1 + X2 + · · · + X100 > 70) ≃ 1 − Φ = 1 − Φ(1.41) ≃ 0.08.
10σ

Exercise 7. Consider the random experiment of rolling two fair dice (six sided).
(i) What is the probability of obtaining the total score 8?
(ii) What is the probability that at least one of the dice shows 6?
(iii) What is the probability of obtaining the total score 8 conditioned to the event
that at least one of the dice shows 6?
(iv) Suppose the pair of dice is repeatedly rolled. How many times we have to roll
the dice for the probability of obtaining the total score 8 at least 30 times to be
not smaller than 0.95? (Use the normal approximation)
Solution 7. (i) Considering the sample space S = {(i, j) : i, j = 1, 2, . . . 6} with
the uniform probability P, we have

A = “the total score is 8” = {(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)},
|A| 5
so P(A) = |S| = 36 .
(ii) We have

B = “at least one of the dice shows 6” = {(1, 6), (2, 6), (3, 6), (4, 6), (5, 6), (6, 6), (6, 5), (6, 4), (6, 3), (6, 2), (6, 1)},
|B| 11
so P(B) = |S| = 36 .
(iii)
P(A ∩ B) P({(2, 6), (6, 2)}) 2
P(A|B) = = = .
P(B) P(B) 11
6

(iv) Denote by Xn the number of times we obtain 8 as total score in n rolls. Note
that Xn ∼ Binom(n, 5/36). Using the Normal approximation with correction
of continuity
   
5 5
29.5 − 36 n n − 29.5
P(Xn ≥ 30) ≃ 1 − Φ  √ q  = Φ  36 q


5 31 5 31
n 36 · 36 n 36 · 36

So P(Xn ≥ 30) ≥ 0.95 is approximately equivalent to


 
5 5
n − 29.5 n − 29.5
Φ  √36 q  ≥ 0.95 ⇐⇒ 36 q
√ ≥ Φ −1 (0.95) ≃ 1.645.
5 31 5 31
n 36 · 36 n 36 · 36

This last inequality becomes


r
5 5 31 √
n − 1.645 · n − 29.5 ≥ 0.
36 36 36

Solving for n we obtain n ≥ 282.

You might also like