• Tidak ada hasil yang ditemukan

Total probability and Bayes formulas

Dalam dokumen PROBABILITY THEORY AND MATHEMATICAL STATISTICS (Halaman 120-135)

PROBABILITY SPACE

Remark 1. We saw above that for any event Aא ࣠

10. Negative binomial distribution. Let’s find the probability that in the sequence of independent Bernoulli trials with the probability of success р the success

4.3. Total probability and Bayes formulas

In this item we first prove a simple but important formula, called the formula of total probability. This formula is the main tool for calculating the probabilities of complex events using conditional probabilities.

In conclusion of this item, questions of reassessing probabilities of hypotheses with the use of additional information will be considered, i.e. the so-called Bayes formulas are proved.

Each sub-item ends with a discussion of the relevant examples.

121

4.3.1. Total probability formula

Theorem 8. Let ሺ:ǡ ࣠ǡ ܲሻ be a probability space, A࣠, and an events H1,H2,...࣠ are pairwise disjoint (H Hi j ‡, iz j), have positive probabilities

Ρ Hi !0

and satisfy the condition

1 i

i

H

f :

¦

.

Then the probability of the event A can be found by the total probability formula

1 i i

i

Ρ A

¦

f P(H )P(A / H ). (16)

Proof. It follows from the conditions of theorem that

1 i

i

A

¦

f AH ,

and the events of a sequence AH AH1, 2,... are pairwise disjoint.

Then, by the countable additivity axiom, the probability

1

( ) ( i)

i

P A

¦

f P AH .

Further, by the multiplication of probabilities formula, ( i) ( ) ( /i i) P AH P H P A H .

Substituting these probabilities into the previous formula, we obtain the desired formula (16).ז The total probability formula is usually applied in those cases when (for one reason or another) it is easier to find conditional probabilities P A H( / i) and proba- bilities P H( i) than to directly calculate the probability ( )P A .

Examples

12. There are n1 white and m1 black balls in first urn and n2 white and m2 black – in second one. One ball is randomly selected from the first urn and is moved to the second one. Then one ball is randomly selected from the replenished second urn. Find the probability that this last ball is a white ball (event A).

Solution. Let’s denote by H1 (H2) the event, consisting in the fact that a white (black) ball was replenished from the first urn to the second urn.

122

Then

1 1

1 2

1 1 1 1

( ) n , ( ) m

P H P H

n m n m ,

2 2

1 2

2 2 2 2

( / ) 1 , ( / )

1 1

n n

P A H P A H

n m n m

.

Further, by the total probability formula (16) we have

1 2 1 2

1 1 2 2 1 1 2 2

1 2 1 2

1 1 2 2

( 1)

( ) ( )( 1) ( )( 1)

( 1) .

( )( 1)

n n m n

P A n m n m n m n m

n n m n

n m n m

Let us consider a special case.

Let the compositions of balls in urns be the same:

1 2 , 1 2

n n n m m m.

Then

( ) n

P A n mPH1൯Ǥ

From the above we can draw the following conclusion.

Suppose there are N urns with the same composition: there are n white and m black balls in each urn. Suppose at the first step one random ball is selected from the first urn and this ball is moved to the second urn. At the second step one random ball is selected from the replenished second urn and this ball is moved to the third urn, etc.

At the last step one random ball is selected from the urn № N. Then the probability that this last ball is a white ball is equal to

.

13. The task of choosing the strategy for passing the exam. Let the exam on a particular subject be conducted orally and the teacher (examiner) prepared n exam tickets. Let the rules for taking the exam are such that students will successfully pass the exam provided they choose their «lucky» tickets, i.e. tickets, they know the answers to questions from them.

Students go to the exam one at a time, select a ticket at random (without returning) and answer the ticket questions.

If the student was able to successfully prepare only for m tickets, , then, to successfully pass the exam with the greatest probability, what strategy should he choose: should he go to the exam first, second, somewhere in the middle or at the very end?

n n m

n md

123

Solution. Cases when A enters the exam first or second, we have already considered in Example 2 (see the remark at the end of the solution of this example) (see the note at the end of the solution of this example) and it turned out that in both cases the probability of a successful passing of the exam is the same:

