## Warning: Ignoring 53573 observations
2024-06-03
##load in the data
## Warning: Ignoring 53573 observations
## `geom_smooth()` using formula = 'y ~ x'
ggplot(movies, aes(x = budget, y = votes)) + geom_point(alpha = 0.5) + geom_smooth(method = “lm”, se = FALSE, color = “green”) + labs(title = “Number of Votes over Budget with Linear Regression”)
\[ m = \frac{y_2 - y_1}{x_2 - x_1} \]
The equation for the regression line (\(y\)) is:
\[ y = \beta_0 + \beta_1 x \]
where: - \(\beta_0\) is the y-intercept. - \(\beta_1\) is the slope of the line.