Convolves the two pmfs, takes the expectation of the sum, and checks
it against E(X) + E(Y).
Usage
EsumConv(values_x, probs_x, values_y, probs_y)
Arguments
- values_x, probs_x
the pmf of X; probs must sum to 1.
- values_y, probs_y
the pmf of Y, independent of X.
Value
list(e_sum, e_x_plus_e_y).
References
Morin, D. J. (2016). Probability: For the Enthusiastic
Beginner. Createspace. Eqs (3.11)-(3.12).
Examples
EsumConv(1:2, c(0.5, 0.5), 1:3, rep(1 / 3, 3))$e_sum
#> [1] 3.5