You are on page 1of 13

Exercises in Probability and Statistics

Conditional probability. Independent events

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 | An1 ... A1 )

Independence of events:

The random events A and B are independent iff P( AB)  P( A) P( B)

 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.

Solution: We define the following events:

А: the chosen number is even,

В: the chosen number is divisible by 3


Exercises in Probability and Statistics

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.

Solution: We define the following events:

Ai- the i-th chosen ball is white, i=1,2

We need to determine P(A1A2)=?

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:

We will solve the problem step by step.

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.

3. In the connection 3 the components are serially connected, so

P(C  G)  P(C) P(G)  0.92  0.9936  0.9141

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

P( F  H )  1  P( FH )  1  (1  0.8464)(1  0.9141)  0.9868

Finally, the probability that the system functions can be calculated as

P(( A  B)  (C  ( D  E)))  0.9868

Problem 4. A series of independent and equally distributed experiments is conducted. The


probability that the event A will happen in each of the experiments is 0.3. The experiments are
repeated until we observe the event A. Find the probability of the following events

В: the experiment has to be repeated for the fourth time,

С: the experiment was repeated exactly 4 times.


Exercises in Probability and Statistics

Solution: We define the following events

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

C  A1 A2 A3 A4 P(C )  P( A1 ) P( A2 ) P( A3 ) P( A4 )  0.7 3  0.3  0.1029

Problem 5. A machine controlled by a worker produces a defective product with a probability


0.01, if the worker follows the instructions, and with a probability 0.03 if the worker does not
follow the instructions. The worker follows the instructions 90% of the time. What is the
proportion of products which are produced with a defect?

Solution: We define the following events:

А: a defective product is produced

В: the worker follows the instructions

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

P( AB )  P( B) P( A | B)  0.9  0.01  0.009


P( AB )  P( B ) P( A | B )  0.1  0.03  0.003
P( A)  P( AB )  P( AB )  0.009  0.003  0.012
0.012  100  1.2% of the products will be with a defect.
Exercises in Probability and Statistics

Problem 6. Problem of 4 liars:

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?

Solution: We define the following events:

А: Person I did not lie

В: Person IV has told the correct information

Ск: The k-th person did not lie (he said what he has heard)

P(A|B)=?

P(Ck)=1/3, events Ck, k=1,2,3,4 are independent events

The event B will happen if any of the following events has happened

C1C2 C3C4 , C1 C 2 C3C4 , C1C2 C3C4 , C1C2 C3 C4 , C1 C 2 C3C 4 , C1 C2 C3 C4 , C1C2 C3 C4 ,


C1 C2 C3 C4 (an even number of people lies)

The event АВ is union of C1C2 C3C4 , , C1C2 C3 C4 , C1 C2 C3 C4

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?

c) Are the events arriving on time and departing on time independent?

Solution:

Event А: the plane departed on time P(A)=0.9

Event В: the plane arrived on time P(B)=0.8

P( AB)  0.75  P( A) P( B) and therefore the events are not independent.


P( AB ) 0.75
P( B | A)    0.8333
P( A) 0.9

P( AB ) 0.75
P( A | B)    0.9375
P( B) 0.8

P( A | B)  P( A), P( B | A)  P( B) - the arrival on time increases


the probability that the plane departed on time; the departure on time increases the
probability of arrival on time.

Total probability. Bayes’ formulas

Formula for total probability:


n
Let HiF, i=1,…,n, and HiHj=, i≠j and let H
i 1
i   . Then, for any random event ВF the

following formula holds:


Exercises in Probability and Statistics

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:

а) We define the following events:

Hi : the i-th box is chosen i=1,2 Then

1
H1+H2= and H1H2= P( H 1 )  P( H 2 ) 
2

А: the chosen ball is black

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?

Solution: We define the following events

H1: the student knows the right answer

H2 : the student guesses the answer

А: the student answered the question correctly

P( H1 )  0.8 P( H 2 )  0.2 P( A | H 2 )  0.25 P( A | H 1 )  1

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

а) What is the probability that a randomly chosen message is with no mistake?

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

А – the message has no mistake P(А|H1)=0.998 , P(A|H2)=0.999 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

  PPHA,A  PA | HPAP (H )  0.002


b) P H 1 | A  1 1 1  0.4
0.003
 0.267

Bernoulli’s scheme

A Bernoulli’s scheme of n experiments (trials) is a sequence of n independent and equal trials


where appearance of only one event is considered. If p is the probability of the event A (equal
for each trial), then with Pn(k) we will denote the probability that in n experiments, the event A
was observed k times and it is calculated with:

n
Pn (k )    p k q nk , 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?

Solution: We define the following event

А: the number one is observed


Exercises in Probability and Statistics

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

P8 (3)        0.10047


 3  6   6 

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?

Solution: We define the following events

Аi: the number on the i-th die is even, i=1,2

B: the numbers on both dices are even

The events А1 and А2 are independent and B=A1A2

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?

Solution: We define the following events

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?

Solution: We define the event

A: the archer hits the target p  P( A)  0.7

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?

Solution: We define the following events:

Hi: there are i white balls in the box, i=0,1,2,3

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

B: one black and three white balls are chosen

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

Now we calculate P( H i | B), i  0,1,2,3

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.

You might also like