1. ## Group porobability

We choose two groups where group A can be of size X where X ranges from 1 to n-1. Group B is the remaining (n-X).
All values of X are equally likely and all group sizes are equally likely

If we choose one item from 1 to n where all choices are equally likely, what is the average size of the group containing the item?

3. The attempt at a solution

Originally I tried the following:

Average size of group A is simply n/2 as it is uniformly distributed and therefore, since the item can be in either group, the size must also be n/2

However, given that the item is more likely to be in the larger of the two groups, we must skew the average to greater than n/2 and indeed, when I run an Excel simulation, that proves correct. Any thoughts on this?

The solution can be obtained form considering the first 1 to n-1 samples which must all be equally likely to be chosen

This yields

1/n(n-1) * [sum from 1 to (n-1) (x^2 + (n-x)^2)]

and has been verified. Can be simplified further. There must be another way to do this though? A more elegant method perhaps?

2. Originally Posted by Gekko
We choose two groups where group A can be of size X where X ranges from 1 to n-1. Group B is the remaining (n-X).
All values of X are equally likely and all group sizes are equally likely

If we choose one item from 1 to n where all choices are equally likely, what is the average size of the group containing the item?

3. The attempt at a solution

Originally I tried the following:

Average size of group A is simply n/2 as it is uniformly distributed and therefore, since the item can be in either group, the size must also be n/2

However, given that the item is more likely to be in the larger of the two groups, we must skew the average to greater than n/2 and indeed, when I run an Excel simulation, that proves correct. Any thoughts on this?
Hmm I think I've got it although maybe in a roundabout way

$\displaystyle \sum_{k=1}^{n-1} \frac{2k}{n-1}\cdot\frac{\binom{n-1}{k-1}}{\binom{n}{k}}$

and although I haven't proven it, based on the numbers this simplifies to $1+\frac{2}{3}(n-2)$.

The way I arrived was a bit complicated, involved using Bayes' theorem, if you want I can explain but maybe someone will post something simpler.