A fair coin is flipped by Bill $k$ times and by Mary $n-k$ times. Find the probability that they flip the...
$begingroup$
A fair coin is flipped by Bill $k$ times and by Mary $n-k$ times. Find the probability that they flip the same number of heads.
I have two answers but not sure which one is correct.
a. I use hypergeometric distribution.
$$P=sum_{m=0}^{min(k,n-k)}{begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}overbegin{pmatrix}n\2mend{pmatrix}}$$
b.I use product of two binomial random variable and then sum them up.
Let X be the number of heads flipped by Bill and Y for Mary.
Since Bill and Mary are two independent person,
$$P(X=m,Y=m)=P(X=m)P(Y=m)$$
$$P=sum_{m=0}^{min(k,n-k)}P(X=m)P(Y=m)$$
$$=sum_{m=0}^{min(k,n-k)}begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}{1over2^n}$$
If there is a correct answer in either of them, how can I calculate then?
probability
$endgroup$
add a comment |
$begingroup$
A fair coin is flipped by Bill $k$ times and by Mary $n-k$ times. Find the probability that they flip the same number of heads.
I have two answers but not sure which one is correct.
a. I use hypergeometric distribution.
$$P=sum_{m=0}^{min(k,n-k)}{begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}overbegin{pmatrix}n\2mend{pmatrix}}$$
b.I use product of two binomial random variable and then sum them up.
Let X be the number of heads flipped by Bill and Y for Mary.
Since Bill and Mary are two independent person,
$$P(X=m,Y=m)=P(X=m)P(Y=m)$$
$$P=sum_{m=0}^{min(k,n-k)}P(X=m)P(Y=m)$$
$$=sum_{m=0}^{min(k,n-k)}begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}{1over2^n}$$
If there is a correct answer in either of them, how can I calculate then?
probability
$endgroup$
$begingroup$
The second one looks correct. I have no idea how to calculate it.
$endgroup$
– herb steinberg
Jan 2 at 2:54
add a comment |
$begingroup$
A fair coin is flipped by Bill $k$ times and by Mary $n-k$ times. Find the probability that they flip the same number of heads.
I have two answers but not sure which one is correct.
a. I use hypergeometric distribution.
$$P=sum_{m=0}^{min(k,n-k)}{begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}overbegin{pmatrix}n\2mend{pmatrix}}$$
b.I use product of two binomial random variable and then sum them up.
Let X be the number of heads flipped by Bill and Y for Mary.
Since Bill and Mary are two independent person,
$$P(X=m,Y=m)=P(X=m)P(Y=m)$$
$$P=sum_{m=0}^{min(k,n-k)}P(X=m)P(Y=m)$$
$$=sum_{m=0}^{min(k,n-k)}begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}{1over2^n}$$
If there is a correct answer in either of them, how can I calculate then?
probability
$endgroup$
A fair coin is flipped by Bill $k$ times and by Mary $n-k$ times. Find the probability that they flip the same number of heads.
I have two answers but not sure which one is correct.
a. I use hypergeometric distribution.
$$P=sum_{m=0}^{min(k,n-k)}{begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}overbegin{pmatrix}n\2mend{pmatrix}}$$
b.I use product of two binomial random variable and then sum them up.
Let X be the number of heads flipped by Bill and Y for Mary.
Since Bill and Mary are two independent person,
$$P(X=m,Y=m)=P(X=m)P(Y=m)$$
$$P=sum_{m=0}^{min(k,n-k)}P(X=m)P(Y=m)$$
$$=sum_{m=0}^{min(k,n-k)}begin{pmatrix}k\mend{pmatrix}begin{pmatrix}n-k\mend{pmatrix}{1over2^n}$$
If there is a correct answer in either of them, how can I calculate then?
probability
probability
asked Jan 2 at 2:06
Yibei HeYibei He
3139
3139
$begingroup$
The second one looks correct. I have no idea how to calculate it.
$endgroup$
– herb steinberg
Jan 2 at 2:54
add a comment |
$begingroup$
The second one looks correct. I have no idea how to calculate it.
$endgroup$
– herb steinberg
Jan 2 at 2:54
$begingroup$
The second one looks correct. I have no idea how to calculate it.
$endgroup$
– herb steinberg
Jan 2 at 2:54
$begingroup$
The second one looks correct. I have no idea how to calculate it.
$endgroup$
– herb steinberg
Jan 2 at 2:54
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The second answer you gave is correct, and the logic you give behind it is valid. They are independent events so you just have to sum up the probability of them both getting m heads for each possible m.
As far as how to calculate it, there is no shortcut, you just have to sum it up. Here is some python code that will do it for you quickly though!
from scipy.special import comb
n = 10
k = 7
np.sum([comb(k,m,exact=True)*comb(n-k,m,exact=True)/2**n for m in range(min(k,n-k)+1)])
$endgroup$
add a comment |
Your Answer
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%2f3059072%2fa-fair-coin-is-flipped-by-bill-k-times-and-by-mary-n-k-times-find-the-proba%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
$begingroup$
The second answer you gave is correct, and the logic you give behind it is valid. They are independent events so you just have to sum up the probability of them both getting m heads for each possible m.
As far as how to calculate it, there is no shortcut, you just have to sum it up. Here is some python code that will do it for you quickly though!
from scipy.special import comb
n = 10
k = 7
np.sum([comb(k,m,exact=True)*comb(n-k,m,exact=True)/2**n for m in range(min(k,n-k)+1)])
$endgroup$
add a comment |
$begingroup$
The second answer you gave is correct, and the logic you give behind it is valid. They are independent events so you just have to sum up the probability of them both getting m heads for each possible m.
As far as how to calculate it, there is no shortcut, you just have to sum it up. Here is some python code that will do it for you quickly though!
from scipy.special import comb
n = 10
k = 7
np.sum([comb(k,m,exact=True)*comb(n-k,m,exact=True)/2**n for m in range(min(k,n-k)+1)])
$endgroup$
add a comment |
$begingroup$
The second answer you gave is correct, and the logic you give behind it is valid. They are independent events so you just have to sum up the probability of them both getting m heads for each possible m.
As far as how to calculate it, there is no shortcut, you just have to sum it up. Here is some python code that will do it for you quickly though!
from scipy.special import comb
n = 10
k = 7
np.sum([comb(k,m,exact=True)*comb(n-k,m,exact=True)/2**n for m in range(min(k,n-k)+1)])
$endgroup$
The second answer you gave is correct, and the logic you give behind it is valid. They are independent events so you just have to sum up the probability of them both getting m heads for each possible m.
As far as how to calculate it, there is no shortcut, you just have to sum it up. Here is some python code that will do it for you quickly though!
from scipy.special import comb
n = 10
k = 7
np.sum([comb(k,m,exact=True)*comb(n-k,m,exact=True)/2**n for m in range(min(k,n-k)+1)])
answered Jan 2 at 3:22
Erik ParkinsonErik Parkinson
1,17519
1,17519
add a comment |
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.
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%2f3059072%2fa-fair-coin-is-flipped-by-bill-k-times-and-by-mary-n-k-times-find-the-proba%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
$begingroup$
The second one looks correct. I have no idea how to calculate it.
$endgroup$
– herb steinberg
Jan 2 at 2:54