(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}\) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(42S) Probability of Same Birthday Day - morex - 12-05-2018, 06:09 PM
RE: (42S) Probability of Same Birthday Day - Dieter - 12-05-2018, 08:36 PM
RE: (42S) Probability of Same Birthday Day - morex - 12-05-2018, 09:02 PM
RE: (42S) Probability of Same Birthday Day - ijabbott - 12-05-2018, 11:46 PM
RE: (42S) Probability of Same Birthday Day - Valentin Albillo - 12-06-2018, 04:32 AM
RE: (42S) Probability of Same Birthday Day - Joe Horn - 12-06-2018, 05:54 AM
RE: (42S) Probability of Same Birthday Day - Valentin Albillo - 12-06-2018, 03:59 PM
RE: (42S) Probability of Same Birthday Day - Joe Horn - 12-10-2018, 05:10 PM
RE: (42S) Probability of Same Birthday Day - ijabbott - 12-06-2018, 08:49 AM
RE: (42S) Probability of Same Birthday Day - morex - 12-06-2018, 07:49 PM
RE: (42S) Probability of Same Birthday Day - Albert Chan - 08-16-2019 01:55 PM
|
User(s) browsing this thread: 3 Guest(s)