Thread Rating:

Poll

21 votes (45.65%)
14 votes (30.43%)
6 votes (13.04%)
3 votes (6.52%)
12 votes (26.08%)
3 votes (6.52%)
6 votes (13.04%)
5 votes (10.86%)
12 votes (26.08%)
10 votes (21.73%)

46 members have voted

Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 15th, 2020 at 5:24:02 PM permalink
Quote: gordonm888

(1) How many bridge deals (13 cards out of 52) on average will it take before a player has held all 52 cards (in his own hand) at least once?




16.4116...

Solved it, hopefully correctly, with a Markov chain.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5374
Joined: Feb 18, 2015
September 15th, 2020 at 6:44:32 PM permalink
Quote: Wizard

Quote: gordonm888

(1) How many bridge deals (13 cards out of 52) on average will it take before a player has held all 52 cards (in his own hand) at least once?




16.4116...

Solved it, hopefully correctly, with a Markov chain.



CORRECT answer for the first part



My source says the answer is:

545928847452258491492389829320450626160841197170151499543576764239417023255451861085626905883156684405195107023780479317372271274509508567967387626740665018015009371549436149407597300658313676235368117130572713596038893838341598601195428485082034721825135468987/
33263651815411301455093132853409898491173712201961171863009501862172850150290107365581703955244599875291300187598652081762922197224670489260819393711347009189515918586716637050967309053192156474313569986447499658535026680206545307025594664981127461443909937520 ≈ 16.412 .

Not sure why this answer uses about 250 digits in the numerator and denominator and then rounds it to so few digits. Weird, huh?

Given a Markov chain calculation, I understand about formulating the transition matrix and then starting with an initial state vector/matrix and repeatedly multiplying it with the transition matrix. I just haven't really attempted it yet.

Wizard, did you use a spreadsheet or a computational program to do this?
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
September 15th, 2020 at 7:30:49 PM permalink
Quote: gordonm888

Quote: Wizard

Quote: gordonm888

(1) How many bridge deals (13 cards out of 52) on average will it take before a player has held all 52 cards (in his own hand) at least once?




16.4116...

Solved it, hopefully correctly, with a Markov chain.



CORRECT answer for the first part



My source says the answer is:

545928847452258491492389829320450626160841197170151499543576764239417023255451861085626905883156684405195107023780479317372271274509508567967387626740665018015009371549436149407597300658313676235368117130572713596038893838341598601195428485082034721825135468987/
33263651815411301455093132853409898491173712201961171863009501862172850150290107365581703955244599875291300187598652081762922197224670489260819393711347009189515918586716637050967309053192156474313569986447499658535026680206545307025594664981127461443909937520 ≈ 16.412 .

Not sure why this answer uses about 250 digits in the numerator and denominator and then rounds it to so few digits. Weird, huh?

Given a Markov chain calculation, I understand about formulating the transition matrix and then starting with an initial state vector/matrix and repeatedly multiplying it with the transition matrix. I just haven't really attempted it yet.

Wizard, did you use a spreadsheet or a computational program to do this?


That's what I get as well

I did it computationally, using a vector of rational numbers and working from the expected number needed with 52 already drawn (hint: zero) down to the number needed with 13. The solution is 1 + the number needed with 13, as the first deal will always result in exactly 13 cards having been dealt.

After all, what's a Markov chain other than a series of simultaneous equations?

charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
September 15th, 2020 at 7:39:23 PM permalink
In the end I ran a simulation and then a simple program looping through all the months using nested loops (do a=1 to 12, do b=1 to 12 etc perms=daysinmonth[a]*...).
Slightly worrying is the simulation gave slightly different answers!
Simulation
Parms: No of trials:1000000000 Time:3:0:59:776
Summary Trials 1000000000 Wins 572657896 Losses 427342104
Parms: No of trials:1000000000 Time:3:5:40:425

Parms: No of trials:1000000000 Time:3:31:15:942
Summary Trials 1000000000 Wins 572637546 Losses 427362454
Parms: No of trials:1000000000 Time:3:36:4:144
Calculation: Summary Trials 17748900625 Wins 10164157800 Losses 7584742825.

The calculation agrees with
No ofNo ofNo ofWaysDaysDaysDaysDaysContribution
31-day30-day28-dayfirst secondthirdfourth
monthsmonthsmonthspersonpersonpersonperson
4
1
217
186
155
124
775 757 640
3
1
4
217
186
155
120
3 002 932 800
3
1
4
217
186
155
28
700 684 320
2
2
6
217
186
120
90
2 615 457 600
2
1
1
12
217
186
120
28
1 627 395 840
1
3
4
217
120
90
60
562 464 000
1
2
1
12
217
120
90
28
787 449 600
4
1
120
90
60
30
19 440 000
3
1
4
120
90
60
28
72 576 000
Total
10 164 157 800
365
365
365
365
17 748 900 625
Prob
57.266 408%

Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 15th, 2020 at 7:43:05 PM permalink
I used a spreadsheet. It doesn't give an exact answer, but after 116 hands the probability of seeing every card is 0.999999999999836, resulting in an expected number of hands of 16.41217418, which should be accurate to that many decimal places.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
September 15th, 2020 at 8:03:07 PM permalink
For the bridge hands an idea I was thinking of using is similar spreadsheet method to working out EVs at Blackjack, i.e. using recursion.

