Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

help me solve # 4, thank you the R code from textbook chapters 1 and 2. (http://

ID: 3352409 • Letter: H

Question

help me solve # 4, thank you

the R code from textbook chapters 1 and 2. (http://homepage.divns.uiowa.edu-kchan Include all the plots in your homework. 2. (2 points) Textbook exercise 1.4. 3. taylor is a dataset in the package forecast. SA lam) (a) (2 points) Write a function season IQR (s) to return the IQR ( inter-quartile range, i.e., 75th percentile 25th percentile) of a given season. The argument s is a your function using seasonIQR(9). season number between 1 and 12. Test (b) (4 points) In fact for the taylor dataset, the season is week and the period is day. Write a func- tion weeklySummary (w) where w is the week number between 1 and 12. The function will return two values: the first one is the average of the daily maximal values of the given week, and the second one is the average of the daily minimal values of the given week. Test your function using. weeklySummary (10). (5 points) Let Zi and Za be independent N(0, 1) random variables, and define new random variables X and Y by where a, b, c, u, v, w are constants. Please show that Var(X) a2+b2, = au + bu. = Con(X, Y) Graduate studnts only. Undergrad students wil receive 2 extra points if solving this problem correcedlyl)

Explanation / Answer

a)

Var(X) = var(aZ1 +b Z2 + c)

= a^2 Var(Z1) + b^2 var(z2) + Var(c)    {Z1 and Z2 are independent}

= a^2 + b^2   { as Var(Z1) =var(z2) =1 ,Var(c) = 0}

similarly

Var(Y) = u^2 + v^2

Cov(X,Y) = Cov(aZ1+ bZ2+c, uZ1 + v Z2 + w)

Cov(Z1,z2) = 0 and Cov(Z,k) = 0   where k is any constant and Z is any random variable

hence

Cov(X,Y) = Cov(aZ1 , uZ1) + Cov(bZ2 , vZ2)

= au Cov(Z1,Z1) + bvCov(z2,Z2)

= au+ bv    {Cov(Z,Z) = Var(Z) = 1}

Please rate