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.
The relationship between number of calories and amount of carbohydrates (in grams) that Starbucks food menu items contain is linear.
Explanatory variable: Calories Response variable: carbohydrates.
Regression line would be the best method to understand the carbohydrate consumption based on the calories.
These data do not meet the conditions required for fitting a least squares 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}
Height increases as soulder girth increases.
The relationship will remain the same as the unit change does not matter.
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.
x_m = 107.2
x_sd = 10.37
y_m = 171.14
y_sd = 9.41
c = 0.67
s = c*(y_sd/x_sd)
s
## [1] 0.6079749
i = y_m - s*x_m
i
## [1] 105.9651
Height = 105.9651+(0.6079749*Shoulder Girth)
slope: 0.6079749 intercept: 105.9651
q = lm(hgt ~ bdims$sho_gi, data = bdims)
summary(q)$r.squared
## [1] 0.4432035
Regression line explains 44.3% of the observed variation.
s_g_100 <- i + s * 100
s_g_100
## [1] 166.7626
160 - s_g_100
## [1] -6.762581
This means that the model overestimated the height of the student.
No. ## Cats, Part I.
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}
heart weight= -0.357 + 4.034 * body weight
A cat with body weight = 0kg has an expected Heart Weight of -0.357g. A cat with 0kg is not possible.
For each 1kg increase in body weight there is a 4.034 increase in heart weight.
\(R^2\) = 64.66%.
sqrt(0.6466)= 0.8041144
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}
x_m = -0.0883
y_m = 3.9983
i = 4.010
s = (y_m - i) / x_m
s
## [1] 0.1325028
Yes because the slope is positive.
The conditions of linear regression are met. The observation is independent of each other and random. Histogram is fairly normal. The data is linear.