## fun sums

Posted in Books, Kids, Statistics with tags , , , , , , on May 26, 2021 by xi'an

Some sums and limits found from a [vacation] riddle by The Riddler:

For the first method, Friend 1 takes half of the cake, Friend 2 takes a third of what remains, and so on. After  infinitely many friends take their respective pieces, you get whatever is left.

$\lim_{k\to\infty}\prod_{i=2}^k\left(1-\dfrac{1}{i}\right) = \lim_{k\to\infty} \dfrac{1}{k} = 0$

For the second method, Friend 1 takes ½² of the cake, Friend 2 takes ⅓² of what remains, and so on. After infinitely many friends take their respective pieces, you get whatever is left.

$\lim_{k\to\infty}\prod_{i=2}^k\left(1-\dfrac{1}{i^2}\right) = \lim_{k\to\infty}\dfrac{k+1}{2k} = \dfrac{1}{2}$

For the third method, Friend 1 takes ½² of the cake, Friend 2 takes ¼² of what remains, Friend 3 takes ⅙² of what remains after Friend 2, and so on. After your infinitely many friends take their respective pieces, you get whatever is left.

$\lim_{k\to\infty}\prod_{i=2}^k\left(1-\dfrac{1}{4i^2}\right) = \lim_{k\to\infty}\dfrac{4(2k+1)}{3\pi k} = \dfrac{2}{\pi}$

## the incredible accuracy of Stirling’s approximation

Posted in Kids, R, Statistics with tags , , on December 7, 2016 by xi'an

The last riddle from the Riddler [last before The Election] summed up to find the probability of a Binomial B(2N,½) draw ending up at the very middle, N. Which is

$\wp={2N \choose N}2^{-2N}$

If one uses the standard Stirling approximation to the factorial function,

log(N!)≈Nlog(N) – N + ½log(2πN)

the approximation to ℘ is 1/√πN, which is not perfect for the small values of N. Introducing the second order Stirling approximation,

log(N!)≈Nlog(N) – N + ½log(2πN) + 1/12N

the approximation become

℘≈exp(-1/8N)/√πN

which fits almost exactly from the start. This accuracy was already pointed out by William Feller, Section II.9.