Causal Couture Week 6: Launching the Causal Intelligence Layer

Causal Couture's week six build estimates whether social engagement actually causes next-day sales, using regression, bootstrap uncertainty, placebo tests, and a stockout diagnostic.

9:35 video5 min readWatch on YouTube

There's a meaningful difference between noticing that two things happened together, simulating what might happen under a hypothetical change, and actually estimating whether one thing causes another. Week six of Causal Couture, detailed by HAI Fellow Ushasvi Rachel, is the point where the platform stops blurring those three ideas together and builds a dedicated system for the third one: an observational causal effect estimator.

Three claims that are not the same thing

Causal Couture now explicitly separates three different kinds of analytical output. An observed signal describes what's present in historical retail data, a pattern that already happened. A scenario simulation asks how the existing analytical framework responds to a user-defined hypothetical change; it's not a forecast, it's a what-if run through the existing model. An estimated causal effect is something different again: an observational estimate of how changing one factor may relate to a later outcome, made under explicit, stated assumptions. The goal of week six isn't to declare that causality has been proven. It's to build the technical and methodological foundation that makes rigorous causal analysis possible at all, and to keep these three outputs from being treated as interchangeable.

The first causal question: does engagement drive next-day sales?

The question the platform tackles first is whether social engagement for a product has a causal effect on that product's sales the following day. The data stays at the same grain the platform already uses, one row per date and SKU. The treatment is social engagement for a product on a given date; the outcome is units sold for that same product on the following day. That creates a clean, ordered relationship: engagement at time T, followed by sales at time T plus one day.

Getting the temporal structure right

A dedicated temporal causal dataset was built from the platform's unified retail data specifically to support this question, including current and prior engagement, current and prior sales, current inventory, and validity and inventory-constraint indicators. One correction mattered a lot here: simply shifting a sales column by one row can silently treat the next available record as if it were the next calendar day, even when there are gaps in the dates. The updated pipeline instead checks the actual next observed date for each SKU and only populates next-day sales when that date is exactly one calendar day later. That keeps the treatment-outcome relationship temporally honest instead of quietly corrupted by missing dates.

Confounders, mediators, and why the distinction matters

Before estimating anything, the team built a causal diagram to make its assumptions visible rather than implicit. Prior sales may influence both current engagement and later sales. Prior engagement may carry forward its own effect. Inventory availability can constrain how many units actually get sold regardless of demand. SKU-specific characteristics and calendar effects may influence both engagement and purchasing behavior. Web variables, like product views or view-to-cart rate, get treated with particular caution, since they may occur after social engagement but before the purchase itself, making them possible mediators rather than confounders. If that pathway, engagement leads to web behavior leads to purchase, is real, then automatically controlling for those web variables could strip out part of the very effect being studied.

Estimating the effect, honestly

The first effect estimator uses linear regression, with a preferred adjustment structure that includes current engagement, prior sales, prior engagement, current inventory when available, SKU fixed effects, and day-of-week effects. Observations where inventory was constrained can be excluded from the primary estimate, so periods where nothing was available to sell don't distort the measured relationship. The output reports the estimated engagement effect, the number of observations used, which adjustment variables and fixed effects were applied, and general model information. The interpretation stays deliberately limited: this is an observational estimate from uploaded retail data, not experimental proof of causation.

Guarding against false precision

A single point estimate can create a misleading sense of exactness, so the system adds bootstrap uncertainty analysis, repeatedly resampling the available observations, re-estimating the model each time, and examining the resulting distribution of effect estimates to report a mean, a median, a standard error, and a percentile interval. It also runs a shuffled-treatment placebo test, where the observed engagement values are randomly shuffled and the model is re-estimated; if a similarly large relationship still shows up after the real treatment structure has been destroyed, that result needs more scrutiny, while a weaker shuffled result offers additional reassurance without proving identification on its own. A separate check confirms engagement actually contains meaningful variation, looking at its range, distribution, and number of unique values, as a basic global check rather than formal proof of overlap across every confounder group.

The stockout diagnostic

Retail data adds a specific complication: observed sales can be capped by inventory rather than by demand. Low sales don't necessarily mean low demand if a product simply wasn't available to buy. The stockout diagnostic identifies normal inventory periods, low-stock periods, inventory pressure, and full stockouts, evaluating where observed sales may be an unreliable stand-in for real demand and assigning a suppressed-demand risk classification. It doesn't try to recover or impute the true underlying demand, only to flag where inventory constraints make interpretation harder.

Bringing it together on the front end

