0
$\begingroup$

You try to guess your friend's password, which is $8$ characters long, chosen from numbers the $0 \to 9$, letters a $\to$ z and letter A $\to $Z [caps]. But Your friend is lazy, and only choses from "a, s, d, f" and "A, S, D, F" and the number "$1$". All characters letters or numbers are not allowed. (eg ABCDEFGS) is invalid. What is the probability that your friend's password contains at least one 'a' or 'A'?

Answer: $0.844$

Let $A = \text{Event at least one 'A'}$, $B = \text{Even at least one 'a'}$

We want $P(A \cup B) = P(A) + P(B) - P(AB)$

Is this the right approach?

  • 0
    Probability of the complement is better. What's the probability that the first letter is not 'a' or 'A'? What about the 2nd letter?2017-02-01
  • 0
    @quasi, its not first, its at least one2017-02-01
  • 1
    But if there's not at least one, then there's _none_, right? My suggestion was to compute the probability of _none_.2017-02-01

3 Answers 3

1

If both are not allowed together then its right approach.

You can also do it as -

cases of at least = 1 - case of none

  • 0
    It is *technically* the right approach. However, while calculating $P(A)$ and $P(B)$ is not that hard, $P(AB)$ is somewhat harder, and why make extra work? Finding the probability for the complement event is much easier.2017-02-01
1

Be careful to take care of multiple stipulations.

  • Number of strings that are not all letter or all numbers: $9^8-8^8-1^8 =X$, say

  • Subtract from the above strings that contain neither a nor A: $7^8-6^8-1^8 = Y$, say

  • Number of "good" strings $= X-Y$

  • P("good" string) $=\dfrac{X-Y}{X} = 1 - \dfrac{Y}{X} \approx 0.844$

0

$P(A \cup B) = P(A) + P(B) - P(AB)$ is fine, where P(AB) is the probability that the password contains at least one 'a' and at least one 'A' which is difficult to find. better way to approach the problem is given by @Kanwaljit Singh