# Experiments

#### Contents

- Where you can use it
- Where its data comes from
- How experiments work with Self-driving

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](/content/docs/feature-flags/index.html) you already have in PostHog, you don't need new instrumentation to measure a result. Any event, [data warehouse](/content/docs/data-warehouse/index.html) table, or funnel you've already built can become an experiment metric, and every variant is linked to the [session replays](/content/docs/session-replay/index.html) of the people who saw it.

[Get started](/content/docs/experiments/start-here/index.html)

## Where you can use it

You design, launch, and analyze experiments in the PostHog web app. The other surfaces let you create and manage them from your editor or your own systems, and review the validity problems Self-driving finds in the ones you're running.

PostHog Web  
Create experiments, launch them, and read results with significance, replays, and exposures in view.  
[Run an experiment →](/content/docs/experiments/surfaces/web-app/index.html)

PostHog MCP  
Create experiments, check results, and manage their lifecycle from any MCP client or AI editor.  
[Drive experiments →](/content/docs/experiments/surfaces/mcp/index.html)

API  
Manage experiments, holdouts, and shared metrics programmatically from your own systems.  
[Use the API →](/content/docs/experiments/surfaces/api/index.html)

PostHog Desktop Beta  
Review the validity problems a Self-driving scout finds in your running experiments.  
[Review findings →](/content/docs/experiments/surfaces/desktop/index.html)

## 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 →](/content/docs/experiments/exposures/index.html)

**Events**  
Any event you already capture can become a funnel, mean, or ratio metric for an experiment.  
[Define metrics →](/content/docs/experiments/metrics/index.html)

**Data warehouse**  
Measure revenue, subscriptions, or anything else living in a warehouse table you've synced.  
[Use warehouse tables →](/content/docs/experiments/data-warehouse/index.html)

## How experiments work with Self-driving

Your experiments are a signal source for [Self-driving](/content/docs/self-driving/index.html). A [scout](/content/docs/self-driving/scouts/index.html) audits the measurement rather than the result: it reads the exposure stream of every running experiment against the split, status, and flag state you configured, and files each confirmed contradiction as a [report](/content/docs/self-driving/reports/index.html) in your [inbox](/content/docs/self-driving/inbox/index.html).

- **Exposures**  
The variant assignments your running experiments record.
- **Validity threats**  
Skewed splits, contamination, stalls, and mid-run flag edits.
- **One report**  
The experiment, the numbers, and when it started going wrong.
- **You review**  
A person confirms the threat, not an agent.
- **You decide**  
Fix the wiring, relaunch, or discount the result.

This loop stops at your review on purpose. A validity threat is an investigation rather than a one-line change, so the scout files the evidence and a suggested reviewer instead of drafting a pull request. Once you've confirmed what's wrong and the fix is a code change, you can promote the report into the usual [implementation](/content/docs/self-driving/inbox/implementation/index.html) path, where an agent drafts the PR and you review and merge it.

Which variant is winning stays your call – the scout never comments on results. See [PostHog Desktop](/content/docs/experiments/surfaces/desktop/index.html) for everything it watches, and the [Self-driving docs](/content/docs/self-driving/index.html) for the full picture.

### Still have questions?

Ask PostHog AI

### Was this page useful?

HelpfulCould be better
