Computing the expectation of the number of balls in a box The 2019 Stack Overflow Developer...
Is bread bad for ducks?
Output the Arecibo Message
Why isn't the circumferential light around the M87 black hole's event horizon symmetric?
Inverse Relationship Between Precision and Recall
What is the grammatical structure of "Il est de formation classique"?
Worn-tile Scrabble
Old scifi movie from the 50s or 60s with men in solid red uniforms who interrogate a spy from the past
What information about me do stores get via my credit card?
Compute the product of 3 dictionaries and concatenate keys and values
Did any laptop computers have a built-in 5 1/4 inch floppy drive?
How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?
How to type a long/em dash `—`
Geography at the pixel level
Deal with toxic manager when you can't quit
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
Using xargs with pdftk
Sums of normal random variables
What is the meaning of Triage in Cybersec world?
APIPA and LAN Broadcast Domain
Getting crown tickets for Statue of Liberty
Why are there uneven bright areas in this photo of black hole?
How to deal with speedster characters?
If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?
What is this business jet?
Computing the expectation of the number of balls in a box
The 2019 Stack Overflow Developer Survey Results Are InThere is two boxes with one with 8 balls and one with 4 ballsdrawing balls from box without replacemntRandom distribution of colored balls into boxes.Optimal Number of White BallsCompute possible outcomes when get balls from a boxPoisson Approximation Problem involving putting balls into boxesCompute expected received balls from boxesput n balls into n boxesA question of probability regarding expectation and variance of a random variable.Distributing 5 distinct balls into 3 distinct boxes
$begingroup$
- There are $r$ boxes and $n$ balls.
- Each ball is placed in a box with equal probability, independently of the other balls.
- Let $X_{i}$ be the number of balls in box $i$,
$1 leq i leq r$. - Compute $mathbb{E}left[X_{i}right], mathbb{E}left[X_{i}X_{j}right]$.
I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.
probability-theory
$endgroup$
add a comment |
$begingroup$
- There are $r$ boxes and $n$ balls.
- Each ball is placed in a box with equal probability, independently of the other balls.
- Let $X_{i}$ be the number of balls in box $i$,
$1 leq i leq r$. - Compute $mathbb{E}left[X_{i}right], mathbb{E}left[X_{i}X_{j}right]$.
I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.
probability-theory
$endgroup$
$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
3 hours ago
$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
3 hours ago
$begingroup$
Computationally, the answer to the second part appears to be $frac{n^2}{r^2}$
$endgroup$
– Sean Lee
2 hours ago
add a comment |
$begingroup$
- There are $r$ boxes and $n$ balls.
- Each ball is placed in a box with equal probability, independently of the other balls.
- Let $X_{i}$ be the number of balls in box $i$,
$1 leq i leq r$. - Compute $mathbb{E}left[X_{i}right], mathbb{E}left[X_{i}X_{j}right]$.
I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.
probability-theory
$endgroup$
- There are $r$ boxes and $n$ balls.
- Each ball is placed in a box with equal probability, independently of the other balls.
- Let $X_{i}$ be the number of balls in box $i$,
$1 leq i leq r$. - Compute $mathbb{E}left[X_{i}right], mathbb{E}left[X_{i}X_{j}right]$.
I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.
probability-theory
probability-theory
edited 2 hours ago
Felix Marin
68.9k7110147
68.9k7110147
asked 3 hours ago
631631
465
465
$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
3 hours ago
$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
3 hours ago
$begingroup$
Computationally, the answer to the second part appears to be $frac{n^2}{r^2}$
$endgroup$
– Sean Lee
2 hours ago
add a comment |
$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
3 hours ago
$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
3 hours ago
$begingroup$
Computationally, the answer to the second part appears to be $frac{n^2}{r^2}$
$endgroup$
– Sean Lee
2 hours ago
$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
3 hours ago
$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
3 hours ago
$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
3 hours ago
$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
3 hours ago
$begingroup$
Computationally, the answer to the second part appears to be $frac{n^2}{r^2}$
$endgroup$
– Sean Lee
2 hours ago
$begingroup$
Computationally, the answer to the second part appears to be $frac{n^2}{r^2}$
$endgroup$
– Sean Lee
2 hours ago
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:
$$ mathbb{E}[X_i] = frac{n}{r} $$
Now, we would like to know what is $mathbb{E}[X_i X_j] $.
We begin by making the following observation:
$$X_i = n - sum_{jneq i}X_j $$
Which gives us:
$$ X_isum_{jneq i}X_j = nX_i - X_i^2$$
Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:
begin{align}mathbb{E}[X_i X_j] &= frac{1}{r}Big(mathbb{E}[X_i sum_{jneq i} X_j] + mathbb{E}[X_i^2]Big) \
&= frac{1}{r} mathbb{E}[nX_i] \
&= frac{n^2}{r^2}
end{align}
$endgroup$
add a comment |
$begingroup$
For the first part, you can use linearity of expectation to compute $mathbb{E}[X_i]$.
Specifically, you know that for a fixed box, the probability of putting a ball in it
is $frac{1}{r}$. Let
$$
Y_k^{(i)} = begin{cases}
1 &, text{ if ball $k$ was placed in box $i$} \
0 &, text{ otherwise}
end{cases},
$$
which satisfies $mathbb{E}[Y_k^{(i)}] = mathbb{P}(Y_k^{(i)} = 1) = frac{1}{r}.$
Then you can write
$$
X_i = sum_{j=1}^n Y_j^{(i)} Rightarrow mathbb{E}X_i = sum_{j=1}^n frac{1}{r} = frac{n}{r}.
$$
$endgroup$
add a comment |
$begingroup$
Think of placing the ball in box "$i$" as success and not placing it as a failure.
This situation can be represented using the Hypergeometric Distribution.
$$
P(X=k) = frac{{K choose k} {N- Kchoose n - k}}{{N choose n}}.
$$
$N$ is the population size (number of boxes $r$)
$K$ is the number of success states in the population (just $1$ because the success is defined as placing the ball in box "$i$".)
$n$ is the number of draws (the number of balls $n$).
$k$ is the number of observed successes (the number of balls in box "$i$").
The expectation of the Hypergeometric Distribution is $nfrac{K}N$, hence the mean of your variable
$$E[X_i]=nfrac{1}{r}=frac{n}{r}$$
$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%2f3184022%2fcomputing-the-expectation-of-the-number-of-balls-in-a-box%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:
$$ mathbb{E}[X_i] = frac{n}{r} $$
Now, we would like to know what is $mathbb{E}[X_i X_j] $.
We begin by making the following observation:
$$X_i = n - sum_{jneq i}X_j $$
Which gives us:
$$ X_isum_{jneq i}X_j = nX_i - X_i^2$$
Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:
begin{align}mathbb{E}[X_i X_j] &= frac{1}{r}Big(mathbb{E}[X_i sum_{jneq i} X_j] + mathbb{E}[X_i^2]Big) \
&= frac{1}{r} mathbb{E}[nX_i] \
&= frac{n^2}{r^2}
end{align}
$endgroup$
add a comment |
$begingroup$
Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:
$$ mathbb{E}[X_i] = frac{n}{r} $$
Now, we would like to know what is $mathbb{E}[X_i X_j] $.
We begin by making the following observation:
$$X_i = n - sum_{jneq i}X_j $$
Which gives us:
$$ X_isum_{jneq i}X_j = nX_i - X_i^2$$
Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:
begin{align}mathbb{E}[X_i X_j] &= frac{1}{r}Big(mathbb{E}[X_i sum_{jneq i} X_j] + mathbb{E}[X_i^2]Big) \
&= frac{1}{r} mathbb{E}[nX_i] \
&= frac{n^2}{r^2}
end{align}
$endgroup$
add a comment |
$begingroup$
Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:
$$ mathbb{E}[X_i] = frac{n}{r} $$
Now, we would like to know what is $mathbb{E}[X_i X_j] $.
We begin by making the following observation:
$$X_i = n - sum_{jneq i}X_j $$
Which gives us:
$$ X_isum_{jneq i}X_j = nX_i - X_i^2$$
Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:
begin{align}mathbb{E}[X_i X_j] &= frac{1}{r}Big(mathbb{E}[X_i sum_{jneq i} X_j] + mathbb{E}[X_i^2]Big) \
&= frac{1}{r} mathbb{E}[nX_i] \
&= frac{n^2}{r^2}
end{align}
$endgroup$
Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:
$$ mathbb{E}[X_i] = frac{n}{r} $$
Now, we would like to know what is $mathbb{E}[X_i X_j] $.
We begin by making the following observation:
$$X_i = n - sum_{jneq i}X_j $$
Which gives us:
$$ X_isum_{jneq i}X_j = nX_i - X_i^2$$
Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:
begin{align}mathbb{E}[X_i X_j] &= frac{1}{r}Big(mathbb{E}[X_i sum_{jneq i} X_j] + mathbb{E}[X_i^2]Big) \
&= frac{1}{r} mathbb{E}[nX_i] \
&= frac{n^2}{r^2}
end{align}
edited 2 hours ago
answered 2 hours ago
Sean LeeSean Lee
791214
791214
add a comment |
add a comment |
$begingroup$
For the first part, you can use linearity of expectation to compute $mathbb{E}[X_i]$.
Specifically, you know that for a fixed box, the probability of putting a ball in it
is $frac{1}{r}$. Let
$$
Y_k^{(i)} = begin{cases}
1 &, text{ if ball $k$ was placed in box $i$} \
0 &, text{ otherwise}
end{cases},
$$
which satisfies $mathbb{E}[Y_k^{(i)}] = mathbb{P}(Y_k^{(i)} = 1) = frac{1}{r}.$
Then you can write
$$
X_i = sum_{j=1}^n Y_j^{(i)} Rightarrow mathbb{E}X_i = sum_{j=1}^n frac{1}{r} = frac{n}{r}.
$$
$endgroup$
add a comment |
$begingroup$
For the first part, you can use linearity of expectation to compute $mathbb{E}[X_i]$.
Specifically, you know that for a fixed box, the probability of putting a ball in it
is $frac{1}{r}$. Let
$$
Y_k^{(i)} = begin{cases}
1 &, text{ if ball $k$ was placed in box $i$} \
0 &, text{ otherwise}
end{cases},
$$
which satisfies $mathbb{E}[Y_k^{(i)}] = mathbb{P}(Y_k^{(i)} = 1) = frac{1}{r}.$
Then you can write
$$
X_i = sum_{j=1}^n Y_j^{(i)} Rightarrow mathbb{E}X_i = sum_{j=1}^n frac{1}{r} = frac{n}{r}.
$$
$endgroup$
add a comment |
$begingroup$
For the first part, you can use linearity of expectation to compute $mathbb{E}[X_i]$.
Specifically, you know that for a fixed box, the probability of putting a ball in it
is $frac{1}{r}$. Let
$$
Y_k^{(i)} = begin{cases}
1 &, text{ if ball $k$ was placed in box $i$} \
0 &, text{ otherwise}
end{cases},
$$
which satisfies $mathbb{E}[Y_k^{(i)}] = mathbb{P}(Y_k^{(i)} = 1) = frac{1}{r}.$
Then you can write
$$
X_i = sum_{j=1}^n Y_j^{(i)} Rightarrow mathbb{E}X_i = sum_{j=1}^n frac{1}{r} = frac{n}{r}.
$$
$endgroup$
For the first part, you can use linearity of expectation to compute $mathbb{E}[X_i]$.
Specifically, you know that for a fixed box, the probability of putting a ball in it
is $frac{1}{r}$. Let
$$
Y_k^{(i)} = begin{cases}
1 &, text{ if ball $k$ was placed in box $i$} \
0 &, text{ otherwise}
end{cases},
$$
which satisfies $mathbb{E}[Y_k^{(i)}] = mathbb{P}(Y_k^{(i)} = 1) = frac{1}{r}.$
Then you can write
$$
X_i = sum_{j=1}^n Y_j^{(i)} Rightarrow mathbb{E}X_i = sum_{j=1}^n frac{1}{r} = frac{n}{r}.
$$
answered 2 hours ago
VHarisopVHarisop
1,218421
1,218421
add a comment |
add a comment |
$begingroup$
Think of placing the ball in box "$i$" as success and not placing it as a failure.
This situation can be represented using the Hypergeometric Distribution.
$$
P(X=k) = frac{{K choose k} {N- Kchoose n - k}}{{N choose n}}.
$$
$N$ is the population size (number of boxes $r$)
$K$ is the number of success states in the population (just $1$ because the success is defined as placing the ball in box "$i$".)
$n$ is the number of draws (the number of balls $n$).
$k$ is the number of observed successes (the number of balls in box "$i$").
The expectation of the Hypergeometric Distribution is $nfrac{K}N$, hence the mean of your variable
$$E[X_i]=nfrac{1}{r}=frac{n}{r}$$
$endgroup$
add a comment |
$begingroup$
Think of placing the ball in box "$i$" as success and not placing it as a failure.
This situation can be represented using the Hypergeometric Distribution.
$$
P(X=k) = frac{{K choose k} {N- Kchoose n - k}}{{N choose n}}.
$$
$N$ is the population size (number of boxes $r$)
$K$ is the number of success states in the population (just $1$ because the success is defined as placing the ball in box "$i$".)
$n$ is the number of draws (the number of balls $n$).
$k$ is the number of observed successes (the number of balls in box "$i$").
The expectation of the Hypergeometric Distribution is $nfrac{K}N$, hence the mean of your variable
$$E[X_i]=nfrac{1}{r}=frac{n}{r}$$
$endgroup$
add a comment |
$begingroup$
Think of placing the ball in box "$i$" as success and not placing it as a failure.
This situation can be represented using the Hypergeometric Distribution.
$$
P(X=k) = frac{{K choose k} {N- Kchoose n - k}}{{N choose n}}.
$$
$N$ is the population size (number of boxes $r$)
$K$ is the number of success states in the population (just $1$ because the success is defined as placing the ball in box "$i$".)
$n$ is the number of draws (the number of balls $n$).
$k$ is the number of observed successes (the number of balls in box "$i$").
The expectation of the Hypergeometric Distribution is $nfrac{K}N$, hence the mean of your variable
$$E[X_i]=nfrac{1}{r}=frac{n}{r}$$
$endgroup$
Think of placing the ball in box "$i$" as success and not placing it as a failure.
This situation can be represented using the Hypergeometric Distribution.
$$
P(X=k) = frac{{K choose k} {N- Kchoose n - k}}{{N choose n}}.
$$
$N$ is the population size (number of boxes $r$)
$K$ is the number of success states in the population (just $1$ because the success is defined as placing the ball in box "$i$".)
$n$ is the number of draws (the number of balls $n$).
$k$ is the number of observed successes (the number of balls in box "$i$").
The expectation of the Hypergeometric Distribution is $nfrac{K}N$, hence the mean of your variable
$$E[X_i]=nfrac{1}{r}=frac{n}{r}$$
answered 2 hours ago
RScrlliRScrlli
751114
751114
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%2f3184022%2fcomputing-the-expectation-of-the-number-of-balls-in-a-box%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
3 hours ago
$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
3 hours ago
$begingroup$
Computationally, the answer to the second part appears to be $frac{n^2}{r^2}$
$endgroup$
– Sean Lee
2 hours ago