> ## Documentation Index
> Fetch the complete documentation index at: https://confidence-auth-testing.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Metrics

> Confidence Metrics computes metrics for experiments. On Confidence Cloud, base metrics on events you send with the Confidence SDKs. With Warehouse Native, base them on tables in your own data warehouse.

## Get Started

Confidence computes metrics in a data warehouse. By default, your account uses
[Confidence Cloud](/docs/start/confidence-cloud.md), a warehouse that Confidence
creates and operates for you, so you have nothing to set up.

With Warehouse Native, you instead give Confidence permissions to read and
write data in your own cloud data warehouse. You can limit access so
Confidence only has access to the data it needs. Follow one of the quickstart
guides to connect your warehouse:

Google BigQuery

Snowflake

Redshift

Databricks

When your data warehouse is ready, follow the
metrics quickstart guide to create a metric.

[Quickstart Guide](/docs/guides/create-your-first-metric.md)

## What is a Metric?

In Confidence, a metric is a way to measure the behavior of a user, a system or
something else of interest. Use metrics to verify the success of an
experiment, and to decide if a change has had a positive or negative impact
on the exposed audience.

Read more about metrics

The key concepts for defining a metric are:

[Entity](/docs/capabilities/metrics/entities.md)

The unit that you want to measure, such as a user. [Entities](/docs/capabilities/metrics/entities.md) are
identified by a unique ID, like a user ID.

[Assignment Table](/docs/capabilities/metrics/assignment-tables.md)

A query that returns data about how entities were assigned to experiments and
variants. Confidence uses assignments to compute exposure for an experiment.

[Fact Table](/docs/capabilities/metrics/fact-tables.md)

A query that returns data
about "facts" or measurements of interest, such as sales revenue, quantity
sold, number of customer orders, or any other measurable data points.

## How Confidence Computes Metrics

![metric processing](https://mintcdn.com/confidence-auth-testing/YnQm99fG-Zh7IGxq/images/avg-metric.png?fit=max\&auto=format\&n=YnQm99fG-Zh7IGxq\&q=85\&s=38d1f545fd71353cf45ad23b5b9e324c)

To compute a metric, Confidence goes through the following steps:

**1. Exposure**

Exposure aggregates assignment data. The assignment data can have multiple
records of when a user was assigned to a variant. When computing exposure, Confidence
identifies the first time a user was assigned to a variant and uses that as the
exposure record. **First exposure** is the timestamp for when the user was first exposed,
which metric calculations use to get the right facts.

Read about assignment tables

**2. Per-Entity Aggregation**

For metrics that are measuring an average across entities, metrics compute a
per-entity aggregation as a first step. This aggregation step reduces multiple facts per
entity into a single value.
You select the aggregation function (for example the sum, count, or average) in the metric
definition.

Read about fact tables

**3. Metric Result**

The metric calculation joins the per-entity measurements, or facts for metrics that do not require
a per-entity aggregation, with exposure.
After the join, the calculation averages the per-entity measurements per variant.
The first exposure timestamp selects the correct per-entity measurement, taking into account the
exposure offset parameter of the metric.

Read about metric configuration

To improve performance, Confidence caches the data by writing the intermediate steps, such as the
exposure tables, to the data warehouse.

## Related Resources

> **[Create a Metric](/docs/guides/create-your-first-metric.md)**
>
> Step-by-step metric setup tutorial

> **[Create Metrics](/docs/capabilities/metrics/create-metric.md)**
>
> Metric creation guide

> **[Metrics Reference](/docs/capabilities/metrics/metrics.md)**
>
> Deep dive into metric types

> **[Fact Tables](/docs/capabilities/metrics/fact-tables.md)**
>
> Configure measurement data sources
