Welcome to the Sherlock Experiment Analysis Template Pack, designed by Trailblazer Labs for rigorous, reproducible analysis in A/B tests, clinical trials, or any controlled experiments. This pack provides fillable templates for four key areas: Power Analysis, Sequential Tests, Variance Reduction, and Outcome Narratives.
Each template includes:
Purpose: Quick overview.
Key Inputs/Steps: What to fill in.
Outputs: Computed results or narrative structure.
Tools: Suggested software (e.g., Python/R, or libraries like statsmodels, abtest, sequential).
Copy-paste these into your notebook/docs and customize. Formulas are in LaTeX/MathJax for clarity.
1. Power Analysis Template
Purpose: Pre- or post-experiment calculation of sample size, detectable effect size, or power. Ensures experiments are neither under- nor over-powered.
Inputs Table
Parameter
Symbol
Value/Estimate
Notes/Source
Baseline metric (control mean)
μ₀
[e.g., 0.15]
Historical data
Minimum Detectable Effect (MDE)
δ
[e.g., 0.02 (13% LIFT)]
Business priority
Standard deviation
σ
[e.g., 0.08]
Historical or pilot
Alpha (Type I error)
α
0.05
One-sided/two-sided?
Power (1 - β)
1 - β
0.80
Standard
Allocation ratio (treatment:control)
r
1:1
Unequal?
Test type
-
t-test / Proportion / etc.
Calculations
Use this Python snippet (requires statsmodels):
python
from statsmodels.stats.power import TTestIndPower, tt_ind_solve_power
import numpy as np
# Fill from table
effect_size = abs(δ / σ) # Cohen's d
power_analysis = TTestIndPower()
sample_size_n = power_analysis.solve_power(effect_size=effect_size, alpha=α, power=0.8, ratio=1, alternative='two-sided')
print(f"Required N per arm: {np.ceil(sample_size_n)}")
Outputs:
Required total N: [Compute]
Achieved power @ observed effect: [Compute]
Sensitivity plot: [Insert plot or describe]
Checklist:
Account for multiple testing (e.g., Bonferroni)?
Pre-experiment power >80%?
Post-experiment: Power curve confirms?
2. Sequential Tests Template
Purpose: Monitor experiments in real-time for early stopping (e.g., efficacy/futility). Reduces time/cost vs. fixed-sample tests.
Design Inputs
Parameter
Value
Notes
Test type
SPRT / Group Sequential / Bayesian
[e.g., SPRT for continuous monitoring]
Null hypothesis (H₀)
μ = μ₀
[e.g., lift = 0]
Alternative (H₁)
μ = μ₀ + δ
MDE from power template
Alpha spending
α
0.05 total
Interim looks
n_interims
[e.g., 5] or continuous
Boundary method
O'Brien-Fleming / Pocock / Haybittle
Conservative?
Boundaries Calculation (Group Sequential Example)
Use R gsDesign or Python sequental:
python
import sequental as seq
boundaries = seq.group_sequential(alpha=0.05, power=0.8, ratio=1, n_interim=5, design='obrien_fleming')
print(boundaries.z) # Critical z-values per look
Monitoring Log (Fill per check):
Check #
t (time/fraction complete)
Observed lift (p-value)
Z-stat
Decision
Action
1
0.2
[e.g., 0.05 (0.03)]
[z]
Continue
-
...
...
...
...
Stop
Efficacy/Futility
Outputs:
Final decision: [Continue/Stop - Efficacy/Futility]
Alpha spent: [e.g., 0.025]
Expected duration savings: [e.g., 30%]
Checklist:
Peeking adjusted?
Logged all decisions?
Post-look: Report ASN (average sample number)?
3. Variance Reduction Template
Purpose: Boost precision by reducing metric variance. Increases effective power without more samples (e.g., CUPED reduces SD by 30-50%).
Tone Tips: Data-first, no hype. Use "evidence suggests" for borderline results.
Outputs: Full report link: [Paste]
This pack streamlines analysis—run it end-to-end for any experiment. Questions? Provide your data, and Sherlock will demo. Built for truth-seeking at Trailblazer Labs. 🔍