2026-04-12

Business Problem

Companies invest heavily in advertising, but understanding whether marketing spend directly impacts sales is critical for making data-driven decisions.

Objective
Evaluate the relationship between advertising spend and sales using simple linear regression.

Dataset Overview

This dataset includes:

- TV Advertising
- Radio Advertising
- Newspaper Advertising
- Sales (response variable)

head(Advertising)
     TV Radio Newspaper Sales
1 230.1  37.8      69.2  22.1
2  44.5  39.3      45.1  10.4
3  17.2  45.9      69.3   9.3
4 151.5  41.3      58.5  18.5
5 180.8  10.8      58.4  12.9
6   8.7  48.9      75.0   7.2

TV Advertising vs. Sales

\[ \text{Sales} = \beta_0 + \beta_1 \cdot \text{TV} + \varepsilon \]

\[ \beta_1 = \text{change in Sales for each unit increase in TV advertising} \]

Radio Advertising vs. Sales

\[ \text{Sales} = \beta_0 + \beta_1 \cdot \text{Radio} + \varepsilon \]

\[ \beta_1 = \text{change in Sales for each unit increase in Radio advertising} \]

Regression Model Output

summary(model_marketing)
Call:
lm(formula = Sales ~ TV, data = Advertising)

Residuals:
    Min      1Q  Median      3Q     Max 
-8.3860 -1.9545 -0.1913  2.0671  7.2124 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) 7.032594   0.457843   15.36   <2e-16 ***
TV          0.047537   0.002691   17.67   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 3.259 on 198 degrees of freedom
Multiple R-squared:  0.6119,    Adjusted R-squared:  0.6099 
F-statistic: 312.1 on 1 and 198 DF,  p-value: < 2.2e-16

Key Result

  • TV advertising has a statistically significant positive relationship with sales
  • The p-value is extremely small (p < 0.001), indicating strong evidence of a relationship
  • The model explains approximately 61% of the variation in sales (R² = 0.61)
  • Radio advertising shows a positive relationship, but it is weaker compared to TV

Interactive Visualization (Plotly)

Busniess Insight

TV advertising delivers the greatest return in driving sales and should be prioritized when allocating marketing budgets. While radio advertising shows a positive relationship, its impact is less consistent, suggesting it should be used as a supporting channel rather than a primary investment.

Conclusion

TV advertising delivers the greatest return in driving sales and should be prioritized when allocating marketing budgets. While radio advertising shows a positive relationship, its impact is less consistent, suggesting it should be used as a supporting channel rather than a primary investment.