Estimate Causal Effect
Estimate causal effects using do-calculus (Pearl's do-operator).
Computes E[Y | do(X=x)] - "the expected Y if we intervene to set X"
Differs from observational inference P(Y|X) because interventions break confounding. Eliminates backdoor paths and estimates true causal effect.
Why This Matters
Optimal decision-making requires causal effects:
- "If I change X, how much will Y improve?"
- "What's the causal impact (not just correlation)?"
- Avoids Simpson's paradox and confounding errors
Classical example: Treatment A correlates with worse outcomes, but has positive causal effect. Do-calculus distinguishes these.
Args: treatment: Intervention variable outcome: Outcome to measure current_user: Authenticated user db: Database session
Returns: Causal effect estimate and number of paths considered
Example: ``` Treatment: "increased_context_window" Outcome: "task_success_rate"
Returns:
{
"treatment": "increased_context_window",
"outcome": "task_success_rate",
"causal_effect": 0.23,
"num_paths": 5
}
Interpretation: Interventional increase in context window causally
increases task success by 23 percentage points.
```
Request
- The document declares no server URL.
- Auth: HTTP bearer
Query parameters
Intervention variable
Outcome to measure
Headers
Response
Successful Response
Changes
No recorded changes to this operation across all 2 revisions of this API.