All of these components, the unified retail dataset, the temporal causal dataset, the adjusted effect estimate, bootstrap uncertainty, the placebo test, treatment variation checks, stockout diagnostics, and comparisons across alternative model specifications, feed into one coordinated causal intelligence workflow, exposed through a new backend route and a dedicated frontend experience. To make the number easier to interpret, the platform translates the raw coefficient into a business-scale figure: the estimated sales effect associated with a 10 percentage point increase in engagement rate, rather than a full one-point increase. The resulting evidence categories, stronger, moderate, weak, or insufficient observational support, are diagnostic summaries, not probabilities that the relationship is truly causal.

Key takeaways

  • Causal Couture now explicitly separates observed signals, scenario simulations, and estimated causal effects as three distinct, non-interchangeable outputs.
  • The first causal question tested is whether social engagement causally affects next-day sales, using a properly time-ordered temporal dataset that checks actual calendar gaps rather than just shifting rows.
  • A causal diagram distinguishes confounders (like prior sales and inventory) from possible mediators (like web behavior), since controlling for mediators could remove part of the real effect.
  • Linear regression estimates the effect, but bootstrap uncertainty analysis and a shuffled-treatment placebo test guard against false precision and spurious findings.
  • A stockout diagnostic flags periods where inventory constraints, not real demand, may be suppressing observed sales, without trying to impute the true demand.
  • All outputs are framed as observational estimates with explicit assumptions, not experimental proof of causation, and results are compared across multiple model specifications for robustness.

Who this is for

This update is for anyone following the Causal Couture project's progression from decision intelligence toward genuine causal analysis, and for readers interested in how a retail analytics platform can honestly separate correlation, simulation, and causal estimation. It's part of the broader HAI Fellows work coming out of Humanitarians AI.

Chapters

  1. 0:00Week 6: Transitioning to Causal Intelligence
  2. 0:33Constructing the Temporal Causal Dataset with Date Gaps
  3. 1:02The Causal Diagram: Confounders vs. Mediators
  4. 1:30Estimating the Effect & Running Bootstrap Uncertainty
  5. 2:00Diagnostic Assurance: Placebo and Variation Checks
  6. 2:30The Stockout Diagnostic: Identifying Suppressed Demand
  7. 3:00Frontend Causal Dashboard & Multi-Specification Robustness
Full transcript(auto-generated, with timestamps)

Week 6: Transitioning to Causal Intelligence

[0:00]Week five completed Causal Couture's phase four decision intelligence system. Observed signals, trends, alerts, structured recommendations, and user-driven scenario simulation. Week six begins the next layer, causal intelligence. The goal is not to declare that causality has been proven. It is to build the technical and methodological foundation for more rigorous causal analysis. Causal Couture now separates three different analytical claims. An observed signal describes what is present in historical retail data.

Constructing the Temporal Causal Dataset with Date Gaps

[0:34]A scenario simulation asks how the existing analytical framework responds to a user-defined hypothetical change. It is not a forecast. An estimated causal effect is an observational estimate of how changing one factor may relate to a later outcome under explicit assumptions. These outputs may inform one another, but they are not interchangeable. The first causal question implemented for the platform is, "What is the causal effect of social engagement on

The Causal Diagram: Confounders vs. Mediators

[1:03]Subsequent product sales?" The project keeps its existing analytical grain. One row for each date and SKU. The treatment is social engagement for a product on the current date. The outcome is units sold for that same product on the following day. That creates a clearly ordered relationship. Engagement at time T followed by sales at time T plus one day. To support this question, a dedicated temporal causal

Estimating the Effect & Running Bootstrap Uncertainty

[1:30]Data set was created from the unified retail data. It includes current and prior engagement, current and prior sales, current inventory, next period sales information, validity indicators, and inventory constraint indicators. A correction was important here. Simply shifting a sales column by one row can mistake the next available record for the next day, even when dates are missing. The updated pipeline checks the actual next observed date for each SKU.

Diagnostic Assurance: Placebo and Variation Checks

[2:01]Next day sales are populated only when that date is exactly one calendar day later. That keeps the temporal treatment and outcome relationship honest. The first causal diagram makes the assumptions visible. Prior sales may influence both current engagement and later sales. Prior engagement may also carry forward. Inventory availability can constrain how many units are sold. SKU specific characteristics and calendar effects may influence both engagement and purchasing

The Stockout Diagnostic: Identifying Suppressed Demand

[2:31]Behavior. Web variables such as product views or view to cart rate require caution. They may occur after social engagement and before purchase, making them possible mediators rather than confounders. The pathway could be social engagement, then web behavior, then purchase. Automatically controlling for those variables could remove part of the effect being studied. The first effect estimator uses linear regression. The preferred adjustment structure includes current engagement, prior

