If nine coins are tossed, what is the probability that the number of heads is even?
$begingroup$
So there can either be 0 heads, 2 heads, 4 heads, 6 heads, or 8 heads.
We have $n = 9$ trials, find the probability of each $k$ for $k = 0, 2, 4, 6, 8$
$n = 9, k = 0$
$$binom{9}{0}bigg(frac{1}{2}bigg)^0bigg(frac{1}{2}bigg)^{9}$$
$n = 9, k = 2$
$$binom{9}{2}bigg(frac{1}{2}bigg)^2bigg(frac{1}{2}bigg)^{7}$$
$n = 9, k = 4$
$$binom{9}{4}bigg(frac{1}{2}bigg)^4bigg(frac{1}{2}bigg)^{5}$$
$n = 9, k = 6$
$$binom{9}{6}bigg(frac{1}{2}bigg)^6bigg(frac{1}{2}bigg)^{3}$$
$n = 9, k = 8$
$$binom{9}{8}bigg(frac{1}{2}bigg)^8bigg(frac{1}{2}bigg)^{1}$$
Add all of these up:
$$=.64$$ so there's a 64% chance of probability?
probability discrete-mathematics
$endgroup$
|
show 2 more comments
$begingroup$
So there can either be 0 heads, 2 heads, 4 heads, 6 heads, or 8 heads.
We have $n = 9$ trials, find the probability of each $k$ for $k = 0, 2, 4, 6, 8$
$n = 9, k = 0$
$$binom{9}{0}bigg(frac{1}{2}bigg)^0bigg(frac{1}{2}bigg)^{9}$$
$n = 9, k = 2$
$$binom{9}{2}bigg(frac{1}{2}bigg)^2bigg(frac{1}{2}bigg)^{7}$$
$n = 9, k = 4$
$$binom{9}{4}bigg(frac{1}{2}bigg)^4bigg(frac{1}{2}bigg)^{5}$$
$n = 9, k = 6$
$$binom{9}{6}bigg(frac{1}{2}bigg)^6bigg(frac{1}{2}bigg)^{3}$$
$n = 9, k = 8$
$$binom{9}{8}bigg(frac{1}{2}bigg)^8bigg(frac{1}{2}bigg)^{1}$$
Add all of these up:
$$=.64$$ so there's a 64% chance of probability?
probability discrete-mathematics
$endgroup$
1
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
10 hours ago
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
10 hours ago
1
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
10 hours ago
3
$begingroup$
Your arithmetic is wrong somewhere because it should sum to $0.50$. You can match the chance of $k$ heads with the chance of $9-k$. The powers of $frac 12$ always give $frac 1{2^9}$, so it is probably in your computation of the combination numbers. Your approach is fine, if much harder than the symmetry arguments.
$endgroup$
– Ross Millikan
10 hours ago
2
$begingroup$
Ross Millikan is correct; you need to double-check your arithmetic. The last two terms of each product multiply to 1/512. The first terms of each product are 1, 36, 126, 84 and 9. Those add to 256. So you should be getting 256/512 which is 1/2. Always check your arithmetic.
$endgroup$
– Eric Lippert
7 hours ago
|
show 2 more comments
$begingroup$
So there can either be 0 heads, 2 heads, 4 heads, 6 heads, or 8 heads.
We have $n = 9$ trials, find the probability of each $k$ for $k = 0, 2, 4, 6, 8$
$n = 9, k = 0$
$$binom{9}{0}bigg(frac{1}{2}bigg)^0bigg(frac{1}{2}bigg)^{9}$$
$n = 9, k = 2$
$$binom{9}{2}bigg(frac{1}{2}bigg)^2bigg(frac{1}{2}bigg)^{7}$$
$n = 9, k = 4$
$$binom{9}{4}bigg(frac{1}{2}bigg)^4bigg(frac{1}{2}bigg)^{5}$$
$n = 9, k = 6$
$$binom{9}{6}bigg(frac{1}{2}bigg)^6bigg(frac{1}{2}bigg)^{3}$$
$n = 9, k = 8$
$$binom{9}{8}bigg(frac{1}{2}bigg)^8bigg(frac{1}{2}bigg)^{1}$$
Add all of these up:
$$=.64$$ so there's a 64% chance of probability?
probability discrete-mathematics
$endgroup$
So there can either be 0 heads, 2 heads, 4 heads, 6 heads, or 8 heads.
We have $n = 9$ trials, find the probability of each $k$ for $k = 0, 2, 4, 6, 8$
$n = 9, k = 0$
$$binom{9}{0}bigg(frac{1}{2}bigg)^0bigg(frac{1}{2}bigg)^{9}$$
$n = 9, k = 2$
$$binom{9}{2}bigg(frac{1}{2}bigg)^2bigg(frac{1}{2}bigg)^{7}$$
$n = 9, k = 4$
$$binom{9}{4}bigg(frac{1}{2}bigg)^4bigg(frac{1}{2}bigg)^{5}$$
$n = 9, k = 6$
$$binom{9}{6}bigg(frac{1}{2}bigg)^6bigg(frac{1}{2}bigg)^{3}$$
$n = 9, k = 8$
$$binom{9}{8}bigg(frac{1}{2}bigg)^8bigg(frac{1}{2}bigg)^{1}$$
Add all of these up:
$$=.64$$ so there's a 64% chance of probability?
probability discrete-mathematics
probability discrete-mathematics
edited 10 hours ago
Stuy
asked 10 hours ago
StuyStuy
1909
1909
1
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
10 hours ago
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
10 hours ago
1
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
10 hours ago
3
$begingroup$
Your arithmetic is wrong somewhere because it should sum to $0.50$. You can match the chance of $k$ heads with the chance of $9-k$. The powers of $frac 12$ always give $frac 1{2^9}$, so it is probably in your computation of the combination numbers. Your approach is fine, if much harder than the symmetry arguments.
$endgroup$
– Ross Millikan
10 hours ago
2
$begingroup$
Ross Millikan is correct; you need to double-check your arithmetic. The last two terms of each product multiply to 1/512. The first terms of each product are 1, 36, 126, 84 and 9. Those add to 256. So you should be getting 256/512 which is 1/2. Always check your arithmetic.
$endgroup$
– Eric Lippert
7 hours ago
|
show 2 more comments
1
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
10 hours ago
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
10 hours ago
1
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
10 hours ago
3
$begingroup$
Your arithmetic is wrong somewhere because it should sum to $0.50$. You can match the chance of $k$ heads with the chance of $9-k$. The powers of $frac 12$ always give $frac 1{2^9}$, so it is probably in your computation of the combination numbers. Your approach is fine, if much harder than the symmetry arguments.
$endgroup$
– Ross Millikan
10 hours ago
2
$begingroup$
Ross Millikan is correct; you need to double-check your arithmetic. The last two terms of each product multiply to 1/512. The first terms of each product are 1, 36, 126, 84 and 9. Those add to 256. So you should be getting 256/512 which is 1/2. Always check your arithmetic.
$endgroup$
– Eric Lippert
7 hours ago
1
1
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
10 hours ago
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
10 hours ago
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
10 hours ago
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
10 hours ago
1
1
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
10 hours ago
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
10 hours ago
3
3
$begingroup$
Your arithmetic is wrong somewhere because it should sum to $0.50$. You can match the chance of $k$ heads with the chance of $9-k$. The powers of $frac 12$ always give $frac 1{2^9}$, so it is probably in your computation of the combination numbers. Your approach is fine, if much harder than the symmetry arguments.
$endgroup$
– Ross Millikan
10 hours ago
$begingroup$
Your arithmetic is wrong somewhere because it should sum to $0.50$. You can match the chance of $k$ heads with the chance of $9-k$. The powers of $frac 12$ always give $frac 1{2^9}$, so it is probably in your computation of the combination numbers. Your approach is fine, if much harder than the symmetry arguments.
$endgroup$
– Ross Millikan
10 hours ago
2
2
$begingroup$
Ross Millikan is correct; you need to double-check your arithmetic. The last two terms of each product multiply to 1/512. The first terms of each product are 1, 36, 126, 84 and 9. Those add to 256. So you should be getting 256/512 which is 1/2. Always check your arithmetic.
$endgroup$
– Eric Lippert
7 hours ago
$begingroup$
Ross Millikan is correct; you need to double-check your arithmetic. The last two terms of each product multiply to 1/512. The first terms of each product are 1, 36, 126, 84 and 9. Those add to 256. So you should be getting 256/512 which is 1/2. Always check your arithmetic.
$endgroup$
– Eric Lippert
7 hours ago
|
show 2 more comments
8 Answers
8
active
oldest
votes
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
4
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
1
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
add a comment |
$begingroup$
If there are an even number of heads then there must be an odd number of tails. But heads and tails are symmetrical, so the probability must be $1/2$.
$endgroup$
add a comment |
$begingroup$
All the possible sequences of tosses (which are all equally likely) may be divided into the two categories "even number of heads" and "odd number of heads". You can then pair up each sequence in one category with the "flipped" version (flip every coin in the sequence around) in the other category. This shows that there are equally many sequences in each of the two categories. So the probability of landing in a specific one of them must be $frac12$.
$endgroup$
add a comment |
$begingroup$
There are two cases here:
- There's an even number of heads: 0, 2, 4, 6 or 8 heads
- There's an odd number of heads: 1, 3, 5, 7 or 9 heads
But notice that having an odd number of heads means having an even number of tails (e.g. 5 heads means 4 tails), so the second case is the same as:
- There's an even number of tails: 0, 2, 4, 6 or 8 tails
Since heads and tails are equally probable, we can, by symmetry, see that these two cases have the same probability. Therefore each must have probability $1/2$.
$endgroup$
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
add a comment |
$begingroup$
The easiest way to see this : Consider the number of heads we have in the first $8$ coins.
- If this number is even, we need a tail, we have probability $frac{1}{2}$
- If this number is odd, we need a head, we have probability $frac{1}{2}$
Hence no matter what the $8$ coins delivered, we have probability $frac{1}{2}$ , which is the answer.
$endgroup$
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
3
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
add a comment |
$begingroup$
Your approach is good also, you probably made a mistake in calculations. The number of favorable outcomes is
$$binom{9}{0}+binom{9}{2}+binom{9}{4}+binom{9}{6}+binom{9}{8}=1+36+126+84+9=256$$
The number of all possible outcomes is $512$ thus the probability to get even number of heads is $0.5$.
$endgroup$
add a comment |
$begingroup$
The probability generating function of a Binomiall random variable $Xsim text{Bin}(n, 1/2)$ with probability of success $1/2$ is given by
$$
g_{X}(t)=Et^X=sum_{k=0}^nP(X=k)t^k=sum_{k=0}^nbinom{n}{k}frac{t^k}{2^n}=frac{1}{2^n}(1+t)^n
$$
In particular the probability that $X$ is even is given by
$$
sum_{0leq kleq n, k,{text{even}}}P(X=k)=frac{g(1)+g(-1)}{2}=frac{1+0}{2}=frac{1}{2}.
$$
$endgroup$
add a comment |
$begingroup$
If $h$ denotes getting a heads and $p$ denotes getting tails, let's write $frac{1}{2}h+frac{1}{2}p$ for the notion of a fair coin: half the time it turns up heads, and half the time tails.
If we expand out the following product while keeping track of multiplication order,
$$left(frac{1}{2}h+frac{1}{2}pright)left(frac{1}{2}h+frac{1}{2}pright)=frac{1}{4}hh+frac{1}{4}hp+frac{1}{4}ph+frac{1}{4}pp,$$
we see that the sequences $hh$, $hp$, $ph$, and $pp$ are equally likely. Forgetting about multiplication order, which we want to do because we only care about how many times heads or tails showed up, corresponds to just treating this like a polynomial:
$$=frac{1}{4}h^2+frac{1}{2}hp+frac{1}{4}p^2.$$
We can keep multiplying copies of a fair coin together to find the probability that a certain number of heads or tails happened, where the coefficient in front of $h^kp^ell$ is the probability of $k$ heads and $ell$ tails.
Nine coins is the expansion
$$left(frac{1}{2}h+frac{1}{2}pright)^9=sum_{k=0}^9binom{9}{k}left(frac{1}{2}hright)^kleft(frac{1}{2}pright)^{9-k}=sum_{k=0}^9frac{1}{2^9}binom{9}{k}h^kp^{9-k}.$$
So far, all this has done is explain why you were adding up $2^{-9}binom{9}{k}$ for $k=0,2,4,dots,8$. Here, now, is a nice trick. If we formally set $h=1$ and $p=1$, then we get
$$1=sum_{k=0}^9frac{1}{2^9}binom{9}{k},$$
and if we formally set $h=-1$ and $p=1$, then we get
$$0=sum_{k=0}^9frac{1}{2^9}binom{9}{k}(-1)^k.$$
The average of these two equations is
$$frac{1}{2}=sum_{k=0,ktext{ even}}^9frac{1}{2^9}binom{9}{k},$$
since $frac{1}{2}(1+(-1)^k)$ is $1$ or $0$ depending on whether $k$ is even or odd. Thus the probability of an even number of heads is $frac{1}{2}$.
Notice that this did not use the fact nine coins were tossed at any point! (Other than the fact that at least one coin was tossed. In the case of tossing no coins, an even number of heads happens with probability $1$. What part of my argument goes wrong for the case of zero coins?)
$endgroup$
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%2f3134991%2fif-nine-coins-are-tossed-what-is-the-probability-that-the-number-of-heads-is-ev%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
4
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
1
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
add a comment |
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
4
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
1
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
add a comment |
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
The probability is $frac{1}{2}$ because the last flip determines it.
answered 10 hours ago
Jorge Fernández HidalgoJorge Fernández Hidalgo
75.9k1192195
75.9k1192195
4
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
1
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
add a comment |
4
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
1
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
4
4
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Though this answer is correct for this specific question, it is interesting to consider why it works. Consider: an unfair coin comes up heads 75% of the time, tails 25% of the time. We flip it nine times. Again, the last flip determines whether the total is odd or even. In this case, is it even 75% of the time, because the last flip is heads 75% of the time, or is it even 50% of the time, as it was before? Or is it even some other percentage of the time? Before you do the math, what's your gut feeling? And can you explain why your argument is only valid for a fair coin?
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Interesting question Eric. Formally I would use recursion, let us define $O_n$ as the probability that we get an odd number of heads when flipping $n$ coins, and let $p$ be the probability the coin comes up as heads. Then the previous reasoning turns into the recurrence relation $O_n=(1-p)O_{n-1} + p(1-O_{n-1})=(1-2p)O_{n-1}+p$.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Although I think things become clearer when we work with $ O_n=H_n+0.5$ as we obtain $H_n+0.5 = (1-p)(H_{n-1}+0.5) + p(0.5-H_{n-1})$ which tells us $H_n = H_{n-1}(1-2p)$. So as one can see $O_n$ approachs $frac{1}{2}$ and whether is does so in a monotone or alternating manner depends on whethere $pgeq 1/2$. Recall $O_1$ is simply $p$, so $H_1 = p-0.5$. In the case in which $p<0.5$ we have that $H_n$ is always negative and in the other case we have that $H_n$ alternates signs.
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
$begingroup$
That's a good analysis. My reason for bringing it up is: plainly the OP is relatively new to probability, so I think it is important to call out the assumptions when giving "shortcut" reasoning like this answer. The underlying assumption is that with eight coins, an even number of heads or tails is also 1/2. I think it is worthwhile calling that out. I wouldn't want the OP to deduce that for more general problems, they only need to consider the probability of the final flip.
$endgroup$
– Eric Lippert
2 hours ago
1
1
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
$begingroup$
Yes you are right, I was a bit careless when I wrote it, thank you for pointing out that detail!
$endgroup$
– Jorge Fernández Hidalgo
2 hours ago
add a comment |
$begingroup$
If there are an even number of heads then there must be an odd number of tails. But heads and tails are symmetrical, so the probability must be $1/2$.
$endgroup$
add a comment |
$begingroup$
If there are an even number of heads then there must be an odd number of tails. But heads and tails are symmetrical, so the probability must be $1/2$.
$endgroup$
add a comment |
$begingroup$
If there are an even number of heads then there must be an odd number of tails. But heads and tails are symmetrical, so the probability must be $1/2$.
$endgroup$
If there are an even number of heads then there must be an odd number of tails. But heads and tails are symmetrical, so the probability must be $1/2$.
answered 10 hours ago
Ethan BolkerEthan Bolker
44.1k552117
44.1k552117
add a comment |
add a comment |
$begingroup$
All the possible sequences of tosses (which are all equally likely) may be divided into the two categories "even number of heads" and "odd number of heads". You can then pair up each sequence in one category with the "flipped" version (flip every coin in the sequence around) in the other category. This shows that there are equally many sequences in each of the two categories. So the probability of landing in a specific one of them must be $frac12$.
$endgroup$
add a comment |
$begingroup$
All the possible sequences of tosses (which are all equally likely) may be divided into the two categories "even number of heads" and "odd number of heads". You can then pair up each sequence in one category with the "flipped" version (flip every coin in the sequence around) in the other category. This shows that there are equally many sequences in each of the two categories. So the probability of landing in a specific one of them must be $frac12$.
$endgroup$
add a comment |
$begingroup$
All the possible sequences of tosses (which are all equally likely) may be divided into the two categories "even number of heads" and "odd number of heads". You can then pair up each sequence in one category with the "flipped" version (flip every coin in the sequence around) in the other category. This shows that there are equally many sequences in each of the two categories. So the probability of landing in a specific one of them must be $frac12$.
$endgroup$
All the possible sequences of tosses (which are all equally likely) may be divided into the two categories "even number of heads" and "odd number of heads". You can then pair up each sequence in one category with the "flipped" version (flip every coin in the sequence around) in the other category. This shows that there are equally many sequences in each of the two categories. So the probability of landing in a specific one of them must be $frac12$.
answered 10 hours ago
ArthurArthur
116k7116199
116k7116199
add a comment |
add a comment |
$begingroup$
There are two cases here:
- There's an even number of heads: 0, 2, 4, 6 or 8 heads
- There's an odd number of heads: 1, 3, 5, 7 or 9 heads
But notice that having an odd number of heads means having an even number of tails (e.g. 5 heads means 4 tails), so the second case is the same as:
- There's an even number of tails: 0, 2, 4, 6 or 8 tails
Since heads and tails are equally probable, we can, by symmetry, see that these two cases have the same probability. Therefore each must have probability $1/2$.
$endgroup$
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
add a comment |
$begingroup$
There are two cases here:
- There's an even number of heads: 0, 2, 4, 6 or 8 heads
- There's an odd number of heads: 1, 3, 5, 7 or 9 heads
But notice that having an odd number of heads means having an even number of tails (e.g. 5 heads means 4 tails), so the second case is the same as:
- There's an even number of tails: 0, 2, 4, 6 or 8 tails
Since heads and tails are equally probable, we can, by symmetry, see that these two cases have the same probability. Therefore each must have probability $1/2$.
$endgroup$
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
add a comment |
$begingroup$
There are two cases here:
- There's an even number of heads: 0, 2, 4, 6 or 8 heads
- There's an odd number of heads: 1, 3, 5, 7 or 9 heads
But notice that having an odd number of heads means having an even number of tails (e.g. 5 heads means 4 tails), so the second case is the same as:
- There's an even number of tails: 0, 2, 4, 6 or 8 tails
Since heads and tails are equally probable, we can, by symmetry, see that these two cases have the same probability. Therefore each must have probability $1/2$.
$endgroup$
There are two cases here:
- There's an even number of heads: 0, 2, 4, 6 or 8 heads
- There's an odd number of heads: 1, 3, 5, 7 or 9 heads
But notice that having an odd number of heads means having an even number of tails (e.g. 5 heads means 4 tails), so the second case is the same as:
- There's an even number of tails: 0, 2, 4, 6 or 8 tails
Since heads and tails are equally probable, we can, by symmetry, see that these two cases have the same probability. Therefore each must have probability $1/2$.
answered 8 hours ago
FrxstremFrxstrem
4131813
4131813
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
add a comment |
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
7 hours ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
26 mins ago
add a comment |
$begingroup$
The easiest way to see this : Consider the number of heads we have in the first $8$ coins.
- If this number is even, we need a tail, we have probability $frac{1}{2}$
- If this number is odd, we need a head, we have probability $frac{1}{2}$
Hence no matter what the $8$ coins delivered, we have probability $frac{1}{2}$ , which is the answer.
$endgroup$
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
3
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
add a comment |
$begingroup$
The easiest way to see this : Consider the number of heads we have in the first $8$ coins.
- If this number is even, we need a tail, we have probability $frac{1}{2}$
- If this number is odd, we need a head, we have probability $frac{1}{2}$
Hence no matter what the $8$ coins delivered, we have probability $frac{1}{2}$ , which is the answer.
$endgroup$
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
3
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
add a comment |
$begingroup$
The easiest way to see this : Consider the number of heads we have in the first $8$ coins.
- If this number is even, we need a tail, we have probability $frac{1}{2}$
- If this number is odd, we need a head, we have probability $frac{1}{2}$
Hence no matter what the $8$ coins delivered, we have probability $frac{1}{2}$ , which is the answer.
$endgroup$
The easiest way to see this : Consider the number of heads we have in the first $8$ coins.
- If this number is even, we need a tail, we have probability $frac{1}{2}$
- If this number is odd, we need a head, we have probability $frac{1}{2}$
Hence no matter what the $8$ coins delivered, we have probability $frac{1}{2}$ , which is the answer.
answered 10 hours ago
PeterPeter
48.2k1139133
48.2k1139133
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
3
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
add a comment |
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
3
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
1
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
10 hours ago
3
3
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
7 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
$begingroup$
This answer presupposes that having an even number of heads and an odd number of heads in eight flips is equally likely, but we haven't proved that lemma.
$endgroup$
– Eric Lippert
3 hours ago
add a comment |
$begingroup$
Your approach is good also, you probably made a mistake in calculations. The number of favorable outcomes is
$$binom{9}{0}+binom{9}{2}+binom{9}{4}+binom{9}{6}+binom{9}{8}=1+36+126+84+9=256$$
The number of all possible outcomes is $512$ thus the probability to get even number of heads is $0.5$.
$endgroup$
add a comment |
$begingroup$
Your approach is good also, you probably made a mistake in calculations. The number of favorable outcomes is
$$binom{9}{0}+binom{9}{2}+binom{9}{4}+binom{9}{6}+binom{9}{8}=1+36+126+84+9=256$$
The number of all possible outcomes is $512$ thus the probability to get even number of heads is $0.5$.
$endgroup$
add a comment |
$begingroup$
Your approach is good also, you probably made a mistake in calculations. The number of favorable outcomes is
$$binom{9}{0}+binom{9}{2}+binom{9}{4}+binom{9}{6}+binom{9}{8}=1+36+126+84+9=256$$
The number of all possible outcomes is $512$ thus the probability to get even number of heads is $0.5$.
$endgroup$
Your approach is good also, you probably made a mistake in calculations. The number of favorable outcomes is
$$binom{9}{0}+binom{9}{2}+binom{9}{4}+binom{9}{6}+binom{9}{8}=1+36+126+84+9=256$$
The number of all possible outcomes is $512$ thus the probability to get even number of heads is $0.5$.
answered 9 hours ago
VasyaVasya
3,4271516
3,4271516
add a comment |
add a comment |
$begingroup$
The probability generating function of a Binomiall random variable $Xsim text{Bin}(n, 1/2)$ with probability of success $1/2$ is given by
$$
g_{X}(t)=Et^X=sum_{k=0}^nP(X=k)t^k=sum_{k=0}^nbinom{n}{k}frac{t^k}{2^n}=frac{1}{2^n}(1+t)^n
$$
In particular the probability that $X$ is even is given by
$$
sum_{0leq kleq n, k,{text{even}}}P(X=k)=frac{g(1)+g(-1)}{2}=frac{1+0}{2}=frac{1}{2}.
$$
$endgroup$
add a comment |
$begingroup$
The probability generating function of a Binomiall random variable $Xsim text{Bin}(n, 1/2)$ with probability of success $1/2$ is given by
$$
g_{X}(t)=Et^X=sum_{k=0}^nP(X=k)t^k=sum_{k=0}^nbinom{n}{k}frac{t^k}{2^n}=frac{1}{2^n}(1+t)^n
$$
In particular the probability that $X$ is even is given by
$$
sum_{0leq kleq n, k,{text{even}}}P(X=k)=frac{g(1)+g(-1)}{2}=frac{1+0}{2}=frac{1}{2}.
$$
$endgroup$
add a comment |
$begingroup$
The probability generating function of a Binomiall random variable $Xsim text{Bin}(n, 1/2)$ with probability of success $1/2$ is given by
$$
g_{X}(t)=Et^X=sum_{k=0}^nP(X=k)t^k=sum_{k=0}^nbinom{n}{k}frac{t^k}{2^n}=frac{1}{2^n}(1+t)^n
$$
In particular the probability that $X$ is even is given by
$$
sum_{0leq kleq n, k,{text{even}}}P(X=k)=frac{g(1)+g(-1)}{2}=frac{1+0}{2}=frac{1}{2}.
$$
$endgroup$
The probability generating function of a Binomiall random variable $Xsim text{Bin}(n, 1/2)$ with probability of success $1/2$ is given by
$$
g_{X}(t)=Et^X=sum_{k=0}^nP(X=k)t^k=sum_{k=0}^nbinom{n}{k}frac{t^k}{2^n}=frac{1}{2^n}(1+t)^n
$$
In particular the probability that $X$ is even is given by
$$
sum_{0leq kleq n, k,{text{even}}}P(X=k)=frac{g(1)+g(-1)}{2}=frac{1+0}{2}=frac{1}{2}.
$$
answered 3 hours ago
Foobaz JohnFoobaz John
22.4k41452
22.4k41452
add a comment |
add a comment |
$begingroup$
If $h$ denotes getting a heads and $p$ denotes getting tails, let's write $frac{1}{2}h+frac{1}{2}p$ for the notion of a fair coin: half the time it turns up heads, and half the time tails.
If we expand out the following product while keeping track of multiplication order,
$$left(frac{1}{2}h+frac{1}{2}pright)left(frac{1}{2}h+frac{1}{2}pright)=frac{1}{4}hh+frac{1}{4}hp+frac{1}{4}ph+frac{1}{4}pp,$$
we see that the sequences $hh$, $hp$, $ph$, and $pp$ are equally likely. Forgetting about multiplication order, which we want to do because we only care about how many times heads or tails showed up, corresponds to just treating this like a polynomial:
$$=frac{1}{4}h^2+frac{1}{2}hp+frac{1}{4}p^2.$$
We can keep multiplying copies of a fair coin together to find the probability that a certain number of heads or tails happened, where the coefficient in front of $h^kp^ell$ is the probability of $k$ heads and $ell$ tails.
Nine coins is the expansion
$$left(frac{1}{2}h+frac{1}{2}pright)^9=sum_{k=0}^9binom{9}{k}left(frac{1}{2}hright)^kleft(frac{1}{2}pright)^{9-k}=sum_{k=0}^9frac{1}{2^9}binom{9}{k}h^kp^{9-k}.$$
So far, all this has done is explain why you were adding up $2^{-9}binom{9}{k}$ for $k=0,2,4,dots,8$. Here, now, is a nice trick. If we formally set $h=1$ and $p=1$, then we get
$$1=sum_{k=0}^9frac{1}{2^9}binom{9}{k},$$
and if we formally set $h=-1$ and $p=1$, then we get
$$0=sum_{k=0}^9frac{1}{2^9}binom{9}{k}(-1)^k.$$
The average of these two equations is
$$frac{1}{2}=sum_{k=0,ktext{ even}}^9frac{1}{2^9}binom{9}{k},$$
since $frac{1}{2}(1+(-1)^k)$ is $1$ or $0$ depending on whether $k$ is even or odd. Thus the probability of an even number of heads is $frac{1}{2}$.
Notice that this did not use the fact nine coins were tossed at any point! (Other than the fact that at least one coin was tossed. In the case of tossing no coins, an even number of heads happens with probability $1$. What part of my argument goes wrong for the case of zero coins?)
$endgroup$
add a comment |
$begingroup$
If $h$ denotes getting a heads and $p$ denotes getting tails, let's write $frac{1}{2}h+frac{1}{2}p$ for the notion of a fair coin: half the time it turns up heads, and half the time tails.
If we expand out the following product while keeping track of multiplication order,
$$left(frac{1}{2}h+frac{1}{2}pright)left(frac{1}{2}h+frac{1}{2}pright)=frac{1}{4}hh+frac{1}{4}hp+frac{1}{4}ph+frac{1}{4}pp,$$
we see that the sequences $hh$, $hp$, $ph$, and $pp$ are equally likely. Forgetting about multiplication order, which we want to do because we only care about how many times heads or tails showed up, corresponds to just treating this like a polynomial:
$$=frac{1}{4}h^2+frac{1}{2}hp+frac{1}{4}p^2.$$
We can keep multiplying copies of a fair coin together to find the probability that a certain number of heads or tails happened, where the coefficient in front of $h^kp^ell$ is the probability of $k$ heads and $ell$ tails.
Nine coins is the expansion
$$left(frac{1}{2}h+frac{1}{2}pright)^9=sum_{k=0}^9binom{9}{k}left(frac{1}{2}hright)^kleft(frac{1}{2}pright)^{9-k}=sum_{k=0}^9frac{1}{2^9}binom{9}{k}h^kp^{9-k}.$$
So far, all this has done is explain why you were adding up $2^{-9}binom{9}{k}$ for $k=0,2,4,dots,8$. Here, now, is a nice trick. If we formally set $h=1$ and $p=1$, then we get
$$1=sum_{k=0}^9frac{1}{2^9}binom{9}{k},$$
and if we formally set $h=-1$ and $p=1$, then we get
$$0=sum_{k=0}^9frac{1}{2^9}binom{9}{k}(-1)^k.$$
The average of these two equations is
$$frac{1}{2}=sum_{k=0,ktext{ even}}^9frac{1}{2^9}binom{9}{k},$$
since $frac{1}{2}(1+(-1)^k)$ is $1$ or $0$ depending on whether $k$ is even or odd. Thus the probability of an even number of heads is $frac{1}{2}$.
Notice that this did not use the fact nine coins were tossed at any point! (Other than the fact that at least one coin was tossed. In the case of tossing no coins, an even number of heads happens with probability $1$. What part of my argument goes wrong for the case of zero coins?)
$endgroup$
add a comment |
$begingroup$
If $h$ denotes getting a heads and $p$ denotes getting tails, let's write $frac{1}{2}h+frac{1}{2}p$ for the notion of a fair coin: half the time it turns up heads, and half the time tails.
If we expand out the following product while keeping track of multiplication order,
$$left(frac{1}{2}h+frac{1}{2}pright)left(frac{1}{2}h+frac{1}{2}pright)=frac{1}{4}hh+frac{1}{4}hp+frac{1}{4}ph+frac{1}{4}pp,$$
we see that the sequences $hh$, $hp$, $ph$, and $pp$ are equally likely. Forgetting about multiplication order, which we want to do because we only care about how many times heads or tails showed up, corresponds to just treating this like a polynomial:
$$=frac{1}{4}h^2+frac{1}{2}hp+frac{1}{4}p^2.$$
We can keep multiplying copies of a fair coin together to find the probability that a certain number of heads or tails happened, where the coefficient in front of $h^kp^ell$ is the probability of $k$ heads and $ell$ tails.
Nine coins is the expansion
$$left(frac{1}{2}h+frac{1}{2}pright)^9=sum_{k=0}^9binom{9}{k}left(frac{1}{2}hright)^kleft(frac{1}{2}pright)^{9-k}=sum_{k=0}^9frac{1}{2^9}binom{9}{k}h^kp^{9-k}.$$
So far, all this has done is explain why you were adding up $2^{-9}binom{9}{k}$ for $k=0,2,4,dots,8$. Here, now, is a nice trick. If we formally set $h=1$ and $p=1$, then we get
$$1=sum_{k=0}^9frac{1}{2^9}binom{9}{k},$$
and if we formally set $h=-1$ and $p=1$, then we get
$$0=sum_{k=0}^9frac{1}{2^9}binom{9}{k}(-1)^k.$$
The average of these two equations is
$$frac{1}{2}=sum_{k=0,ktext{ even}}^9frac{1}{2^9}binom{9}{k},$$
since $frac{1}{2}(1+(-1)^k)$ is $1$ or $0$ depending on whether $k$ is even or odd. Thus the probability of an even number of heads is $frac{1}{2}$.
Notice that this did not use the fact nine coins were tossed at any point! (Other than the fact that at least one coin was tossed. In the case of tossing no coins, an even number of heads happens with probability $1$. What part of my argument goes wrong for the case of zero coins?)
$endgroup$
If $h$ denotes getting a heads and $p$ denotes getting tails, let's write $frac{1}{2}h+frac{1}{2}p$ for the notion of a fair coin: half the time it turns up heads, and half the time tails.
If we expand out the following product while keeping track of multiplication order,
$$left(frac{1}{2}h+frac{1}{2}pright)left(frac{1}{2}h+frac{1}{2}pright)=frac{1}{4}hh+frac{1}{4}hp+frac{1}{4}ph+frac{1}{4}pp,$$
we see that the sequences $hh$, $hp$, $ph$, and $pp$ are equally likely. Forgetting about multiplication order, which we want to do because we only care about how many times heads or tails showed up, corresponds to just treating this like a polynomial:
$$=frac{1}{4}h^2+frac{1}{2}hp+frac{1}{4}p^2.$$
We can keep multiplying copies of a fair coin together to find the probability that a certain number of heads or tails happened, where the coefficient in front of $h^kp^ell$ is the probability of $k$ heads and $ell$ tails.
Nine coins is the expansion
$$left(frac{1}{2}h+frac{1}{2}pright)^9=sum_{k=0}^9binom{9}{k}left(frac{1}{2}hright)^kleft(frac{1}{2}pright)^{9-k}=sum_{k=0}^9frac{1}{2^9}binom{9}{k}h^kp^{9-k}.$$
So far, all this has done is explain why you were adding up $2^{-9}binom{9}{k}$ for $k=0,2,4,dots,8$. Here, now, is a nice trick. If we formally set $h=1$ and $p=1$, then we get
$$1=sum_{k=0}^9frac{1}{2^9}binom{9}{k},$$
and if we formally set $h=-1$ and $p=1$, then we get
$$0=sum_{k=0}^9frac{1}{2^9}binom{9}{k}(-1)^k.$$
The average of these two equations is
$$frac{1}{2}=sum_{k=0,ktext{ even}}^9frac{1}{2^9}binom{9}{k},$$
since $frac{1}{2}(1+(-1)^k)$ is $1$ or $0$ depending on whether $k$ is even or odd. Thus the probability of an even number of heads is $frac{1}{2}$.
Notice that this did not use the fact nine coins were tossed at any point! (Other than the fact that at least one coin was tossed. In the case of tossing no coins, an even number of heads happens with probability $1$. What part of my argument goes wrong for the case of zero coins?)
answered 9 mins ago
Kyle MillerKyle Miller
9,430930
9,430930
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%2f3134991%2fif-nine-coins-are-tossed-what-is-the-probability-that-the-number-of-heads-is-ev%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
1
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
10 hours ago
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
10 hours ago
1
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
10 hours ago
3
$begingroup$
Your arithmetic is wrong somewhere because it should sum to $0.50$. You can match the chance of $k$ heads with the chance of $9-k$. The powers of $frac 12$ always give $frac 1{2^9}$, so it is probably in your computation of the combination numbers. Your approach is fine, if much harder than the symmetry arguments.
$endgroup$
– Ross Millikan
10 hours ago
2
$begingroup$
Ross Millikan is correct; you need to double-check your arithmetic. The last two terms of each product multiply to 1/512. The first terms of each product are 1, 36, 126, 84 and 9. Those add to 256. So you should be getting 256/512 which is 1/2. Always check your arithmetic.
$endgroup$
– Eric Lippert
7 hours ago