Skip to content

Instantly share code, notes, and snippets.

type StopItProps<T> = {
items: T[]
callback: (item: T, index: number) => JSX.Element
}
const stopIt = <T,>(items: StopItProps<T>['items']) => (
callback: StopItProps<T>['callback']
): JSX.Element[] =>
items.map((item, i) => (
<React.Fragment key={`corey-was-here-${i}-${Date.now()}`}>{callback(item, i)}</React.Fragment>
@simpleshadow
simpleshadow / BLUELAND_AB_TEST_CHANCE_TO_WIN.md
Created February 12, 2026 22:40
Pack A/B Testing: Chance to Win calculation for revenue per user

A/B Testing: "Chance to Win" for Revenue Per User

Overview

Pack's A/B testing calculates a "Chance to Win" metric for each variant — the Bayesian probability that a variant outperforms the control. For revenue-based goals, this tells you the likelihood that a variant generates more revenue per user than the control.

The calculation happens in two stages:

  1. BigQuery aggregates raw event data (total revenue, visitor counts, etc.) per variant
  2. Bayesian Engine computes the probability that each variant beats the control