# Test whether effect in one model is significantly higher than effect in other model

I have two models: one predicting the sales for a cheap product and another predicting the sales of a more expensive product (both of the same company). Let us say that both models look like this:

Sales = a + b*advertising


I want to test whether the effect of advertising on sales for one brand is higher/lower than the effect of advertising on sales for the other brand.

Does anyone know how I can formally test whether the difference is statistically signifcantly different?

A hint I got from someone is that I might consider using only one model. I have no clue however.

• Have a look at this question. Does this help? Dec 7, 2014 at 17:48
• Is this time series data? Are these 2 products substitutes? Dec 8, 2014 at 8:59

This can be addressed by introducing a dummy variable and an interaction term.

Let $Y = \text{Sales}$

$A = \text{Advertising}$

$X = \left\{ \begin{array}{lr} 1 & \text{if Brand A}\\ 0 & \text{if Brand B} \end{array} \right.$

So we have continuous outcome $Y$, continuous covariate $A$, and dummy variable $X$.

We wish to determine whether the effect of advertising ($A$) on sales ($Y$) is the same between the two values of $X$. Graphically, this corresponds to the null hypothesis that regression lines for $X=0$ and $X=1$ are parallel.

We can test this hypothesis using the interaction model:

$$Y = \beta_0 + \beta_1 A + \beta_2 X + \beta_3 AX$$ which can also be written as $$Y = \beta_0 + \beta_1 A + X(\beta_2 + \beta_3 A)$$.

If $X=0$ (Brand B):

$$Y = \beta_0 + \beta_1 A$$

If $X=1$ (Brand A):

\begin{align} Y &= \beta_0 + \beta_1 A + \beta_2 + \beta_3 A\\ &= (\beta_0 + \beta_2) + (\beta_1 + \beta_3) A \end{align}

Our null hypothesis is that the slopes of the two lines are the same, so \begin{align} H_0 : \beta_1 &= \beta_1 + \beta_3\\ \Leftrightarrow \beta_3 &= 0 \end{align}

This means that to address whether the effect of advertising on sales is the same between brands, we can perform a t-test for $\beta_3$ in the interaction model.