causalis.scenarios.classic_rct.model.DiffInMeansDiffInMeans
Difference-in-means model for Randomized Controlled Trials (RCT).
The difference-in-means estimator is the simplest way to estimate the Average Treatment Effect (ATE) in a randomized experiment. Because treatment assignment is random, the difference in sample means between the treated and control groups is an unbiased estimator of the ATE.
Notes
The Average Treatment Effect (ATE) is defined as:
In an RCT, $D \perp (Y(0), Y(1))$, so:
The estimator implemented here is the simple difference in sample means:
Standard errors and confidence intervals are computed using Welch’s t-test by default, which does not assume equal variances between groups:
where $s_g^2$ is the sample variance in group $g$.
Examples
Generate synthetic RCT data
Attributes
- dataCausalData or None
The dataset used for fitting and estimation.
Canonical target
causalis.scenarios.classic_rct.model.DiffInMeans
Sections