Documentation

stddev() function

Flux 0.7.0+

The stddev() function computes the standard deviation of non-null records in a specified column. stddev() is an aggregate function.

Output data type: Float

stddev(
  column: "_value",
  mode: "sample"
)

Parameters

column

Column to operate on. Default is "_value".

mode

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

The available options are:

sample

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

population

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

tables

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

Examples

The following example uses data provided by the sampledata package to show how stddev() transforms data.

import "sampledata"

sampledata.int()
  |> stddev()

View input and output


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.