2026-11-01

Research Question

How does TV advertising spending relate to product sales?

This presentation uses a real advertising dataset to explore the relationship between TV advertising expenditure and product sales.

The data will be analyzed using simple linear regression.

Dataset

This presentation uses the Advertising dataset from An Introduction to Statistical Learning.

The dataset contains 200 observations of advertising expenditures and product sales.

The main variables used in this analysis are:

  • TV: TV advertising expenditure (in thousands of dollars)
  • Sales: Product sales (in thousands of units)

TV advertising expenditure is the independent variable (X), and product sales is the dependent variable (Y).

Sample Data

The table below shows the first five observations from the Advertising dataset.

TV Advertising Product Sales
230.1 22.1
44.5 10.4
17.2 9.3
151.5 18.5
180.8 12.9

What Is Simple Linear Regression?

Simple linear regression is a statistical method used to describe the relationship between two quantitative variables.

  • Independent Variable (X): TV Advertising Expenditure
  • Dependent Variable (Y): Product Sales

The goal is to find a straight line that best represents the relationship between advertising spending and sales.

We can also use the regression model to predict sales for a given advertising budget.

Regression Equation

The simple linear regression model can be written as:

\[ Y = \beta_0 + \beta_1 X + \varepsilon \]

Where:

  • \(Y\): Product Sales
  • \(X\): TV Advertising Expenditure
  • \(\beta_0\): Intercept
  • \(\beta_1\): Slope
  • \(\varepsilon\): Random Error

The slope represents the expected change in sales for a one-unit increase in TV advertising expenditure.

Exploring the Data

The scatter plot below shows the relationship between TV advertising expenditure and product sales.

Fitting a Regression Line

The regression line shows the predicted relationship between TV advertising spending and product sales.

Interactive Visualization

Hover over the points to explore TV advertising spending and product sales.

Regression Results and R-Squared

R-squared measures the proportion of variation in sales explained by TV advertising expenditure.

\[ R^2 = 1 - \frac{SS_{\text{res}}}{SS_{\text{tot}}} \]

The R-squared value of our model is 0.612.

This means TV advertising expenditure explains approximately 61.2% of the variation in product sales.

The estimated regression equation is:

\[ \widehat{Sales} = 7.033 + 0.048 \times TV \]

R Code and Conclusion

The following R code fits a simple linear regression model.

model = lm(sales ~ TV, data = advertising)
summary(model)

Conclusion:

  • TV advertising spending is positively associated with product sales.
  • TV advertising explains approximately 61.2% of the variation in sales.
  • The model can estimate sales based on TV advertising expenditure.
  • However, correlation does not imply causation.