Syntha Lab RU

Multiple regression: the contribution of price, discount and traffic to sales

From a table of periods estimates how sales depend on up to three factors at once (for example price, discount depth, traffic): coefficients with confidence intervals and p-values, R², a check of the factors’ interdependence (VIF), the effect of a one-standard-deviation shift of a factor and a forecast at given values with a band.

Marketing budget and testing impact For whom: Analysts and marketers who need to separate the contribution of price, discount and traffic to sales.

Calculate on your data →

At a glance

What question does it answer?
By how many units sales change when one factor changes with the others unchanged, and how far the model can be trusted.
What data is needed?
Sales and up to three factors by week or month.
How to read the result?
Example on the default values (24 weeks): R² 98.3%, coefficients: price −0.046 units per rouble, discount 3.14 units per percentage point, traffic 0.91 units per thousand. The forecast at a price of 3,900, a discount of 15% and traffic of 120: 239 units, the band from 228 to 251. Example on the default values: R²: 98.3%; Adjusted R²: 98%; Model standard error: 5.3; Overall significance (p, F test): <0.05%. The figures are illustrative: enter your own to see your result.

Why and how to reason

Sales depend on several causes at once: price, discount, traffic. If each is looked at separately there is confusion: a discount coincided with a rise in traffic, and it is unclear who helped. Multiple regression selects coefficients so that the sum of squared deviations from actual sales is the smallest: b = (XᵀX)⁻¹Xᵀy. The result: sales = 261 − 0.046 × price + 3.14 × discount (points) + 0.91 × traffic. It reads: a rise in price of 100 lowers sales by 4.6 units, each point of discount adds 3.1 units, and each visitor 0.9. R² of 98% shows that the three factors explain almost all the variability. Each coefficient has an interval and a p-value. VIF checks whether factors are related to each other: at 1.1 all is well. The forecast at price 3,900, discount 15 and traffic 120 is 239 with an interval of 228 to 251.

When to use it

It fits when there is a history by periods with enough observations (at least 5 to 10 times the number of factors) and the factors moved independently. Do not use it if factors moved together (a discount always with advertising) or there are few periods: then the coefficients are unstable. Assumptions: the link is linear, errors are independent, there are no hidden factors (season, competitors), the future resembles the past.

How to read the result

Look at three things. The sign and size of coefficients: do they match common sense (price reduces, discount increases). Intervals and p-values: a coefficient with an interval including zero is not proven. VIF: if above the threshold (5), factors duplicate each other, and the coefficients cannot be interpreted separately. The “effect of a one-SD shift” helps compare factors of different scale. The forecast interval shows the range: if the target lies in it, the result is attainable. Match the conclusion with a test: regression shows a link, it does not prove a cause. It is worth writing the final formula in words for colleagues (“a point of discount gives about three units”): then the model becomes an understandable rule, not a black box.

Common mistakes

The usual mistakes: fitting the model to a high R² by adding factors, forecasting beyond observed values, not checking VIF, taking weeks with shortages as demand, mistaking a link for a cause. For a price decision confirm the coefficient with a small test. Do not include in the model factors that you set at the same time (discount and advertising in the same weeks): their effects cannot be separated.

What data is needed?

  • Sales and up to three factors by week or month.
  • At least three observations beyond the number of parameters.
  • The factor values for the forecast.

Inputs

FieldUnitValue in the exampleMeaning
Factor 1 in the forecast3,900The value of the first factor (the price in the example) at which the forecast is counted. Empty: no forecast.
Factor 2 in the forecast15The value of the second factor (the discount depth in the example). Needed if factor 2 is used. Optional. Empty: the field is ignored (counted as zero in sums).
Factor 3 in the forecast120The value of the third factor (traffic in the example). Needed if factor 3 is used. Optional. Empty: the field is ignored (counted as zero in sums).
VIF threshold for the warning5Above the threshold the factors are too alike and the coefficients are unstable. There is no single standard, 5 or 10 is taken; the value is yours.

How it is calculated

StepFormula
Coefficientsb = (XᵀX)⁻¹ Xᵀ y
Errorsσ² = SSE ÷ (n − p); the coefficient error = √(σ² × the diagonal of (XᵀX)⁻¹)
t, pt = coefficient ÷ error; p from the Student distribution with n − p degrees of freedom
R²1 − SSE ÷ SST; adjusted: 1 − (1 − R²) × (n − 1) ÷ (n − p)
VIF1 ÷ (1 − R² of regressing the factor on the others)
Forecast band± t × σ × √(1 + x₀ᵀ (XᵀX)⁻¹ x₀)

Worked numbers

Default values from the app; in the interactive version you enter your own.

R²
98.3 %What share of the sales spread the factors explain. It grows when any factor is added.
Adjusted R²
98 %R² corrected for the number of factors: it grows only if a factor is useful.
Model standard error
5.3The typical deviation of the actual from the model, in sales units.
Overall significance (p, F test)
<0.05 %
Observations
24
Intercept
261.09
Coefficient: Factor 1
−0.046The change in sales when the factor rises by one with the others unchanged; interval from −0.055 to −0.037, p 0%.
Coefficient: Factor 2
3.14The change in sales when the factor rises by one with the others unchanged; interval from 2.867 to 3.414, p 0%.
Coefficient: Factor 3
0.914The change in sales when the factor rises by one with the others unchanged; interval from 0.739 to 1.088, p 0%.
Largest VIF
1.11×
Sales forecast at the given factors
239
Forecast: lower bound 95%
228
Forecast: upper bound 95%
251
Actual and model: the closer to the line, the more accurate
Scatter plot: 24 points; regression line: y = 0 + 1·x100150200250300350150200250300350188; 186191; 194225; 224196; 194246; 241201; 200227; 235167; 170169; 176301; 304225; 227219; 221181; 172184; 190218; 222190; 193239; 230155; 145262; 257201; 199204; 206295; 296179; 182213; 210Sales by the model, units↑ Actual sales, units
  • points
  • regression line: y = 0 + 1·x
Data as a table
Sales by the model, unitsActual sales, units
187.7186
190.5194
224.6224
195.9194
245.8241
201.4200
226.7235
166.7170
169.4176
301304
225.2227
219.1221
181.3172
184190
218.2222
189.5193
239.4230
154.8145
261.5257
201.4199
204.2206
294.5296
178.6182
212.7210
Effect of a one-standard-deviation shift, % of average sales
Bar chart: Factor 1 −5.5, Factor 2 13.3, Factor 3 6−10−5051015Factor 1Factor 1Effect: −5.5−5.5Factor 2Factor 2Effect: 13.313.3Factor 3Factor 3Effect: 66%
Data as a table
MeasureEffect
Factor 1−5.5
Factor 213.3
Factor 36

Model coefficients

TermCoefficientStandard errortp, %Lower 95%Upper 95%VIF
Intercept261.0920.05913.020219.247302.933—
Factor 1−0.0460.004−10.320−0.055−0.0371.03
Factor 23.140.13123.9702.8673.4141.11
Factor 30.9140.08410.9200.7391.0881.09

Regression shows an association and not a cause: if discounts were given in the high-traffic season their effect mixes with the season. Add a seasonal factor or count within one season. The forecast band holds inside the range of your data.

Nuances and limits

  • Reading a coefficient as a cause: discounts and the season may coincide.
  • Including strongly related factors (VIF above the threshold): the coefficients jump.
  • Forecasting outside the data range: the line is untested there.

Terms used

Calculate on your data →