With 52 found, your expected number of hands to go is zero : f(52) = 0 .

With 51 found, it takes you 1/p(51) hands to get out of the state (where p(n) is the chance of finding at least one card in state n - in this case the last card) + 1* f(52).

With 50 found, it takes you 1/p(50) to get out, then P(s51|s50 finds a card)*f(51) + P(s52|s50 finds a card)*f(52) more hands.

With fewer found, it's the sum of how long do you have to wait for a decision ( again 1/p(n) ), and then add SUMPRODUCT (probabilities of going to each new state, f(new state) ).

The tricky part is working out the probabilties, given you've found at least one new card, of how many you might actually have found.

I think when this was a roulette puzzle, working out how long it took to roll all 37 numbers, you could only go up one state so it was fairly easy. In this case you can go up multiple states.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
September 15th, 2020 at 11:03:15 PM permalink
Quote: Gialmere

A sort of sequel to the famous birthday problem...



What is the probability that in a group of 4 people, at least 2 of them are born in the same month?

Assume a 365 day year (i.e. 28 days in February) but, apart from this caveat, use the correct probabilities for each of the months.


Where
a = 28/365
b= 120/365
c=217/365
d=30/365
e=31/365

n= a(1-a)^3 + b(1-d)^3 + c(1-e)^3 = 0.770101

4(1-n) - 6(a^2 + bd + ce) + 4(a^3 + bd^2 + ce^2) - (a^4 + bd^3 + ce^3) = 44.646% probability
It’s all about making that GTA
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 16th, 2020 at 6:43:55 AM permalink
Quote: Ace2


Where
a = 28/365
b= 120/365
c=217/365
d=30/365
e=31/365

n= a(1-a)^3 + b(1-d)^3 + c(1-e)^3 = 0.770101

4(1-n) - 6(a^2 + bd + ce) + 4(a^3 + bd^2 + ce^2) - (a^4 + bd^3 + ce^3) = 44.646% probability


Also very close, but no.
Have you tried 22 tonight? I said 22.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
September 16th, 2020 at 7:14:59 AM permalink
Quote: gordonm888

(2) How many Pai Gow Poker hands (7 cards out of 53) on average will it take before a player has held all 53 cards at least once?



1 / 32.92568564

Specifically:
629,097,238,224,941,789,116,137,284,618,328,573
,253,267,781,017,644,372,314,522,497,141,028,041,898,951,883,234,392,254,059,720,888,441,444,593,624,346,465,280,910,908
,992,267,124,905,045,814,131,513,624,902,821,633,667,261,105,718,956,288,311,603,040,542,103,677,201,489,748,650,413,559
/
19,106,579,741,561,884,505,224,318,707,257,710
,891,622,671,725,425,855,998,089,223,811,780,836,135,833,611,417,577,161,108,975,083,498,545,215,815,129,315,281,867,166
,023,015,450,873,297,597,254,359,533,368,618,569,986,012,443,663,161,895,129,820,324,319,062,323,201,573,486,955,270,120

ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1730
Joined: Jul 26, 2010
September 16th, 2020 at 9:10:28 AM permalink
Quote: Gialmere

...

What is the probability that in a group of 4 people, at least 2 of them are born in the same month?

Assume a 365 day year (i.e. 28 days in February) but, apart from this caveat, use the correct probabilities for each of the months.




I get approximately 0.428431201777603.

Edit: Now, I agree with you others. (In calculating the probability of four different months, I had neglected one combination: September-April-June-November.)
Now, my Excel gives: 0.427335922672112.
Last edited by: ChesterDog on Sep 16, 2020
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
Thanked by
gordonm888
September 16th, 2020 at 11:23:27 AM permalink
Quote: Gialmere

Quote: gordonm888

0.427335923
I agree with Charlie's approach and calculations except that the total number of combinations should be 365^4 because the four people can be born on the same day.


Close, but no cigar.

I've tried yet another approach, not the actual coding as I used a spreadsheet, but the logic is as follows...
...yes there's a better way using perms, but this is bullet proof...
DO I=1 TO 12
DO j=1 TO 12
DO k=1 TO 12
DO l=1 TO 12
determine whether any months are the same
perms = DAYSINMONTH(i) * DAYSINMONTH(j) * DAYSINMONTH(k) * DAYSINMONTH(l)
add perms to "diff" or "same"
ENDDO ENDDO ENDDO ENDDO
print diff same

   57.266 408%      42.733 592%
10 164 157 800 7 584 742 825 17 748 900 625
So I'm wondering whether I've misunderstood the question.
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5374
Joined: Feb 18, 2015
September 16th, 2020 at 12:02:18 PM permalink
Quote: ThatDonGuy

Quote: gordonm888

(2) How many Pai Gow Poker hands (7 cards out of 53) on average will it take before a player has held all 53 cards at least once?



1 / 32.92568564

Specifically:
629,097,238,224,941,789,116,137,284,618,328,573
,253,267,781,017,644,372,314,522,497,141,028,041,898,951,883,234,392,254,059,720,888,441,444,593,624,346,465,280,910,908
,992,267,124,905,045,814,131,513,624,902,821,633,667,261,105,718,956,288,311,603,040,542,103,677,201,489,748,650,413,559
/
19,106,579,741,561,884,505,224,318,707,257,710
,891,622,671,725,425,855,998,089,223,811,780,836,135,833,611,417,577,161,108,975,083,498,545,215,815,129,315,281,867,166
,023,015,450,873,297,597,254,359,533,368,618,569,986,012,443,663,161,895,129,820,324,319,062,323,201,573,486,955,270,120



CORRECT (I will graciously assume you meant the inverse of your answer.)

How do you calculate that many digits?
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
September 16th, 2020 at 12:06:48 PM permalink
Quote: gordonm888

How do you calculate that many digits?


I created a "Rational" library for .NET that does arithmetic on rational numbers, with arbitrary-precision integers ("BigIntegers") for the numerator and denominator.
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5374
Joined: Feb 18, 2015
Thanked by
charliepatrick
September 16th, 2020 at 12:25:21 PM permalink
Quote: charliepatrick

Quote: Gialmere

Quote: gordonm888

0.427335923
I agree with Charlie's approach and calculations except that the total number of combinations should be 365^4 because the four people can be born on the same day.


Close, but no cigar.

I've tried yet another approach, not the actual coding as I used a spreadsheet, but the logic is as follows...
...yes there's a better way using perms, but this is bullet proof...
DO I=1 TO 12
DO j=1 TO 12
DO k=1 TO 12
DO l=1 TO 12
determine whether any months are the same
perms = DAYSINMONTH(i) * DAYSINMONTH(j) * DAYSINMONTH(k) * DAYSINMONTH(l)
add perms to "diff" or "same"
ENDDO ENDDO ENDDO ENDDO
print diff same

   57.266 408%      42.733 592%
10 164 157 800 7 584 742 825 17 748 900 625
So I'm wondering whether I've misunderstood the question.



And, if you ignored the length of the months and simply assumed they were 1/12 of a year the easy-to-calculate combinatorial answer is 42.708 333%. And given the actual distribution of month lengths, -and especially the effect of February being only 28 days - it makes sense that the our answer of 42.733 592% is slightly higher than 42.708 333%.

MathAnswersMatter
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
September 16th, 2020 at 12:28:39 PM permalink
For the birthdays problem, I was getting what everybody else was getting, until...

I did a brute force search, and got 42.7391782%

For some reason, the method used was overcounting the number of times there were four different months by 991,440.
The number of sets of people with different months are lower than from Charlie's counts as follows, where (A, B, C) is A people born in 31-day months, B people born in 30-day months, and C people born in 28-day-months:
(4, 0, 0): 124 x 155 x 12
(3, 1, 0): 4 x 120 x 155 x 6
(3, 0, 1): 4 x 28 x 155 x 6
(2, 2, 0): 6 x 120 x 90 x 2
(2, 1, 1): 12 x 28 x 120 x 2
The others are the same

Last edited by: ThatDonGuy on Sep 16, 2020
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
September 16th, 2020 at 2:03:03 PM permalink
Another way to look at the scenario where everyone is born in a 31-day month is to consider it as two parts.
(i) Each person could be born on any of 31 days in their month. That gives 31*31*31*31.
(ii) Looking for times where the months are different, the first person can be any of the 7 months. The second can be any of 6 etc. That gives 7*6*5*4.
31*31*31*31*7*6*5*4 = 775757640.
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5374
Joined: Feb 18, 2015
September 16th, 2020 at 2:43:34 PM permalink
Quote: ThatDonGuy

For the birthdays problem, I was getting what everybody else was getting, until...


I did a brute force search, and got 42.7391782%

For some reason, the method used was overcounting the number of times there were four different months by 991,440.
The number of sets of people with different months are lower than from Charlie's counts as follows, where (A, B, C) is A people born in 31-day months, B people born in 30-day months, and C people born in 28-day-months:
(4, 0, 0): 124 x 155 x 12
(3, 1, 0): 4 x 120 x 155 x 6
(3, 0, 1): 4 x 28 x 155 x 6
(2, 2, 0): 6 x 120 x 90 x 2
(2, 1, 1): 12 x 28 x 120 x 2
The others are the same



I admit, I am stumped. I have spent about an hour studying this post and Charlie's calculations and I simply can't reconcile them. I see no problem with Charlie's approach and calculations. I am human, maybe I have a blind spot.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 16th, 2020 at 5:17:29 PM permalink
Here is the official Birthday solve from the puzzle site. I'll let you guys debate the finer points.
(Note that I was too lazy to code and reconvert the two tables.)

The answer is .43122136 or 43.12%.

For each of the seven months containing 31 days, the probability of being born in that month is 31/365.
For each of the four months containing 30 days, the probability of being born in that month is 30/365.
For February which contains 28 days, the probability of being born in that month is 28/365.

We must figure out the probability that all four are born in different months, and then subtract that number from 1 to get the probability that at least two are born in the same month.

We must first determine the number of combinations of four DIFFERENT months. Using 12C4, we get 495 different combinations of 12 months taken 4 at a time. Luckily, we can break this down into nine categories since many of those 495 combinations would have the same probability:
JAN-FEB-MAR-APR would have the same probability as JAN-FEB-SEP-DEC because they each have two months with 31 days, 1 month with 30 days, and 1 month with 28 days.

So, here are the nine categories:

