Finding the probability of winning an interrupted game.
I came across this question in James Stewart's Probability and Statistics (page 80, question 3).
The Question:
A game between two players consists of tossing a coin. Player A gets a point if the coin shows heads, and Player B gets a point if it shows tails. The first player to get six points wins an $8000 jackpot. As it happens, the police raid the place when player A has five points and B has three points. After everyone has calmed down, how should the jackpot be divided between the two players? In other words, what is the probability of A winning if the game were to continue?
The French mathematicians Pascal and Fermat corresponded about this problem, and both
came to the same correct conclusion (though by very different reasonings). Their friend
Roberval disagreed with both of them. He argued that Player A has probability of winning,
because the game can end in the four ways H, TH, TTH, TTT, and in three of these, A wins.
Roberval’s reasoning was wrong.
My Attempt:
My reasoning to solve this question is similar to that of Roberval's. Since the game can end in 4 ways, out of which 3 ways are favorable for A, the winning probability of A should be 3/4. But, then I tried to stimulate the playing conditions using a C++ program below:
#include <iostream>
#include <stdlib.h>
using namespace std;
void play();
void aScores();
long int a = 5, b = 3, i;
int r;
float aWins = 0.0, bWins = 0.0, n = 10000.0;
/*
n is the number of times the program simulates the situation.
a denotes Player A. According to initial conditions A has 5 points.
b denotes Player B. According to initial conditions B has 3 points.
r stores the random number.
A scores a point if the random number is even.
B scores a point if the random number is odd.
The first player to score 6 points wins.
aWins and bWins count the number of wins Player A and Player B gets respectively.
*/
int main()
{
for (i = 0; i < n; i++)
{
cout << "nNEW RUN-----------------------------------------n";
play();
if (a == 6)
aScores();
else
{ //b=4
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=5
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=6
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
bWins++;
cout << " B wins.n";
a = 5;
b = 3;
}
}
}
}
float aPer, bPer; // stores the percentage of winnings of both players.
aPer = (aWins / n) * 100;
bPer = (bWins / n) * 100;
cout << "nA wins " << aWins << " times. (" << aPer << ")%" << endl;
cout << "B wins " << bWins << " times. (" << bPer << ")%" << endl;
return 0;
}
void play()
{
r = rand();
cout << " Random no:" << r << endl;
if (r % 2 == 0) //denotes head, A scores
a++;
else //denotes tail, B scores
b++;
}
void aScores()
{
cout << " A socres a point. n A = " << a << "n B = " << b << endl;
aWins++;
cout << " A wins.n";
a = 5;
b = 3;
}
On running the program for few values of n I got the following results:
| Values of n | A wins | B wins | Winning Percentage of A |
| -------------: | ------------: | ------------: | :---------------------: |
| 1,000 | 887 | 113 | 88.700 |
| 10,000 | 8,754 | 1,246 | 87.540 |
| 100,000 | 87,445 | 12,555 | 87.440 |
| 1,000,000 | 874,772 | 125,228 | 87.477 |
| 1,000,000,000 | 874,995,405 | 125,004,595 | 87.499 |
| 10,000,000,000 | 8,749,967,956 | 1,250,032,044 | 87.499 |
The probability of A winning the game is more than my expected 0.75.
Please elaborate how to calculate the probability of Player A winning the game correctly.
probability conditional-probability
add a comment |
I came across this question in James Stewart's Probability and Statistics (page 80, question 3).
The Question:
A game between two players consists of tossing a coin. Player A gets a point if the coin shows heads, and Player B gets a point if it shows tails. The first player to get six points wins an $8000 jackpot. As it happens, the police raid the place when player A has five points and B has three points. After everyone has calmed down, how should the jackpot be divided between the two players? In other words, what is the probability of A winning if the game were to continue?
The French mathematicians Pascal and Fermat corresponded about this problem, and both
came to the same correct conclusion (though by very different reasonings). Their friend
Roberval disagreed with both of them. He argued that Player A has probability of winning,
because the game can end in the four ways H, TH, TTH, TTT, and in three of these, A wins.
Roberval’s reasoning was wrong.
My Attempt:
My reasoning to solve this question is similar to that of Roberval's. Since the game can end in 4 ways, out of which 3 ways are favorable for A, the winning probability of A should be 3/4. But, then I tried to stimulate the playing conditions using a C++ program below:
#include <iostream>
#include <stdlib.h>
using namespace std;
void play();
void aScores();
long int a = 5, b = 3, i;
int r;
float aWins = 0.0, bWins = 0.0, n = 10000.0;
/*
n is the number of times the program simulates the situation.
a denotes Player A. According to initial conditions A has 5 points.
b denotes Player B. According to initial conditions B has 3 points.
r stores the random number.
A scores a point if the random number is even.
B scores a point if the random number is odd.
The first player to score 6 points wins.
aWins and bWins count the number of wins Player A and Player B gets respectively.
*/
int main()
{
for (i = 0; i < n; i++)
{
cout << "nNEW RUN-----------------------------------------n";
play();
if (a == 6)
aScores();
else
{ //b=4
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=5
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=6
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
bWins++;
cout << " B wins.n";
a = 5;
b = 3;
}
}
}
}
float aPer, bPer; // stores the percentage of winnings of both players.
aPer = (aWins / n) * 100;
bPer = (bWins / n) * 100;
cout << "nA wins " << aWins << " times. (" << aPer << ")%" << endl;
cout << "B wins " << bWins << " times. (" << bPer << ")%" << endl;
return 0;
}
void play()
{
r = rand();
cout << " Random no:" << r << endl;
if (r % 2 == 0) //denotes head, A scores
a++;
else //denotes tail, B scores
b++;
}
void aScores()
{
cout << " A socres a point. n A = " << a << "n B = " << b << endl;
aWins++;
cout << " A wins.n";
a = 5;
b = 3;
}
On running the program for few values of n I got the following results:
| Values of n | A wins | B wins | Winning Percentage of A |
| -------------: | ------------: | ------------: | :---------------------: |
| 1,000 | 887 | 113 | 88.700 |
| 10,000 | 8,754 | 1,246 | 87.540 |
| 100,000 | 87,445 | 12,555 | 87.440 |
| 1,000,000 | 874,772 | 125,228 | 87.477 |
| 1,000,000,000 | 874,995,405 | 125,004,595 | 87.499 |
| 10,000,000,000 | 8,749,967,956 | 1,250,032,044 | 87.499 |
The probability of A winning the game is more than my expected 0.75.
Please elaborate how to calculate the probability of Player A winning the game correctly.
probability conditional-probability
Hint: the only way $B$ can win is if the coin comes up $T$ three times in a row.
– lulu
Nov 28 '18 at 21:29
In that case, B can win only once out of four possible outcomes (since the possible outcomes are H,TH,TTH and TTT ). As I explained in the question this reasoning is flawed.
– Azelf
Nov 28 '18 at 21:41
No. The probability of getting $TTT$ is $frac 18$. Thus, $B$ has only a $frac 18$ chance of winning.
– lulu
Nov 29 '18 at 1:11
add a comment |
I came across this question in James Stewart's Probability and Statistics (page 80, question 3).
The Question:
A game between two players consists of tossing a coin. Player A gets a point if the coin shows heads, and Player B gets a point if it shows tails. The first player to get six points wins an $8000 jackpot. As it happens, the police raid the place when player A has five points and B has three points. After everyone has calmed down, how should the jackpot be divided between the two players? In other words, what is the probability of A winning if the game were to continue?
The French mathematicians Pascal and Fermat corresponded about this problem, and both
came to the same correct conclusion (though by very different reasonings). Their friend
Roberval disagreed with both of them. He argued that Player A has probability of winning,
because the game can end in the four ways H, TH, TTH, TTT, and in three of these, A wins.
Roberval’s reasoning was wrong.
My Attempt:
My reasoning to solve this question is similar to that of Roberval's. Since the game can end in 4 ways, out of which 3 ways are favorable for A, the winning probability of A should be 3/4. But, then I tried to stimulate the playing conditions using a C++ program below:
#include <iostream>
#include <stdlib.h>
using namespace std;
void play();
void aScores();
long int a = 5, b = 3, i;
int r;
float aWins = 0.0, bWins = 0.0, n = 10000.0;
/*
n is the number of times the program simulates the situation.
a denotes Player A. According to initial conditions A has 5 points.
b denotes Player B. According to initial conditions B has 3 points.
r stores the random number.
A scores a point if the random number is even.
B scores a point if the random number is odd.
The first player to score 6 points wins.
aWins and bWins count the number of wins Player A and Player B gets respectively.
*/
int main()
{
for (i = 0; i < n; i++)
{
cout << "nNEW RUN-----------------------------------------n";
play();
if (a == 6)
aScores();
else
{ //b=4
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=5
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=6
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
bWins++;
cout << " B wins.n";
a = 5;
b = 3;
}
}
}
}
float aPer, bPer; // stores the percentage of winnings of both players.
aPer = (aWins / n) * 100;
bPer = (bWins / n) * 100;
cout << "nA wins " << aWins << " times. (" << aPer << ")%" << endl;
cout << "B wins " << bWins << " times. (" << bPer << ")%" << endl;
return 0;
}
void play()
{
r = rand();
cout << " Random no:" << r << endl;
if (r % 2 == 0) //denotes head, A scores
a++;
else //denotes tail, B scores
b++;
}
void aScores()
{
cout << " A socres a point. n A = " << a << "n B = " << b << endl;
aWins++;
cout << " A wins.n";
a = 5;
b = 3;
}
On running the program for few values of n I got the following results:
| Values of n | A wins | B wins | Winning Percentage of A |
| -------------: | ------------: | ------------: | :---------------------: |
| 1,000 | 887 | 113 | 88.700 |
| 10,000 | 8,754 | 1,246 | 87.540 |
| 100,000 | 87,445 | 12,555 | 87.440 |
| 1,000,000 | 874,772 | 125,228 | 87.477 |
| 1,000,000,000 | 874,995,405 | 125,004,595 | 87.499 |
| 10,000,000,000 | 8,749,967,956 | 1,250,032,044 | 87.499 |
The probability of A winning the game is more than my expected 0.75.
Please elaborate how to calculate the probability of Player A winning the game correctly.
probability conditional-probability
I came across this question in James Stewart's Probability and Statistics (page 80, question 3).
The Question:
A game between two players consists of tossing a coin. Player A gets a point if the coin shows heads, and Player B gets a point if it shows tails. The first player to get six points wins an $8000 jackpot. As it happens, the police raid the place when player A has five points and B has three points. After everyone has calmed down, how should the jackpot be divided between the two players? In other words, what is the probability of A winning if the game were to continue?
The French mathematicians Pascal and Fermat corresponded about this problem, and both
came to the same correct conclusion (though by very different reasonings). Their friend
Roberval disagreed with both of them. He argued that Player A has probability of winning,
because the game can end in the four ways H, TH, TTH, TTT, and in three of these, A wins.
Roberval’s reasoning was wrong.
My Attempt:
My reasoning to solve this question is similar to that of Roberval's. Since the game can end in 4 ways, out of which 3 ways are favorable for A, the winning probability of A should be 3/4. But, then I tried to stimulate the playing conditions using a C++ program below:
#include <iostream>
#include <stdlib.h>
using namespace std;
void play();
void aScores();
long int a = 5, b = 3, i;
int r;
float aWins = 0.0, bWins = 0.0, n = 10000.0;
/*
n is the number of times the program simulates the situation.
a denotes Player A. According to initial conditions A has 5 points.
b denotes Player B. According to initial conditions B has 3 points.
r stores the random number.
A scores a point if the random number is even.
B scores a point if the random number is odd.
The first player to score 6 points wins.
aWins and bWins count the number of wins Player A and Player B gets respectively.
*/
int main()
{
for (i = 0; i < n; i++)
{
cout << "nNEW RUN-----------------------------------------n";
play();
if (a == 6)
aScores();
else
{ //b=4
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=5
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
play();
if (a == 6)
aScores();
else
{ //b=6
cout << " B socres a point. n A = " << a << "n B = " << b << endl;
bWins++;
cout << " B wins.n";
a = 5;
b = 3;
}
}
}
}
float aPer, bPer; // stores the percentage of winnings of both players.
aPer = (aWins / n) * 100;
bPer = (bWins / n) * 100;
cout << "nA wins " << aWins << " times. (" << aPer << ")%" << endl;
cout << "B wins " << bWins << " times. (" << bPer << ")%" << endl;
return 0;
}
void play()
{
r = rand();
cout << " Random no:" << r << endl;
if (r % 2 == 0) //denotes head, A scores
a++;
else //denotes tail, B scores
b++;
}
void aScores()
{
cout << " A socres a point. n A = " << a << "n B = " << b << endl;
aWins++;
cout << " A wins.n";
a = 5;
b = 3;
}
On running the program for few values of n I got the following results:
| Values of n | A wins | B wins | Winning Percentage of A |
| -------------: | ------------: | ------------: | :---------------------: |
| 1,000 | 887 | 113 | 88.700 |
| 10,000 | 8,754 | 1,246 | 87.540 |
| 100,000 | 87,445 | 12,555 | 87.440 |
| 1,000,000 | 874,772 | 125,228 | 87.477 |
| 1,000,000,000 | 874,995,405 | 125,004,595 | 87.499 |
| 10,000,000,000 | 8,749,967,956 | 1,250,032,044 | 87.499 |
The probability of A winning the game is more than my expected 0.75.
Please elaborate how to calculate the probability of Player A winning the game correctly.
probability conditional-probability
probability conditional-probability
edited Nov 28 '18 at 21:52
asked Nov 28 '18 at 21:27
Azelf
203
203
Hint: the only way $B$ can win is if the coin comes up $T$ three times in a row.
– lulu
Nov 28 '18 at 21:29
In that case, B can win only once out of four possible outcomes (since the possible outcomes are H,TH,TTH and TTT ). As I explained in the question this reasoning is flawed.
– Azelf
Nov 28 '18 at 21:41
No. The probability of getting $TTT$ is $frac 18$. Thus, $B$ has only a $frac 18$ chance of winning.
– lulu
Nov 29 '18 at 1:11
add a comment |
Hint: the only way $B$ can win is if the coin comes up $T$ three times in a row.
– lulu
Nov 28 '18 at 21:29
In that case, B can win only once out of four possible outcomes (since the possible outcomes are H,TH,TTH and TTT ). As I explained in the question this reasoning is flawed.
– Azelf
Nov 28 '18 at 21:41
No. The probability of getting $TTT$ is $frac 18$. Thus, $B$ has only a $frac 18$ chance of winning.
– lulu
Nov 29 '18 at 1:11
Hint: the only way $B$ can win is if the coin comes up $T$ three times in a row.
– lulu
Nov 28 '18 at 21:29
Hint: the only way $B$ can win is if the coin comes up $T$ three times in a row.
– lulu
Nov 28 '18 at 21:29
In that case, B can win only once out of four possible outcomes (since the possible outcomes are H,TH,TTH and TTT ). As I explained in the question this reasoning is flawed.
– Azelf
Nov 28 '18 at 21:41
In that case, B can win only once out of four possible outcomes (since the possible outcomes are H,TH,TTH and TTT ). As I explained in the question this reasoning is flawed.
– Azelf
Nov 28 '18 at 21:41
No. The probability of getting $TTT$ is $frac 18$. Thus, $B$ has only a $frac 18$ chance of winning.
– lulu
Nov 29 '18 at 1:11
No. The probability of getting $TTT$ is $frac 18$. Thus, $B$ has only a $frac 18$ chance of winning.
– lulu
Nov 29 '18 at 1:11
add a comment |
1 Answer
1
active
oldest
votes
Your mistake is assuming all four cases you list are equally probable. The chance of $H$ is $frac 12$. The only way $B$ wins is for the first three tosses to all be tails, which has a chance of $(frac 12)^3=frac 18=0.125$. So, probability of A wining the game is 0.875, which is in good agreement with your simulation. $A$ wins with $H, TH,$ or $TTH$, with probabilities $frac 12, frac 14$, and $frac 18$ respectively.
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3017741%2ffinding-the-probability-of-winning-an-interrupted-game%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Your mistake is assuming all four cases you list are equally probable. The chance of $H$ is $frac 12$. The only way $B$ wins is for the first three tosses to all be tails, which has a chance of $(frac 12)^3=frac 18=0.125$. So, probability of A wining the game is 0.875, which is in good agreement with your simulation. $A$ wins with $H, TH,$ or $TTH$, with probabilities $frac 12, frac 14$, and $frac 18$ respectively.
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
add a comment |
Your mistake is assuming all four cases you list are equally probable. The chance of $H$ is $frac 12$. The only way $B$ wins is for the first three tosses to all be tails, which has a chance of $(frac 12)^3=frac 18=0.125$. So, probability of A wining the game is 0.875, which is in good agreement with your simulation. $A$ wins with $H, TH,$ or $TTH$, with probabilities $frac 12, frac 14$, and $frac 18$ respectively.
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
add a comment |
Your mistake is assuming all four cases you list are equally probable. The chance of $H$ is $frac 12$. The only way $B$ wins is for the first three tosses to all be tails, which has a chance of $(frac 12)^3=frac 18=0.125$. So, probability of A wining the game is 0.875, which is in good agreement with your simulation. $A$ wins with $H, TH,$ or $TTH$, with probabilities $frac 12, frac 14$, and $frac 18$ respectively.
Your mistake is assuming all four cases you list are equally probable. The chance of $H$ is $frac 12$. The only way $B$ wins is for the first three tosses to all be tails, which has a chance of $(frac 12)^3=frac 18=0.125$. So, probability of A wining the game is 0.875, which is in good agreement with your simulation. $A$ wins with $H, TH,$ or $TTH$, with probabilities $frac 12, frac 14$, and $frac 18$ respectively.
edited Nov 28 '18 at 22:19
Azelf
203
203
answered Nov 28 '18 at 21:56
Ross Millikan
292k23197371
292k23197371
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
add a comment |
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
Thanks !!!. I got it.
– Azelf
Nov 28 '18 at 22:20
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3017741%2ffinding-the-probability-of-winning-an-interrupted-game%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hint: the only way $B$ can win is if the coin comes up $T$ three times in a row.
– lulu
Nov 28 '18 at 21:29
In that case, B can win only once out of four possible outcomes (since the possible outcomes are H,TH,TTH and TTT ). As I explained in the question this reasoning is flawed.
– Azelf
Nov 28 '18 at 21:41
No. The probability of getting $TTT$ is $frac 18$. Thus, $B$ has only a $frac 18$ chance of winning.
– lulu
Nov 29 '18 at 1:11