Stat 331 Applied Linear Models – Assignment 1Due on May 29th (Friday) 11 pm to Crowdmark. If a question involves R, use R Markdown towrite your solution and show your R codes and outputs.1. Under the simple linear regression model, letˆyi=ˆβ0+ˆβ1xidenote the fitted value, andri=yi-ˆyidenote the corresponding residual. We want to show thatˆσ2=∑ni=1r2in-2is an unbiased estimator ofσ2. Prove the following(a) Show that∑ni=1r2i=syy-s2xysxxwheresyy=∑ni=1(yi-¯y)2andsxy=∑ni=1(xi-¯x)(yi-¯y).(b) Show thatE(syy) = (n-1)σ2+β21sxxandE(s2xy) =β21s2xx+σ2sxx.(c) Show thatE(∑ni=1r2i)= (n-2)σ2.2. We look at weekly reports on the box office ticket sales for plays on Broadway in New York.We shall consider the data for a particular week (referred to below as the current week). Thedata are in the form of the gross box office results for the current week and the gross boxoffice results for the previous week. The data are available on the Learn website in the filea1q2.csv.