# Expectation and probability of a sum in a permutation.

Given numbers $(1,2,3,4)$ what is the expectation of the sum of the first and last number? I know that for both the first and the last number the expectation for each number will be 10/4, however short of writing down all the permutations and counting the sums and then getting the expectations that way, how would I express $E(X)$ given that $X$ is the sum of first and last digits of the permutation?

Thanks!

• Do you mean that the four numbers will be randomly shuffled? Nov 13, 2017 at 4:10
• Wouldn't it just be $2(2.5))=5$
– Remy
Nov 13, 2017 at 4:30
• The amount of numbers is small enough so we can verify by writing them all out
– Remy
Nov 13, 2017 at 4:31
• 1,2 1,3 1,4 2,3 2,4 3,4 gives 3, 4, 5, 5, 6, 7 and the average of these is 5.
– Remy
Nov 13, 2017 at 4:32
• Yes, and I know how to do it manually, but I think I am supposed to do it in another way.... Nov 13, 2017 at 17:57

Let $Y$ be the first digit of the permutation and $Z$ be the last digit of the permutation. Then $X=Y+Z$.
$Y$ takes on the values $1,2,3,4$ with equal probability. (Why?) Similarly $Z$ takes on the values $1,2,3,4$ with equal probability.
However, $Y$ and $Z$ are clearly not independent (if $Y=2$ then we know $Z \ne 2$).
Nevertheless, a useful property of the expectation is $$E[Y+Z] = E[Y] + E[Z]$$ even if $Y$ and $Z$ are not independent.
Thus, since $E[Y]=E[Z]=\frac{1+2+3+4}{4}=2.5$, we have $E[X] = 2.5 + 2.5 = 5$.