1
$\begingroup$

Is there a good approximation function for

$$\left(\frac{n - 1}{n}\right) ^ n$$

I am trying to quickly calculate the probability of an event with probability of $\frac{1}{n}$ not happening if you try $n$ times.

It's quite hard to google something you can't put a name on.

$\endgroup$
5
  • 4
    $\begingroup$ For large values of $n$ you can just take $1/e$. $\endgroup$ – Darth Geek Dec 25 '16 at 16:25
  • $\begingroup$ @Dan Geek. this answer, probably :) is enough for the OP, but he/she may need an order 1 equivalent. $\endgroup$ – Jean Marie Dec 25 '16 at 16:36
  • $\begingroup$ Would that work well enough for $n = 100$? As in $0.xxx$ accurate? $\endgroup$ – RokL Dec 25 '16 at 16:40
  • $\begingroup$ It doesn't work very well for $n=2$ :-) For $n=100$, it's a lot better, but only you can decide if it's good enough. $\endgroup$ – bubba Dec 25 '16 at 16:45
  • $\begingroup$ Judging by the graph posted in an answer, for $n = 100$ the result is probably accurate to three digits, which is what I wanted. $\endgroup$ – RokL Dec 25 '16 at 16:47
6
$\begingroup$

It is $$\lim_{n\to \infty} \left(1-\frac{1}{n}\right)^n=e^{-1}$$

$\endgroup$
2
$\begingroup$

Note that

$$\left(\frac{n-1}n\right)^n=\left(1-\frac1n\right)^n=\frac{n-1}{1\times2n}-\frac{(n-1)(n-2)}{1\times2\times3n^2}+\frac{(n-1)(n-2)(n-3)}{1\times2\times3\times4n^3}+\dots$$

which is the binomial expansion theorem.

$\endgroup$
1
  • 2
    $\begingroup$ I am unsure that this development is useful for the question at hand. $\endgroup$ – Jean Marie Dec 25 '16 at 16:40
1
$\begingroup$

The function $$ f(x) = \left(\frac{x-1}x\right)^x=\left(1-\frac1x\right)^x $$ is well-behaved, it appears, and, as others have noted, it approaches $1/e$ as $x$ gets larger. Here is a graph of $1/e - f(x)$:

enter image description here

So you can fit the first part of it with a polynomial, which will speed up your calculations, and you can just use $1/e$ for large values of $x$. When $x=100$, $1/e -f(x) \approx 0.00185.$

An excellent tool for fitting with polynomials is chebfun.

$\endgroup$
0
$\begingroup$

If you want a better approximation than $\frac1e \approx 0.36787944$ then you could try the Laurent series

$$\left(\dfrac{n-1}{n}\right)^n = \frac1e\left(1 - \frac1{2x} - \frac5{24x^2}- \frac5{48x^3} - \frac{337}{5760x^4} -O\left(\frac1{x^5}\right) \right)$$

which for small $n$ and ignoring the $O\left(\frac1{x^5}\right)$ term gives

n       ((n-1)/n)^n Approx      difference
1       0           0.0474539   0.0474539
2       0.25        0.2506139   0.0006139
3       0.2962963   0.2963655   0.0000692
4       0.3164063   0.3164216   0.0000153
5       0.32768     0.3276848   0.0000048
6       0.3348980   0.3348999   0.0000019
7       0.3399167   0.3399175   0.0000009
8       0.3436089   0.3436094   0.0000004
9       0.3464394   0.3464397   0.0000002
10      0.3486784   0.3486786   0.0000001
11      0.3504939   0.3504940   0.0000001
12      0.3519956   0.3519957   0.0000001
13      0.3532585   0.3532585   0.0000000
14      0.3543353   0.3543353   0.0000000
15      0.3552644   0.3552644   0.0000000
16      0.3560741   0.3560741   0.0000000
17      0.3567862   0.3567862   0.0000000
18      0.3574172   0.3574172   0.0000000
19      0.3579803   0.3579803   0.0000000
20      0.3584859   0.3584859   0.0000000
21      0.3589424   0.3589424   0.0000000
22      0.3593565   0.3593565   0.0000000
23      0.3597340   0.3597340   0.0000000
24      0.3600794   0.3600794   0.0000000
25      0.3603967   0.3603967   0.0000000
100     0.3660323   0.3660323   0.0000000
1000    0.3676954   0.3676954   0.0000000
$\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.