Expected number of good presents
$begingroup$
Given $b$ boys and $g$ girls. Children give presents to each other. They know who gives a present whom from random permutation of $1,2,dots b+g$. If child gives present to child with same gender present is good with probability $p_1$, otherwise probability is $p_2$. Presents are good independently. We have a random variable $X$ representing number of good presents. What is $E(X)$ and $Var(X)$?
My idea of solving this:
Without loss of generality I assume that $g le b$. Let $f(k)$ - number of permutations representing cases in which exactly $k$ girls give present to boys. $f(k) = [g (g-1)cdots (g-k+1)b(b-1) cdots (b-k+1)]cdot [g (g-1)cdots (g-k+1)]cdot b! = frac{g!}{(g-k)!}frac{b!}{(b-k)!} frac{g!}{(g-k)!}b!$
$E(X) = sumlimits_{k=0}^{g}{frac{f(k)}{(b+g)!}(E(Binom(b+g-2k, p_1))+E(Binom(2k, p_2)))} = frac{g!g!}{(b+g)!}sumlimits_{k=0}^{g}{frac{(b+g-2k)p_1+(2k)p_2}{(b-k)!(g-k)!(g-k)!}}$
How to finish it?
probability random-variables variance expected-value
$endgroup$
add a comment |
$begingroup$
Given $b$ boys and $g$ girls. Children give presents to each other. They know who gives a present whom from random permutation of $1,2,dots b+g$. If child gives present to child with same gender present is good with probability $p_1$, otherwise probability is $p_2$. Presents are good independently. We have a random variable $X$ representing number of good presents. What is $E(X)$ and $Var(X)$?
My idea of solving this:
Without loss of generality I assume that $g le b$. Let $f(k)$ - number of permutations representing cases in which exactly $k$ girls give present to boys. $f(k) = [g (g-1)cdots (g-k+1)b(b-1) cdots (b-k+1)]cdot [g (g-1)cdots (g-k+1)]cdot b! = frac{g!}{(g-k)!}frac{b!}{(b-k)!} frac{g!}{(g-k)!}b!$
$E(X) = sumlimits_{k=0}^{g}{frac{f(k)}{(b+g)!}(E(Binom(b+g-2k, p_1))+E(Binom(2k, p_2)))} = frac{g!g!}{(b+g)!}sumlimits_{k=0}^{g}{frac{(b+g-2k)p_1+(2k)p_2}{(b-k)!(g-k)!(g-k)!}}$
How to finish it?
probability random-variables variance expected-value
$endgroup$
add a comment |
$begingroup$
Given $b$ boys and $g$ girls. Children give presents to each other. They know who gives a present whom from random permutation of $1,2,dots b+g$. If child gives present to child with same gender present is good with probability $p_1$, otherwise probability is $p_2$. Presents are good independently. We have a random variable $X$ representing number of good presents. What is $E(X)$ and $Var(X)$?
My idea of solving this:
Without loss of generality I assume that $g le b$. Let $f(k)$ - number of permutations representing cases in which exactly $k$ girls give present to boys. $f(k) = [g (g-1)cdots (g-k+1)b(b-1) cdots (b-k+1)]cdot [g (g-1)cdots (g-k+1)]cdot b! = frac{g!}{(g-k)!}frac{b!}{(b-k)!} frac{g!}{(g-k)!}b!$
$E(X) = sumlimits_{k=0}^{g}{frac{f(k)}{(b+g)!}(E(Binom(b+g-2k, p_1))+E(Binom(2k, p_2)))} = frac{g!g!}{(b+g)!}sumlimits_{k=0}^{g}{frac{(b+g-2k)p_1+(2k)p_2}{(b-k)!(g-k)!(g-k)!}}$
How to finish it?
probability random-variables variance expected-value
$endgroup$
Given $b$ boys and $g$ girls. Children give presents to each other. They know who gives a present whom from random permutation of $1,2,dots b+g$. If child gives present to child with same gender present is good with probability $p_1$, otherwise probability is $p_2$. Presents are good independently. We have a random variable $X$ representing number of good presents. What is $E(X)$ and $Var(X)$?
My idea of solving this:
Without loss of generality I assume that $g le b$. Let $f(k)$ - number of permutations representing cases in which exactly $k$ girls give present to boys. $f(k) = [g (g-1)cdots (g-k+1)b(b-1) cdots (b-k+1)]cdot [g (g-1)cdots (g-k+1)]cdot b! = frac{g!}{(g-k)!}frac{b!}{(b-k)!} frac{g!}{(g-k)!}b!$
$E(X) = sumlimits_{k=0}^{g}{frac{f(k)}{(b+g)!}(E(Binom(b+g-2k, p_1))+E(Binom(2k, p_2)))} = frac{g!g!}{(b+g)!}sumlimits_{k=0}^{g}{frac{(b+g-2k)p_1+(2k)p_2}{(b-k)!(g-k)!(g-k)!}}$
How to finish it?
probability random-variables variance expected-value
probability random-variables variance expected-value
asked Dec 11 '18 at 0:00
uuduuudu
12
12
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
This is a good example of when using indicator random variables is extremely helpful and avoids the sort of complicated computation that your first attempt involves.
Let $I_i$ be the indicator for the event ${text{the $i$th child received a good present}}$ (that is, $I_i$ equals $1$ if the event holds, and otherwise equals $0$).
Then $X = sum_{i=1}^{b+g} I_i$ so
$$E[X] = Eleft[sum_{i=1}^{b+g} I_i right]= sum_{i=1}^{b+g} E[I_i].$$
It is much easier to compute each $E[I_i]$ individually than to compute $E[X]$ directly.
So, the remaining task is to compute
$$E[I_i] = P(text{the $i$th child received a good present}) = cdots$$
for each $i$. Can you take it from here?
Similarly,
$$E[X^2] = Eleft[left(sum_{i=1}^{b+g} I_iright)^2right] = sum_{i=1}^{b+g} E[I_i^2] + 2 sum_{i ne j} E[I_i I_j].$$
If we compute this, we can compute the variance of $X$.
Note $E[I_i^2] = E[I_i]$ because $I_i$ takes values $0$ or $1$, and note that you have already computed this quantity above.
Thus the only new quantity we have left to compute is $E[I_i I_j]$ for $i ne j$.
This is
$$E[I_i I_j] = Ptext{(both children $i$ and $j$ receive good presents}) = cdots$$
Can you take it from here?
$endgroup$
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
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%2f3034677%2fexpected-number-of-good-presents%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
This is a good example of when using indicator random variables is extremely helpful and avoids the sort of complicated computation that your first attempt involves.
Let $I_i$ be the indicator for the event ${text{the $i$th child received a good present}}$ (that is, $I_i$ equals $1$ if the event holds, and otherwise equals $0$).
Then $X = sum_{i=1}^{b+g} I_i$ so
$$E[X] = Eleft[sum_{i=1}^{b+g} I_i right]= sum_{i=1}^{b+g} E[I_i].$$
It is much easier to compute each $E[I_i]$ individually than to compute $E[X]$ directly.
So, the remaining task is to compute
$$E[I_i] = P(text{the $i$th child received a good present}) = cdots$$
for each $i$. Can you take it from here?
Similarly,
$$E[X^2] = Eleft[left(sum_{i=1}^{b+g} I_iright)^2right] = sum_{i=1}^{b+g} E[I_i^2] + 2 sum_{i ne j} E[I_i I_j].$$
If we compute this, we can compute the variance of $X$.
Note $E[I_i^2] = E[I_i]$ because $I_i$ takes values $0$ or $1$, and note that you have already computed this quantity above.
Thus the only new quantity we have left to compute is $E[I_i I_j]$ for $i ne j$.
This is
$$E[I_i I_j] = Ptext{(both children $i$ and $j$ receive good presents}) = cdots$$
Can you take it from here?
$endgroup$
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
add a comment |
$begingroup$
This is a good example of when using indicator random variables is extremely helpful and avoids the sort of complicated computation that your first attempt involves.
Let $I_i$ be the indicator for the event ${text{the $i$th child received a good present}}$ (that is, $I_i$ equals $1$ if the event holds, and otherwise equals $0$).
Then $X = sum_{i=1}^{b+g} I_i$ so
$$E[X] = Eleft[sum_{i=1}^{b+g} I_i right]= sum_{i=1}^{b+g} E[I_i].$$
It is much easier to compute each $E[I_i]$ individually than to compute $E[X]$ directly.
So, the remaining task is to compute
$$E[I_i] = P(text{the $i$th child received a good present}) = cdots$$
for each $i$. Can you take it from here?
Similarly,
$$E[X^2] = Eleft[left(sum_{i=1}^{b+g} I_iright)^2right] = sum_{i=1}^{b+g} E[I_i^2] + 2 sum_{i ne j} E[I_i I_j].$$
If we compute this, we can compute the variance of $X$.
Note $E[I_i^2] = E[I_i]$ because $I_i$ takes values $0$ or $1$, and note that you have already computed this quantity above.
Thus the only new quantity we have left to compute is $E[I_i I_j]$ for $i ne j$.
This is
$$E[I_i I_j] = Ptext{(both children $i$ and $j$ receive good presents}) = cdots$$
Can you take it from here?
$endgroup$
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
add a comment |
$begingroup$
This is a good example of when using indicator random variables is extremely helpful and avoids the sort of complicated computation that your first attempt involves.
Let $I_i$ be the indicator for the event ${text{the $i$th child received a good present}}$ (that is, $I_i$ equals $1$ if the event holds, and otherwise equals $0$).
Then $X = sum_{i=1}^{b+g} I_i$ so
$$E[X] = Eleft[sum_{i=1}^{b+g} I_i right]= sum_{i=1}^{b+g} E[I_i].$$
It is much easier to compute each $E[I_i]$ individually than to compute $E[X]$ directly.
So, the remaining task is to compute
$$E[I_i] = P(text{the $i$th child received a good present}) = cdots$$
for each $i$. Can you take it from here?
Similarly,
$$E[X^2] = Eleft[left(sum_{i=1}^{b+g} I_iright)^2right] = sum_{i=1}^{b+g} E[I_i^2] + 2 sum_{i ne j} E[I_i I_j].$$
If we compute this, we can compute the variance of $X$.
Note $E[I_i^2] = E[I_i]$ because $I_i$ takes values $0$ or $1$, and note that you have already computed this quantity above.
Thus the only new quantity we have left to compute is $E[I_i I_j]$ for $i ne j$.
This is
$$E[I_i I_j] = Ptext{(both children $i$ and $j$ receive good presents}) = cdots$$
Can you take it from here?
$endgroup$
This is a good example of when using indicator random variables is extremely helpful and avoids the sort of complicated computation that your first attempt involves.
Let $I_i$ be the indicator for the event ${text{the $i$th child received a good present}}$ (that is, $I_i$ equals $1$ if the event holds, and otherwise equals $0$).
Then $X = sum_{i=1}^{b+g} I_i$ so
$$E[X] = Eleft[sum_{i=1}^{b+g} I_i right]= sum_{i=1}^{b+g} E[I_i].$$
It is much easier to compute each $E[I_i]$ individually than to compute $E[X]$ directly.
So, the remaining task is to compute
$$E[I_i] = P(text{the $i$th child received a good present}) = cdots$$
for each $i$. Can you take it from here?
Similarly,
$$E[X^2] = Eleft[left(sum_{i=1}^{b+g} I_iright)^2right] = sum_{i=1}^{b+g} E[I_i^2] + 2 sum_{i ne j} E[I_i I_j].$$
If we compute this, we can compute the variance of $X$.
Note $E[I_i^2] = E[I_i]$ because $I_i$ takes values $0$ or $1$, and note that you have already computed this quantity above.
Thus the only new quantity we have left to compute is $E[I_i I_j]$ for $i ne j$.
This is
$$E[I_i I_j] = Ptext{(both children $i$ and $j$ receive good presents}) = cdots$$
Can you take it from here?
answered Dec 11 '18 at 0:11
angryavianangryavian
40.6k23380
40.6k23380
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
add a comment |
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
$begingroup$
So, $E(I_i) = frac{g}{g+b}p_1+frac{b}{g+b}p_2$ for $i le g$ and E(I_i) = $frac{g}{g+b}p_2+frac{b}{g+b}p_1$ for $i > g$?
$endgroup$
– uudu
Dec 11 '18 at 0:21
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%2f3034677%2fexpected-number-of-good-presents%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