2
$\begingroup$

Assume that every time you hear a song on the radio, the chance of it being your favorite song is $2\%$. How many songs must you listen to so that the probability of hearing your favorite song exceeds $90\%$?

My initial approach was:

This is a geometric distribution with probability of success $p=0.02$. Let the random variable $X$ be the number of songs heard BEFORE I hear my favorite song. For example, $X=3$ means I heard 3 mediocre songs before my favorite song. So we want,

$P(X=k)=(1-p)^kp > 0.9\\\\ ~~~~~~~~~~~~~~~~\Rightarrow (1-p)^k > 0.9/p\\\\ ~~~~~~~~~~~~~~~~\Rightarrow k(\log(1-p)) > \log(0.9/p)\\\\ ~~~~~~~~~~~~~~~~\Rightarrow k > \frac{\log(0.9/p)}{\log(1-p)}\\\\ ~~~~~~~~~~~~~~~~= k > \frac{\log(0.9/0.02)}{\log(0.98)}\\ $

The correct approach was:

$P$(good song) $=0.02$

$P$(bad song) = $0.98$

$P$(n bad songs) = $0.98^n$

$P$(good song after n) = $1-(0.98)^n$

thus,

$1-(0.98)^n > 0.9 \Rightarrow n > \frac{\log{(1-0.9)}}{\log{0.98}}$

What did I do wrong in my initial approach?

$\endgroup$
4
$\begingroup$

You are considering the probability that you hear exactly $k$ songs before the favourite, which is not greater than $2\%$ for all $k$, let alone $90\%$. This is illustrated if you evaluate the final expression for $k$ in your approach – it comes to the absurd $-188.423$.

$\endgroup$
1
$\begingroup$

You want the value of $n$ such that the probability for hearing your favourite song among $n$ songs exceeds $90\%$.   Not only "at the end", but anywhere "among" them.

Alternatively: that the probability for not hearing your favourite song among those $n$ is at most $10\%$.

Thus:

$$(1-0.02)^n\leqslant (1-0.90)\\ n\log 0.98\leqslant \log 0.10\\\vdots\\ n\geqslant 114$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.