<< Chapter < Page Chapter >> Page >

A reliability problem

A remote device has five similar components which fail independently, with equal probabilities. The system remains operable if three or more of the components are operative. Supposeeach unit remains active for one year with probability 0.8. What is the probability the system will remain operative for that long?

SOLUTION

P = C ( 5 , 3 ) 0 . 8 3 0 . 2 2 + C ( 5 , 4 ) 0 . 8 4 0 . 2 + C ( 5 , 5 ) 0 . 8 5 = 10 0 . 8 3 0 . 2 2 + 5 0 . 8 4 0 . 2 + 0 . 8 5 = 0 . 9421
Got questions? Get instant answers now!

Because Bernoulli sequences are used in so many practical situations as models for success-failure trials, the probabilities P ( S n = k ) and P ( S n k ) have been calculated and tabulated for a variety of combinations of the parameters ( n , p ) . Such tables are found in most mathematical handbooks. Tables of P ( S n = k ) are usually given a title such as binomial distribution, individual terms . Tables of P ( S n k ) have a designation such as binomial distribution, cumulative terms . Note, however, some tables for cumulative terms give P ( S n k ) . Care should betaken to note which convention is used.

A reliability problem

Consider again the system of Example 5, above. Suppose we attempt to enter a table of Cumulative Terms, Binomial Distribution at n = 5 , k = 3 , and p = 0 . 8 . Most tables will not have probabilities greater than 0.5. In this case, we may work with failures . We just interchange the role of E i and E i c . Thus, the number of failures has the binomial ( n , q ) distribution. Now there are three or more successes iff there are not three or more failures. We go the the table of cumulative terms at n = 5 , k = 3 , and p = 0 . 2 . The probability entry is 0.0579. The desired probability is 1 - 0.0579 = 0.9421.

Got questions? Get instant answers now!

In general, there are k or more successes in n trials iff there are not n - k + 1 or more failures.

m-functions for binomial probabilities

Although tables are convenient for calculation, they impose serious limitations on the available parameter values, and when the values arefound in a table, they must still be entered into the problem. Fortunately, we have convenient m-functions for these distributions. When MATLABis available, it is much easier to generate the needed probabilities than to look them up in a table, and the numbers are entered directly into the MATLAB workspace. And we have greatfreedom in selection of parameter values. For example we may use n of a thousand or more, while tables are usually limited to n of 20, or at most 30. The two m-functions for calculating P ( A k n ) and P ( B k n ) are

  • P ( A k n ) is calculated by y = ibinom(n,p,k) , where k is a row or column vector of integers between 0 and n . The result y is a row vector of the same size as k .
  • P ( B k n ) is calculated by y = cbinom(n,p,k) , where k is a row or column vector of integers between 0 and n . The result y is a row vector of the same size as k .

Use of m-functions ibinom and cbinom

If n = 10 and p = 0 . 39 , determine P ( A k n ) and P ( B k n ) for k = 3 , 5 , 6 , 8 .

>>p = 0.39;>>k = [3 5 6 8];>>Pi = ibinom(10,p,k) % individual probabilities Pi = 0.2237 0.1920 0.1023 0.0090>>Pc = cbinom(10,p,k) % cumulative probabilities Pc = 0.8160 0.3420 0.1500 0.0103
Got questions? Get instant answers now!

Note that we have used probability p = 0 . 39 . It is quite unlikely that a table will have this probability. Although we use only n = 10 , frequently it is desirable to use values of several hundred. The m-functions work well for n up to 1000 (and even higher for small values of p or for values very near to one). Hence, there is great freedom from the limitations of tables.If a table with a specific range of values is desired, an m-procedure called binomial produces such a table. The use of large n raises the question of cumulation of errors in sums or products. The level of precision in MATLAB calculations is sufficient that such roundoff errors are well below pratical concerns.

>>binomial % call for procedure Enter n, the number of trials 13Enter p, the probability of success 0.413 Enter row vector k of success numbers 0:4n p 13.0000 0.4130k P(X=k) P(X>=k) 0 0.0010 1.00001.0000 0.0090 0.9990 2.0000 0.0379 0.99003.0000 0.0979 0.9521 4.0000 0.1721 0.8542
Got questions? Get instant answers now!

Remark . While the m-procedure binomial is useful for constructing a table, it is usually not as convenient for problems as the m-functions ibinom or cbinom. The lattercalculate the desired values and put them directly into the MATLAB workspace .

Joint bernoulli trials

Bernoulli trials may be used to model a variety of practical problems. One such is to compare the results of two sequences of Bernoulli trials carried outindependently. The following simple example illustrates the use of MATLAB for this.

A joint bernoulli trial

Bill and Mary take ten basketball free throws each. We assumethe two seqences of trials are independent of each other, and each is a Bernoulli sequence.

Mary: Has probability 0.80 of success on each trial.

Bill: Has probability 0.85 of success on each trial.

What is the probability Mary makes more free throws than Bill?

SOLUTION

We have two Bernoulli sequences, operating independently.

Mary: n = 10 , p = 0 . 80

Bill: n = 10 , p = 0 . 85

Let

M be the event Mary wins

M k be the event Mary makes k or more freethrows.

B j be the event Bill makes exactly j freethrows

Then Mary wins if Bill makes none and Mary makes one or more, or Bill makes one and Mary makes two or more, etc. Thus

M = B 0 M 1 B 1 M 2 B 9 M 10

and

P ( M ) = P ( B 0 ) P ( M 1 ) + P ( B 1 ) P ( M 2 ) + + P ( B 9 ) P ( M 10 )

We use cbinom to calculate the cumulative probabilities for Mary and ibinom to obtain the individual probabilities for Bill.

>>pm = cbinom(10,0.8,1:10); % cumulative probabilities for Mary>>pb = ibinom(10,0.85,0:9); % individual probabilities for Bill>>D = [pm; pb]' % display: pm in the first columnD = % pb in the second column 1.0000 0.00001.0000 0.0000 0.9999 0.00000.9991 0.0001 0.9936 0.00120.9672 0.0085 0.8791 0.04010.6778 0.1298 0.3758 0.27590.1074 0.3474

To find the probability P ( M ) that Mary wins, we need to multiply each of these pairs together, then sum. This is just the dot or scalar product, which MATLABcalculates with the command p m * p b ' . We may combine the generation of the probabilities and the multiplication in one command:

>>P = cbinom(10,0.8,1:10)*ibinom(10,0.85,0:9)' P = 0.2738
Got questions? Get instant answers now!

The ease and simplicity of calculation with MATLAB make it feasible to consider the effect of different values of n . Is there an optimum number of throws for Mary? Why should there be an optimum?

An alternate treatment of this problem in the unit on Independent Random Variables utilizes techniques for independent simplerandom variables.

Alternate matlab implementations

Alternate implementations of the functions for probability calculations are found in the Statistical Package available as a supplementary package. We have utilized our formulation, so that only the basic MATLAB package is needed.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask