Thread Rating:

nick
nick
  • Threads: 1
  • Posts: 4
Joined: Jan 1, 2010
January 18th, 2010 at 7:52:20 AM permalink
My question is based on dice odds. I know that there are 6 ways to get 7 and 1 way to get 12 but what are the chances of getting 6 sevens before 1 twelve. Are they even and if not how many 12s should be added to the equation to make it an even proposition?

Thank you
NIck
pacomartin
pacomartin
  • Threads: 649
  • Posts: 7895
Joined: Jan 14, 2010
January 18th, 2010 at 9:56:57 AM permalink
Unfortunately I don't have time to figure that out right now. However, you must set up a Markov transition matrix to cover the situation. You can't do this problem with an algebraic formula. It's much more complex than that.
DJTeddyBear
DJTeddyBear
  • Threads: 207
  • Posts: 10992
Joined: Nov 2, 2009
January 18th, 2010 at 10:23:00 AM permalink
Intuition says the odds of hitting a 6 in 36 event six times before hitting a 1 in 36 event just once should be 50%.

I GOTTA be missing something. Or am I?
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, childish, irrational rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
cclub79
cclub79
  • Threads: 35
  • Posts: 1147
Joined: Dec 16, 2009
January 18th, 2010 at 10:26:30 AM permalink
I think it would be the chances of a 7 aren't 6/36, but 6/7, since you are ignoring everything but 7s and 12s.
DJTeddyBear
DJTeddyBear
  • Threads: 207
  • Posts: 10992
Joined: Nov 2, 2009
January 18th, 2010 at 10:31:46 AM permalink
cclub is commenting on a rather long post that I had up for about 2 minutes before I realized that I was completely out of my mind.
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, childish, irrational rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
cclub79
cclub79
  • Threads: 35
  • Posts: 1147
Joined: Dec 16, 2009
January 18th, 2010 at 10:36:19 AM permalink
You weren't out of your mind; I think you had it exactly right in your equation except replace (6/36) ^ 6 with (6/7) ^ 6.
DJTeddyBear
DJTeddyBear
  • Threads: 207
  • Posts: 10992
Joined: Nov 2, 2009
January 18th, 2010 at 10:39:42 AM permalink
Yeah, ignore everything but 7 and 12, and the odds of a 7 are 6/7 = 85.7% while the odds of a 12 are 1/6 = 14.3%. That adds up to 100%. Cool.

---

The odds of any 7 six times in a row seems to be 85.7% ^ 6 = 39.7%
The odds of hitting a 12 once in 6 tries seems to be 14.3% * 6 = 85.7%

The obvious problem is that it adds up to more than 100%


Back to the drawing board....
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, childish, irrational rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
DJTeddyBear
DJTeddyBear
  • Threads: 207
  • Posts: 10992
Joined: Nov 2, 2009
January 18th, 2010 at 10:52:56 AM permalink
Quote: DJTeddyBear

The odds of hitting a 12 once in 6 tries seems to be 14.3% * 6 = 85.7%

That's where my error is.


Since the problem is resolved prior to six throws once a 12 shows up in the first 5 throws, you have to either create a very complex formula that takes that into account, or calculate for the event that requires all six throws and subtract from 100%

I.E. The odds of hitting six 7s in a row, an event that requires all six throws to resolve, is ( 6 / 7 ) ^ 6 = 39.7%
Therefore the odds of NOT doing that, i.e. hitting AT LEAST one 12 in those six throws, is 100% - 39.7% = 60.3%


THEREFORE: Bet on 12.
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, childish, irrational rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
stephen
stephen
  • Threads: 1
  • Posts: 28
Joined: Jan 5, 2010
January 18th, 2010 at 11:13:57 AM permalink
DJTeddyBear is correct. I verified it with a simple script that ran through a few million iterations and my experimental results matched his derived ones perfectly.
DorothyGale
DorothyGale
  • Threads: 40
  • Posts: 639
Joined: Nov 23, 2009
January 18th, 2010 at 12:54:23 PM permalink
Quote: nick

My question is based on dice odds. I know that there are 6 ways to get 7 and 1 way to get 12 but what are the chances of getting 6 sevens before 1 twelve. Are they even and if not how many 12s should be added to the equation to make it an even proposition?

Thank you
NIck



Interesting question. I didn't feel like tacking it direcctly, because a simple simulator was about a two minute programming project. Here are the results of a simulation of one billion (1,000,000,000) rolls of the dice for four separate cases.

Here are the simulation results for four 7's vs. one 12 --
Number of times four 7's came up before a 12: 32581424
Number of times a 12 came up before four 7's: 27768376

Here are the simulation results for nine 7's vs. two 12's --
Number of times nine 7's came up before two 12's: 13442654
Number of times two 12's came up before nine 7's: 10107307

Here are the simulation results for five 7's vs. one 12 --
Number of times five 7's came up before a 12: 23914613
Number of times a 12 came up before five 7's: 27781426

Here are the simulation results for six 7's vs. one 12 --
Number of times six 7's came up before a 12: 18256704
Number of times a 12 came up before six 7's: 27781741


Here is the sloppy C code for the latter of these four simulations. I did not audit or double check this code:


#include
#include
#include

main() {
int d1, d2, s; // dice and dice sum
int noS = 0, noT = 0; // counters for sevens and twelves
int ctr, x = 0, y = 0; // other counters

srand(time(NULL));

x = 0;
y = 0;

for (ctr = 0; ctr < 1000000000; ctr++) {
if (ctr%1000000 == 0)
fprintf(stderr, "%d\r", ctr);

d1 = rand()%6+1;
d2 = rand()%6+1;
s = d1+d2;
if (s == 7)
x++;
if (s == 12)
y++;

if (x == 6) {
noS++;
x = 0;
y = 0;
}
if (y == 1) {
noT++;
x = 0;
y = 0;
}
}

printf("\n");
printf("Number of times six 7's came up before a 12: %d\n", noS);
printf("Number of times a 12 came up before six 7's: %d\n", noT);
}


--Dorothy
"Who would have thought a good little girl like you could destroy my beautiful wickedness!"
DorothyGale
DorothyGale
  • Threads: 40
  • Posts: 639
Joined: Nov 23, 2009
January 18th, 2010 at 1:38:52 PM permalink
Quote: nick

... how many 12s should be added to the equation to make it an even proposition?



I've played around with my program to answer this more formal version of your question: Assume the probability of getting X sevens before Y twelves is approximately 0.5. Solve for integer values of X and Y.

I tried values through Y = 6 and was not able to get an implied integer solution for X.

For example, this code examines the problem with X = 34 and Y = 6, 100M rounds:


#include
#include
#include

main() {
int s, d1, d2;
int noS = 0, noT = 0;
int ctr, x = 0, y = 0;

srand(time(NULL));

x = 0;
y = 0;

for (ctr = 0; ctr < 100000000; ctr++) {
if (ctr%1000000 == 0)
fprintf(stderr, "%d\r", ctr);

d1 = rand()%6+1;
d2 = rand()%6+1;
s = d1+d2;

if (s == 7)
x++;

if (s == 12)
y++;

// input value of x 7's before y 12's
if (x == 34) {
noS++;
x = 0;
y = 0;
}

// input value of y 12's before x 7's
if (y == 6) {
noT++;
x = 0;
y = 0;
}
}

printf("\n");
printf("Number of times 7's completed first: %d\n", noS);
printf("Number of times 12's completed first: %d\n", noT);
}

->OUTPUT->
Number of times 7's completed first: 294860
Number of times 12's completed first: 283584



--Dorothy
"Who would have thought a good little girl like you could destroy my beautiful wickedness!"
nick
nick
  • Threads: 1
  • Posts: 4
Joined: Jan 1, 2010
January 18th, 2010 at 3:47:58 PM permalink
Thanks for your reply. Basically you are agreeing that it is approximately even odds whether you get 6 consecutive 7s or 1 12 before those 6 7s are thrown, I was thinking that since there are 7 possibilities,with six ways to make 7 and one way to make 12, it would be figured by (6/7)* itself until about 1/2 would be the product. In this case I believe it's (6/7)(6/7)(6/7)(6/7)which is 1296/2401.Which means it's closer to 4 to 1 rather than 6 to 1, and to bring it to even, the proposition would have to be whether 4 consecutive 7s vs. 1 12 would be an even bet. I say consecutive because I'm discounting any other number rolled as irrelevant.
nick
DorothyGale
DorothyGale
  • Threads: 40
  • Posts: 639
Joined: Nov 23, 2009
January 18th, 2010 at 4:11:50 PM permalink
Quote: nick

Basically you are agreeing that it is approximately even odds whether you get 6 consecutive 7s or 1 12 before those 6 7s are thrown



I'm not saying this in the least. Here are the results of my simulation in this case, as posted above:

Number of times six 7's came up before a 12: 18256704
Number of times a 12 came up before six 7's: 27781741

You can see that it is much more likely that a 12 will be rolled than rolling six 7's.

Also, in your original post you did not say "consecutive." Here is the text of your question:

Quote: nick

what are the chances of getting 6 sevens before 1 twelve.


You simply asked for the probability of rolling six 7's before a 12 was rolled.

Using the numbers from my simulation, the probabilities are about:

Probability of rolling six 7's before a 12 is rolled: 39.655%
Probability of rolling a 12 before rolling six 7's are rolled: 60.345%

This isn't close to 50%.

Again, I am not agreeing with you in any respect here.

--Dorothy
"Who would have thought a good little girl like you could destroy my beautiful wickedness!"
Wizard
Administrator
Wizard
  • Threads: 1491
  • Posts: 26432
Joined: Oct 14, 2009
January 18th, 2010 at 5:07:37 PM permalink
I know this has been said before, but here is how I plan to answer this in a future "ask the wizard" column:

The probability of rolling a 7 is 1/6, and the probability of rolling a 12 is 1/36. The probability of rolling a 7, given that a roll is a 7 or 12 is (1/6)/((1/6)+(1/36)) = 6/7. So the probability that the first six times a 6 or 12 is rolled it is a 6 every time is (6/7)^6 = 39.66%.

If you rephrase the question to be what is the probability of rolling five sixes before a 12, then the answer is (6/7)^5 = 46.27%. With four rolls it is (6/7)^4 = 53.98%. So there is no number that is exactly 50/50. If you're looking for a good sucker bet, suggest you can either roll four sevens before a twelve, or a twelve before five sevens.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
DJTeddyBear
DJTeddyBear
  • Threads: 207
  • Posts: 10992
Joined: Nov 2, 2009
January 19th, 2010 at 4:46:50 AM permalink
Quote: DJTeddyBear

The odds of hitting six 7s in a row, an event that requires all six throws to resolve, is ( 6 / 7 ) ^ 6 = 39.7%
Therefore the odds of NOT doing that, i.e. hitting AT LEAST one 12 in those six throws, is 100% - 39.7% = 60.3%

Quote: Wizard

...the probability that the first six times a 7 or 12 is rolled it is a 7 every time is (6/7)^6 = 39.66%

I underlined and fixed your typos.


Woo hoo! I DID have the right answer (eventually).

Thanks for the confirmation, Wiz!


I really enjoyed stretching out my brain muscle on this one. :)
I invented a few casino games. Info: http://www.DaveMillerGaming.com/ ————————————————————————————————————— Superstitions are silly, childish, irrational rituals, born out of fear of the unknown. But how much does it cost to knock on wood? 😁
boymimbo
boymimbo
  • Threads: 17
  • Posts: 5994
Joined: Nov 12, 2009
January 19th, 2010 at 8:30:19 AM permalink
Quote: nick

My question is based on dice odds. I know that there are 6 ways to get 7 and 1 way to get 12 but what are the chances of getting 6 sevens before 1 twelve. Are they even and if not how many 12s should be added to the equation to make it an even proposition?

Thank you
NIck



Simplify your equation to a seven sided dice with 1 12 and 6 sevens.

The odds of rolling 6 7s before a 12 is (6/7)^6 = 39.657%.
The odds of rolling 5 7s before a 12 is (6/7)^5 = 46.266%
The odds of rolling 4 7s before a 12 is (4/7)^4 = 53.977%
----- You want the truth! You can't handle the truth!
nick
nick
  • Threads: 1
  • Posts: 4
Joined: Jan 1, 2010
January 19th, 2010 at 9:35:58 AM permalink
Thank you all for your input.I apologize for the "consecutive" confusion. It would seem from your analyses,therefore, that if I upped the number to 9 sevens vs. 2 twelves it would be an even bet;and to extend the logic even further, and I'm not sure it would hold, would it also be an even bet if I substituted one 11 for two 12s since there are two ways to make 11 and only one way to make 12?And if I used the number 10 , would the math be (6/9)(6/9) = close to a two to one bet?.
nick
nick
  • Threads: 1
  • Posts: 4
Joined: Jan 1, 2010
January 21st, 2010 at 11:33:14 AM permalink
It looks like two 12's and eight 7's would be the answer; but that's like one 12 and four 7's. Do you think there's a different dynamic with more numbers ? And to repeat the other thought what about 7's vs. a number 11 ,for example, which has two ways of being made or a number 10 which can be made three ways?
nick
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 11th, 2018 at 10:20:08 PM permalink
Quote: nick

that if I upped the number to 9 sevens vs. 2 twelves it would be an even bet

no
it would not be an even bet

I have this for
nine 7s B4 two 12s: 0.570822175
two 12s B4 nine 7s: 0.429177825
average number of rolls to either: 42.46

to get closer, maybe, we need to go to
ten 7s and two 12s

ten 7s B4 two 12s: 0.519855909
two 12s B4 ten 7s: 0.480144091
average number of rolls to either: 45.58

Markov chain was used
might be possible to extend this using more 7s...
looking to see if this could be done another way (maybe in a calculator)

not much found about this type of question
for a general solution
Sally
I Heart Vi Hart
mustangsally
mustangsally
  • Threads: 25
  • Posts: 2463
Joined: Mar 29, 2011
July 15th, 2018 at 10:06:45 AM permalink
Quote: pacomartin

Unfortunately I don't have time to figure that out right now. However, you must set up a Markov transition matrix to cover the situation. You can't do this problem with an algebraic formula. It's much more complex than that.

