3. Consider the data in table 1 , showing the distance needed to stop (y,ft) when a car travels at a particular speed (x,mph) and brakes. It is thought that a good model for this dataset is a quadratic model yih=a+bxi+cxi2+iji=1,,k;j=1,,ni. If we assume that ijN(0,2), independent, then the likelihood function is (21)N/2exp(221ij(yijabxicxi2)2) where N=ini. Table 1: Braking distances of 50 cars, x= speed (mph),y= distance to stop (feet). (a) Fit the model using JAGS. Assume normal prior distributions for the coefficients of the regression and an inverse-gamma prior distribution for the variance of the error. Give reasonable initial values for each of the parameters. Include the R code for the algorithm in your answer. (b) Plot the posterior distribution of the parameters, compute the posterior mean, median and the 95% credible interval for each regression coefficient. (c) Report trace plots of each parameter and discuss convergence. (d) Make a plot of the estimated regression curve from the MCMC analysis using the empirical averages of the parameters a,b and c. . 3. Consider the data in table 1 , showing the distance needed to stop (y,ft) when a car travels at a particular speed (x,mph) and brakes. It is thought that a good model for this dataset is a quadratic model yih=a+bxi+cxi2+iji=1,,k;j=1,,ni. If we assume that ijN(0,2), independent, then the likelihood function is (21)N/2exp(221ij(yijabxicxi2)2) where N=ini. Table 1: Braking distances of 50 cars, x= speed (mph),y= distance to stop (feet). (a) Fit the model using JAGS. Assume normal prior distributions for the coefficients of the regression and an inverse-gamma prior distribution for the variance of the error. Give reasonable initial values for each of the parameters. Include the R code for the algorithm in your answer. (b) Plot the posterior distribution of the parameters, compute the posterior mean, median and the 95% credible interval for each regression coefficient. (c) Report trace plots of each parameter and discuss convergence. (d) Make a plot of the estimated regression curve from the MCMC analysis using the empirical averages of the parameters a,b and c