.

We now consider the general case. We introduce the events: – student went to the exam i-th in order and pulled his «lucky» ticket ( ), – (i-1) students who went to the exam before A, pulled out j «lucky» tickets

. Then for the probabilities , by the total probability formula, we can write:

. (17)

If from the first entered examiners j students pulled «lucky» for A tickets, then A, entered the i-th, will pull his «lucky» ticket with the probability

,

Because in this case total remainder is tickets, and

«lucky» among them.

Similarly, the probability that out of examiners who entered the exam before A, exactly j students pulled out a «lucky» for A ticket (event ), according to the hypergeometric distribution, is equal to

.

Substituting these probabilities into the formula (17), we obtain:

(18) n

m

Ai A

. , ...

, 2 ,

1 n

i H(ij)

j 0,1,2,..., 1i

( )i P A

H P A H

i n

P A

P i

j

ji i i

i) j / , 3,...,

( 1

0

) ( )

¦ (

1 i

A/H

nmij1

Ρ i (i)j

1 )

1

(

i n i

n m j

1 i

) (ij

H

1 1

ni

j i m j n m ji

C C H C

P

¦

1 ˜

0 1

1

1

i

j i

n j i m j n i m

i n

j m C

C A C

P

) . 1 (

) 1 (

2 0

) 1 ( 2 ( 1) 1 1

1 1 1

0

1

1

¦ ¦

i j

j

i m

j n i m

n i

j

j i m j n i m

n

C i C

n C C m

i C n C

m

124

Taking into account the proved earlier formula (Ch. І, §2, p. 2.3, formula (7)) ,

we can write down

. Hence,

.

From the last relations we can draw the following conclusion: If you do not have any additional information in advance, then for it does not matter, first he will go to the exam, or somewhere in the middle, or go down the very last one – the probability of successfully passing the exam is constant and equal to , i.е. depends only on the level of his knowledge.

14. Gambler's ruin problem. Two gamblers, A and B, play in some game before the complete ruin of one of them. Let the starting capitals of and are equal to and CU (respectively). A and B can win every game with the probabilities p and q (respectively), where p + q = 1 (we do not take into account the draw), and the size of the win of one of the players (which means that the size of the loss of another) is equal to 1 (one) CU.

Assuming the outcomes of individual parties are independent, find the proba- bilities of ruin of each of the players.

Solution. Let’s denote by an event, consists in fact that, having the starting capital (at the beginning of the game) n CU, the player A eventually loses the game (is ruined), and through denote the probability of this event: .

Then we need to find the probability (probability of ruin of A). It is clear that .

If a player at the beginning of some party had capital in n CU, then his ruin can occur in two cases: or he will win the next party (an event ), or lose the next party (an event ). Then by the total probability formula

. (18) In our problem

and, because A win the next party, then he has n + 1 CU, but he still lost the game, we have

¦

k

l

nk l k m l n

mC C

C

0

>

@

21 1

1( 1)

)

( i ni ni

n

i C C

i n C A m P

n m i

n n

i m mn i

n n

i m i

n m

( 1)

) 1 ( )