Category 1st Month 2nd Month 3rd Month 4th Month Number of Combinations
#1 31 31 31 31 7C4 = 35
#2 30 30 30 30 4C4 = 1
#3 31 31 31 30 7C3 x 4 = 140
#4 31 31 31 28 7C3 x 1 = 35
#5 31 31 30 30 7C2 x 4C2 = 21 x 6 = 126
#6 31 31 30 28 7C2 x 4 x 1 = 21 x 4 x 1 = 84
#7 31 30 30 30 7 x 4C3 = 7 x 4 = 28
#8 31 30 30 28 7 x 4C2 x 1 = 42
#9 30 30 30 28 4C3 x 1 = 4
Total 495


Now the next table shows the probability that all four people have different birth months for each of the nine categories:

Category 1st Month 2nd Month 3rd Month 4th Month Probability that all are different
#1 31 31 31 31 (31/365)4 = .00005203
#2 30 30 30 30 (30/365)4 = .00004564
#3 31 31 31 30 (31/365)3 x 30/365 = .00005036
#4 31 31 31 28 (31/365)3 x 28/365 = .00004700
#5 31 31 30 30 (31/365)2 x (30/365)2 = .00004873
#6 31 31 30 28 (31/365)2 x 30/365 x 28/365 = .00004548
#7 31 30 30 30 31/365 x (30/365)3 = .00004716
#8 31 30 30 28 31/365 x (30/365)2 x 28/365 = .00004014
#9 30 30 30 28 (30/365)3 x 28/365 = .00004259


Now, we must combine the two tables to obtain the sum of all 495 combinations:
Sum = 35 x .00005203 + 1 x .00004564 + 140 x .00005036 +
35 x .00004700 + 126 x .00004873 + 84 x .00004548 +
28 x .00004716 + 42 x .00004014 + 4 x .00004259
= .02369911

However, this only represents the nine combinations. We have computed the probabilities for each combination of four months. But we have ignored the possibility of the four people having different birth months within the same category.
For example:

Abe could be born in JAN, Ben in FEB, Carol in MAR, and David in APR; or
Abe could be born in JAN, Ben in FEB, Carol in APR, and David in MAR; or
Abe could be born in JAN, Ben in MAR, Carol in FEB, and David in APR; or
Abe could be born in JAN, Ben in MAR, Carol in APR, and David in FEB; or

Abe could be born in JAN, Ben in APR, Carol in FEB, and David in MAR; or
Abe could be born in JAN, Ben in APR, Carol in MAR, and David in FEB; or
Abe could be born in FEB, Ben in JAN, Carol in MAR, and David in APR; or
Abe could be born in FEB, Ben in JAN, Carol in APR, and David in MAR; or

Abe could be born in FEB, Ben in MAR, Carol in JAN, and David in APR; or
Abe could be born in FEB, Ben in MAR, Carol in APR, and David in JAN; or
Abe could be born in FEB, Ben in APR, Carol in MAR, and David in JAN; or
Abe could be born in FEB, Ben in APR, Carol in JAN, and David in APR; or

Abe could be born in MAR, Ben in JAN, Carol in FEB, and David in APR; or
Abe could be born in MAR, Ben in JAN, Carol in APR, and David in FEB; or
Abe could be born in MAR, Ben in FEB, Carol in JAN, and David in APR; or
Abe could be born in MAR, Ben in FEB, Carol in APR, and David in JAN; or

Abe could be born in MAR, Ben in APR, Carol in JAN, and David in FEB; or
Abe could be born in MAR, Ben in APR, Carol in FEB, and David in JAN; or
Abe could be born in APR, Ben in JAN, Carol in FEB, and David in MAR; or
Abe could be born in APR, Ben in JAN, Carol in MAR, and David in FEB; or

Abe could be born in APR, Ben in FEB, Carol in MAR, and David in JAN; or
Abe could be born in APR, Ben in FEB, Carol in JAN, and David in MAR; or
Abe could be born in APR, Ben in MAR, Carol in JAN, and David in FEB; or
Abe could be born in APR, Ben in MAR, Carol in FEB, and David in JAN; or

So, for each category of four months, there are 24 permutations!
So, we must multiply our probability sum by 24 to get 24 x .02369911 = .56877864.
This means that the probability that four people will have different birth months is .56877864.

And finally, the probability that at least two of the four are born in
the same month is 1 - .56877864 = .43122136 or 43.12%.

----------------------------------

Birthdays are good for you.

Statistics show that people who have more of them live longer.
Have you tried 22 tonight? I said 22.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
September 16th, 2020 at 6:38:43 PM permalink
Quote: ThatDonGuy

For the birthdays problem, I was getting what everybody else was getting, until...


I did a brute force search, and got 42.7391782%


I found a glitch in my code (it was only counting 30 days for December) - when I corrected it,

all nine sets of numbers matched Charlie's, and the brute force answer is 42.733592267%.



...and, I found the error in the "official" answer:

Quote: Gialmere

Now the next table shows the probability that all four people have different birth months for each of the nine categories:

