# Thread: Expected value of balls in box (a challenging one)

1. ## Expected value of balls in box (a challenging one)

If we have a box that contains 1000000 balls numbered from 1 to 1000000.
if we take "K" balls without replacement. let X be the maximum number and y be the minimum number in the K balls.
What is the expected value E(x-y) as function of "K".

2. ## Re: Expected value of balls in box (a challenging one)

Originally Posted by billobillo
If we have a box that contains 1000000 balls numbered from 1 to 1000000.
if we take "K" balls without replacement. let X be the maximum number and y be the minimum number in the K balls.
What is the expected value E(x-y) as function of "K".
@billobillo
You will never understand this question unless you yourself sit and work with the numbers.
May I suggest that you cut the question down to 100 balls an let K=8.
List the smallest eight numbers. What is $x=?~,~y=?~,~x-y=?$

List the larest eight numbers. What is $x=?~,~y=?~,~x-y=?$

List any eight numbers. What is $x=?~,~y=?~,~x-y=?$

Now what is the maximum for $x$?
Now what is the minimum for $y$?
Now what is $?\le x-y\le ?$?

The think about number partitions?

When you have done that. Tell us what you find.

3. ## Re: Expected value of balls in box (a challenging one)

Originally Posted by Plato
@billobillo
You will never understand this question unless you yourself sit and work with the numbers.
May I suggest that you cut the question down to 100 balls an let K=8.
List the smallest eight numbers. What is $x=?~,~y=?~,~x-y=?$

List the larest eight numbers. What is $x=?~,~y=?~,~x-y=?$

List any eight numbers. What is $x=?~,~y=?~,~x-y=?$

Now what is the maximum for $x$?
Now what is the minimum for $y$?
Now what is $?\le x-y\le ?$?

The think about number partitions?

When you have done that. Tell us what you find.
Hi Plato,

Sorry I know this is not my problem, but I've been thinking on it lately. I don't quite understand where you're planning to lead our OP, so may I ask for a precision ?

What do you mean by "what is the maximum for x" ? Why would it help ?

Thanks

4. ## Re: Expected value of balls in box (a challenging one)

The title is a bit misleading...

Try it Moo, but maybe not start with K=8...
if K=2, you draw 2 balls out of 100, what is the expected value of the bigger numbered ball?
Now you draw 3 balls...
Then you should get it by now.

prove by using principle of symmetry

5. ## Re: Expected value of balls in box (a challenging one)

Originally Posted by Moo
Sorry I know this is not my problem, but I've been thinking on it lately. I don't quite understand where you're planning to lead our OP, so may I ask for a precision ?
What do you mean by "what is the maximum for x" ? Why would it help ?
The set $\{1,2,3,4,5,6,7,8\}$ has $x=8,~y=1,~\&~x-y=7$

The set $\{93,94,95,96,97,98,99,100\}$ has $x=100,~y=93,~\&~x-y=7$.

The set $\{1,24,37,45,50,61,87,100\}$ has $x=100,~y=1,~\&~x-y=99$

Clearly $7\le~x-y~\le 99$

Now $\mathcal{P}(x-y=99)=\dfrac{\binom{98}{6}}{\binom{100}{8}}$.

6. ## Re: Expected value of balls in box (a challenging one)

Thanks for your replies, before posting this topic, I worked on a sample of 7 balls with K=3 and I was able to find E(x) and E(y) as function of K but not E(x-y),
I'm not a math specialist but I guess that x and y are not independent events, any suggestions?

7. ## Re: Expected value of balls in box (a challenging one)

E(x-y) is always E(x)-E(y), you are confusing with E(XY) which required independence to factorize