Back to all analyses
Price and demand
Explore how changes in price affect the model’s demand and revenue estimates.
- Python
- statsmodels
- Simulation
- Matplotlib
Key results
54monthly observations of demand, prices, income, and promotion spend
0.695 to 0.830R² without and with month controls
-137 unitsdemand change for each 1-unit price increase (p = 0.004)
93.38 vs 99.38revenue-maximizing price without and with seasonality
Findings & method
What I found
- The demand model: demand = 5,025 − 136.6 × own price + 117.4 × competitor price − 0.28 × income + 7.87 × promotion spend. Own price lowers demand, a competitor’s price raises it (p = 0.004 each), and promotion spend adds 7.9 units per unit spent (p < 0.001).
- Income has a negative sign, which is unusual. It is not significant at 5% in the first model (p = 0.068) and is in the model with months (p = 0.030), so I would treat that result with caution.
- Seasonality changed the answer. Adding month controls lifted R² to 0.830 (adjusted 0.763), and December demand is lower by about 1,187 units (p = 0.012). I then simulated 20 prices from 91.38 to 110.38 with the other inputs held fixed.
- The peak moves. Without months, revenue peaks near a price of 93.38 (about 1.19 million). With the October effect, it peaks near 99.38 (about 1.206 million).
- The curve is flat near the top. Between prices of 91 and 100, predicted revenue differs by under 1%, so price alone is a weak revenue lever in this range.
Price simulator
Predicted demand and revenue
Competitor price held at 109.14, income per capita at 7,620.6, and promotion spend at 1,247.31.
model = smf.ols('demand_Maa ~ own_price + comp_price + inc_per_capita + pro_exp', data=hoi).fit()
hoi_new['pred_demand'] = model.predict(hoi_new)
hoi_new['revenue'] = hoi_new['own_price'] * hoi_new['pred_demand']
Limits: 54 months of data, and the simulation holds everything but price fixed, so it cannot show how competitors would react. The model with months has a high condition number, a sign of multicollinearity.