Discounts are one of the most common tools used to drive e-commerce sales, but they may also influence how customers perceive the products they buy. This project asks whether purchases made below a seller-product's historical reference price are associated with different customer ratings.
I built an end-to-end analytical pipeline from the relational Olist dataset using SQL and DuckDB, creating historical reference prices from each product's prior pricing history. I then used statistical modelling to compare discounted and non-discounted purchases while accounting for differences between products, sellers, and changes over time.
Discounted purchases were associated with ratings just 0.008 points higher on average, with a 95% confidence interval from -0.057 to 0.074. This entire range was well within the project's 0.3 rating-point threshold for a practically meaningful difference.
Business recommendation: Based on the historical evidence, sellers can use discounts without expecting a meaningful change in customer ratings. Pricing decisions should instead focus on outcomes such as conversion and profitability.
Because the historical data were not generated through random assignment, these results describe an association rather than a causal effect.
To answer the causal question, I designed a prospective randomized A/B test assigning customers 50/50 between standard pricing and a predefined discount treatment. The experiment uses customer rating as the primary outcome and a Welch two-sample t-test with a 95% confidence interval.
With 80% statistical power, a 5% significance level, and a minimum detectable effect of 0.3 rating points, the experiment requires 274 observed ratings per group (548 total). Conversion, review completion, and contribution margin per randomized customer would also be monitored.