If a word appears with probability $0.05$, how many words are needed so that it appears with probability $0.99$?

82 Views Asked by At

Probability of a specific word appearing in a language is $0.05$. How many words must there be in a text, so that the word appears at least once with a probability of $0.99$?

My understanding is that the random variable $X$ which gives the number of the word's appearances has binomial distribution $B(n, 0.05)$ and I am supposed to find $n$.

Probability mass function is therefore:

$$f(x) = \binom{n}1\cdot0.05\cdot0.95^{n-1}$$

For the word to appear once we have to solve this equation for $n$: $$0.99 = n\cdot0.05\cdot0.95^{n-1}$$ Am I on the right track here? Thanks.

3

There are 3 best solutions below

0
On BEST ANSWER

We are looking for $P(n \geq 1) = 1 - P(n = 0)$. But the probability of every word not being the specific word we are looking for is given by:

$$P(n=0)=0.95^{n} = 0.01$$

Solving this for $n$, we have:

$$n\ln(0.95)=\ln(0.01) \implies n=\frac{\ln(0.01)}{\ln(0.95)}\approx 89.78$$

But we want the minimal integer $n$ such that the probability is at least 0.99, so we take the ceiling, $\lceil 89.79 \rceil = 90$.

0
On

It’s simpler than that. Suppose that you have $n$ words; the probability that the specified word does not appear is $0.95^n$, and you want to make $n$ large enough to ensure that this is at most ... what?

Remember, you’re not interested in the probability that it appears exactly once: you want the probability that it appears at least once.

0
On

You're on the right track but you actually want to sum over the values. $$ P(W)=\sum_{m=1}^{n}{n\choose m}p^m(1-p)^{n-m}. $$ Can you see the next trick to use?

$$P(\overline{W})=1-P(W)=1-{n\choose 0}p^0(1-p)^{n-0}.$$