Post Reply 
(42S) Probability of Same Birthday Day
08-16-2019, 01:55 PM (This post was last modified: 08-16-2019 04:22 PM by Albert Chan.)
Post: #11
RE: (42S) Probability of Same Birthday Day
Learning about approximating summation formula, and apply to same birthday problem.
From Fundamentals of Numerical Analysis, by Stephen Kellison, page 139:

Σf = Δ-1 f
= (eD - 1)-1 f
= (D + D²/2! + D³/3! + D4/4! + ...)-1 f
= (D-1 - ½ + D/12 - D³/720 + ...) f

Approximate Σf using 3 terms:

XCas> f := ln(1-x/365)
XCas> expand(int(f) - f/2 + diff(f)/12)

\(365 - \frac{1}{(1-x/365)*4380} - \frac{731*ln(1-x/365)}{2}\) + x*ln(1-x/365) - x

Drop constant of integration, and simplify:

XCas> g(x) := ln(1-x/365) * (x-365.5) - x - 1/(4380-12*x)
XCas> g1 := g(1)                        // g1 ≈ -1/4379.99999
XCas> P(n) := 1 - e^(g(n)-g1) // approximated probability, very good

XCas> map([10,23,25,50,70], n -> [n, P(n), 1. - e^sum(f, x=1 .. n-1)])

\(\begin{bmatrix}
10 & 0.1169481777 & 0.1169481777 \\
23 & 0.5072972343 & 0.5072972343 \\
25 & 0.5686997040 & 0.5686997040 \\
50 & 0.9703735796 & 0.9703735796 \\
70 & 0.9991595760 & 0.9991595760 \\
\end{bmatrix}\)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (42S) Probability of Same Birthday Day - Albert Chan - 08-16-2019 01:55 PM



User(s) browsing this thread: 3 Guest(s)