Generalised Case for Expected Value of Children to get a boy and a girl












1














Source: (Harvard Statistics 110: see #17, p. 29 of pdf).



A couple decides to keep having children until they have at least one boy and at least one girl, and then stop. Assume they never have twins, that the "trials" are independent with probability 1/2 of a boy, and that they are fertile enough to keep producing children indefinitely. What is the expected number of children?



I would like to answer this question more generally with
the probability of a boy being $p$ and the probability of a girl being $q$.



Let $C$ be a random variable denoting the number of children born until at least one boy and at least one girl is born.



Let $B$ be a random variable denoting the number of boys born until the first girl.



Let $G$ be a random variable denoting the number of girls born until the first boy.



Then the probability of $C$, the number of children being equal to $k$ is
$$p^{k-1}q+q^{k-1}p$$



So



$$E(C)=qsum_{k=2}^infty kp^{k-1}+psum_{k=2}^infty kq^{k-1}$$
$$=q frac{d}{dp}(frac{p^2}{1-p})+pfrac{d}{dq}(frac{q^2}{1-q})$$
$$=1+frac{p^2+q^2}{pq}$$



However, we could also think of the problem as $C=B+G$.



Now $$E(C)=E(B)+E(G)$$ however I cannot obtain my previous expression.










share|cite|improve this question
























  • I don't understand your second method. If you want an alternate method using Expectation directly: Let $E_B,E_G$ be the expected number of kids before you get a boy, girl (resp.). then $E=ptimes (E_G+1)+qtimes (E_B+1)$.
    – lulu
    Nov 20 '18 at 12:04












  • Total Children = Number of Boys Born + Number of Girls Born. So I thought this would be an intuitive way to use expectation.
    – An Invisible Carrot
    Nov 20 '18 at 12:08










  • I still don't get it. How are you embedding the condition that you stop once you have at least one of each?
    – lulu
    Nov 20 '18 at 12:09












  • So P(B)=2 would be $p^2q$ for example. Its assumed that the condition has been embedded?
    – An Invisible Carrot
    Nov 20 '18 at 12:13










  • Perhaps instead defining B to be the number of boys before the first girl, and G the number of girls before the first boy is appropriate. So the case mentioned in my question would have been dealt with in the G variable, where G=1,2,...
    – An Invisible Carrot
    Nov 20 '18 at 12:17
















1














Source: (Harvard Statistics 110: see #17, p. 29 of pdf).



A couple decides to keep having children until they have at least one boy and at least one girl, and then stop. Assume they never have twins, that the "trials" are independent with probability 1/2 of a boy, and that they are fertile enough to keep producing children indefinitely. What is the expected number of children?



I would like to answer this question more generally with
the probability of a boy being $p$ and the probability of a girl being $q$.



Let $C$ be a random variable denoting the number of children born until at least one boy and at least one girl is born.



Let $B$ be a random variable denoting the number of boys born until the first girl.



Let $G$ be a random variable denoting the number of girls born until the first boy.



Then the probability of $C$, the number of children being equal to $k$ is
$$p^{k-1}q+q^{k-1}p$$



So



$$E(C)=qsum_{k=2}^infty kp^{k-1}+psum_{k=2}^infty kq^{k-1}$$
$$=q frac{d}{dp}(frac{p^2}{1-p})+pfrac{d}{dq}(frac{q^2}{1-q})$$
$$=1+frac{p^2+q^2}{pq}$$



However, we could also think of the problem as $C=B+G$.



Now $$E(C)=E(B)+E(G)$$ however I cannot obtain my previous expression.










share|cite|improve this question
























  • I don't understand your second method. If you want an alternate method using Expectation directly: Let $E_B,E_G$ be the expected number of kids before you get a boy, girl (resp.). then $E=ptimes (E_G+1)+qtimes (E_B+1)$.
    – lulu
    Nov 20 '18 at 12:04












  • Total Children = Number of Boys Born + Number of Girls Born. So I thought this would be an intuitive way to use expectation.
    – An Invisible Carrot
    Nov 20 '18 at 12:08










  • I still don't get it. How are you embedding the condition that you stop once you have at least one of each?
    – lulu
    Nov 20 '18 at 12:09












  • So P(B)=2 would be $p^2q$ for example. Its assumed that the condition has been embedded?
    – An Invisible Carrot
    Nov 20 '18 at 12:13










  • Perhaps instead defining B to be the number of boys before the first girl, and G the number of girls before the first boy is appropriate. So the case mentioned in my question would have been dealt with in the G variable, where G=1,2,...
    – An Invisible Carrot
    Nov 20 '18 at 12:17














1












1








1







Source: (Harvard Statistics 110: see #17, p. 29 of pdf).



A couple decides to keep having children until they have at least one boy and at least one girl, and then stop. Assume they never have twins, that the "trials" are independent with probability 1/2 of a boy, and that they are fertile enough to keep producing children indefinitely. What is the expected number of children?



I would like to answer this question more generally with
the probability of a boy being $p$ and the probability of a girl being $q$.



Let $C$ be a random variable denoting the number of children born until at least one boy and at least one girl is born.



Let $B$ be a random variable denoting the number of boys born until the first girl.



Let $G$ be a random variable denoting the number of girls born until the first boy.



Then the probability of $C$, the number of children being equal to $k$ is
$$p^{k-1}q+q^{k-1}p$$



So



$$E(C)=qsum_{k=2}^infty kp^{k-1}+psum_{k=2}^infty kq^{k-1}$$
$$=q frac{d}{dp}(frac{p^2}{1-p})+pfrac{d}{dq}(frac{q^2}{1-q})$$
$$=1+frac{p^2+q^2}{pq}$$



However, we could also think of the problem as $C=B+G$.



Now $$E(C)=E(B)+E(G)$$ however I cannot obtain my previous expression.










share|cite|improve this question















Source: (Harvard Statistics 110: see #17, p. 29 of pdf).



A couple decides to keep having children until they have at least one boy and at least one girl, and then stop. Assume they never have twins, that the "trials" are independent with probability 1/2 of a boy, and that they are fertile enough to keep producing children indefinitely. What is the expected number of children?



I would like to answer this question more generally with
the probability of a boy being $p$ and the probability of a girl being $q$.



Let $C$ be a random variable denoting the number of children born until at least one boy and at least one girl is born.



Let $B$ be a random variable denoting the number of boys born until the first girl.



Let $G$ be a random variable denoting the number of girls born until the first boy.



Then the probability of $C$, the number of children being equal to $k$ is
$$p^{k-1}q+q^{k-1}p$$



So



$$E(C)=qsum_{k=2}^infty kp^{k-1}+psum_{k=2}^infty kq^{k-1}$$
$$=q frac{d}{dp}(frac{p^2}{1-p})+pfrac{d}{dq}(frac{q^2}{1-q})$$
$$=1+frac{p^2+q^2}{pq}$$



However, we could also think of the problem as $C=B+G$.



Now $$E(C)=E(B)+E(G)$$ however I cannot obtain my previous expression.







probability expected-value






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 20 '18 at 12:44

























asked Nov 20 '18 at 12:01









An Invisible Carrot

1018




1018












  • I don't understand your second method. If you want an alternate method using Expectation directly: Let $E_B,E_G$ be the expected number of kids before you get a boy, girl (resp.). then $E=ptimes (E_G+1)+qtimes (E_B+1)$.
    – lulu
    Nov 20 '18 at 12:04












  • Total Children = Number of Boys Born + Number of Girls Born. So I thought this would be an intuitive way to use expectation.
    – An Invisible Carrot
    Nov 20 '18 at 12:08










  • I still don't get it. How are you embedding the condition that you stop once you have at least one of each?
    – lulu
    Nov 20 '18 at 12:09












  • So P(B)=2 would be $p^2q$ for example. Its assumed that the condition has been embedded?
    – An Invisible Carrot
    Nov 20 '18 at 12:13










  • Perhaps instead defining B to be the number of boys before the first girl, and G the number of girls before the first boy is appropriate. So the case mentioned in my question would have been dealt with in the G variable, where G=1,2,...
    – An Invisible Carrot
    Nov 20 '18 at 12:17


















  • I don't understand your second method. If you want an alternate method using Expectation directly: Let $E_B,E_G$ be the expected number of kids before you get a boy, girl (resp.). then $E=ptimes (E_G+1)+qtimes (E_B+1)$.
    – lulu
    Nov 20 '18 at 12:04












  • Total Children = Number of Boys Born + Number of Girls Born. So I thought this would be an intuitive way to use expectation.
    – An Invisible Carrot
    Nov 20 '18 at 12:08










  • I still don't get it. How are you embedding the condition that you stop once you have at least one of each?
    – lulu
    Nov 20 '18 at 12:09












  • So P(B)=2 would be $p^2q$ for example. Its assumed that the condition has been embedded?
    – An Invisible Carrot
    Nov 20 '18 at 12:13










  • Perhaps instead defining B to be the number of boys before the first girl, and G the number of girls before the first boy is appropriate. So the case mentioned in my question would have been dealt with in the G variable, where G=1,2,...
    – An Invisible Carrot
    Nov 20 '18 at 12:17
















I don't understand your second method. If you want an alternate method using Expectation directly: Let $E_B,E_G$ be the expected number of kids before you get a boy, girl (resp.). then $E=ptimes (E_G+1)+qtimes (E_B+1)$.
– lulu
Nov 20 '18 at 12:04






I don't understand your second method. If you want an alternate method using Expectation directly: Let $E_B,E_G$ be the expected number of kids before you get a boy, girl (resp.). then $E=ptimes (E_G+1)+qtimes (E_B+1)$.
– lulu
Nov 20 '18 at 12:04














Total Children = Number of Boys Born + Number of Girls Born. So I thought this would be an intuitive way to use expectation.
– An Invisible Carrot
Nov 20 '18 at 12:08




Total Children = Number of Boys Born + Number of Girls Born. So I thought this would be an intuitive way to use expectation.
– An Invisible Carrot
Nov 20 '18 at 12:08












I still don't get it. How are you embedding the condition that you stop once you have at least one of each?
– lulu
Nov 20 '18 at 12:09






I still don't get it. How are you embedding the condition that you stop once you have at least one of each?
– lulu
Nov 20 '18 at 12:09














So P(B)=2 would be $p^2q$ for example. Its assumed that the condition has been embedded?
– An Invisible Carrot
Nov 20 '18 at 12:13




So P(B)=2 would be $p^2q$ for example. Its assumed that the condition has been embedded?
– An Invisible Carrot
Nov 20 '18 at 12:13












Perhaps instead defining B to be the number of boys before the first girl, and G the number of girls before the first boy is appropriate. So the case mentioned in my question would have been dealt with in the G variable, where G=1,2,...
– An Invisible Carrot
Nov 20 '18 at 12:17




Perhaps instead defining B to be the number of boys before the first girl, and G the number of girls before the first boy is appropriate. So the case mentioned in my question would have been dealt with in the G variable, where G=1,2,...
– An Invisible Carrot
Nov 20 '18 at 12:17















active

oldest

votes











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3006234%2fgeneralised-case-for-expected-value-of-children-to-get-a-boy-and-a-girl%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3006234%2fgeneralised-case-for-expected-value-of-children-to-get-a-boy-and-a-girl%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith