Exercise 1

The author was trying to determine whether beauty

Exercise 2

The distribution is left skewed with a mean above 4, which means students tend to rate courses higher (in the 4’s and 5’s), rather than lower.

This is what I expected to see because the mean score of courses based on data I have collected (which sums to only my personal experience as an undergraduate student) is about 4 out of 5 stars.

ggplot(data = evals, aes(x = score)) + 
 geom_histogram(bins=9)

Exercise 3

ggplot(data = evals, aes(x = cls_students, y = cls_perc_eval)) +
  geom_point()

Exercise 4

The initial scatter plot appears to have a smaller number of observations than there are data points, but this is visuaully misleading because the data points are layered on top of eachother.

ggplot(data = evals, aes(x = score, y = bty_avg)) +
  geom_jitter(width = 0.2, height = 0.2) 

Exercise 5

E(score) = 3.88034 + 0.666400(bty_avg)

slope interpretation: For every 1 unit increase in beauty average, the score of a professor is expected to increase by 0.6664.

m_bty <- lm(score ~ bty_avg, data = evals)

summary(m_bty)
## 
## Call:
## lm(formula = score ~ bty_avg, data = evals)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.9246 -0.3690  0.1420  0.3977  0.9309 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.88034    0.07614   50.96  < 2e-16 ***
## bty_avg      0.06664    0.01629    4.09 5.08e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.5348 on 461 degrees of freedom
## Multiple R-squared:  0.03502,    Adjusted R-squared:  0.03293 
## F-statistic: 16.73 on 1 and 461 DF,  p-value: 5.083e-05

Exercise 6

m_bty <- lm(score ~ bty_avg, data = evals)

ggplot(data = evals) +
  geom_point(aes(x = score, y = bty_avg)) +
  geom_smooth(method = "lm", aes(x = score, y = bty_avg), color = 'green')
## `geom_smooth()` using formula = 'y ~ x'

Exercise 7

Here you might type any answers to Exercises.

#Here you would type any code for Exercise 7

Exercise 8

Here you might type any answers to Exercises.

#Here you would type any code for Exercise 8

Exercise 9

Here you might type any answers to Exercises.

#Here you would type any code for Exercise 9