Nutrition at Starbucks, Part I. (8.22, p. 326) The scatterplot below shows the relationship between the number of calories and amount of carbohydrates (in grams) Starbucks food menu items contain. Since Starbucks only lists the number of calories on the display items, we are interested in predicting the amount of carbs a menu item has based on its calorie content.

  1. Describe the relationship between number of calories and amount of carbohydrates (in grams) that Starbucks food menu items contain.

Answer:

The relationship is moderate positive between number of calories and the amount of carbohydrates with alot of variability.
  1. In this scenario, what are the explanatory and response variables?

Answer

 Since we are interested in calculating the amount of carbohydrates I would say that the carbohydrates is the response variable and the calories is the explanatory variable. 
  1. Why might we want to fit a regression line to these data?

Answer

The reason will be to confirm the relationship between the calories and carbohydrates and be able to make predictions also observe the residuals with the regression line.

  1. Do these data meet the conditions required for fitting a least squares line?

Answer

Seems like the data meets the conditions to fittine the least square lines.


Body measurements, Part I. (8.13, p. 316) Researchers studying anthropometry collected body girth measurements and skeletal diameter measurements, as well as age, weight, height and gender for 507 physically active individuals. The scatterplot below shows the relationship between height and shoulder girth (over deltoid muscles), both measured in centimeters.

\begin{center} \end{center}

  1. Describe the relationship between shoulder girth and height.

Answer

  I would say that there is a positive relationship between the two because as the shoulder girth increases so does the height.
  
  
  
  1. How would the relationship change if shoulder girth was measured in inches while the units of height remained in centimeters?

Answer

   It should remain the same as only the units changed so instead of centimeters you should see inches on the scale. It should have no impact on the relationship.

Body measurements, Part III. (8.24, p. 326) Exercise above introduces data on shoulder girth and height of a group of individuals. The mean shoulder girth is 107.20 cm with a standard deviation of 10.37 cm. The mean height is 171.14 cm with a standard deviation of 9.41 cm. The correlation between height and shoulder girth is 0.67.

  1. Write the equation of the regression line for predicting height.

Answer

The equation can be written as

y ^ = B 0 + B 1 ∗ x

Here X would be the explanatory variable Shoulder and y is the response variable Height,
B0 and B1 will be representing the two model variables in our case,
The slope B1 = (y SD) / (x SD) * R,
 R will be the correlation between the two variables
 
    Shoulder_Mean<-107.20

    Std_Shoulder<-10.37
    
    mean_height<-171.14
    
    std_height<- 9.41
    
    correlation_shoulder_height<-0.67
    
    B1<-round(correlation_shoulder_height*(std_height/Std_Shoulder),4)
    
    B0<-round(mean_height-B1*Shoulder_Mean,4)
Lets write the equaton here Height= 105.965+.608*Shoulder_Girth



      
      
      
  
  1. Interpret the slope and the intercept in this context.

Answer

    we have 0.6079749 cm in height. If shoulder girth is at 0, we can start from 105.965.
    
    
  1. Calculate \(R^2\) of the regression line for predicting height from shoulder girth, and interpret it in the context of the application.

Answer

 $R^2$= 0.67^2= 0.4489
  1. A randomly selected student from your class has a shoulder girth of 100 cm. Predict the height of this student using the model.

Answer

We Know that

y ^ = B 0 + B 1 ∗ x

Height=105.9624+0.608 * 100 =  166.7624
  1. The student from part (d) is 160 cm tall. Calculate the residual, and explain what this residual means.

Answer

height <- 160

residual<- round(height - 166.77 ,2)
  The residual is -6.77
  1. A one year old has a shoulder girth of 56 cm. Would it be appropriate to use this linear model to predict the height of this child?

Answer

I dont think this will be an appropriate model to use for a one year child it is more accurate for adults.

Cats, Part I. (8.26, p. 327) The following regression output is for predicting the heart weight (in g) of cats from their body weight (in kg). The coefficients are estimated using a dataset of 144 domestic cats.

\begin{center} \end{center}

  1. Write out the linear model.

Answer

   heart_weight= -0.357 + 4.034 * body_weight
   
   
   
  1. Interpret the intercept.

Answer

    To me it seems to be the heart weight in grams 
  1. Interpret the slope.

Answer

  for very Kilogram increase in the cates body weight there will be a 4.034 gram increase in the weight of the heart.
  
  
  1. Interpret \(R^2\).

Answer

    <math xmlns="http://www.w3.org/1998/Math/MathML">

R 2

It is explained by the body weight seems to be a 64.66% varince between heart weights.
  1. Calculate the correlation coefficient.

Answer

    Calculating the Correlation_Coefficient= SquareRoot(R2)
Correlation_coefficient<-sqrt(64.66)

Correlation_Coefficient= 8.0411442


Rate my professor. (8.44, p. 340) Many college courses conclude by giving students the opportunity to evaluate the course and the instructor anonymously. However, the use of these student evaluations as an indicator of course quality and teaching effectiveness is often criticized because these measures may reflect the influence of non-teaching related characteristics, such as the physical appearance of the instructor. Researchers at University of Texas, Austin collected data on teaching evaluation score (higher score means better) and standardized beauty score (a score of 0 means average, negative score means below average, and a positive score means above average) for a sample of 463 professors. The scatterplot below shows the relationship between these variables, and also provided is a regression output for predicting teaching evaluation score from beauty score.

\begin{center}

\end{center}

  1. Given that the average standardized beauty score is -0.0883 and average teaching evaluation score is 3.9983, calculate the slope. Alternatively, the slope may be computed using just the information provided in the model summary table.

Answer

Slope <- round( ( 3.9983 - 4.010 )/ -0.0883 , 4)

The Slope is = 0.1325

  1. Do these data provide convincing evidence that the slope of the relationship between teaching evaluation and beauty is positive? Explain your reasoning.

Answer

 The Data tells us that the relationship is positive between the teaching evaluation and beauty.
 
  1. List the conditions required for linear regression and check if each one is satisfied for this model based on the following diagnostic plots.

Answer

Independency in Observations: The observations are indepependant. Satsified

linear relationship: Scatterplot shows a weak linear relationship. Satsified

Normal residuals: Residual graph tells us it is a normal distribution. Satsified

Constant variability: There is a consistent variality in the residual graph. Satsified