POV-Ray : Newsgroups : povray.off-topic : It's all statistics : Re: It's all statistics Server Time
29 Jul 2024 18:23:02 EDT (-0400)
  Re: It's all statistics  
From: Neeum Zawan
Date: 9 Jul 2011 13:18:58
Message: <8762nbs781.fsf@fester.com>
Invisible <voi### [at] devnull> writes:

>   Pr(402 heads) = (1000 choose 402) / 2^1000
>
> Now this is a problem. 2^1000 is roughly the square of the number of
> atoms in the observable universe, while 1000 choose 402 is defined as
>
>   1000 choose 402 = 1000! / (402! * 598!)
>
> In principle it looks plausible that you could compute the factorial of
> a big number. It might just be a bit slow, eh? Well... no. It turns out
> that 1000! is over 3 million bits in length, for a start.
>
> Even if you could compute 1000 choose 402, it's again almost as huge as
> 2^1000. And taking the quotient of two vast numbers is unlikely to be
> very numerically stable.

Am I missing something? This is trivial to calculate:

(1000/(598*2)) * (999/(597*2) * (998/(596/2)) * ... 

when you've exhausted the 598!, continue the sequence with 402!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.