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$
2
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
yesterday
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
yesterday
4
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
yesterday
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
yesterday
3
$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
yesterday
|
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 yesterday
Stuy
asked yesterday
StuyStuy
355211
355211
2
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
yesterday
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
yesterday
4
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
yesterday
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
yesterday
3
$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
yesterday
|
show 2 more comments
2
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
yesterday
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
yesterday
4
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
yesterday
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
yesterday
3
$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
yesterday
2
2
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
yesterday
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
yesterday
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
yesterday
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
yesterday
4
4
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
yesterday
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
yesterday
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
yesterday
$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
yesterday
3
3
$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
yesterday
$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
yesterday
|
show 2 more comments
9 Answers
9
active
oldest
votes
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
25
$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
22 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
21 hours ago
14
$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
21 hours ago
2
$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
21 hours ago
3
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
|
show 6 more comments
$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$
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$
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 hours ago
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$
1
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
3
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
20 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 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
yesterday
6
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
3
$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
22 hours ago
1
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
2
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
|
show 2 more comments
$begingroup$
There's a way to do it with barely any maths:
It's clear that if there's an odd number of heads, there's an even number of tails and vice versa, so P(even number of heads) + P(even number of tails) = 1.
Formally rename "heads" to "tails". The problem remains unchanged.
So P(even number of heads) = P(even number of tails) = 1/2.
New contributor
$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
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
25
$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
22 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
21 hours ago
14
$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
21 hours ago
2
$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
21 hours ago
3
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
|
show 6 more comments
$begingroup$
The probability is $frac{1}{2}$ because the last flip determines it.
$endgroup$
25
$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
22 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
21 hours ago
14
$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
21 hours ago
2
$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
21 hours ago
3
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
|
show 6 more comments
$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 yesterday
Jorge Fernández HidalgoJorge Fernández Hidalgo
76k1193195
76k1193195
25
$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
22 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
21 hours ago
14
$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
21 hours ago
2
$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
21 hours ago
3
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
|
show 6 more comments
25
$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
22 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
21 hours ago
14
$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
21 hours ago
2
$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
21 hours ago
3
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
25
25
$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
22 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
22 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
21 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
21 hours ago
14
14
$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
21 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
21 hours ago
2
2
$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
21 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
21 hours ago
3
3
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
$begingroup$
I disagree that the underlying assumption is "with eight coins, an even number of heads occurs with probability $1/2$" -- that assumption is not necessary for the answer at all. If you flip 8 coins of varying biases, but the 9th and final one is a fair coin, then this answer is still correct.
$endgroup$
– Mees de Vries
9 hours ago
|
show 6 more comments
$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 yesterday
Ethan BolkerEthan Bolker
44.3k553118
44.3k553118
add a comment |
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$
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 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$
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 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$
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 yesterday
VasyaVasya
3,5671517
3,5671517
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 hours ago
add a comment |
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 hours ago
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 hours ago
$begingroup$
Comparing the number of favorable outcomes with all possible outcomes in this way only works for a fair (50% heads/50% tails) coin.
$endgroup$
– Richard Ward
4 hours ago
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 yesterday
ArthurArthur
117k7116200
117k7116200
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$
1
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
3
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
20 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 hours 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$
1
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
3
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
20 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 hours 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 yesterday
FrxstremFrxstrem
4631813
4631813
1
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
3
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
20 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 hours ago
add a comment |
1
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
3
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
20 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 hours ago
1
1
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
$begingroup$
Ethan Bolker already gave this explanation 2 hours ago.
$endgroup$
– Paul Sinclair
yesterday
3
3
$begingroup$
@PaulSinclair Yes, he did. But I found this explanation clearer than Ethan's, which skips a number of steps.
$endgroup$
– CJ Dennis
20 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
20 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
@PaulSinclair are they required to have read Ethan's answer first before going here?
$endgroup$
– The Great Duck
18 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 hours ago
$begingroup$
I didn't understand Ethan's answer and I understood this one perfectly.
$endgroup$
– Todd Wilcox
6 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
yesterday
6
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
3
$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
22 hours ago
1
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
2
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
|
show 2 more comments
$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
yesterday
6
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
3
$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
22 hours ago
1
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
2
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
|
show 2 more comments
$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 yesterday
PeterPeter
48.2k1139133
48.2k1139133
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
yesterday
6
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
3
$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
22 hours ago
1
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
2
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
|
show 2 more comments
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
yesterday
6
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
3
$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
22 hours ago
1
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
2
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
1
1
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
yesterday
$begingroup$
This is , by the way, true for EVERY number of coins (even for one coin).
$endgroup$
– Peter
yesterday
6
6
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
$begingroup$
Pedantic point: If zero coins are tossed, the probability of an even number of heads is 100%.
$endgroup$
– Brian
yesterday
3
3
$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
22 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
22 hours ago
1
1
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
$begingroup$
@EricLippert: No it doesn't. If the probability in both cases is the same, then the probability overall is the same...
$endgroup$
– user21820
14 hours ago
2
2
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
$begingroup$
@EricLippert No. If the probability of an even number of heads in 8 tosses is p (and the probability of an odd number of heads is 1-p), without assuming the value of p, the probability of an even number in all 9 tosses is p·(1/2) + (1-p)(1/2), which turns out to be exactly 1/2.
$endgroup$
– dgstranz
12 hours ago
|
show 2 more comments
$begingroup$
There's a way to do it with barely any maths:
It's clear that if there's an odd number of heads, there's an even number of tails and vice versa, so P(even number of heads) + P(even number of tails) = 1.
Formally rename "heads" to "tails". The problem remains unchanged.
So P(even number of heads) = P(even number of tails) = 1/2.
New contributor
$endgroup$
add a comment |
$begingroup$
There's a way to do it with barely any maths:
It's clear that if there's an odd number of heads, there's an even number of tails and vice versa, so P(even number of heads) + P(even number of tails) = 1.
Formally rename "heads" to "tails". The problem remains unchanged.
So P(even number of heads) = P(even number of tails) = 1/2.
New contributor
$endgroup$
add a comment |
$begingroup$
There's a way to do it with barely any maths:
It's clear that if there's an odd number of heads, there's an even number of tails and vice versa, so P(even number of heads) + P(even number of tails) = 1.
Formally rename "heads" to "tails". The problem remains unchanged.
So P(even number of heads) = P(even number of tails) = 1/2.
New contributor
$endgroup$
There's a way to do it with barely any maths:
It's clear that if there's an odd number of heads, there's an even number of tails and vice versa, so P(even number of heads) + P(even number of tails) = 1.
Formally rename "heads" to "tails". The problem remains unchanged.
So P(even number of heads) = P(even number of tails) = 1/2.
New contributor
edited 14 hours ago
New contributor
answered 14 hours ago
RemellionRemellion
1434
1434
New contributor
New contributor
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 22 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 19 hours ago
Kyle MillerKyle Miller
9,485930
9,485930
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
2
$begingroup$
Zero is an even number, too.
$endgroup$
– saulspatz
yesterday
$begingroup$
What about $k=0$?
$endgroup$
– Dbchatto67
yesterday
4
$begingroup$
Either Heads or Tails but not both must be even, so $.5$
$endgroup$
– lulu
yesterday
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
yesterday
3
$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
yesterday