docs-v2/content/flux/v0.x/stdlib/experimental/stddev.md

1.6 KiB
Raw Permalink Blame History

title description menu weight aliases related flux/v0.x/tags introduced
experimental.stddev() function The `experimental.stddev()` function computes the standard deviation of non-null values in the `_value` column for each input table.
flux_0_x_ref
name parent
experimental.stddev experimental
302
/influxdb/v2.0/reference/flux/stdlib/experimental/stddev/
/influxdb/cloud/reference/flux/stdlib/experimental/stddev/
/flux/v0.x/stdlib/universe/stddev/
/{{< latest "influxdb" "v1" >}}/query_language/functions/#stddev, InfluxQL STDDEV()
transformations
aggregates
0.107.0

The experimental.stddev() function computes the standard deviation of non-null values in the _value column for each input table. experimental.stddev() is an aggregate function.

import "experimental"

experimental.stddev(mode: "sample")

Parameters

mode

The standard deviation mode or type of standard deviation to calculate. Defaults to "sample".

Available options:

sample

Calculate the sample standard deviation where the data is considered to be part of a larger population.

population

Calculate the population standard deviation where the data is considered a population of its own.

tables

Input data. Default is piped-forward data (<-).

Examples

import "experimental"

from(bucket: "example-bucket")
    |> range(start: -5m)
    |> filter(fn: (r) => r._measurement == "cpu" and r._field == "usage_system")
    |> experimental.stddev()