1 (

) 1 ( 1

n A m P A

P A

P( 1) ( 2) ... ( n)

A

n m

A B a

b

An

pn pn P An

pa

0 , 0 1 pa b p

H1

H2

H1 P A H1

P

H2 P A H2

P A P

pn n n n

1 , 2 1 ,

P H p P H q p

125

, Similarly

. Substituting these probabilities in (17), we obtain

.

Taking into account equality , the last relation can be written in the form . (19) Now we need to solve this last equation (19).

First we consider the case , i.е. the case, when the skill of players is the same. In this case, equation (19) is written in the form

,

and, assuming successively in this equation , we find that , where c is some constant. It follows that

.

We have , , this means .

Further, since , then

,

i.е. , hence,

,

. (20) By analogy, for the probability of ruin of the second player, we obtain the formula

. (20′)

n 1

n 1

P A H p

An H2

pn1 P

1

1

n

n

n pp qp

p

1 p q

pn1pn q pn pn1

p

1/ 2 p q

1

1

n n n

n p p p

p

,...

2 , 1 n n

c p p p p p

p p

pn1 n n n1 ... 2 1 1 0

nc p p c p p c p

p1 0 , 2 0 2 ,... , n 0

0 1

p pab 0 pn 1nc

b 0 pa

a b

c pab 1 0

) /(

1 a b

c

) /(

1 n a b

pn

b a

b b a pa a

1

qb

b a qb a

126

From the formulas (20 ') and (20) we can draw the following conclusion for equally skilled players : one, who has a greater starting capital, has a lower probability of ruin: from follows , i.е. from follows

.

If, however, , i.е., if the first player's starting capital is much larger than that of the second player, then (т.е. ). In other words, we come to the conclusion that A practically does not lose (B is practically ruined).

We now consider the general case . By replacing in formula (19) n by k, then multiplying term by term from k = 1 to k = n, we have

. It follows that

Reducing the last equality by the common multiplier and taking into account that , we obtain the following relation:

. It follows that

(21) By calculating the value of both sides of (21) when , we see that

.

Substituting the value found for in formula (21), we obtain a solution of equation (19):

p q 0,5

b

a! pa qb a!b

b

a q

p !

1

1

¸¹

¨ ·

©

!! § ~0 a b b a

0

a ~

p qb ~1

pzq

–

–

n

k k k

n

k p pk pk q p p

1 1

1 1

–

n ˜

k k k n n

n p p p p

p

2 1 1

–

n

˜

k k k

n p p p p

q

2 1 1 0

0 1

p

/ 1 1

1

p q p p

pn n n

¦ ¦

ab1 1 1 1 1 /

n k

b a

n k k k

k n

b a

n p p p p p q p

p

.

/ 1

/ 1 1 /

1 q p

p q p

p q

n b a n

˜

0 n

1

1 /

1 1 / a b

p q p

q p

1 p1

127

. (19')

Substituting the value in last formula, we find the probability the probability of gambler A ruin:

. (22) Performing similar calculations for the probability of ruining the player B, we obtain the formula

. (23) From the obtained formulas we can draw the following conclusions:

If the skill of the player A is weaker than the skill of the player B , but the player's A initial capital is much more than the player's B i.е. and

,then

, .

From the above relations, we conclude that by regulating the relationship between the parameters it is possible to reduce the probability of ruin of a player having a smaller initial capital, but playing more skillfully, and vice versa.

15. In reliability theory, the reliability function or simply reliability is the probability that the device will function correctly from the initial moment to the current moment t. The limit of the ratio of the conditional probability of failure of a device that worked properly up to the moment t in the time interval (we denote this probability by ) to the value of this interval (when ) is called the failure rate.

Assuming that the failure rate is known, to find the reliability function Solution. Let’s introduce the following events:

{the device failed in the time interval },

{the device was serviceable in the time interval }, {the device was serviceable in the time interval }.

/ /

1 /

n a b

n a b

q p q p

p q p

n a pa

a b

b b

a b a

b a b a b

a b a a

a p q

q p q

p q p q p

q p q p

p q

/ / /

/ /

1 1 1

a b

a

p q

p

qb q

/ 1

/ 1

pq

,

(a!!b b~ 0) a

~ 0 p a b

q

§ ·

¨ ¸© ¹

b

a q

p p¸¸¹

¨¨ ·

© § 1

~ ~

b b

q p q

§ ·¨ ¸

© ¹

, , , p q b a

) (t p

0 t

t t, 't

/

p t 't t ' ot 0

O t p(t)

A

t t, 't

C

0,t 't

B 0,t

128

Then

, and from the condition of the problem

, ,

, . From the relations obtained it follows that

, . Passing to the limit when , we obtain the equation

the solution of which is the function

.

4.3.2. The Bayes formulas

Theorem 9. Let an events А and satisfy the conditions of the theorem 8.

Then, if , then the following Bayes formulas take place:

. (24)

Proof. By the conditional probability formula

. (25) C BA P C P B P A B( )

/

( ) ( ) p t P B

( ) ( )

p t ' t P C

0

( / ) limt

P A B

t t

O ' o ' ( / ) 1

P A B O t ' 't o t

)) ( 1

( )

(t t pt t t o t

p ' O ' '

( ) ( ) o t

p t t p t

t p t p t

t O 't

'

' '

0 ' ot

, (0) 1 , ct t p t p

p O

0

( ) exp t

p t ­® O s ds½¾

¯

³

¿

,...

, 2

1 H H 0

) (A ! P

1

, 1,2,...

i i

i

j j

j

Ρ H Ρ A / H

Ρ H / A i

Ρ H Ρ A / H

¦

f

i

i

Ρ H A Ρ H / A

Ρ A

129

Furthermore, by the probabilities multiplication formula, a numerator of the formula (25) is equal to , and (by the total probability formula) the probability of the denominator of (25) is equal to the expression of denominator of (24). ז The general scheme of application of the Bayes formula to the solution of practical problems is as follows.

Let the event A can occur under different conditions, with respect to the nature of which the assumptions (hypotheses) can be made, and for whatever reasons we know the probabilities of these hypotheses. Let it also be known that the hypothesis gives a probability to the event . If an experiment, in which an event A has occurred, is made, this should cause a reassessment of the hypotheses probabilities – Bayes' formulas qualitatively solve this problem.

Usually, the probabilities of hypotheses are called a priori (pre-experi- mentally determined) probabilities, but – a posterior (determined after the experiment) probabilities.

Examples

16. At the factory manufacturing some products, the machines produce 25%, 35%, 40% of all products (respectively). Defect in their products is 5%, 4% and 6% (respectively). All products manufactured by the factory are assembled into a common warehouse.

а) What is the probability that a randomly taken product from a warehouse will be defective (event D)?

b) What is the probability that the selected product, which turned out to be defective, was produced by the machine "

Solution. Let’s denote by an events, consisting in the fact, that the selec- ted product was produced by the machines (respectively).

а) By the total probability formula

