Experiments
Contents
Experiments let you test a change against a control and find out whether it actually worked. You define variants, pick the metrics you care about, and PostHog randomizes your users, tracks their exposures, and runs the statistics – Bayesian or frequentist – so you get a real answer instead of a hunch.
Because experiments run on the same events and feature flags you already have in PostHog, you don't need new instrumentation to measure a result. Any event, data warehouse table, or funnel you've already built can become an experiment metric, and every variant is linked to the session replays of the people who saw it.
Where you can use it
Design, launch, and analyze experiments in the PostHog web app, or create and manage them from an MCP client or your own systems.
PostHog Web
Create experiments, launch them, and read results with significance, replays, and exposures in view.
Run an experiment →PostHog MCP
Create experiments, check results, and manage their lifecycle from any MCP client or AI editor.
Drive experiments →API
Manage experiments, holdouts, and shared metrics programmatically from your own systems.
Use the API →Where its data comes from
Experiments don't collect anything new. They read the feature flag that assigns each user to a variant, the events those users go on to send, and – if you want – tables you've already loaded into the data warehouse.
Feature flags
Every experiment is backed by a flag that randomizes users into variants and records their exposure.
Understand exposures →Events
Any event you already capture can become a funnel, mean, or ratio metric for an experiment.
Define metrics →Data warehouse
Measure revenue, subscriptions, or anything else living in a warehouse table you've synced.
Use warehouse tables →