Birthday problem: Difference between revisions
m
→{{header|J}}
m (Clarify, slightly) |
m (→{{header|J}}) |
||
Line 301:
Quicky approach (use a population of 1e5 people to get a quick estimate and then refine against a population of 1e8 people):
<lang J>bd5=:
bd8=:
cnt=: [: >./ #/.~
Line 315:
)
est=: 3 :0
approx=. (bd5 Prb&y i.365) I. 0.5
n=. approx-(2+y)
|