a)
First we find the sums that can occur by simply adding two different numbers together from the given.
Note that these are pairs of different numbers as we choose without replacement.
We get:
$X=x$ |
$\var{pmf[0]}$ |
$\var{pmf[1]}$ |
$\var{pmf[2]}$ |
$\var{pmf[3]}$ |
$\var{pmf[4]}$ |
$\var{pmf[5]}$ |
$\var{pmf[6]}$ |
$\var{pmf[7]}$ |
$\var{pmf[8]}$ |
We have to find the probabilities that each of these sums occur.
There are $10$ ways of selecting $2$ numbers from the $5$ given, but it may be the case that two different pairs produce the same sum.
In this case we find that there are two ways of producing the sum $\var{twice}$. All other sums have only one way.
So since each selection of a pair of numbers has probability $0.1$.
The probability of producing the sum $\var{twice}$ is $0.2$ , and the other sums have probability $0.1$ .
b)
The expectation is given by:
\[ \begin{eqnarray*} E[X]&=& \sum xP(X=x)\\ &=&\simplify[]{ {pmf[0]}*{x0}+{pmf[1]}*{x1}+{pmf[2]}*{x2}+{pmf[3]}*{x3}+{pmf[4]}*{x4}+{pmf[5]}*{x5}+{pmf[6]}*{x6}+{pmf[7]}*{x7}+{pmf[8]}*{x8}}\\ &=&\var{expx} \end{eqnarray*} \]