Category 1st Month 2nd Month 3rd Month 4th Month Probability that all are different
#1 31 31 31 31 (31/365)^4 = .00005203
#2 30 30 30 30 (30/365)^4 = .00004564
#3 31 31 31 30 (31/365)^3 x 30/365 = .00005036
#4 31 31 31 28 (31/365)^3 x 28/365 = .00004700
#5 31 31 30 30 (31/365)^2 x (30/365)^2 = .00004873
#6 31 31 30 28 (31/365)^2 x 30/365 x 28/365 = .00004548
#7 31 30 30 30 31/365 x (30/365)^3 = .00004716
#8 31 30 30 28 31/365 x (30/365)^2 x 28/365 = .00004014
#9 30 30 30 28 (30/365)^3 x 28/365 = .00004259


31/365 x (30/365)^2 x 28/365 = 0.00004401, not 0.00004014

Last edited by: ThatDonGuy on Sep 16, 2020
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5374
Joined: Feb 18, 2015
September 16th, 2020 at 7:00:35 PM permalink
I think the official answer is wrong. Basically, in this step:

"Now, we must combine the two tables to obtain the sum of all 495 combinations:
Sum = 35 x .00005203 + 1 x .00004564 + 140 x .00005036 +
35 x .00004700 + 126 x .00004873 + 84 x .00004548 +
28 x .00004716 + 42 x .00004014 + 4 x .00004259
= .02369911"

The 8 digit fractions in that calculation were all rounded -and one of the rounded numbers was actually rounded up when it should have been rounded down. Those numbers were calculated in this step:


"Category 1st Month 2nd Month 3rd Month 4th Month Probability that all are different
#1 31 31 31 31 (31/365)4 = .00005203
#2 30 30 30 30 (30/365)4 = .00004564
#3 31 31 31 30 (31/365)3 x 30/365 = .00005036
#4 31 31 31 28 (31/365)3 x 28/365 = .00004700
#5 31 31 30 30 (31/365)2 x (30/365)2 = .00004873
#6 31 31 30 28 (31/365)2 x 30/365 x 28/365 = .00004548
#7 31 30 30 30 31/365 x (30/365)3 = .00004716
#8 31 30 30 28 31/365 x (30/365)2 x 28/365 = .00004014
#9 30 30 30 28 (30/365)3 x 28/365 = .00004259"

But the author should have displayed and used more digits. For example, the #3 product is actually .0000503541, which seems like a small difference from .00005036 but it is multiplied by (140 x24) to arrive at its contribution to the final answer. This roundoff in this one number alone causes an error in the final number that is much higher than the discrepancy we are trying to resolve.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
September 16th, 2020 at 7:07:32 PM permalink
Quote: gordonm888

"Category 1st Month 2nd Month 3rd Month 4th Month Probability that all are different
#3 31 31 31 30 (31/365)3 x 30/365 = .00005036

But the author should have displayed and used more digits. For example, the #3 product is actually .0000503541, which seems like a small difference from .00005036 but it is multiplied by (140 x24) to arrive at its contribution to the final answer. This roundoff in this one number alone causes an error in the final number that is much higher than the discrepancy we are trying to resolve.


Er, even if you round 0.0000503541 to 0.00005035, the difference is only 0.00000001; multiplying it by 140 x 24 = 0.0000336, which does not make up the discrepancy.
There is another math error in there; see my post just above yours (click on the "Dontcha Just Hate Math Errors" spoiler button).
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5374
Joined: Feb 18, 2015
September 16th, 2020 at 11:10:09 PM permalink
Quote: ThatDonGuy

Quote: gordonm888

"Category 1st Month 2nd Month 3rd Month 4th Month Probability that all are different
#3 31 31 31 30 (31/365)3 x 30/365 = .00005036

But the author should have displayed and used more digits. For example, the #3 product is actually .0000503541, which seems like a small difference from .00005036 but it is multiplied by (140 x24) to arrive at its contribution to the final answer. This roundoff in this one number alone causes an error in the final number that is much higher than the discrepancy we are trying to resolve.


Er, even if you round 0.0000503541 to 0.00005035, the difference is only 0.00000001; multiplying it by 140 x 24 = 0.0000336, which does not make up the discrepancy.
There is another math error in there; see my post just above yours (click on the "Dontcha Just Hate Math Errors" spoiler button).



Yeah, I realized this after I posted it, but I am so over this issue that I didn't bother to correct it. I have spent too much time trying to reconcile your wrong calculation and Gialmere's erroneous "Official solution" and Charlie's original mistake. It was my turn to make an error.

Gilamere if you post another problem about people being born in the same month, physical violence may break out.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
September 17th, 2020 at 2:23:04 AM permalink
Quote: Gialmere

A sort of sequel to the famous birthday problem...



What is the probability that in a group of 4 people, at least 2 of them are born in the same month?

Assume a 365 day year (i.e. 28 days in February) but, apart from this caveat, use the correct probabilities for each of the months.




Here is my idea :-

A) Find the probability for all 4 people born in different month

1) Jan, Feb, March, April =====> Prob 1 = 31/365 * 28/365 * 31/365 * 30/365 * 4 ! = 19373760/365^4
2) Jan, Feb, March, May =====> Prob 2 =
.
.
.
495) Sept, Oct, Nov, Dec ====> Prob 495

B) The probability that in a group of 4 people, at least 2 of them are born in the same month = 1 - (Prob 1+ Prob 2 + . . .+ Prob 495)

LOL
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 17th, 2020 at 8:14:09 AM permalink
Quote: gordonm888

Gilamere if you post another problem about people being born in the same month, physical violence may break out.


Heh. Okay, I'll retreat back to dice...



The game Jackpot Yahtzee is played using four 6-sided dice whose faces contain slot machine symbols.

Die 1: Orange, Orange, Bell, Bell, Cherry, Dollar

Die 2: Orange, Orange, Bell, Bell, Cherry, Dollar

Die 3: Orange, Bell, Dollar, Cherry, Cherry, Cherry

Die 4: Orange, Bell, Dollar, Cherry, Cherry, Cherry

The best roll you can get is one of each symbol since this allows you to put any of the four symbols on your payline rack for the turn.

Expressed as a fraction, what is the probability that you will roll one of each type of symbol on a single throw of the dice?
Have you tried 22 tonight? I said 22.
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
Thanked by
Gialmeregordonm888
September 17th, 2020 at 8:43:26 AM permalink
Jackpot Yahtzee



O = Orange, B= Bell, D = Dollar, C = Cherry

1) OBDC ===>Prob 1 = 2/6 * 2/6 * 1/6 * 3/6 = 12/1296
2) OBCD ===>Prob 2 = 2/6 * 2/6 * 3/6 * 1/6 = 12/1296
3) ODBC ===>Prob 3 = 2/6 * 1/6 * 1/6 * 3/6 = 6/1296
4) ODCB ===>Prob 4 = 2/6 * 1/6 * 3/6 * 1/6 = 6/1296
5) OCBD ===>Prob 5 = 2/6 * 1/6 * 1/6 * 1/6 = 2/1296
6) OCDB ===>Prob 6 = 2/6 * 1/6 * 1/6 * 1/6 = 2/1296
.
.
.
.
24)CDBO===>Prob 1 = 1/6 * 1/6 * 1/6 * 1/6 = 1/1296

Prob = Prob1 + Prob2 + . . . + Prob24 = 29/324


Last edited by: ssho88 on Sep 17, 2020
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 17th, 2020 at 4:32:17 PM permalink
Quote: ssho88

Jackpot Yahtzee



O = Orange, B= Bell, D = Dollar, C = Cherry

1) OBDC ===>Prob 1 = 2/6 * 2/6 * 1/6 * 3/6 = 12/1296
2) OBCD ===>Prob 2 = 2/6 * 2/6 * 3/6 * 1/6 = 12/1296
3) ODBC ===>Prob 3 = 2/6 * 1/6 * 1/6 * 3/6 = 6/1296
4) ODCB ===>Prob 4 = 2/6 * 1/6 * 3/6 * 1/6 = 6/1296
5) OCBD ===>Prob 5 = 2/6 * 1/6 * 1/6 * 1/6 = 2/1296
6) OCDB ===>Prob 6 = 2/6 * 1/6 * 1/6 * 1/6 = 2/1296
.
.
.
.
24)CDBO===>Prob 1 = 1/6 * 1/6 * 1/6 * 1/6 = 1/1296

Prob = Prob1 + Prob2 + . . . + Prob24 = 29/324



Correct!
--------------------------

A gambler hits a huge slot jackpot.

"What are we going to spend 10 million dollars on?" asks his wife.

"31 black"
Have you tried 22 tonight? I said 22.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
September 17th, 2020 at 9:22:18 PM permalink
There’s a small off-strip casino that has the following game which costs one dollar to play.

The player bets on heads or tails and a fair coin is flipped. The game ends when the player wins a flip. He gets paid $1.00 if he wins on the first flip, $1.00/2 = $0.50 if he wins on the second, $1.00/3 = $0.33 if he wins on the third, etc.

For calculation purposes, assume payoff amounts are exact (no rounding)

What is the house edge?
It’s all about making that GTA
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
September 17th, 2020 at 9:41:35 PM permalink
Quote: Ace2

There’s a small off-strip casino that has the following game which costs one dollar to play.

The player bets on heads or tails and a fair coin is flipped. The game ends when the player wins a flip. He gets paid $1.00 if he wins on the first flip, $1.00/2 = $0.50 if he wins on the second, $1.00/3 = $0.33 if he wins on the third, etc.

For calculation purposes, assume payoff amounts are exact (no rounding)

What is the house edge?





HE = 1 - ( 0.5 + 0.5^2 *1/2+ 0.5^3 *1/3+ 0.5^4 *1/4+ 0.5^5 *1/5+ 0.5^6 *1/6 . . . . . . . ) =1-∑0.5^n/n = 1 - ln2 = 0.306852821738692,
where n = 1 to infinity.


Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
September 18th, 2020 at 8:34:12 PM permalink
Quote: ssho88



HE = 1 - ( 0.5 + 0.5^2 *1/2+ 0.5^3 *1/3+ 0.5^4 *1/4+ 0.5^5 *1/5+ 0.5^6 *1/6 . . . . . . . ) =1-∑0.5^n/n = 1 - ln2 = 0.306852821738692,
where n = 1 to infinity.


Correct. I forgot about that series...I solved it by integrating (1/e^x)*(1-1/e^x)*1/x from zero to infinity, which is Ln(2)
It’s all about making that GTA
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 19th, 2020 at 8:07:06 AM permalink


If you roll a pair of dice, the probability of getting midnight is 1/36.

