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

If I can cast sorceries at instant speed, can I use sorcery-speed activated abilities at instant speed?

Are spiders unable to hurt humans, especially very small spiders?

Accepted by European university, rejected by all American ones I applied to? Possible reasons?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

Loose spokes after only a few rides

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

What do these terms in Caesar's Gallic wars mean?

How can I define good in a religion that claims no moral authority?

How to charge AirPods to keep battery healthy?

Why doesn't shell automatically fix "useless use of cat"?

Is it possible for absolutely everyone to attain enlightenment?

How do I free up internal storage if I don't have any apps downloaded?

Why are there uneven bright areas in this photo of black hole?

How to type a long/em dash `—`

Mathematics of imaging the black hole

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

What is this business jet?

How much of the clove should I use when using big garlic heads?

Worn-tile Scrabble

Does HR tell a hiring manager about salary negotiations?

Is it correct to say the Neural Networks are an alternative way of performing Maximum Likelihood Estimation? if not, why?

Is an up-to-date browser secure on an out-of-date OS?

Can there be female White Walkers?



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










5












$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 $mathbbEleft[X_iright], mathbbEleft[X_iX_jright]$.

I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.










share|cite|improve this question











$endgroup$











  • $begingroup$
    Are there any restrictions on $j$?
    $endgroup$
    – Sean Lee
    7 hours ago










  • $begingroup$
    @SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
    $endgroup$
    – 631
    7 hours ago










  • $begingroup$
    Computationally, the answer to the second part appears to be $fracn^2r^2$
    $endgroup$
    – Sean Lee
    6 hours ago










  • $begingroup$
    Have you studied covariance matrices, or vector-valued random variables, at all? That would seem to me to provide the most compact notation for solving this problem.
    $endgroup$
    – Daniel Schepler
    54 mins ago















5












$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 $mathbbEleft[X_iright], mathbbEleft[X_iX_jright]$.

I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.










share|cite|improve this question











$endgroup$











  • $begingroup$
    Are there any restrictions on $j$?
    $endgroup$
    – Sean Lee
    7 hours ago










  • $begingroup$
    @SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
    $endgroup$
    – 631
    7 hours ago










  • $begingroup$
    Computationally, the answer to the second part appears to be $fracn^2r^2$
    $endgroup$
    – Sean Lee
    6 hours ago










  • $begingroup$
    Have you studied covariance matrices, or vector-valued random variables, at all? That would seem to me to provide the most compact notation for solving this problem.
    $endgroup$
    – Daniel Schepler
    54 mins ago













5












5








5





$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 $mathbbEleft[X_iright], mathbbEleft[X_iX_jright]$.

I am preparing for an exam, and I have no idea how to approach this problem. Can someone push me in the right direction ?.










share|cite|improve this question











$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 $mathbbEleft[X_iright], mathbbEleft[X_iX_jright]$.

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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited 6 hours ago









Felix Marin

68.9k7110147




68.9k7110147










asked 7 hours ago









631631

585




585











  • $begingroup$
    Are there any restrictions on $j$?
    $endgroup$
    – Sean Lee
    7 hours ago










  • $begingroup$
    @SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
    $endgroup$
    – 631
    7 hours ago










  • $begingroup$
    Computationally, the answer to the second part appears to be $fracn^2r^2$
    $endgroup$
    – Sean Lee
    6 hours ago










  • $begingroup$
    Have you studied covariance matrices, or vector-valued random variables, at all? That would seem to me to provide the most compact notation for solving this problem.
    $endgroup$
    – Daniel Schepler
    54 mins ago
















  • $begingroup$
    Are there any restrictions on $j$?
    $endgroup$
    – Sean Lee
    7 hours ago










  • $begingroup$
    @SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
    $endgroup$
    – 631
    7 hours ago










  • $begingroup$
    Computationally, the answer to the second part appears to be $fracn^2r^2$
    $endgroup$
    – Sean Lee
    6 hours ago










  • $begingroup$
    Have you studied covariance matrices, or vector-valued random variables, at all? That would seem to me to provide the most compact notation for solving this problem.
    $endgroup$
    – Daniel Schepler
    54 mins ago















