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.
2026-11-01
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.
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 advertising expenditure is the independent variable (X), and product sales is the dependent variable (Y).
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 |
Simple linear regression is a statistical method used to describe the relationship between two quantitative variables.
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.
The simple linear regression model can be written as:
\[ Y = \beta_0 + \beta_1 X + \varepsilon \]
Where:
The slope represents the expected change in sales for a one-unit increase in TV advertising expenditure.
The scatter plot below shows the relationship between TV advertising expenditure and product sales.
The regression line shows the predicted relationship between TV advertising spending and product sales.
Hover over the points to explore TV advertising spending and product sales.
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 \]
The following R code fits a simple linear regression model.
model = lm(sales ~ TV, data = advertising) summary(model)
Conclusion: