--- title: LiftLab | Experiment Intelligence Studio emoji: 🧪 colorFrom: indigo colorTo: blue sdk: static app_file: index.html pinned: false license: mit short_description: A/B testing and experiment analytics. tags: - ab-testing - experimentation - conversion-rate-optimization - statistics - hypothesis-testing - analytics - data-visualization --- # LiftLab | Experiment Intelligence Studio **Hugdrigo portfolio · Project #93** **Short description:** A/B testing and experiment analytics. LiftLab is a polished, local-first application for exploring two-arm conversion experiments, evaluating sampling uncertainty, designing future sample sizes, and maintaining an editable experiment portfolio. It runs as a free **Hugging Face Static Space** using only HTML, CSS and vanilla JavaScript. No server, GPU, external APIs, JavaScript packages, account login, or paid subscriptions are required. > **Educational prototype:** Every included experiment is synthetic. LiftLab uses transparent classical statistical approximations rather than a trained ML model. A small p-value does not demonstrate causality, measure the probability of the hypothesis, validate a product decision, or account for multiple comparisons, repeated peeking, external validity, business guardrails or data-quality problems. Statistical decision-making requires appropriate experimental design and review. ## Capabilities - Executive dashboard summarizing experiment volumes, measured conversion lift, signals and experimental uncertainty. - Eight editable synthetic experiments, with search, status filtering, archiving and restoration. - Group-level conversion rates and **Wilson score confidence intervals**. - Absolute and relative treatment lift; relative lift is explicitly undefined if control conversion is zero. - Pooled two-proportion z-test with **two-sided p-value** and minimum expected-cell-count check. - **Newcombe hybrid score confidence interval** for the difference between independent binomial proportions. - Adjustable significance levels: 0.01, 0.05 and 0.10. - Prospective balanced sample-size planning for 80% or 90% power, configurable baseline conversion and target relative lift. - Hypothetical treatment-conversion scenario slider, leaving the recorded experiment unchanged. - Downloadable CSV experiment summary and validated JSON backup/restore, with spreadsheet-formula mitigation and HTML escaping. - Responsive dark/light interface for desktop, tablet and mobile. - Local-only browser persistence through `localStorage` where permitted by browser settings. ## Run locally Open `index.html` in a modern browser. Some browser security policies restrict local-file execution or storage; in that case run a local static HTTP server, for example: ```bash python -m http.server 8000 ``` Open `http://localhost:8000/` in a browser. ## Publish on Hugging Face 1. Select **Create new Space** in the Hugging Face interface. 2. Owner: `Hugdrigo`; name: `liftlab-experiment-intelligence`. 3. Choose **Static** SDK, **Public** visibility and a blank starting template. 4. Place `README.md`, `index.html` and `LICENSE` in the Space root, preserving this README's YAML front matter. 5. Open the resulting Space and verify its dashboard, Experiment Lab, mobile layout and import/export workflows. The application is entirely client-side and does not require an inference endpoint. ## Methodology ### Definitions For control count `x_A` out of `n_A` and treatment count `x_B` out of `n_B`: - Rates: `p_A = x_A/n_A`, `p_B = x_B/n_B`. - Absolute lift: `p_B - p_A` (displayed in percentage points). - Relative lift: `(p_B - p_A)/p_A`, if `p_A > 0`. - Pooled null rate: `(x_A + x_B) / (n_A + n_B)`. - Pooled standard error for a fixed-horizon, equal-rate null hypothesis: `sqrt(p_pool * (1-p_pool) * (1/n_A + 1/n_B))`. - Two-sided z-test p-value: `2 * (1 - Φ(|z|))`; if the pooled standard error is zero, the demo reports p=1. - Wilson score intervals for each group, with z-score according to the chosen two-sided confidence level. - Newcombe difference interval from the Wilson score endpoints: - Lower: `(p_B-p_A) - sqrt((p_B-L_B)^2 + (U_A-p_A)^2)`. - Upper: `(p_B-p_A) + sqrt((U_B-p_B)^2 + (p_A-L_A)^2)`. A test is marked as having a *statistical signal* only if its unadjusted two-sided p-value is below the selected alpha **and** all four pooled expected success/failure counts are at least five. Otherwise results are labeled inconclusive or insufficient-counts. ### Sample-size planning For baseline `p1`, target `p2 = p1 * (1 + relative_lift)`, significance level `alpha`, power `1-beta`, and balanced groups: `n_per_group ≈ ceil([z_(1-alpha/2)*sqrt(2*pbar*(1-pbar)) + z_(1-beta)*sqrt(p1*(1-p1)+p2*(1-p2))]^2/(p2-p1)^2)`. This is a conventional large-sample normal approximation for a *future* experiment, not a post-hoc power claim. The normal CDF uses a polynomial approximation to `erf`, and the inverse quantile is computed with bisection. Calculations are not guaranteed accurate for very rare events, tiny experiments or complex experimental designs. ## Intended safeguards and limitations - No real customers or data are loaded or transmitted. User-added data remain in the browser unless exported by the user. - A backup is validated for version, shape, bounds, uniqueness and an active selected experiment before replacing state. - HTML-reserved characters in experiment names and channels are escaped before insertion into generated markup. - CSV text fields are quoted and risky leading characters are prefixed to reduce spreadsheet formula interpretation; review any CSV before importing into a spreadsheet. - Experiments are independent two-arm binary-outcome examples. The app does not model clustering, unequal assignment probabilities, interference, seasonality, delayed conversions, covariate adjustment, sequential designs, Bayesian inference, false-discovery-rate corrections, or guardrail trade-offs. - Not a substitute for appropriate experiment governance, data auditing, informed consent or domain-expert analysis. - LocalStorage is not encrypted or synchronized, and browser site-data clearing removes unsaved state. ## Suggested verification 1. Open Overview, Experiment Lab, Experiment Library and Methodology. 2. Switch selected experiments and confirm all result panels and plots update. 3. Adjust alpha, target lift, power, baseline conversion and hypothetical conversions. 4. Create a new experiment, modify its counts, archive and restore it. 5. Export CSV and JSON, then import the JSON backup after changing local state. 6. Confirm invalid JSON and invalid visitor/conversion counts are rejected. 7. Verify the application at narrow mobile widths and in dark mode. ## License MIT License. See [LICENSE](LICENSE). **Project ownership:** Hugdrigo · Project #93 · 2026.