$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
7 hours ago




$begingroup$
Are there any restrictions on $j$?
$endgroup$
– Sean Lee
7 hours ago












$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
7 hours ago




$begingroup$
@SeanLee In the question, no. I'm guessing it would have the same restrictions as i.
$endgroup$
– 631
7 hours ago












$begingroup$
Computationally, the answer to the second part appears to be $fracn^2r^2$
$endgroup$
– Sean Lee
6 hours ago




$begingroup$
Computationally, the answer to the second part appears to be $fracn^2r^2$
$endgroup$
– Sean Lee
6 hours ago












$begingroup$
Have you studied covariance matrices, or vector-valued random variables, at all? That would seem to me to provide the most compact notation for solving this problem.
$endgroup$
– Daniel Schepler
54 mins ago




$begingroup$
Have you studied covariance matrices, or vector-valued random variables, at all? That would seem to me to provide the most compact notation for solving this problem.
$endgroup$
– Daniel Schepler
54 mins ago










3 Answers
3






active

oldest

votes


















2












$begingroup$

Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:



$$ mathbbE[X_i] = fracnr $$



Now, we would like to know what is $mathbbE[X_i X_j] $.



We begin by making the following observation:



$$X_i = n - sum_jneq iX_j $$



Which gives us:



$$ X_isum_jneq iX_j = nX_i - X_i^2$$



Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:



beginalignmathbbE[X_i X_j] &= frac1rBig(mathbbE[X_i sum_jneq i X_j] + mathbbE[X_i^2]Big) \
&= frac1r mathbbE[nX_i] \
&= fracn^2r^2
endalign






share|cite|improve this answer











$endgroup$








  • 1




    $begingroup$
    If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
    $endgroup$
    – Daniel Schepler
    1 hour ago











  • $begingroup$
    Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
    $endgroup$
    – Sean Lee
    1 hour ago







  • 1




    $begingroup$
    I've now expanded VHarisop's answer with my calculations for part two of the question.
    $endgroup$
    – Daniel Schepler
    1 hour ago


















4












$begingroup$

For the first part, you can use linearity of expectation to compute $mathbbE[X_i]$.
Specifically, you know that for a fixed box, the probability of putting a ball in it
is $frac1r$. Let



$$
Y_k^(i) = begincases
1 &, text if ball $k$ was placed in box $i$ \
0 &, text otherwise
endcases,
$$

which satisfies $mathbbE[Y_k^(i)] = mathbbP(Y_k^(i) = 1) = frac1r.$
Then you can write



$$
X_i = sum_j=1^n Y_j^(i) Rightarrow mathbbEX_i = sum_j=1^n frac1r = fracnr.
$$




For the second part, you can proceed similarly: $X_i = sum_k=1^n Y_k^(i)$ and $X_j = sum_ell=1^n Y_ell^(j)$, so:
$$
X_i X_j = sum_k=1^n sum_ell=1^n Y_k^(i) Y_ell^(j) implies
mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n mathbbE(Y_k^(i) Y_ell^(j)).
$$

We will first treat the case where $i ne j$. Then, for each term in the sum such that $k = ell$, we must have $Y_k^(i) Y_ell^(j) = Y_k^(i) Y_k^(j) = 0$ since it impossible for ball $k$ to be placed both in box $i$ and in box $j$. On the other hand, if $k ne ell$, then the events corresponding to $Y_k^(i)$ and $Y_ell^(j)$ are independent since the placement of balls $k$ and $ell$ are independent, which implies that $Y_k^(i)$ and $Y_ell^(j)$ are independent random variables. Therefore, in this case,
$$mathbbE(Y_k^(i) Y_ell^(j)) = mathbbE(Y_k^(i)) mathbbE(Y_ell^(j)) = frac1r cdot frac1r.$$
In summary, if $i ne j$, then
$$mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n delta_k ne ell cdot frac1r^2 = fracn(n-1)r^2$$
where $delta_k ne ell$ represents the indicator value which is 1 when $k ne ell$ and 0 when $k = ell$.



