MSDS Spring 2018

DATA 605 Fundamental of Computational Mathematics

Jiadi Li

Week 8 Discussion: Pg.289 Sum of Random Variables Ex.3

  1. Let \(X_1\) and \(X_2\) be independent random variables with common distribution \(p_X = \begin{bmatrix} 0 & 1 & 2 \\ \frac{1}{8} & \frac{3}{8} & \frac{1}{2}\end{bmatrix}\) Find the distribution of the sum \(X_1 + X_2\).

Let \(m_1(x)\)and \(m_2(x)\) represent the ditribution functions of \(X_1\) and \(X_2\), then the convolution of \(m_1(x)\) and \(m_2(x)\) is the distribution function \(m_3=m_1*m_2\) given by \(m_3(j)=\sum_k m_1(k)m_2(j-k)\), for j = 0, 1, 2, 3.

m0 <- 1/8
m1 <- 3/8
m2 <- 1/2

\(m_3(0)=m_1(0)m_2(0)=(\frac{1}{8})(\frac{1}{8})=\frac{1}{64}\)

m0*m0
## [1] 0.015625
1/64
## [1] 0.015625

\(m_3(1)=m_1(0)m_2(1)+m_1(1)m_2(0)=(\frac{1}{8})(\frac{3}{8})+(\frac{3}{8})(\frac{1}{8})=\frac{6}{64}=\frac{3}{32}\)

m0*m1+m1*m0
## [1] 0.09375
3/32
## [1] 0.09375

\(m_3(2)=m_1(0)m_2(2)+m_1(1)m_2(1)+m_1(2)m_2(0)=(\frac{1}{8})(\frac{1}{2})+(\frac{3}{8})(\frac{3}{8})+(\frac{1}{2})(\frac{1}{8})=\frac{17}{64}\)

m0*m2+m1*m1+m2*m0
## [1] 0.265625
17/64
## [1] 0.265625

\(m_3(3)=m_1(1)m_2(2)+m_1(2)m_2(1)=(\frac{3}{8})(\frac{1}{2})+(\frac{1}{2})(\frac{3}{8})=\frac{3}{8}\)

m1*m2+m2*m1
## [1] 0.375
3/8
## [1] 0.375