You are on page 1of 5

Exercises probability and random variables

Data Science - DTI SUPSI

Exercise 1
What is the probability of
ˆ draw a card of hearts from a deck of 40 cards?

ˆ a red number from the french roulette?

ˆ two heads and one tail when tossing 3 fair coins?

Exercise 2
Function runif(1) in R generates a real number uniformly distributed between 0 and 1. Let X represent the
generated number.
ˆ Define the sample space S.

ˆ Compute the probability that ω is smaller than 0.5.

ˆ Compute the probability that ω falls in the interval I = [0.25, 0.5].

ˆ Compute the probability of the event ω ∈


/ I.

ˆ Let X be the random variable X(ω) = ω 2 . What is the probability of X < 0.25.

Exercise 3
We are interested in the quantity X obtained as the sum of the toss of two fair dice
1. Define the sample space Ω;

2. Give the probability distribution of X;

3. Compute the probability of the event ”X is even”.

Exercise 4
We toss four coins.
1. What is the sample space?

2. What is the probability of the event: ’there are more heads than tails?’

3. What is the probability mass function of the random variable X:= ’number of heads’ ?

1
Exercise 5
In the russian roulette game, 2 bullets are inserted into two adjacent holes in the barrel of a six-shot pistol (see
the figure). The player A The player turns the barrel of the gun at random, points the gun at himself and
shoots. The gun does not fire. Now it’s Player B’s turn. He can decide to fire immediately or to turn the barrel
at random and then fire. What is the least risky choice?

Exercise 6
A field of 125m2 is separated by a wall into two parts A and B. We throw randomly 1000 stones on the field,
23% of which fall on part A. Give an estimate of the surface of parts A and B.

Exercise 7
A and B are events of the set S, with P (A) = 0.2, P (B) = 0.5, P (A∪B) = 0.6. Let AC = S \A and B C = S \B,
compute P (A ∩ B C ) and P (AC ∩ B).

Exercise 8
A small rock is thrown over the area of 100m2 in the figure.

ˆ What is the probability P (A) that the rock will fall inside the A area?

ˆ What is the value of P (B) and P (Ω)?

ˆ What is the value of P (Ω \ A)?

ˆ What is the probability of A ∪ B , A ∩ B, (Ω \ A) ∪ B.

2
Exercise 9
Let’s reason about the result of an exam.

1. Describe with words the following events:


A = {4 ≤ mark < 4.5, 4.5 ≤ mark < 5, 5 ≤ mark ≤ 6}
B = {5 ≤ mark ≤ 6}

2. Which results are included in the event C:=I will have to retake the exam?

3. Describe with words the following events:


D =S\A
E =A∩B
F =B\A
G=A\B
H =A∪C

4. Assume that, based on his own experience, a student expresses the following probabilities:
P (I will fail the exam) = 0.1
P (4 ≤ mark < 4.5) = 0.3
P (4.5 ≤ mark < 5) = 0.4
Compute the probabilities of all the events (A, B, C, ..., H) above.

Exercise 10
Choose a number B at random from the interval [0, 1]. Find the probability that

1. 1/3 < B < 2/3.

3
2. |B − 1/2| ≤ 1/4.

3. B < 1/4 or 1 − B < 1/4.

4. 3B 2 < B.

Exercise 11
Choose independently two numbers B and C at random from the interval [0, 1]. Note that the point (B, C) is
then chosen at random in the unit square. Find the probability that

1. B + C < 1/2.

2. |B − C| < 1/2.

3. maxB, C < 1/2.

4. minB, C < 1/2.

5. B < 1/2 and 1 − C < 1/2.

6. conditions (2) and (5) both hold.

7. B 2 + C 2 ≤ 1/2.

8. (B − 1/2)2 + (C − 1/2)2 < 1/4.

Exercise 12
A shopkeeper has a dozen electric scooters, two of which are defective. A customer is interested in purchasing
the entire dozen. The shopkeeper divides the scooters into two boxes of six scooters each. Knowing that the
customer will try two of the twelve scooters by taking one from each box, what is the probability that the
customer will discover at least one defective scooter if the shopkeeper puts
a. one defective scooter in each box;
b. both defective motors in the same box.

In the case of strategy a, are the events discovering a defective scooter in box 1 and discovering a defective
scooter in box 2 independent? And in the case of strategy b?

Exercise 13
Two friends decided to meet at a coffee bar and agreed to arrive between 13 and 14. The first one will wait for
his friend for 15 minutes and will if the other does not show up by this time. What is the probability that the
two friends will meet?

4
Exercise 14
Peter and John are sharing the car and they decide to bet on whether in the next 10 cars they see at least
two of them have the first two numbers of their plate equal (Peter bets on this happening, and John on the
opposite). Compute the probability that Peter wins the bet.

You might also like