Question

In: Computer Science

This question involves the use of simple linear regression on the fat dataset that can be...

This question involves the use of simple linear regression on the fat dataset that can be found in the faraway library.

data set.

Use the lm() function to perform a simple linear regression with brozek (percent body fat using the reference method) on abdom (abdomen circumference in cm) as the predictor. Print the results of the summary(function) and submit along with your answers to the following questions.

  1. Is there a relationship between the predictor and the response?
  2. How strong is the relationship between the predictor and the response?
  3. What is the predicted percent body fat associated with a abdomen circumference of 100 cm?
  4. What are the associated 95% confidence and prediction intervals?
  5. Plot the scatterplot of response against the predictor. Use the abline() functionto display the least squares regression line.
  1. Are there any outliers?

Solutions

Expert Solution

library(faraway)                                  #Importing faraway library

library(dplyr)                           #Importing dplyr library

glimpse(fat)                            #a short summary with data values of dataset fat

#Using lm() function to define the linear fit model where abdom is the predictor variable and brozek is the #dependent variable from dataset fat.

lml <- lm(brozek~abdom, data = fat)             

pred <- predict(lml, newfat, interval = "confidence")

pred

#Scatter plot

plot(brozek~abdom, data = fat)

#Using abline() function to extracts coefficients of fitted model and adds a regression line to the plot

abline(lml)

names(lml)

#Using summary function to output the results of linear regression model

summary(lml)

lml

Explanation:

1. How strong is the relationship between the predictor and the response?

A. Since the p-value is less than 0.05, we can reject the null hypothesis β=0. Hence there is a significant relationship between the predictor and dependent variables in the linear regression model.

2. What is the predicted percent body fat associated with a abdomen circumference of 100 cm?

3. What are the associated 95% confidence and prediction intervals?

A. The 95% confidence interval of the abdomen circumference 100 cm is between 23.611 % fat and 23.97347 %   fat.

3. Plot the scatterplot of response against the predictor. Use the abline() function to display the least squares regression line.

A.

4. Are there any outliers?

A. Yes, there are 2 outliers in this data. A simple linear regression model, an outlier is an observation of data point with large residual. The value in dependent variable here is unusual when compared to its predictor variable value.


Related Solutions

Use the following linear regression equation regarding airline tickets to answer the question. (The dataset collected...
Use the following linear regression equation regarding airline tickets to answer the question. (The dataset collected for Distance was from 500 miles to 5,687 miles) Note: that Distance is the number of miles between the departure and arrival cities, and Price is the cost in dollars of an airline ticket. (a) Find the slope using the linear regression equation given to you above. Inter- pret the value that you got for the slope in the context of the problem. Predicted...
Regression Make a distinction between simple linear and multiple linear regression. Can you think of examples...
Regression Make a distinction between simple linear and multiple linear regression. Can you think of examples in your business world where these techniques are or should be applied? Share the details, where possible.
Use the paired dataset given in the below table to conduct a simple regression analysis as...
Use the paired dataset given in the below table to conduct a simple regression analysis as follows: (10 pts) Using these 4 paired data points, fill up the table calculating all of the terms such as (x2, x*y) used in the formulas of this question. Fill up the other column titles on your own and make the calculations. If needed add coloumns. (the table should be written in your answer paper) xi yi xi2 xi*yi 1 2 32 2 1...
Consider the simple linear regression model for which the population regression equation can be written in...
Consider the simple linear regression model for which the population regression equation can be written in conventional notation as: yi= βxi+ui as 1- Derive the Ordinary Least Squares estimator (OLS) of β (i.e. ˆβ) include in your answer details of the proof. 2- Give an interpretation of ˆβ
Consider the simple linear regression model for which the population regression equation can be written in...
Consider the simple linear regression model for which the population regression equation can be written in conventional notation as: yi= βxi+ui as 1- Derive the Ordinary Least Squares estimator (OLS) of β0 (i.e. ˆβ0) include in your answer details of the proof. 2- Give an interpretation of ˆβ0
Consider the simple linear regression mode
Consider the simple linear regression modelYi = β0 + β1xi + εi, where the errors εi are identically and independently distributed as N (0, σ2).(a) If the predictors satisfy x ̄ = 0, show that the least squares estimates βˆ0 and βˆ1 are independently distributed.(b) Let r be the sample correlation coefficient between the predictor and response. Under what conditions will we have βˆ1 = r?(c) Suppose that βˆ1 = r, as in part b), but make no assumptions on...
Discuss the application of simple linear regression
Discuss the application of simple linear regression
Make a distinction between simple linear and multiple linear regression. Can you think of examples in...
Make a distinction between simple linear and multiple linear regression. Can you think of examples in your business world where these techniques are or should be applied? Share the details, where possible.
Simple Linear Regression: Suppose a simple linear regression analysis provides the following results: b0 = 6.000,    b1...
Simple Linear Regression: Suppose a simple linear regression analysis provides the following results: b0 = 6.000,    b1 = 3.000,    sb0 = 0.750, sb1 = 0.500,  se = 1.364 and n = 24. Use this information to answer the following questions. (a) State the model equation. ŷ = β0 + β1x ŷ = β0 + β1x + β2sb1    ŷ = β0 + β1x1 + β2x2 ŷ = β0 + β1sb1 ŷ = β0 + β1sb1 x̂ = β0 + β1sb1 x̂ = β0 +...
Question 3 Suppose that the estimated simple linear regression of a response Y on a predictor...
Question 3 Suppose that the estimated simple linear regression of a response Y on a predictor X based on n = 6 observations produces the following residuals: resid <- c(-0.09, 0.18, -0.27, 0.16, -0.06, 0.09) Note: For this question, all of the computations should be performed “by-hand”. (a) (1 point) What is the estimate of σ 2? (b) (2 points) Further, you know that the estimated regression parameters are βˆ 0 = −0.54 and βˆ 1 = 0.08. Additionally, the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT