USING R: Consider rolling two fair dice, suppose on is red and the other blue. D
ID: 3867732 • Letter: U
Question
USING R:
Consider rolling two fair dice, suppose on is red and the other blue.
D1 = Outcome of the red die
D2 = Outcome of the blue die
Y = D 1 + D2
Use R to build the pmf for D1 as a two-column data.frame, then use this table to compute the mean, the variance, and the standard deviation. Repeat these steps for D2 and Y.
Detailed Instructions:
Build the pmf for D1. It should be a data.frame with two columns, one for possible outcomes (called k) and one for the probability of each outcome (called pk).
Use k and pl to compute mu1=, the mean/expected value of D1. Even better if you can do this using the%*% operator.
Using k, pk and mu=1, compute var1= to find the variance of D1. Then use the variance to compute sd1=the standard deviation.
Repeat steps for D2.
Explanation / Answer
PX(D1) = Z 1 0 2x 9
dx = 1 9 .
PX(D3) = Z 3 2 2x 9
dx = 1 4 9 = 5 9 .
1 PX(D1 D2) = 1 9 + 5 9 = 6 9 .
In the last,
we used that D1 D2 = .
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.