Question 6) Suppose X is a random variable taking on possible values 0,2,4 with respective probabilities .5, .3, and .2. Y is a random variable independent from X taking on possible values 1,3,5 with respective probabilities .2, .2, and .6. Use R to determine the following.
f) Find the expected value of X*Y. (i.e. X times Y)
g) Find the expected value of 3X - 5Y.
h) Find the variance of 3X - 5Y
i) Find the expected value of Y4
i) Copy your R script for the above into the text box here.
(f) E(x*y)= 5.32 = sum(y*p)*sum(x*q)
(g) E(3x-5y) = sum(y*y*p)-sum(y*p)*sum(y*p) = 2.56
(h) V(3x-5y) = 5*5*{sum(y*y*p)-sum(y*p)*sum(y*p)}+3*3*{sum(x*x*q)-sum(x*q)*sum(x*q)} = 85.96
and note that "y4 " is meaningless here so i ommited it.
Get Answers For Free
Most questions answered within 1 hours.