Reference no: EM133760171
Question: Write your answers to the questions, including derivations, calculations, interpretations and conclusions, and attach R codes at the end of the homework. Partial credits will be given. Problem 1 (Use R, show your R codes) The dataset teengamb (in R package "faraway", you will need to install the package in R) concerns a study of teenage gambling in Britain.
a) (3 points) Make numerical summaries (number of observations, number of variables, mean, range, frequencies, etc.) for each variable in the data set and comment on any features you find interesting.
b) (3 points) Are there categorical variables in the data set, if yes, which ones?
c) (3 points) Make a histogram and describe its distribution for each variable in the data set;
d) (3 points) Make a scatter plot of income vs gamble. Any linear relationships between these variables? Problem 2 (not using R, calculate everything by hand, show details) Hsuie, Ma and Tsai studied the effect of the molar ratio of sebacic acid (the predictor variable, x) on the intrinsic viscosity of copolyesters (the response variable, y). The table below gives the data.
a) (4 points) Find the least square estimates