1
$\begingroup$

I am trying to calculate the following: 1000 random digits are generated. What is the probability that digit 5 appears at most 93 times? I think this is gamma with lambda = 100, but I can't set it up in a meaningful way. Thanks! (Not homework, practice)

  • 3
    @Raskolnikov Did you realize that you were arguing with the user "\*pro\*gamma"? =)2011-11-02

2 Answers 2

2

Look at a sequence 1000 random digits as 1000 outcomes of 1 single uniformly distributed discrete random variables, ranging from 0 to 9. Let $X_i$ denote the random variable that equals to $1$ if the digits 5 occurs at position $i$, and equals to zero otherwise.

Each $X_i$ is independent and follows Bernoulli distribution with parameter $p$. The total number of 5's in the sample is $Z = \sum_{i=1}^{1000} X_i$. The sum of $n=1000$ Bernoulli variables has the same distribution as binomial distribution with parameter $n$ and $p$.

The probability of having digit 5 at most 93 times is then $\mathbb{P}(Z \le 93) = \sum_{i=0}^{93} \mathbb{P}(Z = i) = \sum_{i=0}^{93} \binom{n}{i} p^i (1-p)^{n-i}$

In the limit when $n$ is large and $p$ is small, binomial cumulative distribution function $F_Z(z) = \mathbb{P}(Z \le z)$ can be approximated using c.d.f. of Poisson distribution with parameter $\lambda = n p$. See wiki page of binomial distribution and search for Poisson approximation.

Compare these two using WolframAlpha (link).

0

Find the number of ways to arrange 93 5s $\times$ the number of ways to arrange the other 907 digit, then add the number arrangements found the same way for 92...0 5s, and divide by the total number of ways to arrange the digits.

$\frac{^{1000}C_{93} \cdot 9^{1000-93}+{^{1000}C_{92}} \cdot 9^{1000-92}+\cdots+ {^{1000}C_0} \cdot 9^{1000}}{10^{1000}}$