Question

Q2: Suppose that X-N(O, 1), U-N(O, 0.25), Y 3- 2X and Z following questions. 2 X +U. Please answer the Compute E(Y), E(Z), Var(Y) and Var(Z). What are the distributions of Y and Z? Using R, draw 50 independent realizations of X and U. Using those values, create 50 realizations of Y and Z. (NOTE: set the seed for random number generation in R. Before your code type set.seed 123))

0 0
Add a comment Improve this question Transcribed image text
Answer #1

E[Y] = E[3-2X] = 3-2E[X] = 3 - 2 * 0 = 3

E[Z] = E[2 - X + U] = 2 - E[X] + E[U] = 2 - 0 + 0 = 2

Var[Y] = Var[3-2X] = 0 + (-2)2 Var[X] = 4 * 1 = 4

Var[Z] = Var[2 - X + U] = 0 +  (-1)2 Var[X] + 12Var[U] = 1 + 0.25 = 1.25

We know that the linear combination of normal random variables is a random variable. Thus, the distributions of Y and Z are

Y ~ N(3, 4) and Z ~ N(2, 1.25)

Run the below code in R to draw 50 independent realizations of X, U, Y and Z

set.seed(123)
x = rnorm(50, mean = 0, sd = sqrt(1))
u = rnorm(50, mean = 0, sd = sqrt(0.25))
y = 3 - 2*x
z = 2 - x + u

I get the below outputs,

> x
[1] -0.56047565 -0.23017749 1.55870831 0.07050839 0.12928774 1.71506499 0.46091621 -1.26506123
[9] -0.68685285 -0.44566197 1.22408180 0.35981383 0.40077145 0.11068272 -0.55584113 1.78691314
[17] 0.49785048 -1.96661716 0.70135590 -0.47279141 -1.06782371 -0.21797491 -1.02600445 -0.72889123
[25] -0.62503927 -1.68669331 0.83778704 0.15337312 -1.13813694 1.25381492 0.42646422 -0.29507148
[33] 0.89512566 0.87813349 0.82158108 0.68864025 0.55391765 -0.06191171 -0.30596266 -0.38047100
[41] -0.69470698 -0.20791728 -1.26539635 2.16895597 1.20796200 -1.12310858 -0.40288484 -0.46665535
[49] 0.77996512 -0.08336907

> u
[1] 0.126659257 -0.014273378 -0.021435229 0.684301142 -0.112885493 0.758235302 -0.774376402 0.292306875
[9] 0.061927122 0.107970784 0.189819741 -0.251161727 -0.166603692 -0.509287692 -0.535895613 0.151764321
[17] 0.224104889 0.026502113 0.461133734 1.025042343 -0.245515583 -1.154584438 0.502869262 -0.354600381
[25] -0.344004308 0.512785685 -0.142386504 -0.610358856 0.090651740 -0.069445681 0.002882093 0.192640201
[33] -0.185330016 0.322188274 -0.110243281 0.165890982 0.548419507 0.217590745 -0.162965793 0.574403809
[41] 0.496751928 0.274198480 0.119365868 -0.313953038 0.680326224 -0.300129794 1.093666497 0.766305313
[49] -0.117850180 -0.513210450

> y
[1] 4.1209513 3.4603550 -0.1174166 2.8589832 2.7414245 -0.4301300 2.0781676 5.5301225 4.3737057
[10] 3.8913239 0.5518364 2.2803723 2.1984571 2.7786346 4.1116823 -0.5738263 2.0042990 6.9332343
[19] 1.5972882 3.9455828 5.1356474 3.4359498 5.0520089 4.4577825 4.2500785 6.3733866 1.3244259
[28] 2.6932538 5.2762739 0.4923702 2.1470716 3.5901430 1.2097487 1.2437330 1.3568378 1.6227195
[37] 1.8921647 3.1238234 3.6119253 3.7609420 4.3894140 3.4158346 5.5307927 -1.3379119 0.5840760
[46] 5.2462172 3.8057697 3.9333107 1.4400698 3.1667381

> z
[1] 2.6871349 2.2159041 0.4198565 2.6137928 1.7578268 1.0431703 0.7647074 3.5573681 2.7487800
[10] 2.5536328 0.9657379 1.3890244 1.4326249 1.3800296 2.0199455 0.3648512 1.7262544 3.9931193
[19] 1.7597778 3.4978338 2.8223081 1.0633905 3.5288737 2.3742908 2.2810350 4.1994790 1.0198265
[28] 1.2362680 3.2287887 0.6767394 1.5764179 2.4877117 0.9195443 1.4440548 1.0681756 1.4772507
[37] 1.9945019 2.2795025 2.1429969 2.9548748 3.1914589 2.4821158 3.3847622 -0.4829090 1.4723642
[46] 2.8229788 3.4965513 3.2329607 1.1021847 1.5701586

Add a comment
Know the answer?
Add Answer to:
Q2: Suppose that X-N(O, 1), U-N(O, 0.25), Y 3- 2X and Z following questions. 2 X...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT