You choose a uniformly random element, $a$, from $\{1, 2, . . . , 100\}$, and you choose a uniformly random element, $b$, from the same set $\{1, 2, . . . , 100\}$. ($a$ and $b$ are chosen independently)
Define the random variable X to be $X = max(a, b)$, where $X$ is the maximum of $a$ and $b$.
The answer is:
$\mathbb{E}(X) = \sum_{k=1}^{100} k \cdot \frac{1+2(k-1)}{100^2}$
I know that the formula for the expected value is $\mathbb{E}(X) = \sum_{}^{} k \cdot Pr(X = k)$.
I understand that the sample space is $100^2$, however I do not understand the numerator $1+2(k-1)$.
Thank you.
Have a look at what $Pr(X=k)$ is, $X=k$ if:
In the end, the total probability is the sum of the probabilities of those three cases.