Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
1.4. Conditional Probability and Independence 31

Example 1.4.11.A computer system is built so that if componentK 1 fails, it is
bypassed andK 2 is used. IfK 2 fails, thenK 3 is used. Suppose that the probability
thatK 1 fails is 0.01, thatK 2 fails is 0.03, and thatK 3 fails is 0.08. Moreover, we
can assume that the failures are mutually independent events. Then the probability
of failure of the system is


(0.01)(0.03)(0.08) = 0. 000024 ,

as all three components would have to fail. Hence, the probability that the system
does not fail is 1− 0 .000024 = 0.999976.


1.4.2 Simulations............................

Many of the exercises at the end of this section are designed to aid the reader in
his/her understanding of the concepts of conditional probability and independence.
With diligence and patience, the reader will derive the exact answer. Many real
life problems, though, are too complicated to allow for exact derivation. In such
cases, scientists often turn to computer simulations to estimate the answer. As an
example, suppose for an experiment, we want to obtainP(A) for some eventA.
A program is written that performs one trial (one simulation) of the experiment
and it records whether or notAoccurs. We then obtainnindependent simulations
(runs) of the program. Denote by ˆpnthe proportion of thesensimulations in which
Aoccurred. Then ˆpnis our estimate of theP(A). Besides the estimation ofP(A),
we also obtain an error of estimation given by 1. 96 ∗



pˆn(1−pˆn)/n.Aswediscuss
theoretically in Chapter 4, we are 95% confident thatP(A) lies in the interval


pˆn± 1. 96


pˆn(1−pˆn)
n

. (1.4.7)


In Chapter 4, we call this interval a 95%confidence intervalforP(A). For now,
we make use of this confidence interval for our simulations.


Example 1.4.12.As an example, consider the game:


PersonAtosses a coin and then personBrolls a die. This is repeated
independently until a head or one of the numbers 1, 2 , 3 ,4appears,at
which time the game is stopped. PersonAwins with the head andB
wins with one of the numbers 1, 2 , 3 ,4. Compute the probabilityP(A)
that personAwins the game.

For an exact derivation, notice that it is implicit in the statementAwins the game
that the game is completed. Using abbreviated notation, the game is completed if
HorT{ 1 ,..., 4 }occurs. Using independence, the probability thatAwins is thus
the conditional probability (1/2)/[(1/2) + (1/2)(4/6)] = 3/5.
The following R function,abgame, simulates the problem. This function can be
downloaded and sourced at the site discussed in the Preface. The first line of the
program sets up the draws for personsAandB, respectively. The second line sets
up a flag for the while loop and the returning values,AwinandBwinare initialized
Free download pdf