Exercise 2
Exercise 2
Exercise 2
Conditional probability:
Conditional probability of the event A given the condition B (if P(B)>0) is defined with
P( AB )
P( A | B)
P( B)
Conditional probability of the event A given the condition B (if P(A>0)) is defined with
P( AB )
P( B | A)
P( A)
P( AB) P( A) P( B | A) P( B) P( A | B)
P( A1 A2 ... An ) P( A1 ) P( A2 | A1 ) P( A3 | A2 A1 )...P( An | An1 ... A1 )
Independence of events:
If the random events A and B are independent, so are the pairs А and B , A and
В, A and B
The events А1,А2, ..., Аn are mutually independent if for any subset of k events,
k=2,3, ...n, it holds:
( ) ( ) ( )
Problem 1. One number is chosen at random from the set S={1,2,…,20}. Find the probability
that the chosen number is even, given that it is divisible by 3.
Then
А={2,4,6,8,10,12,14,16,18,20}
B={3,6,9,12,15,18}
AB={6,12,18}
and therefore
P( AB ) 3 1
P( A | B)
P( B) 6 2
2.
Problem 2. A box consists of 8 white and 10 black balls. In two consecutive drawings with no
return, we choose 2 balls (one at a time). Find the probability that the two chosen balls are
white.
8 7
P( A1 A2 ) P( A1 ) P( A2 | A1 ) 0.183
18 17
Problem 3. Find the probability that the system on the figure below is functional, given that all
the components work with a probability of 0.92, independent of each other.
Figure 1
Exercises in Probability and Statistics
Solution:
1. Let us first consider the connection denoted with 1, the connection A-B. These two
components are serially connected and A-B works only if both components work. Thus
P( F ) P( A B) P( A) P( B) (0.92) 2 0.8464
The components A and B can now be replaced with one component F, with a probability
to function 0.8464.
2. Next we consider the connection D-E, denoted by 2. These two components are
connected in parallel, and thus this part works if at least one of the components works.
Therefore we can use the complementary event “Both components do not work”, to
calculate the probability
P( D E) 1 P( D E ) 1 (1 0.92) 2 0.9936
Exercises in Probability and Statistics
The components D and E are now substituted with one component G, which has a
probability to work 0.9936.
We substitute the components C and G with one component H, which has probability
0.9936 to work.
4. The last two components F and H are connected in parallel. As before we use the
complementary event to calculate the probability
Ai- in the i-th experiment the event A has happened, i=1,2, ...
Since all the experiments in the series are independent, the events Аi are mutually
independent. Since the experiments are all equal, we conclude that P( Ai ) P( A) 0.3 , i=1,2,…
The given events can be described with:
B A1 A2 A3 P( B) P( A1 ) P( A2 ) P( A3 ) 0.7 3 0.343
Then
A A A( B B ) AB AB
P( A) P( AB ) P( AB )
P( A | B) 0.01
P( A | B ) 0.03
90
P( B) 0.9
100
P( B ) 1 0.9 0.1
One of 4 people receives an information. Then he gives a yes/no signal to the second person, he
gives a yes/no signal to the third person, he does the same with the fourth person, and the
fourth person says yes or no aloud. It is known that any of them tells the truth in only 1/3 of the
cases. If we know that the fourth person said the correct information (i.e. the information given
to the first person), what is the probability that the first person did not lie?
Ск: The k-th person did not lie (he said what he has heard)
P(A|B)=?
The event B will happen if any of the following events has happened
Then:
1 1 2 2 1 24 16 41
P( B) ( ) 4 6( ) 2 ( ) 2 ( ) 4
3 3 3 3 81 81 81 81
1 1 2 13
P( AB ) ( ) 4 3( ) 2 ( ) 2
3 3 3 81
13
P( AB ) 81 13
P( A | B)
P( B) 41 41
81
Exercises in Probability and Statistics
Problem 7. 90% of all planes depart on time while 80% of the planes arrive on time. 75% depart
and arrive on time.
а) You are expecting a plane which departed on time. What is the probability that the plane
will arrive on time?
b) The plane you are waiting for has just arrived on time. What is the probability it
departed on time?
Solution:
P( AB ) 0.75
P( A | B) 0.9375
P( B) 0.8
n
P( B) P( H i ) P( B | H i )
i 1
Bayes’ formulas: If the conditions from the formula of total probability are fulfilled, the
following formulas hold:
P( H j ) P( B | H j )
P( H j | B) n
P( H ) P( B | H )
i 1
i i
Problem 1. One box has 2 white and three black balls. A second box contains 4 white and three
black balls.
a) A box is chosen at random and out of it a ball is drawn. Find the probability that the ball is
black. We assume that the boxes can be chosen with equal probability.
b) If we know that the ball is black, what is the probability that the first box was chosen.
Solution:
1
H1+H2= and H1H2= P( H 1 ) P( H 2 )
2
3
P( A | H 1 )
5
3
P( A | H 2 )
7
2
1 3 3 18
P( A) P( H i ) P( A | H i ) ( )
i 1 2 5 7 35
b)
Exercises in Probability and Statistics
P( H 1 ) P( A | H 1 ) 7
P( H 1 | A)
P( A) 12
Problem 2. Student answers a question by choosing one of the 4 possible answers. The
probability that the student knows the correct answer is 0.8, and the probability that he will
guess the answer (i.e. he does not know the correct answer) is 0.2. In the case when he is
guessing the answer, the probability that he will choose the right one is 0.25. Knowing that the
student answered the question correctly, find the probability that he actually knew the right
answer?
P( H 1 | A) ?
P( H 1 ) P( A | H 1 ) 0.8 1
P( H 1 | A) 0.941
P( H 1 ) P( A | H 1 ) P( H 2 ) P( A | H 2 ) 0.8 1 0.2 0.25
Problem 3. An on-line computer system has 4 communication lines through which messages
are sent. Their characteristics are given in the following table:
Message with no
Line Traffic
mistake
1 0.4 0.998
2 0.3 0.999
3 0.1 0.997
4 0.2 0.992
Exercises in Probability and Statistics
b) If we know that the message is erroneous (has a mistake), what is the probability that it
was sent through the first communication line?
Solution:
Event Hi – the message is sent through the i-th line P(H1)=0.4 , P(H2)=0.3 etc
a) P(A)=?
4
P( A) P(H )P( A | H ) 0.4 0.998 0.3 0.999 0.1 0.997 0.2 0.992 0.997
i 1
i i
Bernoulli’s scheme
n
Pn (k ) p k q nk , k 0,1,..., n
k
where q=1-p.
Problem 1. What is the probability that in 8 throws of a die, number one will show up three
times?
1
P( A)
6
Since the experiment is repeated n=8 times, and we want to know if the event A happened 3
times, i.e. k=3, we can calculate
8 1 5
3 5
Problem 2. What is the probability that in three consecutive throws of 2 dice, at least once we
will observe even numbers of both of the dice?
1
p P( B) P( A1 ) P( A2 )
4
The event that B will happen at least ones is complementary to the event that B will never
happen.
0 3
3 1 3 27 37
P3 (k 1) 1 P3 (0) 1 1
0 4 4 64 64
Problem 3. What is the probability that in 10 consecutive flips of a coin, head will appear 4 to 6
times?
1
А: A head has been flipped p P( A)
2
10
6 10 10 10 1
P10 (4 k 6) P10 (k ) 0.45117
k 4 4 5 6 2
Exercises in Probability and Statistics
Problem 4. When an archer shoots at a target, he will miss the target with a probability of 0.3.
How many times should he shoot, so that with a probability of at least 0.95, he will hit the
target at least once?
We want to find the number of times n the archer should shoot the target, s.t. Pn (k 1) 0.95
1 Pn (0) 0.95
n
0.3 n 0.05
0
n ln 0.3 ln 0.05
ln 0.05
n 2.49
ln 0.3
n 3.
Problem 5. There are three balls in a box and each one can be black or white. All the
assumptions about the colors of the balls are equally possible. From the box, with a return, we
choose a ball 4 times. What is the most probable contents of the box, if one black and three
white balls were chosen?
Since all the assumptions for the contents of the box are equally probable, we have that
3
1
P( H ) 1 P( H ) 4 , i 0,1,2,3
i 0
i i
This is a Bernoulli scheme with n=4 in which we will observe the appearance of a black ball.
Exercises in Probability and Statistics
P( B | H 0 ) 0
3 1
4 1 2 8
P( B | H 1 )
1 3 3 81
3 1
4 2 1 32
P( B | H 2 )
1 3 3 81
P( B | H 3 ) 0
3
1 8 1 32 10
P( B) P( H i ) P( B | H i )
i 0 4 81 4 81 81
P( H i ) P( B | H i )
P( H i | B) , i 0,1,2,3
P( B)
P( H 0 | B) 0
1 8
P( H 1 | B) 4 81 1
10 5
81
1 32
P( H 2 | B) 4 81 4
10 5
81
P( H 3 | B) 0
Thus the maximum probability is P( H 2 | B) and therefore we can conclude that the box
most probably had two white and one black ball.