In: Statistics and Probability
Suppose that a computer program randomly generates an 8-letter string from the letters A,B,C,D,E. For example, the program might generate the string CCCCCCCC or DAAEDCBB. The letter in each of the 8 positions is chosen independently of the other positions, and each of the five letters is chosen with equal likelihood. What is the probability that the string contains at least one A or at least one B?
Number of letters available for the computer to generate = 8
Length of the string = 5
First letter in the string can any of the 5 letters
Second letter in the string can be any of the 5 letters...and so on 8th letter in the string can be any of the 5 letters
Therefore number of ways generating 8-letter string from the 5 letters (A,B,C,D,E) = 5x5x5x5x5x5x5x5=58 = 390625
Probability that the string contains at least one A or at least one B = 1-Probability that the string contains no A and no B(Zero As and Zero Bs)
If exclude A and B from the available letters ; then available letters are CDE i.e 3 letters.
using the same logic as above
First letter in the string can any of the 3 letters
Second letter in the string can be any of the 3 letters ...and so on 8th letter in the string can be any of the 3 letters
Therefore number of ways generating 8-letter string from the 3 letters (C,D,E) = 3x3x3x3x3x3x3x3=38 = 6561
Probability that the string contains no A and no B(Zero As and Zero Bs)
= number of ways generating 8-letter string from the 3 letters (C,D,E)/ number of ways generating 8-letter string from the 5 letters (A,B,C,D,E)
= 6561/390625
Probability that the string contains no A and no B(Zero As and Zero Bs) = 6561/390625=0.01679616
Probability that the string contains at least one A or at least one B = 1-Probability that the string contains no A and no B(Zero As and Zero Bs) =1 - 0.01679616=0.98320384
Probability that the string contains at least one A or at least one B = 0.98320384