You can do this problem with an algebraic formula. the method (and formula) is a Poisson processes
that can be found in the book "Introduction to Probability Models Ninth Edition" by Sheldon M. Ross
on page 316.
This is true IF and only IF one is after an event before another event or events and NOT an event and another event (like the popular 2 dice roll a 6 and 8 before two 7s question and bar bet found here: https://wizardofodds.com/ask-the-wizard/179/)

*****
these type of questions can be seen as a 'race' between two independent events
in other words, which 'event' happens first in a series of trials.
I changed the formula a little to using the probabilities instead of the mean time for dice examples only

R code here and
online section 1r.
https://sites.google.com/view/krapstuff/dice/dice-probability-math

headsBeforeTails <- function(heads,pheads,tails,ptails){
pTotal <- pheads+ptails
k <- heads:(heads+tails-1)
prob <- sum(choose(heads+tails-1,k)*(pheads/pTotal)^k *(ptails/pTotal)^(heads+tails-1-k))
print(formatC(prob, digits=8),quote=FALSE)
print(formatC(1-prob, digits=8),quote=FALSE)
}
> headsBeforeTails(2,10/36,2,6/36)# two 6s or 8s before two 7s
[1] 0.68359375
[1] 0.31640625

as can be seen a different question and result from "roll a 6 and 8 before two 7s"

the OP in this thread can easily be solved using the formula (and a Markov chain also, but that does require a little more time)
Quote: nick

if I upped the number to 9 sevens vs. 2 twelves it would be an even bet;
and to extend the logic even further, and I'm not sure it would hold, would it also be an even bet if I substituted one 11 for two 12s since there are two ways to make 11 and only one way to make 12?
And if I used the number 10 , would the math be (6/9)(6/9) = close to a two to one bet?.

review
> headsBeforeTails(9,6/36,2,1/36)# nine 7s before 2 twelves
[1] 0.57082217
[1] 0.42917783
> headsBeforeTails(9,6/36,1,2/36)# nine 7s before 1 eleven
[1] 0.075084686
[1] 0.92491531
> headsBeforeTails(9,6/36,1,3/36)# nine 7s before 1 ten
[1] 0.026012295
[1] 0.97398771


Quote: nick

It looks like two 12's and eight 7's would be the answer; but that's like one 12 and four 7's.

well,
> headsBeforeTails(8,6/36,2,1/36)# eight 7s before 2 twelves
[1] 0.62433675
[1] 0.37566325
> headsBeforeTails(6,6/36,1,1/36)# six 7s before 1 twelve
[1] 0.39656946
[1] 0.60343054
> headsBeforeTails(5,6/36,1,1/36)# five 7s before 1 twelve
[1] 0.46266437
[1] 0.53733563
> headsBeforeTails(4,6/36,1,1/36)# four 7s before 1 twelve
[1] 0.53977509
[1] 0.46022491
> headsBeforeTails(3,6/36,1,1/36)# three 7s before 1 twelve
[1] 0.62973761
[1] 0.37026239

Quote: nick

Do you think there's a different dynamic with more numbers ?

should be just thinking about it.
of course probability can throw one a 'curve ball' just when we think we have thought it out!
how about X {4,5,6,8,9 or 10} before two 7s?
> headsBeforeTails(8,24/36,2,6/36)#place{4,5,6,8,9 or 10} B4 two 7s
[1] 0.43620762
[1] 0.56379238
> headsBeforeTails(7,24/36,2,6/36)#place B4
[1] 0.50331648
[1] 0.49668352
> headsBeforeTails(6,24/36,2,6/36)#place B4
[1] 0.5767168
[1] 0.4232832
> headsBeforeTails(5,24/36,2,6/36)#place B4
[1] 0.65536
[1] 0.34464
> headsBeforeTails(4,24/36,2,6/36)#place B4
[1] 0.73728
[1] 0.26272
> headsBeforeTails(3,24/36,2,6/36)#place B4
[1] 0.8192
[1] 0.1808
> headsBeforeTails(2,24/36,2,6/36)#place B4
[1] 0.896
[1] 0.104


the choices look endless (thinking about more dice)
Sally

added:
(like the popular 2 dice roll a 6 and 8 before two 7s question and bar bet found here: https://wizardofodds.com/ask-the-wizard/179/)

this can be solved using a different formula (requires calculus)adjusting one from here:
https://wizardofvegas.com/forum/questions-and-answers/math/22096-one-die-question/5/

a Markov chain or brute force (like the Wizard did enumerating all the possible winning outcomes... a time breaker for a 'race' with more events.)

another day for that!
Last edited by: mustangsally on Jul 15, 2018
I Heart Vi Hart
ThatDonGuy
ThatDonGuy
  • Threads: 117
  • Posts: 6218
Joined: Jun 22, 2011
July 15th, 2018 at 11:38:12 AM permalink
Quote: mustangsally

You can do this problem with an algebraic formula. the method (and formula) is a Poisson processes
that can be found in the book "Introduction to Probability Models Ninth Edition" by Sheldon M. Ross on page 316.


Link to the 10th edition
  • Jump to: