The designation in the problem
\[p_{x}= \begin{pmatrix} 0 & 1 & 2\\ \frac{1}{8} & \frac{3}{8} & \frac{1}{2} \end{pmatrix} \]
actually means that both \(X_{1}\) and \(X_{2}\) have a distribution defined as:
\(P(0) = \frac{1}{8}\)
\(P(1) = \frac{3}{8}\)
\(P(2) = \frac{1}{2}\)
The possible values for the sum of \(X_{1}\) and \(X_{2}\) are therefore 0,1,2,3 or 4.
The probability of each of these sums can be calculated as below:
\(P_{0} = P(X_{1}=0)*P(X_{2}=0)\)
\(P_{1} = P(X_{1}=0)*P(X_{2}=1)+P(X_{1}=1)*P(X_{2}=0)\)
\(P_{2} = P(X_{1}=0)*P(X_{2}=2)+P(X_{1}=1)*P(X_{2}=1)+P(X_{1}=2)*P(X_{2}=0)\)
\(P_{3} = P(X_{1}=1)*P(X_{2}=2)+P(X_{1}=2)*P(X_{2}=1)\)
\(P_{4} = P(X_{1}=2)*P(X_{2}=2)\)
Since \(P(X_{1}=N) = P(X_{2}=N)=P(N)\), we can simplify:
\(P_{0} = (P(0))^{2}\)
\(P_{1} = P(0)*P(1)+P(1)*P(0)=2P(1)P(0)\)
\(P_{2} = P(0)*P(2)+P(1)*P(1)+P(2)*P(0)=2P(0)P(2)+(P(1))^{2}\)
\(P_{3} = P(1)*P(2)+P(2)*P(1)=2P(1)P(2)\)
\(P_{4} = (P(2))^{2}\)
Plugging in the values above we get:
\(P_{0} = \frac{1}{8}^{2} = \frac{1}{64}\)
\(P_{1} = 2(\frac{3}{8}*\frac{1}{8})=\frac{6}{64}\)
\(P_{2} = 2(\frac{1}{8}*\frac{1}{2})+\frac{3}{8}^{2}=\frac{2}{16}+\frac{9}{64}=\frac{8}{64}+\frac{9}{64}=\frac{17}{64}\)
\(P_{3} = 2(\frac{3}{8}*\frac{1}{2})=\frac{6}{16}=\frac{24}{64}\)
\(P_{4} = \frac{1}{2}^{2}=\frac{1}{4}=\frac{16}{64}\)
The distribution of \(X_{1}+X_{2}\) is therefore:
\[p_{x}= \begin{pmatrix} 0 & 1 & 2 & 3 & 4\\ \frac{1}{64} & \frac{6}{64} & \frac{17}{64} & \frac{24}{64} & \frac{16}{64} \end{pmatrix} \]
Hope that clears it up!