Frontend Causal Dashboard & Multi-Specification Robustness

[3:01]Sales, prior engagement, current inventory when available, SKU fixed effects, and day of week effects. Inventory constrained observations can be excluded from the primary estimate when appropriate. So, periods with no available stock do not automatically distort the relationship. The output reports an estimated engagement effect, the observations used, adjustment variables, fixed effects, and model information. But, the interpretation remains limited. This is an observational estimate from uploaded retail data, not experimental proof of causation. A single estimate can create a false sense of precision. So, the system adds bootstrap uncertainty analysis. It repeatedly resamples the available observations, re-estimates the model, and examines the resulting distribution of engagement effect estimates. The platform can then report a mean estimate, a median estimate, a bootstrap standard error, and a percentile interval. This is a first-stage uncertainty diagnostic. Later work can examine how to account more explicitly for dependence among observations from the same SKU. The causal layer also includes a shuffled treatment placebo test. Here,

The observed engagement treatment is randomly shuffled and the model is estimated again. If a similarly large relationship appears after the original treatment structure has been destroyed, the result requires more scrutiny. If the shuffled result is weaker, that provides additional diagnostic reassurance. But a placebo test does not prove causal identification. The system also checks whether engagement contains meaningful variation by examining its range, distribution, and number of unique values. This is a basic global variation check, not formal proof of conditional positivity or overlap across every confounder group. Retail data adds another complication. Observed sales can be limited by inventory. Low observed sales do not necessarily mean low customer demand if a product was unavailable. The stock out diagnostic identifies normal inventory periods, low stock periods, inventory pressure, and complete stock outs. It evaluates where observed sales may be an unreliable representation of underlying demand and assigns a suppressed demand risk classification. The system does not recover or impute true latent

Demand. It identifies where inventory constraints make interpretation more difficult. A new evidence layer brings the diagnostics together. It considers whether the effect could be estimated, whether uncertainty information is available, whether the bootstrap interval excludes zero, how the placebo compares, whether usable treatment variation exists, and whether inventory suppression risk is acceptable. The resulting categories can describe stronger, moderate, weak, or insufficient observational support. These categories are diagnostic summaries. They are not probabilities that the relationship is causal. The system also compares alternative model specifications, minimal adjustment, inventory adjusted, SKU adjusted, and preferred models. The question is whether the direction of the engagement effect remains consistent, or whether it is sensitive to specification. To make the result easier to understand, the platform also translates the estimate to a business scale change. Instead of presenting only the coefficient for a full one-point increase in engagement rate, it calculates the estimated sales effect associated with a 10 percentage point increase in engagement rate. This

Improves interpretation without changing the underlying observational status of the estimate. These components are consolidated into one causal intelligence workflow, unified retail data set, temporal causal data set, adjusted effect estimation, bootstrap uncertainty, placebo test, treatment variation and overlap, stockout and suppressed demand diagnostics, alternative specification robustness, observational evidence summary, and finally, the causal intelligence response. This gives the front end one coordinated analysis rather than requiring it to orchestrate every diagnostic independently. Phase five was integrated into the existing fast API back end through the causal intelligence route. get/phase5/causalintelligence The existing phase one through phase 4 capabilities were preserved while the new causal layer was added. The front end now includes a dedicated causal intelligence experience. It presents the estimated engagement effect, effect direction, the 10% point interpretation, an uncertainty interval, observational evidence level, placebo behavior, treatment variation status, stockout risk, robustness across specifications, diagnostic interpretation, and methodological warnings. These outputs are shown in a business-facing structure rather than as an unstructured

API response. The updated back end and front end were tested locally. The application reloaded successfully, Swagger documentation was accessible, the phase 5 end point was exposed, and the front end loaded with the new causal intelligence additions. The central separation remains, observed signal is not scenario simulation. Scenario simulation is not an estimated causal effect, and an estimated causal effect from observational data is not experimental proof. By the end of week 6, Causal Couture has a working first causal analysis architecture. It defines a treatment and temporally subsequent outcome, constructs the causal data set, estimates an adjusted observational effect, reports uncertainty, runs placebo and variation diagnostics, identifies inventory-related suppression risk, compares specifications, summarizes evidence, and presents the analysis through the platform. But this is the foundation of causal intelligence, not the completion of causal inference. Next, the work moves towards stronger sensitivity and temporal validation, improved uncertainty estimation, dependence within SKU-level observations, broader robustness testing, and eventually additional retail causal questions.

More from HAI

Humanitarians AI Lyrical Literacy Project