If you have a sequence of random numbers ranging between 1 and 64, what is the length of a sequence that will give a 98% chance of having at least one ( 1, 2, or 3) in the sequence?
Here is the way I am currently thinking about this.
The probability of getting a (1,2 or 3) is 3/64.
Since we are looking for "at least" one, it is easier for us to find the probability of a random number not being a (1,2 or 3). The probability of that is obviously 61/64.
If we have for example two random numbers in a sequence, the probability of the first not being a (1,2 or 3) is 61/64 and the probability of the second not being a (1,2 or 3) is also 61/64. To find the overall probability that at least one is a (1,2 or 3) we can calculate it as the following. P = 1 – ( (61/64) * (61/64) )
To generalize for a sequence of length n we get P = 1 – ( (61/64) ^ n )
Since we want the know the amount of numbers that would give us a 98% chance of having at least one (1,2 or 3), we can plug in the following and solve for n.
0.98 = 1 – ( (61/64) ^ n )
I am however stuck at this point and unaware of how to solve for n (well without using a program or calculator.) Can anyone explain the correct way to solve for n here? Would it be correct to use (log)?
Your logic is fine all the way to the final equation. Now isolate the term with $n$ on one side and take logs: $$\left(\frac {61}{64}\right)^n=1-0.98=0.02\\n \log \left(\frac {61}{64}\right)=\log 0.02\\n=\frac{\log 0.02}{\log \left(\frac {61}{64}\right)}$$