scoop!
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
3 posts
• Page 1 of 1
scoop!
My son asked me this. He works on a local paper. I've changed the subject matter because he thinks the story might go national but the figures are accurate. I need help from a mathematician. Kai and Jake offered what they could, Jake giving me what might well have been the correct formula but it turned into a puff of smoke as I put the phone down.
So I've invented my own enumeration method that seems to me to be near the mark. What I need is either confirmation or the correct method using permutations and factorials and preferably with an explanation I can understand.
I've translated the issue into this scenario:
Here is what I've come up with:
Phil
So I've invented my own enumeration method that seems to me to be near the mark. What I need is either confirmation or the correct method using permutations and factorials and preferably with an explanation I can understand.
I've translated the issue into this scenario:
What are the odds for throwing at least four sixes with ten three-hundred-and-thirty-three sided dice at one time?
Here is what I've come up with:
⊢(six not)←|-\÷333 1 ⍝ 333 sided diceHera's a slightly less accurate alternative that might be more understandable:
0.003003003003003003 0.996996996996997
⍴throws←(10⍴2)⊤⍳2*10 ⍝ all possible throws of 10 dice 1 0 standing for six & not
10 1024
⍴wins←{⍵/⍨4≤+⌿⍵}throws ⍝ throws with at least 4 sixes
10 848
⍴probs←×⌿not six[wins] ⍝ probability for each throw
848
six not ×.* (4 10)(6 0) ⍝ (4 sixes & 6 nots) vs (10 sixes & 0 nots)
7.98704565936344E¯11 5.964275072811856E¯26
(⌈/,⌊/,+/)probs ⍝ max, min and sum
7.987045659363441E¯11 5.964275072811855E¯26 1.6833572880397535E¯8
⍝ expected max and min check out
'1 :',0⍕÷+/probs ⍝ so the odds are
1 : 59405095
Help will be gratefully accepted.What are the odds that at least four people in a room of ten were born on the Fourth of July?
Phil
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
Re: scoop!
Hi Phil,
The number of ways to choose k objects out of n is
The probability of getting exactly k sixes out of 10 die throws is
Summing for k = 4,5,...,10:
which matches your result.
Regards,
Nick
The number of ways to choose k objects out of n is
k!n ⍝ a.k.a. binomial coefficients
The probability of getting exactly k sixes out of 10 die throws is
(k!10)×(six*k)×not*10-k
Summing for k = 4,5,...,10:
⎕io←0
⊢k←4↓⍳1+10
4 5 6 7 8 9 10
÷+/(k!10)×(six*k)×not*10-k
59405095.23
which matches your result.
Regards,
Nick
- Nick|Dyalog
Re: scoop!
Thanks Nick
Quite a bit simpler when you know how!
Phil
Quite a bit simpler when you know how!
Phil
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: Bing [Bot] and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group