How many times do you need to throw a pair of dice so that the chances of getting midnight is more than 50%?
Have you tried 22 tonight? I said 22.
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
September 19th, 2020 at 8:15:51 AM permalink
Define midnight please?
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 19th, 2020 at 8:18:00 AM permalink
Quote: rsactuary

Define midnight please?


12, double six, boxcars
Have you tried 22 tonight? I said 22.
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
September 19th, 2020 at 8:23:55 AM permalink
Quote: Gialmere

12, double six, boxcars



Interesting, I've never heard that term before. thanks
rsactuary
rsactuary
  • Threads: 29
  • Posts: 2315
Joined: Sep 6, 2014
Thanked by
Gialmere
September 19th, 2020 at 8:29:44 AM permalink
There are different ways to interpret your question, I think. But based on my interpretation, I get 25.
unJon
unJon
  • Threads: 16
  • Posts: 4806
Joined: Jul 1, 2018
Thanked by
Gialmere
September 19th, 2020 at 8:53:30 AM permalink
Quote: Gialmere



If you roll a pair of dice, the probability of getting midnight is 1/36.

How many times do you need to throw a pair of dice so that the chances of getting midnight is more than 50%?



(35/36)^n = 0.5

n * ln(35/36) = ln(0.5)

n = 24.6

So 25 rolls
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 19th, 2020 at 12:10:35 PM permalink
Quote: rsactuary

There are different ways to interpret your question, I think. But based on my interpretation, I get 25.


Quote: unJon

(35/36)^n = 0.5

n * ln(35/36) = ln(0.5)

n = 24.6

So 25 rolls


Correct!

Very good. You'd think off hand it'd be 18 rolls, but it ain't.

Note that this solve is similar to the birthday puzzles.

-------------------------------------------

Have you tried 22 tonight? I said 22.
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
September 19th, 2020 at 6:29:27 PM permalink
Quote: Gialmere



If you roll a pair of dice, the probability of getting midnight is 1/36.

How many times do you need to throw a pair of dice so that the chances of getting midnight is more than 50%?



I guess you should change your question to .... chances of getting AT LEAST a "midnight " is more than 50%.

Am I missing something?
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
September 19th, 2020 at 6:41:40 PM permalink
Seems some of you are splitting hairs.

What is ambiguous about the midnight problem ?
It’s all about making that GTA
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27117
Joined: Oct 14, 2009
September 19th, 2020 at 7:19:35 PM permalink
Quote: Ace2

Seems some of you are splitting hairs.

What is ambiguous about the midnight problem ?



I understood what was being asked from the wording.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
unJon
unJon
  • Threads: 16
  • Posts: 4806
Joined: Jul 1, 2018
September 19th, 2020 at 9:02:07 PM permalink
Quote: ssho88

Quote: Gialmere



If you roll a pair of dice, the probability of getting midnight is 1/36.

How many times do you need to throw a pair of dice so that the chances of getting midnight is more than 50%?



I guess you should change your question to .... chances of getting AT LEAST a "midnight " is more than 50%.

Am I missing something?



I think the problem works as written. Solve for how many rolls until you have a 50% chance of getting your first midnight, and see if you get a different answer . . .
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
September 19th, 2020 at 9:43:34 PM permalink
Quote: Ace2

Seems some of you are splitting hairs.

What is ambiguous about the midnight problem ?



English is not my mother tongue, so the question is clear and correct but I can't understand it well, sorry about that.
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
September 19th, 2020 at 10:12:06 PM permalink
Quote: unJon

Quote: ssho88

Quote: Gialmere



If you roll a pair of dice, the probability of getting midnight is 1/36.

How many times do you need to throw a pair of dice so that the chances of getting midnight is more than 50%?



I guess you should change your question to .... chances of getting AT LEAST a "midnight " is more than 50%.

Am I missing something?



I think the problem works as written. Solve for how many rolls until you have a 50% chance of getting your first midnight, and see if you get a different answer . . .




I will solve it this way :-
1 - Prob(WITHOUT MIDNIGHT) > 0.5
1 - (35/36)^n > 0..5
(35/36)^n < 0.5
n*ln(35/36) < ln(0.5)
n*(-0.02817) < -0.69315
n> 24.61
n = 25


IF the 50% chance change to 40% chance, then :-
1 - Prob(WITHOUT MIDNIGHT) > 0.4 ------------------Formula 1
1 - (35/36)^n > 0..4
(35/36)^n < 0.6
n*ln(35/36) < ln(0.6)
n*(-0.02817) < -0.5108
n> 18.13
n = 19


IF Formula 1 is correct, then it means AT LEAST a "midnight" . . . . .

I am nobody, just for discussion purpose, NO OFFENCE.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
September 19th, 2020 at 11:15:15 PM permalink
What is your native language, Sho88?
It’s all about making that GTA
ssho88
ssho88
  • Threads: 58
  • Posts: 682
Joined: Oct 16, 2011
September 19th, 2020 at 11:30:10 PM permalink
Quote: Ace2

What is your native language, Sho88?



Mandarin
unJon
unJon
  • Threads: 16
  • Posts: 4806
Joined: Jul 1, 2018
September 20th, 2020 at 7:03:17 AM permalink
Quote: ssho88

Quote: unJon

