A reproducible platform for designing, analyzing, and visualizing A/B tests on mobile-health sensor data using the UCI mHealth dataset (10 subjects × 13 activities; 24 channels). This project includes data processing, a statistical engine, and a Streamlit dashboard. Results are illustrative (programmatic A/B on observational data) and intended for educational and portfolio purposes.
- Can a simulated intervention (A/B assignment) shift activity intensity and related physiologic metrics?
- How large is the effect (Cohen’s d) and what is the uncertainty (95% CI)?
- Are findings robust across subjects and activities?
Note: Effects are generated from a quasi-randomized A/B assignment on observational data — these are not clinical trial outcomes.
Activity Intensity: Control: 3.228 Intervention: 3.863 Improvement: 19.7% Effect size: 0.663 P-value: 0.0000 Significant: ✅ Yes
Total Acc Magnitude: Control: 32.251 Intervention: 38.597 Improvement: 19.7% Effect size: 0.713 P-value: 0.0000 Significant: ✅ Yes
Heart Rate Estimate: Control: 78.331 Intervention: 78.770 Improvement: 0.6% Effect size: 0.034 P-value: 0.0000 Significant: ✅ Yes
Results are generated reproducibly when you re-process the dataset and run the analysis pipeline.
mhealth-ab-testing/
├── 01_mhealth_ABtesting_framework.py
├── 02_mhealth_ABtesting_dashboard.py
├── data/
│ ├── # UCI mHealth log files (not committed)
├── results/
│ └── Figure_1.png
│ └── Figure_2.png
├── requirements.txt
└── README.md
Dataset: UCI mHealth dataset Dataset License: Follow UCI repository’s licensing and citation requirements
- Quasi-randomized A/B assignment with stratification (subject-level).
- Welch’s t-test; Cohen’s d; 95% CI for difference in means.
- Complete-case, intent-to-treat analysis.
- Limitations: Observational dataset; simulated intervention; potential residual confounding.
- Add mixed-effects models for repeated measures
- Experiment with causal inference methods (e.g., DID, DR-Learner)
- Explore personalized treatment effect estimation
- Prototype integration with real-world EHR datasets
Pull requests are welcome. Please add tests and document any new outputs or metrics.
If you use this project, please cite the UCI mHealth dataset and this repository.

