# variance

Computes the variance of all grouped values.

```tql
variance(xs:list) -> float
```

## Description

The `variance` function returns the variance of all numeric values in `xs`.

### `xs: list`

The values to evaluate.

## Examples

### Compute the variance of values

```tql
from {x: 1}, {x: 2}, {x: 3}
summarize variance_value=variance(x)
```

```tql
{variance_value: 0.666}
```

## See Also

* [`stddev`](https://preview.docs.tenzir.com/375/375/reference/functions/stddev.md)
* [`mean`](https://preview.docs.tenzir.com/375/375/reference/functions/mean.md)
* [Aggregate event streams](https://preview.docs.tenzir.com/375/375/guides/analytics/aggregate-event-streams.md)