For the case $i = j$, I will leave the similar computation of $mathbbE(X_i^2)$ to you, with just the hint that the difference is in the expected value of $mathbbE(Y_k^(i) Y_ell^(j))$ for the case $k = ell$.






share|cite|improve this answer











$endgroup$








  • 1




    $begingroup$
    I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
    $endgroup$
    – Daniel Schepler
    1 hour ago


















0












$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) = fracK choose k N- Kchoose n - kN 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 $nfracKN$, hence the mean of your variable
$$E[X_i]=nfrac1r=fracnr$$






share|cite|improve this answer









$endgroup$













    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%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









    2












    $begingroup$

    Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:



    $$ mathbbE[X_i] = fracnr $$



    Now, we would like to know what is $mathbbE[X_i X_j] $.



    We begin by making the following observation:



    $$X_i = n - sum_jneq iX_j $$



    Which gives us:



    $$ X_isum_jneq iX_j = nX_i - X_i^2$$



    Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:



    beginalignmathbbE[X_i X_j] &= frac1rBig(mathbbE[X_i sum_jneq i X_j] + mathbbE[X_i^2]Big) \
    &= frac1r mathbbE[nX_i] \
    &= fracn^2r^2
    endalign






    share|cite|improve this answer











    $endgroup$








    • 1




      $begingroup$
      If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
      $endgroup$
      – Daniel Schepler
      1 hour ago











    • $begingroup$
      Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
      $endgroup$
      – Sean Lee
      1 hour ago







    • 1




      $begingroup$
      I've now expanded VHarisop's answer with my calculations for part two of the question.
      $endgroup$
      – Daniel Schepler
      1 hour ago















    2












    $begingroup$

    Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:



    $$ mathbbE[X_i] = fracnr $$



    Now, we would like to know what is $mathbbE[X_i X_j] $.



    We begin by making the following observation:



    $$X_i = n - sum_jneq iX_j $$



    Which gives us:



    $$ X_isum_jneq iX_j = nX_i - X_i^2$$



    Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:



    beginalignmathbbE[X_i X_j] &= frac1rBig(mathbbE[X_i sum_jneq i X_j] + mathbbE[X_i^2]Big) \
    &= frac1r mathbbE[nX_i] \
    &= fracn^2r^2
    endalign






    share|cite|improve this answer











    $endgroup$








    • 1




      $begingroup$
      If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
      $endgroup$
      – Daniel Schepler
      1 hour ago











    • $begingroup$
      Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
      $endgroup$
      – Sean Lee
      1 hour ago







    • 1




      $begingroup$
      I've now expanded VHarisop's answer with my calculations for part two of the question.
      $endgroup$
      – Daniel Schepler
      1 hour ago













    2












    2








    2





    $begingroup$

    Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:



    $$ mathbbE[X_i] = fracnr $$



    Now, we would like to know what is $mathbbE[X_i X_j] $.



    We begin by making the following observation:



    $$X_i = n - sum_jneq iX_j $$



    Which gives us:



    $$ X_isum_jneq iX_j = nX_i - X_i^2$$



    Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:



    beginalignmathbbE[X_i X_j] &= frac1rBig(mathbbE[X_i sum_jneq i X_j] + mathbbE[X_i^2]Big) \
    &= frac1r mathbbE[nX_i] \
    &= fracn^2r^2
    endalign






    share|cite|improve this answer











    $endgroup$



    Since there are $r$ boxes and $n$ balls, and each ball is placed in a box with equal probability, we have:



    $$ mathbbE[X_i] = fracnr $$



    Now, we would like to know what is $mathbbE[X_i X_j] $.



    We begin by making the following observation:



    $$X_i = n - sum_jneq iX_j $$



    Which gives us:



    $$ X_isum_jneq iX_j = nX_i - X_i^2$$



    Now, fix $i$ (we can do this because of the symmetry in the question), and thus we have:



    beginalignmathbbE[X_i X_j] &= frac1rBig(mathbbE[X_i sum_jneq i X_j] + mathbbE[X_i^2]Big) \
    &= frac1r mathbbE[nX_i] \
    &= fracn^2r^2
    endalign







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited 6 hours ago

























    answered 6 hours ago









    Sean LeeSean Lee

    801214




    801214







    • 1




      $begingroup$
      If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
      $endgroup$
      – Daniel Schepler
      1 hour ago











    • $begingroup$
      Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
      $endgroup$
      – Sean Lee
      1 hour ago







    • 1




      $begingroup$
      I've now expanded VHarisop's answer with my calculations for part two of the question.
      $endgroup$
      – Daniel Schepler
      1 hour ago












    • 1




      $begingroup$
      If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
      $endgroup$
      – Daniel Schepler
      1 hour ago











    • $begingroup$
      Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
      $endgroup$
      – Sean Lee
      1 hour ago







    • 1




      $begingroup$
      I've now expanded VHarisop's answer with my calculations for part two of the question.
      $endgroup$
      – Daniel Schepler
      1 hour ago







    1




    1




    $begingroup$
    If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
    $endgroup$
    – Daniel Schepler
    1 hour ago





    $begingroup$
    If indeed $E(X_i X_j) = E(X_i) E(X_j)$ for $i in j$ then that implies zero correlation. I would expect a bit of negative correlation. (And indeed, my preliminary calculation based on the decomposition from VHarisop's answer seems to result in $E(X_i X_j) = fracn(n-1)r^2$ for $i ne j$ and $E(X_i^2) = fracnr + fracn(n-1)r^2$.)
    $endgroup$
    – Daniel Schepler
    1 hour ago













    $begingroup$
    Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
    $endgroup$
    – Sean Lee
    1 hour ago





    $begingroup$
    Yeah, it seemed a little strange to me initially, but its consistent with your results btw: $frac1r[(r-1)E(X_iX_j) + E(X_i^2)] = fracn^2r^2$
    $endgroup$
    – Sean Lee
    1 hour ago





    1




    1




    $begingroup$
    I've now expanded VHarisop's answer with my calculations for part two of the question.
    $endgroup$
    – Daniel Schepler
    1 hour ago




    $begingroup$
    I've now expanded VHarisop's answer with my calculations for part two of the question.
    $endgroup$
    – Daniel Schepler
    1 hour ago











    4












    $begingroup$

    For the first part, you can use linearity of expectation to compute $mathbbE[X_i]$.
    Specifically, you know that for a fixed box, the probability of putting a ball in it
    is $frac1r$. Let



    $$
    Y_k^(i) = begincases
    1 &, text if ball $k$ was placed in box $i$ \
    0 &, text otherwise
    endcases,
    $$

    which satisfies $mathbbE[Y_k^(i)] = mathbbP(Y_k^(i) = 1) = frac1r.$
    Then you can write



    $$
    X_i = sum_j=1^n Y_j^(i) Rightarrow mathbbEX_i = sum_j=1^n frac1r = fracnr.
    $$




    For the second part, you can proceed similarly: $X_i = sum_k=1^n Y_k^(i)$ and $X_j = sum_ell=1^n Y_ell^(j)$, so:
    $$
    X_i X_j = sum_k=1^n sum_ell=1^n Y_k^(i) Y_ell^(j) implies
    mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n mathbbE(Y_k^(i) Y_ell^(j)).
    $$

    We will first treat the case where $i ne j$. Then, for each term in the sum such that $k = ell$, we must have $Y_k^(i) Y_ell^(j) = Y_k^(i) Y_k^(j) = 0$ since it impossible for ball $k$ to be placed both in box $i$ and in box $j$. On the other hand, if $k ne ell$, then the events corresponding to $Y_k^(i)$ and $Y_ell^(j)$ are independent since the placement of balls $k$ and $ell$ are independent, which implies that $Y_k^(i)$ and $Y_ell^(j)$ are independent random variables. Therefore, in this case,
    $$mathbbE(Y_k^(i) Y_ell^(j)) = mathbbE(Y_k^(i)) mathbbE(Y_ell^(j)) = frac1r cdot frac1r.$$
    In summary, if $i ne j$, then
    $$mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n delta_k ne ell cdot frac1r^2 = fracn(n-1)r^2$$
    where $delta_k ne ell$ represents the indicator value which is 1 when $k ne ell$ and 0 when $k = ell$.



    For the case $i = j$, I will leave the similar computation of $mathbbE(X_i^2)$ to you, with just the hint that the difference is in the expected value of $mathbbE(Y_k^(i) Y_ell^(j))$ for the case $k = ell$.






    share|cite|improve this answer











    $endgroup$








    • 1




      $begingroup$
      I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
      $endgroup$
      – Daniel Schepler
      1 hour ago















    4












    $begingroup$

    For the first part, you can use linearity of expectation to compute $mathbbE[X_i]$.
    Specifically, you know that for a fixed box, the probability of putting a ball in it
    is $frac1r$. Let



    $$
    Y_k^(i) = begincases
    1 &, text if ball $k$ was placed in box $i$ \
    0 &, text otherwise
    endcases,
    $$

    which satisfies $mathbbE[Y_k^(i)] = mathbbP(Y_k^(i) = 1) = frac1r.$
    Then you can write



    $$
    X_i = sum_j=1^n Y_j^(i) Rightarrow mathbbEX_i = sum_j=1^n frac1r = fracnr.
    $$




    For the second part, you can proceed similarly: $X_i = sum_k=1^n Y_k^(i)$ and $X_j = sum_ell=1^n Y_ell^(j)$, so:
    $$
    X_i X_j = sum_k=1^n sum_ell=1^n Y_k^(i) Y_ell^(j) implies
    mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n mathbbE(Y_k^(i) Y_ell^(j)).
    $$

    We will first treat the case where $i ne j$. Then, for each term in the sum such that $k = ell$, we must have $Y_k^(i) Y_ell^(j) = Y_k^(i) Y_k^(j) = 0$ since it impossible for ball $k$ to be placed both in box $i$ and in box $j$. On the other hand, if $k ne ell$, then the events corresponding to $Y_k^(i)$ and $Y_ell^(j)$ are independent since the placement of balls $k$ and $ell$ are independent, which implies that $Y_k^(i)$ and $Y_ell^(j)$ are independent random variables. Therefore, in this case,
    $$mathbbE(Y_k^(i) Y_ell^(j)) = mathbbE(Y_k^(i)) mathbbE(Y_ell^(j)) = frac1r cdot frac1r.$$
    In summary, if $i ne j$, then
    $$mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n delta_k ne ell cdot frac1r^2 = fracn(n-1)r^2$$
    where $delta_k ne ell$ represents the indicator value which is 1 when $k ne ell$ and 0 when $k = ell$.



    For the case $i = j$, I will leave the similar computation of $mathbbE(X_i^2)$ to you, with just the hint that the difference is in the expected value of $mathbbE(Y_k^(i) Y_ell^(j))$ for the case $k = ell$.






    share|cite|improve this answer











    $endgroup$








    • 1




      $begingroup$
      I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
      $endgroup$
      – Daniel Schepler
      1 hour ago













    4












    4








    4





    $begingroup$

    For the first part, you can use linearity of expectation to compute $mathbbE[X_i]$.
    Specifically, you know that for a fixed box, the probability of putting a ball in it
    is $frac1r$. Let



    $$
    Y_k^(i) = begincases
    1 &, text if ball $k$ was placed in box $i$ \
    0 &, text otherwise
    endcases,
    $$

    which satisfies $mathbbE[Y_k^(i)] = mathbbP(Y_k^(i) = 1) = frac1r.$
    Then you can write



    $$
    X_i = sum_j=1^n Y_j^(i) Rightarrow mathbbEX_i = sum_j=1^n frac1r = fracnr.
    $$




    For the second part, you can proceed similarly: $X_i = sum_k=1^n Y_k^(i)$ and $X_j = sum_ell=1^n Y_ell^(j)$, so:
    $$
    X_i X_j = sum_k=1^n sum_ell=1^n Y_k^(i) Y_ell^(j) implies
    mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n mathbbE(Y_k^(i) Y_ell^(j)).
    $$

    We will first treat the case where $i ne j$. Then, for each term in the sum such that $k = ell$, we must have $Y_k^(i) Y_ell^(j) = Y_k^(i) Y_k^(j) = 0$ since it impossible for ball $k$ to be placed both in box $i$ and in box $j$. On the other hand, if $k ne ell$, then the events corresponding to $Y_k^(i)$ and $Y_ell^(j)$ are independent since the placement of balls $k$ and $ell$ are independent, which implies that $Y_k^(i)$ and $Y_ell^(j)$ are independent random variables. Therefore, in this case,
    $$mathbbE(Y_k^(i) Y_ell^(j)) = mathbbE(Y_k^(i)) mathbbE(Y_ell^(j)) = frac1r cdot frac1r.$$
    In summary, if $i ne j$, then
    $$mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n delta_k ne ell cdot frac1r^2 = fracn(n-1)r^2$$
    where $delta_k ne ell$ represents the indicator value which is 1 when $k ne ell$ and 0 when $k = ell$.



    For the case $i = j$, I will leave the similar computation of $mathbbE(X_i^2)$ to you, with just the hint that the difference is in the expected value of $mathbbE(Y_k^(i) Y_ell^(j))$ for the case $k = ell$.






    share|cite|improve this answer











    $endgroup$



    For the first part, you can use linearity of expectation to compute $mathbbE[X_i]$.
    Specifically, you know that for a fixed box, the probability of putting a ball in it
    is $frac1r$. Let



    $$
    Y_k^(i) = begincases
    1 &, text if ball $k$ was placed in box $i$ \
    0 &, text otherwise
    endcases,
    $$

    which satisfies $mathbbE[Y_k^(i)] = mathbbP(Y_k^(i) = 1) = frac1r.$
    Then you can write



    $$
    X_i = sum_j=1^n Y_j^(i) Rightarrow mathbbEX_i = sum_j=1^n frac1r = fracnr.
    $$




    For the second part, you can proceed similarly: $X_i = sum_k=1^n Y_k^(i)$ and $X_j = sum_ell=1^n Y_ell^(j)$, so:
    $$
    X_i X_j = sum_k=1^n sum_ell=1^n Y_k^(i) Y_ell^(j) implies
    mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n mathbbE(Y_k^(i) Y_ell^(j)).
    $$

    We will first treat the case where $i ne j$. Then, for each term in the sum such that $k = ell$, we must have $Y_k^(i) Y_ell^(j) = Y_k^(i) Y_k^(j) = 0$ since it impossible for ball $k$ to be placed both in box $i$ and in box $j$. On the other hand, if $k ne ell$, then the events corresponding to $Y_k^(i)$ and $Y_ell^(j)$ are independent since the placement of balls $k$ and $ell$ are independent, which implies that $Y_k^(i)$ and $Y_ell^(j)$ are independent random variables. Therefore, in this case,
    $$mathbbE(Y_k^(i) Y_ell^(j)) = mathbbE(Y_k^(i)) mathbbE(Y_ell^(j)) = frac1r cdot frac1r.$$
    In summary, if $i ne j$, then
    $$mathbbE(X_i X_j) = sum_k=1^n sum_ell=1^n delta_k ne ell cdot frac1r^2 = fracn(n-1)r^2$$
    where $delta_k ne ell$ represents the indicator value which is 1 when $k ne ell$ and 0 when $k = ell$.



    For the case $i = j$, I will leave the similar computation of $mathbbE(X_i^2)$ to you, with just the hint that the difference is in the expected value of $mathbbE(Y_k^(i) Y_ell^(j))$ for the case $k = ell$.







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited 1 hour ago









    Daniel Schepler

    9,3341821




    9,3341821










    answered 6 hours ago









    VHarisopVHarisop

    1,228421




    1,228421







    • 1




      $begingroup$
      I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
      $endgroup$
      – Daniel Schepler
      1 hour ago












    • 1




      $begingroup$
      I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
      $endgroup$
      – Daniel Schepler
      1 hour ago







    1




    1




    $begingroup$
    I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
    $endgroup$
    – Daniel Schepler
    1 hour ago




    $begingroup$
    I decided to add my solution to part two, using your notation, to your answer to avoid having an answer split between your part and a part I would post separately. Feel free to edit it more to your liking, or even revert the addition if you prefer.
    $endgroup$
    – Daniel Schepler
    1 hour ago











    0












    $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) = fracK choose k N- Kchoose n - kN 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 $nfracKN$, hence the mean of your variable
    $$E[X_i]=nfrac1r=fracnr$$






    share|cite|improve this answer









    $endgroup$

















      0












      $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) = fracK choose k N- Kchoose n - kN 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 $nfracKN$, hence the mean of your variable
      $$E[X_i]=nfrac1r=fracnr$$






      share|cite|improve this answer









      $endgroup$















        0












        0








        0





        $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) = fracK choose k N- Kchoose n - kN 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 $nfracKN$, hence the mean of your variable
        $$E[X_i]=nfrac1r=fracnr$$






        share|cite|improve this answer









        $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) = fracK choose k N- Kchoose n - kN 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 $nfracKN$, hence the mean of your variable
        $$E[X_i]=nfrac1r=fracnr$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered 6 hours ago









        RScrlliRScrlli

        761114




        761114



























            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.




            draft saved


            draft discarded














            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





















































            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

            How to create a command for the “strange m” symbol in latex? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How do you make your own symbol when Detexify fails?Writing bold small caps with mathpazo packageplus-minus symbol with parenthesis around the minus signGreek character in Beamer document titleHow to create dashed right arrow over symbol?Currency symbol: Turkish LiraDouble prec as a single symbol?Plus Sign Too Big; How to Call adfbullet?Is there a TeX macro for three-legged pi?How do I get my integral-like symbol to align like the integral?How to selectively substitute a letter with another symbol representing the same letterHow do I generate a less than symbol and vertical bar that are the same height?

            Българска екзархия Съдържание История | Български екзарси | Вижте също | Външни препратки | Литература | Бележки | НавигацияУстав за управлението на българската екзархия. Цариград, 1870Слово на Ловешкия митрополит Иларион при откриването на Българския народен събор в Цариград на 23. II. 1870 г.Българската правда и гръцката кривда. От С. М. (= Софийски Мелетий). Цариград, 1872Предстоятели на Българската екзархияПодмененият ВеликденИнформационна агенция „Фокус“Димитър Ризов. Българите в техните исторически, етнографически и политически граници (Атлас съдържащ 40 карти). Berlin, Königliche Hoflithographie, Hof-Buch- und -Steindruckerei Wilhelm Greve, 1917Report of the International Commission to Inquire into the Causes and Conduct of the Balkan Wars

            Чепеларе Съдържание География | История | Население | Спортни и природни забележителности | Културни и исторически обекти | Религии | Обществени институции | Известни личности | Редовни събития | Галерия | Източници | Литература | Външни препратки | Навигация41°43′23.99″ с. ш. 24°41′09.99″ и. д. / 41.723333° с. ш. 24.686111° и. д.*ЧепелареЧепеларски Linux fest 2002Начало на Зимен сезон 2005/06Национални хайдушки празници „Капитан Петко Войвода“Град ЧепелареЧепеларе – народният ски курортbgrod.orgwww.terranatura.hit.bgСправка за населението на гр. Исперих, общ. Исперих, обл. РазградМузей на родопския карстМузей на спорта и скитеЧепеларебългарскибългарскианглийскитукИстория на градаСки писти в ЧепелареВремето в ЧепелареРадио и телевизия в ЧепелареЧепеларе мами с родопски чар и добри пистиЕвтин туризъм и снежни атракции в ЧепелареМестоположениеИнформация и снимки от музея на родопския карст3D панорами от ЧепелареЧепелареррр