Close Menu
    Trending
    • OpenAIs nya webbläsare ChatGPT Atlas
    • Creating AI that matters | MIT News
    • Scaling Recommender Transformers to a Billion Parameters
    • Hidden Gems in NumPy: 7 Functions Every Data Scientist Should Know
    • Is RAG Dead? The Rise of Context Engineering and Semantic Layers for Agentic AI
    • ChatGPT Gets More Personal. Is Society Ready for It?
    • Why the Future Is Human + Machine
    • Why AI Is Widening the Gap Between Top Talent and Everyone Else
    ProfitlyAI
    • Home
    • Latest News
    • AI Technology
    • Latest AI Innovations
    • AI Tools & Technologies
    • Artificial Intelligence
    ProfitlyAI
    Home » Analysis of Sales Shift in Retail with Causal Impact: A Case Study at Carrefour
    Artificial Intelligence

    Analysis of Sales Shift in Retail with Causal Impact: A Case Study at Carrefour

    ProfitlyAIBy ProfitlyAISeptember 17, 2025No Comments13 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Disclosure: I work at Carrefour. The views expressed on this article are my very own. The information and examples offered are revealed with my employer’s permission and don’t include any confidential info.

    A retailer’s assortment is an entire and different vary of merchandise offered to prospects. It’s topic to evolve primarily based on numerous elements resembling: financial circumstances, client tendencies, profitability, high quality or compliance points, renewal of some product ranges, inventory ranges, seasonal modifications, and many others.

    When a product is not out there on the shop cabinets, a few of its gross sales might shift to different merchandise. For a significant meals retailer like Carrefour, it’s essential to estimate this gross sales shift precisely to handle the danger of loss as a consequence of product unavailability and approximate the loss as a consequence of it.

    This measurement serves as an indicator of the results of the unavailability of a product. Moreover, it progressively builds a precious historical past of gross sales shift impression estimates.

    But, estimating gross sales shifts is complicated. Buyer conduct — influenced by hard-to-predict emotional elements — seasonality of sure merchandise, or introduction of latest merchandise can all have an effect on gross sales shifts. As well as, many merchandise develop into unavailable throughout all shops concurrently, making it not possible to determine a management inhabitants.

    The Causal Influence artificial management method, developed by a Google workforce, suits the particularities of our evaluation framework. It allows us to isolate the impact of product unavailability on gross sales from influencing elements, and is appropriate for each quasi-experimental and observational research. Based mostly on Bayesian structural time-series fashions, Causal Influence performs a counterfactual evaluation, calculating the impact on gross sales because the distinction between the gross sales noticed after a product turns into unavailable and, by means of an artificial management, the gross sales that will have been noticed had the product remained out there.

    This text presents our Causal Influence method for estimating the gross sales shift impact following product unavailability, in addition to a heuristic for choosing management group time collection.

    As a consequence of confidentiality issues, the quantitative values on the graphs have been redacted. Observe that every block represents one month alongside the x-axis, and the y-axis represents a variable amount, which might be fairly massive.

    I) Specifying the Use Case

    Product unavailability happens in two important varieties:

    • Full unavailability: the product is not out there within the nationwide assortment, affecting all shops.
    • Partial unavailability: the product is not out there from some — however not all — shops. It stays out there in others.

    We take into account {that a} dependable gross sales shift impression estimate ought to precisely assess each misplaced gross sales and portion of gross sales transferred to different merchandise. But, understanding the precise worth of those portions is not possible, making this problem complicated.

    Our examine analyzes instances of full product unavailability as these instances are essentially the most vital by way of gross sales impression.

    Please additionally observe that causal inference is just not a predictive framework for future occasions: it identifies causal hyperlinks up to now somewhat than forecasting future occasions.

    II) Why did we select Google’s Causal Influence mannequin?

    Causal approaches purpose to know causal relationships between variables, explaining how one impacts one other by isolating the impact we are attempting to investigate from all different present results.

    Amongst these instruments, Causal Influence is a user-friendly library, and it operates inside a completely Bayesian framework, permitting prior info integration whereas offering inherent credibility intervals in its outcomes. Its predictions symbolize anticipated outcomes had the intervention not occurred, expressed as distribution features somewhat than single values.

    Causal Influence generates predictions by combining endogenous elements, resembling seasonality and native stage, with user-chosen exterior time collection (covariates). These covariates have to be unaffected by the intervention and may seize tendencies or elements that would affect the primary time collection. We are going to talk about covariate choice later.

    Fig. 1: A simplified instance of Causal Influence in motion. The highest graph reveals two time collection: the orange line represents precise noticed information, whereas the blue line is the mannequin’s prediction, created utilizing covariates and endogenous elements. Every block represents a month. This prediction estimates what would have occurred if the occasion of curiosity (marked by the vertical dashed line) had not occurred. The blue shaded space signifies the prediction’s uncertainty. The second graph shows the point-by-point distinction between the prediction and the noticed information, and the underside graph reveals the cumulative impression.

    III) Managing Outliers and Anomalies in information

    To make sure correct evaluation, we addressed gross sales information anomalies by following two key steps:

    • We excluded time collection with unfavourable gross sales or numerous zero gross sales from the evaluation.
    • For time collection with occasional zero gross sales, we changed these values with the typical of the previous and following weeks’ gross sales.

    IV) Mannequin Design

    The selection of covariates considerably influences counterfactual prediction accuracy. These time collection should seize tendencies or exterior elements more likely to affect the goal time collection with out being affected by the intervention.

    As well as, it’s essential to contemplate the dimensions of the estimated gross sales shift impact relative to the time collection being studied: if the intervention is anticipated to have an effect on the goal collection by only some p.c, the collection will not be acceptable, as small results are tough to tell apart from random noise (particularly because the library designers have proven that results lower than 1% are tough to show as being linked to the intervention). Subsequently, we analyzed gross sales shift solely when the theoretical most gross sales shift fee exceeds 5% of gross sales in its sub-family. We calculated this as S/(1-S), the place S represents the proportion of turnover the product generated in its sub-family earlier than turning into unavailable.

    Given these preliminary issues, we designed our Causal Influence mannequin as follows:

    Goal

    Because the goal time collection, we chosen the sum of gross sales for the product’s sub-family, excluding the product that grew to become unavailable.

    Covariates

    We first excluded the next varieties of time collection:

    • Merchandise from the identical sub-family because the discontinued product, to stop any affect from its unavailability.
    • Merchandise from completely different households than the discontinued product, since covariates ought to stay business-relevant.
    • Time collection that confirmed correlation however not co-integration with the goal collection, to keep away from spurious relationships.

    Utilizing these filters, we chosen 60 covariates:

    • 20 covariates had been chosen primarily based on their highest co-integration with the goal collection in the course of the 12 months earlier than intervention.
    • 40 further covariates had been chosen from the highest 200 co-integrated collection, primarily based on their strongest correlation with the goal collection in the course of the 12 months earlier than intervention.

    Observe that these numbers (20, 40, and 60) are guidelines of thumb derived from our earlier mannequin suits.

    This empirical method combines time collection that seize each long-term tendencies (by means of co-integration) and short-term variations (by means of correlation). We intentionally selected numerous covariates as a result of Causal Influence employs a “spike and slab” methodology, which robotically reduces the affect of much less vital collection by assigning them near-zero regression coefficients, whereas giving higher weight to necessary ones.

    V) Mannequin Validation

    To validate our covariate choice technique, we drew closely on the method utilized by the Causal Influence designers. We carried out a examine of partial product unavailability as follows:

    1. We examined instances the place merchandise grew to become partially unavailable and carried out an preliminary typical statistical evaluation utilizing difference-in-differences.
    2. We utilized Causal Influence utilizing, as covariates, a management inhabitants that consisted of the product’s sub-family gross sales (excluding the unavailable product) in shops the place the product remained out there. These covariates offered the very best out there counterfactual since these shops had been unaffected by the intervention.
    3. Lastly, we utilized Causal Influence with no management inhabitants, as a substitute utilizing our choice course of primarily based on co-integration and correlation as outlined within the Mannequin Design part.

    Constant estimates throughout a number of stories (spanning completely different merchandise, portions, and classes) would exhibit that we are able to reliably apply this method on a broader scale.

    Moreover we developed two metrics to guage the artificial management’s high quality: a health measure and a predictive functionality measure.

    • The health measure, scored between 0 and 1, assesses how effectively the artificial management fashions the goal over the pre-intervention interval.
    • The predictive functionality measure is a type of backtesting that evaluates the artificial management’s high quality throughout a simulated false intervention up to now.

    A Sensible Validation Instance

    To validate the method described above with a sensible instance, we analyzed a case the place a yogurt pack grew to become unavailable in sure shops. We established therapy and management teams by matching every retailer the place the product grew to become unavailable with the same retailer that also had the product, primarily based on standards resembling gross sales efficiency, buyer traits, and geographic location.

    The theoretical most gross sales shift fee for this product was 9.5%, and our earlier analyses confirmed very excessive gross sales shift charges within the dairy product household. Consequently, we anticipated to acquire an estimate near the theoretical most fee.

    Following our three-step validation methodology, we obtained these outcomes:

    1. The difference-in-differences evaluation estimated the causal impact at 8.7% with 98.7% likelihood.
    2. As proven in Determine 2 (under), the Causal Influence evaluation utilizing a management inhabitants estimated a causal impact of 9.0%, with a confidence interval of [3.7%, 14.4%] and 99.9% likelihood. We are able to additionally see that whereas the mannequin successfully tracks the time collection fluctuations, it does present some minor deviations.

     Fig. 2: Causal impact estimation for the dairy product model after product unavailability, utilizing a management inhabitants to assemble the artificial management.

    As well as, when utilizing covariates chosen primarily based on co-integration and correlation as a substitute of a management inhabitants, the Causal Influence evaluation estimated a causal impact of 8.5%, with a confidence interval of [2.4%, 15.1%] and 99.9% likelihood as proven in Determine 3 (under). Once more, the mannequin successfully tracks the time collection fluctuations, but exhibiting some minor deviations.

     Fig. 3: Causal impact estimation for the dairy product model after product unavailability, utilizing proxies (solely information from shops within the therapy inhabitants to represent the artificial management).

    Here’s a abstract of the estimates obtained throughout the three completely different evaluation strategies:

    Evaluation Impact estimation Causal impact likelihood
    Distinction in Variations 8.7% 98.7% (vital)
    Causal Influence with a management inhabitants 9.0% CI: [3.7%, 14.4%] 99.9% (vital)
    Causal Influence with no management inhabitants info 8.5% CI: [2.4, 15.1%] 99.1% (vital)

    It reveals that the estimates stay constant in magnitude, whether or not utilizing a management inhabitants or not, thus validating our choice course of for covariates when no management inhabitants is obtainable.

    VI) Full unavailability: A rice pack not out there

    We examined a nationwide case the place a pack of rice model grew to become unavailable. We restrained our evaluation to the following couple of months after the product grew to become unavailable to keep away from capturing unrelated results which may emerge over an extended interval. The theoretical most gross sales shift fee for the product was 31.2%. We utilized the covariate choice methodology described earlier to estimate the potential gross sales shift impact.

    Fig. 4: Causal impact estimation after the pack of rice model grew to become unavailable, utilizing proxies (solely information from shops within the therapy inhabitants to represent the artificial management).

    As proven in Determine 4, the artificial management fashions the goal very effectively over the interval earlier than the intervention. The prediction precisely captures seasonal tendencies after the intervention. The credibility interval could be very slim across the estimate.

    We obtained a statistically vital estimate at 22% improve in turnover attributable to the product unavailability over the next months, with over 99.9% likelihood. This amount represents roughly 70% of the pack of rice complete gross sales earlier than the product grew to become unavailable, implying that 30% of the pack of rice gross sales didn’t shift.

    VII) Utilization suggestions and expertise report

    Causal Influence is a strong and user-friendly software for causal inferences. But after vital time spent specifying the mannequin and enhancing its accuracy, we encountered challenges in fine-tuning it to acquire an industrializable answer.

    • The primary level we wish to spotlight is the significance of the “rubbish in, rubbish out” precept, which is especially related when utilizing Causal Influence. Whatever the covariates used, Causal Influence will at all times produce a outcome, generally with very excessive likelihood, even in instances the place outcomes are unrealistic, or not possible.
    • Time collection chosen solely primarily based on the co-integration criterion generally overshadow others in mannequin characteristic significance, which might drastically cut back the estimation accuracy when adjustment is just not well-controlled.
    • The choice of 20 collection for co-integration and 40 for correlation is an empirical rule of thumb. Whereas efficient typically we encountered, it may benefit from additional refinement.

    Conclusion

    On this article we proposed a causal method to estimate the gross sales shift impact when a product turns into unavailable, utilizing Causal Influence. We outlined a strategy for choosing analyzable merchandise, and covariates.

    Though this method is purposeful and strong typically, it has limitations and areas for enchancment. Some are structural, whereas others require spending extra time on mannequin adjustment.

    • We examined the methodology on completely different merchandise with promising outcomes, however it isn’t exhaustive. Some very seasonal merchandise or ones with little historic information pose challenges. Moreover, merchandise that grew to become unavailable in only some shops are uncommon, limiting our skill to validate the strategy on numerous numerous instances.
    • One other structural limitation is the mannequin’s requirement for post-hoc evaluation: the software doesn’t enable gross sales shift impact prediction earlier than a product turns into unavailable. Having the ability to take action would vastly profit enterprise groups. Work is underway to method gross sales shift prediction utilizing bayesian structural time collection forecasting.
    • The gross sales shift impact evaluation ignores margin impacts: the product that grew to become unavailable might have the next unit margin than the merchandise to which its gross sales shifted. The industrial conclusions to be drawn may then differ, however evaluation at a sub-family stage precludes this stage of element.
    • Lastly we may discover different artificial controls, resembling Augmented SC, Strong SC, Penalized SC, and even different causal approaches such because the two-way fastened impact mannequin.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleEvaluating Your RAG Solution | Towards Data Science
    Next Article RAG Explained: Understanding Embeddings, Similarity, and Retrieval
    ProfitlyAI
    • Website

    Related Posts

    Artificial Intelligence

    Creating AI that matters | MIT News

    October 21, 2025
    Artificial Intelligence

    Scaling Recommender Transformers to a Billion Parameters

    October 21, 2025
    Artificial Intelligence

    Hidden Gems in NumPy: 7 Functions Every Data Scientist Should Know

    October 21, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    MapReduce: How It Powers Scalable Data Processing

    April 22, 2025

    Using Google’s LangExtract and Gemma for Structured Data Extraction

    August 26, 2025

    What Statistics Can Tell Us About NBA Coaches

    May 22, 2025

    When Models Stop Listening: How Feature Collapse Quietly Erodes Machine Learning Systems

    August 1, 2025

    A greener way to 3D print stronger stuff | MIT News

    September 4, 2025
    Categories
    • AI Technology
    • AI Tools & Technologies
    • Artificial Intelligence
    • Latest AI Innovations
    • Latest News
    Most Popular

    Building a Сustom MCP Chatbot | Towards Data Science

    July 10, 2025

    What Is a Query Folding in Power BI and Why should You Care?

    July 25, 2025

    A Google Gemini model now has a “dial” to adjust how much it reasons

    April 17, 2025
    Our Picks

    OpenAIs nya webbläsare ChatGPT Atlas

    October 22, 2025

    Creating AI that matters | MIT News

    October 21, 2025

    Scaling Recommender Transformers to a Billion Parameters

    October 21, 2025
    Categories
    • AI Technology
    • AI Tools & Technologies
    • Artificial Intelligence
    • Latest AI Innovations
    • Latest News
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2025 ProfitlyAI All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.