2024-10-23

#libraries

Slide 1: Definition

  • What is Linear Regression?
  • Linear Regression is a statistical method used to compare the relationship between two variables.

Slide 2: Purpose

  • Linear Regression charts are typically used to depict the relationship or correlation between the dependent variable based on the independent variable.
  • They help to predict the response value of the output variable based on the input value through showing this correlation.

Slide : Real World Application

  • Linear regression models are often used in the real world. A few examples:
  • Businesses use linear regression models to depict how much their ad spending affects their revenue; for example, increased ad spending may show increased revenue.
  • Data scientists use linear regression models to depict the effect of certain training methods on player performance.

Slide : Linear Regression Equation

  • The linear regression equation is as follows: \[ y = mx + b \]

  • Where x is the independent variable

  • y is the dependent variable

  • m is the y-intercept

Slide : Plotly Plot

  • Here is an example of a linear regression model as a plotly plot, ad spending is the independent variable and revenue is the dependent variable.
  • This compares the amount that a business spent on ads to the revenue they consequently received.

Slide : Ggplot Plot 1

  • Here is an example of a linear regression model as a ggplot, where hours studied is the independent variable and exam score is the dependent variable.
  • This compares the hours students studied to the test scores they received.

Slide : Ggplot Plot 2

  • Here is an example of a linear regression model as a ggplot, where time spent in office hours is the independent variable and time spent on homework is the dependent variable.
  • This compares the time students spent in office hours to the time they spent on homework afterwards.

Slide : References Used