= 0.25ή0.05+0.35ή0.04ή0.4ή0.02 = 0.0345.

b) By the Bayes formula the required probabilities are equal to

ܲሺܣȀܦሻ ൌܲሺܣሻܲሺܦȀܣሻ

ܲሺܦሻ ൌͲǤͲͳʹͷ ͲǤͲ͵Ͷͷൌʹͷ

͸ͻ

ܲሺܤȀܦሻ ൌܲሺܤሻܲሺܦȀܤሻ

ܲሺܦሻ ൌ ͲǤͲͳͶ ͲǤͲ͵Ͷͷൌʹͺ

͸ͻ

HiA

Ρ

Hi Ρ A/Hi

Ρ A Ρ

,...

, 2

1 H

H Hi

Ρ

Hi Ρ

A/Hi

A

Hi

Hi

Ρ

A/Hi

Ρ

C B A, ,

) , (BC A C B A, ,

C B A, ,

( ) ( / ) ( ) ( / ) )

/ ( ) ( )

(D P A P D A P B P D B P C P D C

P

130

ܲሺܥȀܦሻ ൌܲሺܥሻܲሺܦȀܥሻ

ܲሺܦሻ ൌ ͲǤͲͲͺ ͲǤͲ͵Ͷͷൌͳ͸

͸ͻ

17. Suppose there are two coins in the urn: – symmetrical coin with pro- bability of falling of the Tail, equal to , and – asymmetrical coin with pro- bability of falling of the Tail, equal to . At random, one of the coins is removed and thrown. Suppose that a Tail occurred (an event A).

The question is, what is the probability that the selected coin is symmetrical (asymmetrical)?

Solution. By the condition of problem

, and by the total probability formula

A reassessment of the probabilities of the hypotheses and is obtained from the Bayesian formulas:

4.4. Tasks for independent work

1. Three numbers are selected from the set of numbers in the random selection scheme without returning.

Find a conditional probability that third number will be in the interval between first and second numbers, given that first number less than second one.

2. Three dice are tossed.

If you know that a different number of points fell on the dice, then what is the probability that the «six» fell on one of them?

3. It is known that when throwing five dice, a «1» fell out on at least one of them.

What is the probability that in this case a «1» fell out at least twice?

4. Three dice are tossed.

Find the probability of falling out six points on all dice, if you know that:

а) six points fell out on one die;

b) six points fell out on the 1st die;

c) six points fell out on two dice;

d) the same number of points fell out at least on two dice;

e) the same number of points fell out on all dice;

f) six points fell out at least on one die.

H1

2 /

1 H2

3 / 1

3 / 1 ) / ( , 2 / 1 ) / ( , 2 / 1 ) ( )

(H1 P H2 P A H1 P A H2

P

12. 5 3 1 2 1 2 1 2 ) 1

(A ˜ ˜

P

H1 H2

5. 3 12 / 5

4 / 1 )

(

) / ( ) ) (

/

( 1 1 1

A P

H A P H A P

H P

5. 2 12 / 5

6 / ) 1 / (H2 A P

^

1,2,...,n

`

131 5. Four balls are randomly placed in four boxes.

If it is known that the first two balls were placed into different boxes, then what is the probability that there are exactly three balls into some box?

6. It is known that with the random placement of seven balls into seven boxes, exactly two boxes remained empty.

Prove that then the probability of placing three balls in one of the boxes is 1/4.

7. From an urn containing m white and n-m black balls, r balls are extracted according to the random selection scheme without return. An event -th extracted ball is black (white).

Find the conditional probabilities

ܲሺ ሺ௦ାଵሻȀ ሺଵሻ ሺଶሻ... ሺ௦ሻሻǡ ݍ= 0 or ݍ= 1.

How will these probabilities change if the balls were extracted by random selection with a return?

8. Let a sample space be a union of a set, consisting of all permutations, obtaining from the

elements and sets . We assume that each permutation has

a probability , and each sequence - a probability . Let the event means that the element is in its own (k-th) place .

Show that in this case an events are pairwise independent, but for different indexes an events aren’t independent.

9. There are 3 white, 5 black and 2 red balls in some urn. Two players alternately retrieve one ball without returning from this urn. The winner is the one who takes out the white ball first. If a red ball appears, then a draw is declared.

Consider following events: = {the player, who starts the game, wins}, = {the second participant wins}, В = {the game ended in a draw}.

Find the probabilities of an events , , В.

10. Die is tossed twice. Let and be the number of points, occurred on 1st and 2nd die (respectively).

Find the probabilities of following events:

={ is divided into 2, is divided into 3};

={ is divided into 3, is divided into 2};

={ is divided into };

={ is divided into };

={ is divided into 2};

={ is divided into 3}.

Find all pairwise independent events ( are different).

11. Is the following equality take place for any events and :

а) ;

b) ?

12. Show: in an event doesn’t depend on himself, then or . 13. Show: if an events A and B are independent and , then or 14. Let A and B are the independent events.

i A A0(i) 1(i)

A A A A

! r ar

a

a1, 2,..., Zj (aj,aj,...,aj),j 1,2,...,r

( 2)!

1 r2 r Zj 1 r2 Ak

ak (k 1,...,r)

Ar

A A1, 2,..., k

j

i, , Ai,Aj,Ak

A1 A2

A1 A2 [1 [2

A1 [1 [2

A2 [1 [2

A3 [1 [2

A4 [2 [1

A5 [1[2 A6 [1[2

j i A A, i,j

A B (P(B)!0) 1

) / ( ) /

(A B P A B P

1 ) / ( ) /

(A B P A B P

A P(A) 0 P(A) 1

1 ) (A B

P P(A) 1 P(B) 1

132

Prove that, if an events and are independent, then , or , or

, or .

15. Let be some sequence of independent eevnts.

Then, for the convergence of a series it is necessary and sufficient that .

Is it possible to replace the condition of independence of events by the condition of pairwise independence of events in this statement?

16. There are 3 white, 2 black balls in 1st urn and 2 white, 3 black balls in 2nd urn. Two balls are randomly selected from 1st urn and removed into 2nd urn. After this, one ball is randomly selected from 2nd urn.

Find the probability that it is white.

17. There are 2 groups of urns: 2 urns with 3 white, 4 black balls in each of urns and 3 urns with 4 white and 3 black balls. One of urns is randomly selected and one ball is taken out of it at random. It was black.

What is the probability that this ball was selected from an urn of 1st group?

18. There are 2 white, 1 black ball in 1st urn and 3 white, 2 black – in 2nd one. From each urn, one ball is extracted at random, and these two balls are transferred to the 3rd, empty urn. After that, one ball is removed from the last urn.

What is the probability that it is white?

19. There is one ball in an urn, and it is known only that it is either white or black (with equal probability). One white ball was added to this urn, then one ball was removed from the replenished urn at random.

If the last (extracted) ball turned white, what is the probability that there was originally a white ball in the urn?

20. There were white and black balls in an urn. Then one ball of unknown color was lost. To determine the color of the lost ball, two balls are extracted from the urn at random.

If you know that these two balls turned out to be white, then what is the probability that the lost ball is also a white ball?

How will the answer change if balls were randomly selected from the urn, and it turned out that there are a white and b black balls among them?

21. There are three balls in an urn, each of which can be white or black. Suppose that all four assumptions (hypotheses) about the composition of balls in an urn are equally probable. The four balls are extracted from the urn under the random selection scheme with the return.

Find the probability that the balls appeared in the following sequence: black, white, white, white.

Find the probabilities of hypotheses about the initial composition of balls in the urn under the assumption that the above-described event A = {black, white, white, white} occurred.

22. Find the probability that when independent Bernoulli trials with the probability of success there will be successes and all trials with even numbers will end with success.

23. Let some insect lay k eggs with probability , and the probability of developing an insect from the egg is p.

Assuming mutual independence of development of eggs, to find the probability that the insect will have exactly m descendants.

24. In Bernoulli scheme, p is the probability of outcome «1» (success), and – the probability of outcome «0» (failure).

Find the probability that the chain «00» will appear before the chain «01».

25. Continuation. Find the probability that the chain «00» will appear before the chain «10».

B

A AB P(A) 1 P(B) 1

0 ) (A

P P(B) 0

,...

, 2

1 A A

¦ f

11

k P Ak

0

1 ¸!

¹

¨ ·

©

§f

kAk

P

t3

m n

b a

n 2

p mn

) 0 ,..., 2 , 1 , 0

!( !

O O k O e kk

p q 1

133

26. Continuation. Find the probability that the chain «00» will appear before the chain «111».

27. Let the players A and B play a game consisting of separate parties, under the following conditions: the player, who wins the separate party, receives 1 (one) point. Player A can win each game with the probability D, and player B with the probability E, where , . It is believed that the player who first breaks away from the opponent by two points wins the game.

а) Find the probability Р(А) that the game will be won by the player A. What is Р(В)?

b) What is more profitable for A: to play one game, or play to the end, to win?

28. Continuation. Solve the previous task, if the condition of the game is changed as follows:

who will win two consecutive games, he will win the whole game.

29. The Banach problem.Suppose there are m and n matches in the matchboxes a and b (respectively). Someone randomly chooses a matchbox a or b with the probabilities and (respectively) and uses one match from the selected matchbox (for example, lights a cigarette).

Find the probability that, when for the first time an empty matchbox was taken, then there are r matches in the second box.

30. Continuation. Suppose .

Then what is the probability that the emptiness of the selected matchbox was detected when this (empty) matchbox was selected for the first time?

31. One of the sequences of letters is transmitted via the communication channel:

with the probabilities (respectively) . Each

transmitted letter is correctly received with probability and with the probabilities and received for each of the other two letters. It is assumed that the letters are distorted independently of each other.

Find the probability that AAAA were received, given that were accepted.

E

D ! DE 1

p a P( ) )

1 0 ( 1 )

(b q p p

P

2 / 1

, p q

n m

CCCC BBBB

AAAA, , p1,p2,p3 p1p2p3 1

D 1D

2 1

1D

2 1

ABCA

Dalam dokumen PROBABILITY THEORY AND MATHEMATICAL STATISTICS (Halaman 120-135)

Dokumen terkait