2 Friends are playing the following game:
The first one randomly picks a number between 0 and 100 (inclusive).
Then the second friends tries to guess which number it is.
The second friend pays the first friend the power of the difference between his guess and the result. I need to find:
1) Which value minimizes the expectation of the amount that the second friend pays?
2) How much does the first friend have to pay the second friend before the game so that the expectation of both friends profit will be zero?
I tried the following:
Let X = result of the first friend's random choice.
Let Y = result of the second friend's random guess.
Then Z, the amount the second friend pays, is $Z = (X-Y)^2$.
I never encountered such question before. From what I can gather I need to find the expectation of Z, differentiate it and find the minimum?
We can see that $ X, Y ~Unif([0,...,100]) $ and therefore $\mathbb{E}(X) = \mathbb{Y} = \frac{0 + 100}{2} = 50$.
I kind of got stuck continuing from here, would appreciate some help. Thanks in advance!