Causality / Interactive laboratory

The Torpedo Bat Study

Build a comparison. Inspect balance. Reveal the effect.

Matching & weighting

Data-Generating Process & Scenario Settings

A fixed simulated roster, observed bat assignments, and seasonal swing speeds.

The same scenario produces the same observations. Smaller rosters are nested within larger ones.

Treatment: Torpedo versus Standard bat. Outcome: average seasonal swing speed, in mph.

Pretreatment characteristics: Skills Score, Grade, Age, Club membership, and Position. They influence both assignment and untreated swing speed. Players with higher Skills, higher Grade, or Club membership tend to have higher assignment probabilities; age relative to grade and position also matter. Untreated swing speed rises with Skills, Grade, age relative to grade, and Club membership, with position differences and a fixed noise draw.

The overlap setting changes how strongly these characteristics predict assignment. Good overlap brings assignment probabilities closer together; poor overlap pushes them farther apart. Assignment uses a fixed uniform draw for each player. Neither matching nor weighting uses outcomes to choose comparisons.

Assignment equation and simulation conventions

z = (Skills − 82)/6 + 0.24(Grade − 10.5) + 0.22(Age − Grade − 5.5) + 0.35 Club + position term. The position term is −0.15 for Catcher, 0 for Infield, 0.25 for Outfield, and −0.10 for Pitcher. The probability of Torpedo assignment is logistic(−0.2 + s z), with s = 0.35, 1, or 2.6 for good, moderate, or poor overlap. Assign Torpedo when the player's fixed uniform draw is below that probability. The fixed roster uses seed 20261115. Effect magnitudes and individual potential outcomes remain behind the independent truth reveal.

Exploratory Data Analysis

Original observations, before any matching or weighting.

Matching Method

Choose the adjustment after inspecting the original sample.

Pretreatment covariates
Additional covariates
Optional target · ATT

Matching may represent only supported focal players. ATE matching runs in both directions, each with its own comparison pool.

Advanced matching or weighting settings

Design conventions and limitations

Distances use every selected covariate, including Position indicators. Standardized distances use original-sample scales. Mahalanobis distance uses a diagonal adjustment of 10⁻⁸ for numerical stability. Ties use player ID. Exact and coarsened exact matching use all eligible comparisons unless one exact comparison is selected. ATE matching weights each supported focal contrast equally. The propensity fit uses selected pretreatment covariates and reports failed finite fits without silently regularizing. Balance cannot establish absence of unmeasured confounding.

Player Diagnostics

Select a player to inspect their characteristics, matches, propensity, or weight.

TorpedoStandard

Covariate Balance

Evaluate every available pretreatment covariate, including those omitted from the design.

Standardized mean differences

All covariates
○ Before● After

The chart uses absolute SMD; the table uses signed Torpedo − Standard SMD. Both keep the original pooled group SD as the denominator. The 0.10 guide is not a test of causal validity.

Covariate distributions

TorpedoStandard

Identical bins and y-axis limits before and after. Within-group shares after adjustment use actual analysis weights.

Estimated propensity distributions

TorpedoStandard

Retention & match quality

Balance statistics

Definitions and statistical conventions
  • SMD: Torpedo mean minus Standard mean, divided by the original pooled sample SD √[(s²T + s²S)/2]. This denominator stays fixed before and after. Original sample variances use n−1. A constant covariate with identical means has SMD 0; other undefined values are shown as an em dash.
  • Adjusted means: normalize the actual analysis weights separately within each bat group. These are balance diagnostics, including when an ATE Horvitz–Thompson estimate uses a different outcome normalization.
  • Weighted variance: Σw(x−x̄w)² / [Σw − Σw²/Σw]. This reliability-weight correction reduces to the sample variance with equal weights and is undefined when effective N ≤ 1. Variance ratios are Torpedo / Standard for Skills, Grade, and Age; ratios for binary indicators are omitted.
  • eCDF gaps: absolute differences between normalized Torpedo and Standard cumulative distributions. Mean and maximum are evaluated at the unique pooled original covariate values, with the same support before and after.
  • Standardized pair distance: average absolute covariate difference between each supported focal player and their selected comparisons, divided by the original pooled SD. Average comparisons within each focal player, then weight each focal player equally, as in the estimator. This is inapplicable to IPTW.
  • Used / unused: unique players with positive / zero analysis weight. ESS = (Σw)² / Σw², separately by group. No valid adjustment means after-adjustment statistics are unavailable. An em dash denotes an undefined or inapplicable statistic.

Estimated Treatment Effect

Reveal the estimate and the simulation truth independently.

What effect does this comparison suggest?

Saved Comparisons

Keep snapshots while exploring other scenarios and designs.

Save settings, balance statistics, retention and ESS. Estimate and truth are stored only if revealed when saved. Snapshots remain unchanged; Restore returns to their settings and reveal states. Saved comparisons last for this page session.