Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I get close but can't figure out how they get the answer to this question -- Introduction to Probability, Grinstead, Snell, Chapter 5.1, exercise 17:

The probability of a royal flush in a poker hand is p = 1/649,740. How large must n be to render the probability of having no royal flush in n hands smaller than 1/e?

My answer is: since this is for one success, use a geometric distribution instead of a negative binomial.

  • success p(flush) = 1/649740 = .0000016
  • failure p(no flush) = 1 - 1/649740 = .9999984
  • 1/e = 1 / 2.71828 = .36788

For geometric distribution, I set them equal to find the minimum n:

  • q^n = 1/e
  • (.9999984)^n = .36788
  • log _.9999984 (.36788) = n (base is .9999984, the failure probability)
  • log .36788 / log .9999984 = n (found this technique for using base 10 for both)
  • n = 624998.55

Therefore, my answer is 624999 (just over the equal n by rounding up). However, the answer in the text book says 649741. Using my above process, I get that too -- if I change 1/e from .36788 to .3536. Is my 1/e incorrect? Or have I used the wrong distribution and formula? Thanks in advance for any help.

share|improve this question
3  
I hope that when you use your calculator, you do not truncate numbers and feed the truncated version back in. Use the memory feature! It will save on time and on keying errors. Also, calculators do their calculation internally to higher precision than they reveal externally. If you key something back in, even to "full precision", you are losing accuracy. And you do not need logs to weird bases. Every additonal step in a calculation is a threat to accuracy. –  André Nicolas Jul 27 '11 at 1:17
    
thanks for the tip -- I was doing it the wrong way as you note, I'll follow these steps next time. I need a new calculator, the one I have does not have an e button. –  d l Jul 27 '11 at 23:19
    
So you don't have $\ln x$, $e^x$ on your calculator? Your computer, whatever operating system it runs, almost certainly has a scientific calculator utility. If it doesn't, a free one can be downloaded. –  André Nicolas Jul 28 '11 at 2:02
    
Oh no -- I'm getting more embarrassed; I have the calculator in Windows 7, Scientific View, and it has "ln", but no "e" .... until I hit the "Inv" button, the function buttons change and "e" is there. Sorry for asking a dumb question, and many thanks for your persistence, otherwise I would not have explored further and found this. –  d l Jul 28 '11 at 18:27
    
Nice design, I guess, but too clever. On physical calculators, $e^x$ is permanently written under the key. –  André Nicolas Jul 28 '11 at 19:12
add comment

3 Answers

up vote 2 down vote accepted

This is just an answer due to rounding. You correctly solve the equation

$$ q^n = 1/e $$

for $n$ to get:

$$\begin{align} n = \frac{\log(1/e)}{\log(q)} = \frac{-1}{\log(q)} \approx 649739.5715, \end{align}$$

according to my calculator. Notice that there is no need to explicitly solve for $e$ since $\log(1/e) = -1$.

share|improve this answer
    
thanks -- I did not know that about e, I think that's where my problem was. –  d l Jul 27 '11 at 18:42
    
You're quite welcome. That just comes from $\log_b(b) = 1$. Indeed, when a mathematician writes $\log$ (s)he means the natural log $\ln = \log_e$. Since all logs are the same (up to constants), we just stick with the notation $\log$. –  JavaMan Jul 27 '11 at 18:45
add comment

It's a rounding error. You can get closer results as follows:

$$ \begin{align} q^n &= e^{-1} \\ n \ln q &= -1 \\ n &= 1 / (-\ln q) \end{align} $$

Note that $-\ln(1 - x)$ is approximately $x$ for small x. Just plugging in - 1/649740 gives a result of 649740. The actual series is $x + x^2 / 2 + x^3/3 ...$, which means that the $-\ln q > 1/649740$, but only very slightly, which means that $-1/\ln q < 649740$, so 649740 is sufficient, rather than the 649741 that the book claims.

share|improve this answer
    
thanks -- I get the same answer with your solution if I hit "ln" on my calculator, not "log". I was using "log" before, and did not know e inverse = -1. –  d l Jul 27 '11 at 18:45
add comment

When $p$ is small, the probability of at least one success in $n$ trials is approximately $1-1/\mathrm e$ when $n = 1/p$. Your $p = 1/649740$ should be plenty small enough for this approximation to be very good.

To be exact, the probability of no success in $n$ independent trials, with probability $p$ of success in each, is $(1-p)^n = \exp(n \log(1-p))$. When $n$ is large and/or $p$ is small, this is quite well approximated by $\exp(-np)$. Equivalently, writing $k = np$ for the expected number of successes in the $n$ trials, the probability of no success is approximately $\exp(-k)$ regardless of $n$ (as long as $n$ isn't very small).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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