Calorie is explanatory Variable Carbohydrate is response variable
To predict the Carbs based on calories count.
Independence- We can assume its independence unless otherwise stated. Linearity- Based on first graph, it appears linear. Normal Residual-Based on histogram, the model has a bell shape and is slightly skewed uni model. Constant Variability- based on residuals graph, residuals are not constant. Or not spread apart equally. The lest has smaller concentration with small residuals while to the right the residual are larger. The 4th condition is not satisfied for Least square line.
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}
There is a positive relationship and correlation between the two.
It would still be a positive relatinship with a steeper slope. as the width of X axis will decrease.
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.
height=105.8445+0.6091∗shoulder girth
sh_girth_mean <- 107.20
sh_girth_sd <- 10.37
height_mean <- 171.14
height_sd <- 9.41
cor <- 0.67
#calculate slope
B1 <- (height_sd/sh_girth_sd)*cor
B1
## [1] 0.6079749
B0=round(B1 * -sh_girth_mean + height_mean , 4)
B0
## [1] 105.9651
The intercept of 105.9651 represents the height in centimeters at shoulder girth of 0 cm.
The slope of 0.6080 represents the rate of change in height for each centimeter change in shoulder girth.
r2 <- round(cor^2,2)
r2
## [1] 0.45
The predicted height is 166.76
girth <- 100
pre_height <- B0 + B1*girth
pre_height
## [1] 166.7626
The residual on -6.76 is how far away from the estimate and how accurate the model is.
160-pre_height
## [1] -6.762593
Since 56 cm seems like an outlier as it is almost 5 SD away from the mean so it would be inappropriate to predict height of the individual with this model.
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}
HeartWight =−0.357+4.034∗bodyweight
We expect the heart weight of -0.357 grams if cat weight is 0 kgs. This doesn’t make sense in real life.
For each additional kg of body weight, we can expect cat’s heart weigh additional 4.034 grams
66.66% of the observations can be explained by our linear model.
R2=.6466
round(sqrt(R2),3)
## [1] 0.804
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}
B0=4.010
Slope=4.13 * 0.0322
Slope
## [1] 0.132986
No, There is no evidence that there is a relationship.Slope of is almost .1 which is close to zero.
Residuals are constant across the residual graph.
The histogram of residuals shows a normal bell shape but slightly left skewed.
QQ plpt shows linearity.
There is independence shown in observation.