(42S/DM42/Free42/Plus42) Birthday Probability Function

02102023, 04:10 AM
Post: #1




(42S/DM42/Free42/Plus42) Birthday Probability Function
DM42, Free42, HP 42S: Birthday Probability Function
P = Π( 1  m/C, m = 1 to N1) C = number of categories (examples: days in a calendar year, minutes in an hour, number of places, etc...) N = sample population P = probability that sample population does not share a category (examples: number of people that don't share the same birthday, number of people from a city that are not in the same location, etc...) Code: 00 { 58Byte Prgm } Examples: Probability that 40 people do not share a birthday (assume a 365 day calendar): CATEGORIES? 365 N? 40 Probability: 0.10877 Probability that 3 cards drawn do not share the same suit: CATEGORIES? 4 (4 suits in a deck of cards) N? 3 Probability: 0.37500 Source: Diaconis, Persi and Brian Skyrms Ten Great Ideas About Chance Princeton University Press: Princeton, New Jersey. 2018. ISBN 9780691196398 

02112023, 09:24 AM
Post: #2




RE: (42S/DM42/Free42/Plus42) Birthday Probability Function
For small values we can also use:
Code: 00 { 9Byte Prgm } Examples 365 ENTER 40 R/S 0.10877 4 ENTER 3 R/S 0.37500 

02112023, 05:34 PM
Post: #3




RE: (42S/DM42/Free42/Plus42) Birthday Probability Function
The approximation does very well!


02122023, 10:12 AM
Post: #4




RE: (42S/DM42/Free42/Plus42) Birthday Probability Function
It's less of an approximation but uses the formula:
\( \begin{aligned} \bar{p}(k)=\frac{_{365}P_{k}}{365^{k}} \end{aligned} \) where \(_{n}P_{k}\) denotes permutation. What I meant by "small values" is that with the HP42S we can't go beyond \(k=195\) or we get the error: Out of Range However, it still works with Free42 due to its extended range. For an approximation we can use: \( \begin{aligned} \bar{p}(n,k) &\approx e^{\frac{k(k1)}{2n}} \\ &\approx \left(1  \frac{k}{2n}\right)^{k1} \\ \end{aligned} \) Here we assume that \(k \ll n\). Example 40 ENTER 39 * 2 / 365 / CHS e^{x} 0.11801 1 ENTER 40 ENTER 2 / 365 /  39 y^{x} 0.11105 

02122023, 10:39 AM
Post: #5




RE: (42S/DM42/Free42/Plus42) Birthday Probability Function
It also seems to be a recurring topic of this forum:


« Next Oldest  Next Newest »

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