Quote: ssho88

Quote: Gialmere



If you roll a pair of dice, the probability of getting midnight is 1/36.

How many times do you need to throw a pair of dice so that the chances of getting midnight is more than 50%?



I guess you should change your question to .... chances of getting AT LEAST a "midnight " is more than 50%.

Am I missing something?



I think the problem works as written. Solve for how many rolls until you have a 50% chance of getting your first midnight, and see if you get a different answer . . .




I will solve it this way :-
1 - Prob(WITHOUT MIDNIGHT) > 0.5
1 - (35/36)^n > 0..5
(35/36)^n < 0.5
n*ln(35/36) < ln(0.5)
n*(-0.02817) < -0.69315
n> 24.61
n = 25


IF the 50% chance change to 40% chance, then :-
1 - Prob(WITHOUT MIDNIGHT) > 0.4 ------------------Formula 1
1 - (35/36)^n > 0..4
(35/36)^n < 0.6
n*ln(35/36) < ln(0.6)
n*(-0.02817) < -0.5108
n> 18.13
n = 19


IF Formula 1 is correct, then it means AT LEAST a "midnight" . . . . .

I am nobody, just for discussion purpose, NO OFFENCE.

Yes this is correct. But here I think getting at least one midnight is same as getting first midnight or getting midnight to a native English speaker. Implication is you stop after getting a midnight and what is the median number of rolls you stop after.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 20th, 2020 at 9:16:59 AM permalink


If consonants are free, determine the various values of the five vowels A, E, I, O, and U from the following clues:

Audacious costs $260
Equivocation costs $340
Inimitable costs $255
Onomatopoeia costs $435
Unambiguous costs $225
Have you tried 22 tonight? I said 22.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
Thanked by
Gialmere
September 20th, 2020 at 2:35:30 PM permalink
Quote: Gialmere

If consonants are free, determine the various values of the five vowels A, E, I, O, and U from the following clues:

Audacious costs $260
Equivocation costs $340
Inimitable costs $255
Onomatopoeia costs $435
Unambiguous costs $225



Simple case of five equations in five unknowns

A = 60
E = 75
I = 40
O = 50
U = 25

Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 20th, 2020 at 9:54:46 PM permalink
Quote: ThatDonGuy

Simple case of five equations in five unknowns

A = 60
E = 75
I = 40
O = 50
U = 25


Correct!
--------------------------------

I watch Jeopardy and Wheel of Fortune every night now which is weird because I don't remember turning 74 years old.

Of all the jobs made obsolete by technology, you’d think Vanna White’s would have been among the first.
Have you tried 22 tonight? I said 22.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3047
Joined: Nov 26, 2018
September 21st, 2020 at 8:24:42 AM permalink


Solve the KenDoku above.

Similar to Sudoku, the puzzle consists of a grid containing blocks surrounded by bold lines.

The object is to fill all of the empty squares so that the numbers 1 to 5 appear exactly once in each row and column.

The numbers in each block must produce the result shown in the top left corner of the block using addition. For example, the numbers in the three-square block in the upper left must add up to 9.
Have you tried 22 tonight? I said 22.
ThatDonGuy
ThatDonGuy
  • Threads: 122
  • Posts: 6737
Joined: Jun 22, 2011
Thanked by
Gialmere
September 21st, 2020 at 10:16:47 AM permalink

Label the rows A-E from top to bottom, and the columns 1-5 from left to right

Numbers in curly braces can be in any order

B1-D1 is {1 2 4}
C3-C5 is {3 4 5}
D4-D5 is {1 3}
E1-E3 is {2 4 5}

A1-A3 is {1 3 5} or {2 3 4}
A5-B5 is {1 4} or {2 3}
C2-D3 is {1 4 1} or {1 2 3}
D5-E5 is {1 5} or {2 4}

If A5-B5 is {4 1}, D5-E5 cannot be any valid pair
Therefore A5-B5 is {2 3} and D5-E5 is {1 5}, which means C5 = 4,
which mens C2-D3 cannot be {1 4 1}, so it must be {1 2 3}
C2 cannot be 3, so either D2 or D3 = 3, which means D4 cannot be 3,
which means D4 = 1 and D5 = 3
Since E1-E4 have 2, 3, 4, and 5 in them, E5 = 1, which means D5 = 5
Since D4 = 1, D2 and D3 cannot be 1, so C2 = 1
Since C2-C5 have 1, 3, 4, and 5 in them, C3 = 2
C4 cannot be 1, 2, 3, or 4, so it is 5, and C3 = 3
This means that A4-B4 are {2 4}, so B3 = 5
Also, since B2 = 4, B4 cannot be 4, so it is 2, and A4 = 4
B2 cannot be 1, 4, 5, or 2, so it is 3, and A5 = 2; also, B1 = 1, so D1 = 4
D3 cannot be 4, 1, 5, or 3, so it is 2, and D2 = 3
E3 cannot be 5, 3, 2, or 1, so it is 4, and A3 = 1
A2 cannot be 4, 1, 3, or 2, so it is 5, and A1 = 3, which means E1 = 5 and E2 = 2

Each row, from left to right:
3 5 1 4 2
1 4 5 2 3
2 1 3 5 4
4 3 2 1 5
5 2 4 3 1
The solution is unique

  • Jump to: