Reasoning behind expectation of taking two marbles from a bag I have 5 marbles numbered from 1 through 5 in a bag. Suppose I take out two different balls at random.
a) What is the expected value of the sum of the numbers on the balls?
b) What is the expected value of the product of the numbers on the balls?
I have some problem with this exercise because I don't understand why the expectations of the two random variables , one representing the first extraction and one the second,  are just the same (even though I could manage to calculate it with lots of calculations using condition expectation for the second extraction , but it becomes not a good way with more extractions I think because it requires a lot more calculations). So, applying linearity of expectation for the sum, knowing this, I have: $$E[X+Y]=E[X]+E[Y] = 2 *E[X]$$ For what regards the second question, I don't know if I can apply the formula for the product of indipendent events to get :$$E[XY] =E[X]E[Y]  = E[X]^2$$  But are they even independent? 
Besides , how can I prove the generalization of this formulas for the case with n marbles and m extractions?
 A: Suppose that you are one of the marbles in the bag and your number is e.g. $2$. 
Two marbles will be selected. One of them will be labeled as $X$ and the other will be labeled as $Y$. 
Now what is your chance to be labeled as $X$? 
$\frac15$ of course because there are $5$ equiprobable candidates for that and you are one of them.
Similarly your chance to be labeled as $Y$ is also $\frac15$. In short:$$P(X=2)=\frac15=P(Y=2)$$
This also if you have a different number so evidently $X$ and $Y$ have the same distribution.
$X$ and $Y$ are not independent. For that realize that they cannot both take number $4$ which means that: $$P(X=4\mid Y=4)=0$$By independence we would expect that $P(X=4\mid Y=4)=P(X=4)=\frac15$.
So it is not correct to state that $\mathbb E[XY]=\mathbb EX\times\mathbb EY=(\mathbb EX)^2$.
A: The question asks about generalising the result to $n$ marbles and $m$ extractions.
Problem (a)
Here the expectation method works fine. The expected value is therefore
$$\frac{m(n+1)}{2}.$$
Problem (b)
Here it seems better to proceed recursively.
Let $T(n,m)$ be the sum of the products of all possible sets of $m$ extractions.  Then the expected value of the product is $$\frac {T(n,m)}{n \text C m}.$$
The sum of the products for extractions not including the marble $n$ is $T(n-1,m)$. 
For $m\ge 2$, the sum of the products for extractions including the marble $n$ is $nT(n-1,m-1)$. 
Therefore, for $m\ge 2$ $$T(n,m)=T(n-1,m)+nT(n-1,m-1).$$
A: The first formula that expands sum, is always true.
The second one is true iff they be independent, as yourself said.
But obviously they aren't! If it isn't clear to you suppose:
$$P(X_1=i=X_2)=0 \qquad \text{But} \qquad P(X_1=i)P(X_2=i)=\frac{1}{10}$$
In general case also you can use above to show they aren't independent.
If you want to use that formula and lookup for independent samples, you should take two, one by one, with replacing, so they can be same.
