Interesting problem I spotted while learning:
Let $X=\left\{1,..,n\right\}$. We randomly select subset of $X$ and name it $A$. Each subset if equally likely.
a) Find the expected value of the sum of elements of A.
b) Find the expected value of the sum of elements of A, on condition that it has $k$ elements.
a) I think I know how to solve a). If each subset is selected with the same probability then I think it is equivalent to selecting each element of $X$ with probability $\frac{1}{2}$. So, using indicators, we got that expected value we are looking for is $\frac{n(n+1)}{4}$. But I can't find any rigorous argument why it is equivalent to selecting each element with probability $1/2$.
b) Small observation with $k=1$ (each element selected with probability $1/n$) and $k=n$ (each element selected with probability $1$) gives me feeling that approach from a) can be used with probability $k/n$ and then the result is $\frac{k(n+1)}{2}$. But it is much less intuitive than observation in a). No idea, how to prove this. Can anyone help?