User Name Remember Me? Password

 Advanced Statistics Advanced Probability and Statistics Math Forum

 April 2nd, 2018, 06:58 PM #1 Member   Joined: Feb 2018 From: Canada Posts: 45 Thanks: 2 Expected value I had this question today in my midterm but I was not able to figure it out during the test. Can someone help me out? There are n boxes numbered 1 to n and n balls numbered 1 to n. The balls are to be randomly placed in a box (not necessarily different boxes). What is the expected number of empty boxes? Thank you. April 2nd, 2018, 10:25 PM #2 Senior Member   Joined: Sep 2015 From: USA Posts: 2,369 Thanks: 1273 through listing the possible assignments and grinding out expectations I'm seeing the answer is $E[\text{# empty boxes}] = \dfrac{(n-1)^n}{n^{n-1}}$ This is in very good agreement with sims for various $n$. The assignments of boxes are uniform, each assignment having $p=\left(\dfrac 1 n\right)^n$ The key is to transform the list of assignments into a count of empty boxes. I don't yet recognize a simple formula that fits the data I generate for the individual probabilities of empty box counts. Nevertheless using those to compute the expected value for various $n$ reveals the formula noted above. I'm clearly missing something or this is just an impossible test question. I'm sure the Peanut gallery will chime in. Thanks from Shanonhaliwell April 3rd, 2018, 09:43 PM   #3
Member

Joined: Feb 2018

Posts: 45
Thanks: 2

Quote:
 Originally Posted by romsek through listing the possible assignments and grinding out expectations I'm seeing the answer is $E[\text{# empty boxes}] = \dfrac{(n-1)^n}{n^{n-1}}$ This is in very good agreement with sims for various $n$. The assignments of boxes are uniform, each assignment having $p=\left(\dfrac 1 n\right)^n$ The key is to transform the list of assignments into a count of empty boxes. I don't yet recognize a simple formula that fits the data I generate for the individual probabilities of empty box counts. Nevertheless using those to compute the expected value for various $n$ reveals the formula noted above. I'm clearly missing something or this is just an impossible test question. I'm sure the Peanut gallery will chime in.
Thank you @romsek.You answer is so helpful.
I think the $p=\left(\dfrac 1 n\right)^n$ is the probability a box is not empty after all balls are thrown.
This is how I try to do, let me know if I have done it wrong.
Here, for each $i=1,2,\cdots,n$ define the random variable
$X_i=\begin{cases} 1 &\text{if the i^{\rm th} box is empty} \\ 0 &\text{otherwise} \\ \end{cases}$

Now let $X$ be the total number of empty boxes. Then the number of empty boxes is $X=\sum\limits_{i=1}^n X_i=X_1+X_2+\cdots+X_n$ and the expected number is $E(X)=\sum\limits_{i=1}^{n}E(X_i)=E(X_1) + E(X_2) + \cdots + E(X_n)$ (Using the linearity of expectation).

Each time a ball is thrown, the probability a ball lands in that one box is $\dfrac{1}{n}$ so there is a $\dfrac{n-1}{n}$ chance that it will not land in that box. So the probability that particular box remains empty after all the balls are thrown is $\left(\dfrac{n-1}{n}\right)^n$, since this event must occur n times as we have n balls. Hence, $E(X_i)=P(X_i=1)=\left(\dfrac{n-1}{n}\right)^n$.
$E[\text{number of empty boxes}]=\sum\limits_{i=1}^{n} E(X_i)=n\cdot E(X_i)=n\cdot \left(\dfrac{n-1}{n}\right)^n = \dfrac{(n-1)^n}{n^{n-1}}$ April 3rd, 2018, 10:58 PM   #4
Senior Member

Joined: Sep 2015
From: USA

Posts: 2,369
Thanks: 1273

Quote:
 Originally Posted by Shanonhaliwell Thank you @romsek.You answer is so helpful. I think the $p=\left(\dfrac 1 n\right)^n$ is the probability a box is not empty after all balls are thrown. This is how I try to do, let me know if I have done it wrong. Here, for each $i=1,2,\cdots,n$ define the random variable $X_i=\begin{cases} 1 &\text{if the i^{\rm th} box is empty} \\ 0 &\text{otherwise} \\ \end{cases}$ Now let $X$ be the total number of empty boxes. Then the number of empty boxes is $X=\sum\limits_{i=1}^n X_i=X_1+X_2+\cdots+X_n$ and the expected number is $E(X)=\sum\limits_{i=1}^{n}E(X_i)=E(X_1) + E(X_2) + \cdots + E(X_n)$ (Using the linearity of expectation). Each time a ball is thrown, the probability a ball lands in that one box is $\dfrac{1}{n}$ so there is a $\dfrac{n-1}{n}$ chance that it will not land in that box. So the probability that particular box remains empty after all the balls are thrown is $\left(\dfrac{n-1}{n}\right)^n$, since this event must occur n times as we have n balls. Hence, $E(X_i)=P(X_i=1)=\left(\dfrac{n-1}{n}\right)^n$. $E[\text{number of empty boxes}]=\sum\limits_{i=1}^{n} E(X_i)=n\cdot E(X_i)=n\cdot \left(\dfrac{n-1}{n}\right)^n = \dfrac{(n-1)^n}{n^{n-1}}$
outstanding, you seem to be getting the hang of things. April 8th, 2018, 03:31 PM   #5
Member

Joined: Feb 2018

Posts: 45
Thanks: 2

Quote:
 Originally Posted by romsek outstanding, you seem to be getting the hang of things.
Thanks to you, I was able to do it. Tags expected, expected value Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post jbergin Probability and Statistics 1 January 2nd, 2015 08:56 AM jbergin Advanced Statistics 3 December 27th, 2014 07:03 PM jbergin Probability and Statistics 1 December 23rd, 2014 08:14 AM asd Advanced Statistics 5 March 19th, 2012 02:29 PM kahalla Advanced Statistics 0 March 9th, 2010 12:53 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      