> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# VariancePop

> The VariancePop function calculates the population variance of a column or group, measuring how far values deviate from the mean.

The **VariancePop** function calculates the population 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 (less variability), while a large variance indicates the values are dispersed farther from the mean (greater variability).

**VariancePop** assumes your dataset represents an entire population. If the dataset is a sample of a larger population, use the **[Variance](/docs/variance)** function to estimate unbiased variance.

Sigma calls the underlying CDW or DBMS function that uses the statistical sample variance definition. Refer to your CDW or DBMS provider’s documentation for details about the called function.

The **VariancePop** function is an aggregate function.

Aggregate functions evaluate one or more rows of data and return a single value.

In a table element, the aggregate is calculated for each grouping. For information on how to add a grouping with an aggregate calculation to a table, see [Group columns in a table](/docs/create-and-manage-tables#group-columns-in-a-table).

In a table with no groupings, the aggregate is calculated for each row. For information on how to calculate summary statistics across all rows in a table, see [Add summary statistics to a table](/docs/create-and-manage-tables#add-summary-statistics-to-a-table).

To learn more about using aggregate functions, see [Building complex formulas with grouped data](https://www.sigmacomputing.com/resources/training-videos/table-grouping-and-functions#complex-formulas).

## Syntax

```
VariancePop(field)
```

Function argument:

<dl>
  <dt>
    field
  </dt>

  <dd>
    (required) The column to reference when calculating population variance.
  </dd>
</dl>

## Underlying formula

<table>
  <tbody>
    <tr>
      <td>
        ∑( x

        <sub>i</sub>

         – x̄ )

        <sup>2</sup>
      </td>
    </tr>

    <tr>
      <td>
        n
      </td>
    </tr>
  </tbody>
</table>

* x<sub>i</sub> = each sample value
* x̄ = the mean of all sample values
* n = the total number of sample values (sample size)

## Example

A table contains the average temperature recorded for each month in 2021 and 2022. If the data is grouped by year, you can use the following formula to measure and compare the temperature variability throughout each year.

```
VariancePop([Avg monthly temp])
```

When you calculate the formula in the *Year* grouping, the function returns the population variance for each year. This example indicates greater temperature fluctuation in 2022.

![](https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/Functions/variancepop_example.png)

## Related resources

* [Variance](/docs/variance)