Regression and Sensitivity Analysis:
Does Discounting Payoff?
Every retailer runs discounts. Few stop to ask whether the extra sales are worth what they cost. I built a regression model on weekly sales from 45 Walmart stores to find out what really drives sales, then tested what happens when discount spend changes.
Project Scope
Nearly three years of weekly sales across 45 Walmart stores, combined with store details, economic indicators, and discount spend. The analysis looks at whole stores, not individual departments. The result is a working model that predicts how sales respond to different discount levels.
Business Questions
-
Sales Drivers: How much do store size, store type, holidays, and the economy matter compared to discounts?
-
Is It Worth It: Does spending more on discounts lift sales enough to cover the cost?
-
Diminishing Returns: At what level does each extra dollar of discount stop earning a dollar back?
Tools Used
-
Python (Pandas, Matplotlib, Seaborn)
-
Microsoft Excel
-
Power BI

Weekly Sales Trend
This line shows total sales across all stores, week by week, from 2010 to 2012. Sales hover around $40M to $50M most of the time, then spike sharply every November and December. The holiday season is the biggest moment of the year.

Sales by Store Type
This compares weekly sales across the three store types, where the box shows where most weeks land. Type A stores sell the most, Type B sits in the middle, and Type C is the smallest with sales packed in a tight range.

Correlation Heatmap
This grid shows how closely each factor moves with weekly sales, where closer to 1 means they rise together. Store size stands out at 0.81, far ahead of everything else. Discount spend is weak at 0.23, and temperature, fuel price, and unemployment barely register.

Regression Coefficients
This shows how much each factor pushes weekly sales up (green) or down (red) when everything else is held steady. Holidays add roughly $46K a week, while higher fuel prices and unemployment pull sales down. Size and discount bars look tiny only because they’re measured per square foot and per dollar, and store type is best read as a direction, not an exact amount.

Actual vs Predicted
Each dot is one store week, plotted by what really happened against what the model predicted. The closer to the dashed line the better, and most dots hug it, which is why the model scores 0.93.

Sales vs Discount Spend
This shows the model’s predicted sales as discount spend rises from $0 to about $32K. The line climbs, but check the scale on the left: the whole move is only about $5K on a $1.06M week, roughly half a percent.
What This Means for Your Business
Key Insights
-
Store size drives sales most: a 0.81 correlation, far ahead of the rest.
-
Store type matters too, though it overlaps with size.
-
Holiday weeks run about 8% higher.
-
Fuel price and unemployment slightly hurt sales.
-
Discounts are the weakest driver: each extra $1 brought back only about $0.17 in sales.
Conclusion
The model predicts weekly sales well, but the real value is what it was used for: testing a business decision. In this data, discounts don’t earn back what they cost through extra sales alone, so they need to be justified some other way, like clearing old stock or matching a competitor.
Future Scope
-
Test discount impact by department, since it likely varies a lot.
-
Check whether discounts work better in holiday weeks.
-
Build a price elasticity model.
-
Turn the what if test into an interactive Power BI slider.
GitHub Link
Please click on the link for the detailed project on GitHub:
https://github.com/Rinitj/Sales-Regression-Markdown-Sensitivity
Rinit Jain
Home
About
Contact
Facebook
Twitter
LinkedIn
Tel. 123-456-7890
500 Terry Francine St.