# Variance

The **Variance** function estimates the sample variance of a column or group. This statistical measure determines the spread of distribution or degree to which the column or grouped values deviate from the mean. A small variance indicates the values are close to the mean (little variability), while a large variance indicates the values are dispersed farther from the mean (greater variability).

**Variance** assumes your dataset is a sample of a larger population. If the dataset represents an entire population, use the [variancepop](https://support.meetuma.ai/uma-knowledgebase/data-and-reporting/analytics-pro/functions/aggregate-functions/variancepop "mention") function to calculate actual variance.

### Syntax

```
Variance(field)
```

Function argument:

field(required) The column to reference when estimating sample variance.

### Underlying formula

| ∑( xi – x̄ )2 |
| ------------- |
| n – 1         |

* xi = each sample value
* x̄ = the mean of all sample values
* n = the total number of sample values (sample size)

### Example

A table contains a sample of customer ratings for specific products. If the data is grouped by product, you can use the following formula to measure and compare the ratings variability for each product.

```
Variance([Customer rating (0-5)])
```

When you calculate the formula in the *Product* grouping, the function returns the sample variance for each product. This example indicates a broader range of customer ratings for Product B.

<figure><img src="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Functions/variance_example.png" alt=""><figcaption></figcaption></figure>
