# import the data
link <- url("https://gregorkb.github.io/data/height_length_index_pinky_shoesize_combined.csv")
hl0 <- read.table(link,sep=",",header=T)
# remove a "uk" show size
rmv <- which(hl0$shmw == "uk")
hl <- hl0[-rmv,]
# convert ft and in. to centimeter heights
hl$height <- (hl$ft*12 + hl$in.)*2.54
# view the first few rows of the data frame
head(hl)STAT 516 hw 3
The code below imports into R a data set containing the self-reported heights (in feet and inches), lengths of index and pinky fingers (in millimeters), shoe size, and shoe size gender (“m”/“w”) of several statistics students. The code then removes an observation with shoe size gender given as “uk” and adds to the data set a column containing the heights in centimeters.
It is of interest to use the multiple linear regression model to predict the height of a person based on his or her index and pinky finger lengths, shoe size, and shoe size gender.
1.
Make a figure which shows scatterplots for all pairs of variables in the data set. Comment on which pairs of variables appear to be highly correlated.
2.
Fit a multiple linear regression model for predicting height based on index and pinky finger length, shoe size, and shoe size gender. Then:
2.a
Report the estimated value of the regression coefficient for each covariate.
2.b
Give the value of the estimated standard error \(\widehat{\text{s.e.}}(\hat \beta_j) = \hat \sigma/\sqrt{\Omega_{jj}}\) for each of the covariates.
2.c
Give the value of the test statistic \(T_{\operatorname{test}} = \hat \beta_j / (\hat \sigma/\sqrt{\Omega_{jj}})\) for each of the covariates.
2.d
Give the p value for testing \(H_0\): \(\beta_j = 0\) versus \(H_1\): \(\beta_j \neq 0\) for each of the covariates.
2.e
Give an interpretation to the estimated coefficient \(\hat \beta_j\) for the shoe size covariate.
2.f
Give an interpretation to the estimated coefficient \(\hat \beta_j\) for the shoe size gender covariate.
2.g
Do the index and pinky finger lengths appear to be important predictors of height?
2.h
Give an estimate of \(\sigma\), the standard deviation of the error term in the multiple linear regression model.
2.i
Produce a normal quantile-quantile plot of the residuals as well as a residuals versus fitted values plot. Comment on whether you believe the assumptions of the multiple linear regression model to be satisfied.
3.
Fit a simple linear regression model using only the shoe size gender covariate. Then:
3.a
Give an interpretation of the estimated regression coefficient for the shoe size gender covariate.
3.b
Why does this covariate appear to have a different effect when it is the sole covariate in the model?
4.
Fit a multiple linear regression model using only the index and pinky finger lengths as predictors of height.
4.a
Does either covariate in this model appear to be significantly related to the height?
4.b
What proportion of the total variation in heights does this model explain?
5.
Fit a multiple linear regression model using only the shoe size and shoe size gender covariates.
5.a
Does either covariate in this model appear to be significantly related to the height?
5.b
What proportion of the total variation in heights does this model explain?
6.
A forensic team analyzes a shoe print and a hand print, presumably left by the same person: The shoe print belongs to a size \(8\) women’s shoe and the index and pinky fingers measure \(70\)mm and \(60\)mm, respectively:
6.a
If the forensic team uses the models fitted above to make guesses about the height of the person who left the prints, will they be extrapolating beyond the range of the observed data? Explain your answer.
6.b
Give an interval such that the forensic team can be \(95\%\) certain it contains the average height of the population of all people wearing size \(8\) women’s shoes and having index and pinky fingers measuring \(70\)mm and \(60\)mm, respectively.
6.c
Give an interval such that the forensic team can be \(95\%\) certain it contains the height of the person who left the prints.
7.
Suppose there is no shoe print, but only a hand print with index and pinky fingers measuring \(70\)mm and \(60\)mm, respectively:
7.a
Give an interval such that the forensic team can be \(95\%\) certain it contains the average height of the population of all people having index and pinky fingers measuring \(70\)mm and \(60\)mm, respectively.
7.b
Give an interval such that the forensic team can be \(95\%\) certain it contains the height of the person who left the hand print.
8.
Suppose there is no hand print, but only a shoe print belonging to a size 8 women’s shoe:
8.a
Give an interval such that the forensic team can be \(95\%\) certain it contains the average height of the population of all people wearing a size 8 women’s shoe.
8.b
Give an interval such that the forensic team can be \(95\%\) certain it contains the height of the person who left the shoe print.
9.
Answer the following based on careful study of the preceding model output and confidence and prediction intervals:
9.a
If a shoe print is found, does a hand print provide useful additional accuracy in guessing the height of the person leaving the prints?
9.b
If a hand print is found, does a shoe print provide useful additional accuracy in guessing the height of the person leaving the prints?
9.c
If only a hand print is found, should the forensic team bother trying to use the index and pinky finger lengths to guess the height of the person who left it?