I am working on this problem and I don't really know what to do. I am really struggling in this class.

A bag containsnballs numbered 1, 2, 3, ....n. Two of them are taken out of the bag (without replacement). Let X be the maximum value among the two selected balls.

(a) Find the mean E(X) when n=5.

(b) Generalize to anyn.

I know the formula for Expectation is ∑xP(X=x)

I just don't know what to do.

Thanks for any help.