Skip to content

DST-101: feat: add Bayesian A/B & Thompson Sampling bandit, Retention LTV estimator, theme toggle, URL state sync, and portal index - #1

Open
jasonchen36 wants to merge 1 commit into
Grace-RGe:mainfrom
jasonchen36:feat/bayes-bandit-ltv-and-theme-support
Open

DST-101: feat: add Bayesian A/B & Thompson Sampling bandit, Retention LTV estimator, theme toggle, URL state sync, and portal index#1
jasonchen36 wants to merge 1 commit into
Grace-RGe:mainfrom
jasonchen36:feat/bayes-bandit-ltv-and-theme-support

Conversation

@jasonchen36

Copy link
Copy Markdown

Summary of Enhancements

Extends the Decision Systems Toolkit with new statistical decision tools, interactive features, theme support, and a root portal landing page while preserving zero-dependency client-side privacy:

  1. New Tool: Bayesian A/B Test & Multi-Armed Bandit (panel-bayes)

    • Calculates $P(B &gt; A)$ (Probability Test B outperforms Control A) using Beta-Binomial Monte Carlo sampling (20,000 draws in <10ms).
    • Computes expected decision risk/loss of selecting B over A.
    • Recommends Thompson Sampling multi-armed bandit traffic allocation split (e.g. 95% B / 5% A).
  2. New Tool: Cohort Retention Decay & LTV Estimator (panel-retention)

    • Fits a Power-Law retention decay curve ($R(t) = a \cdot t^{-b}$) from Day 1, 7, 14, 30 cohort data.
    • Projects Day 60, Day 90, Day 180, and Day 365 retention rates and cumulative active user days.
  3. URL State Hash Auto-Sync & Deep Linking

    • Serializes all input parameters into URL hash parameters (?tab=...&bayesAConv=100...), allowing users to share direct links to calculation results.
  4. One-Click "Copy Executive Summary" Button

    • Formats calculation results into copy-pasteable Markdown summaries for Slack, MS Teams, JIRA, or emails.
  5. Dark Mode & Print Support

    • Theme toggle button (☀️ / 🌙) with prefers-color-scheme auto-detection and localStorage persistence.
    • Clean @media print styling for PDF generation.
  6. Root Portal Landing Page (index.html) & CI Workflow (.github/workflows/ci.yml)

    • Portal page with cards linking to English and Chinese versions.
    • Added GitHub Actions HTML/JS validation workflow.

Verification

  • Validated HTML/JS across all 3 pages (index.html, index-en.html, index-cn.html).
  • Verified Monte Carlo draws and Power-Law decay curve calculations in Node/JS.

…mator, theme toggle, URL state sync, and portal page
@jasonchen36

Copy link
Copy Markdown
Author

Hi @Grace-RGe! Whenever you have a chance, I'd love your review on this PR bringing Bayesian A/B testing, Thompson Sampling, LTV retention forecasting, dark mode support, and URL state sync to the toolkit. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant