Documentation

stddev() function

stddev() returns the standard deviation of non-null values in a specified column.

Function type signature
(<-tables: stream[A], ?column: string, ?mode: string) => stream[B] where A: Record, B: Record
For more information, see Function type signatures.

Parameters

column

Column to operate on. Default is _value.

mode

Standard deviation mode or type of standard deviation to calculate. Default is sample.

Availble modes:

  • sample: Calculate the sample standard deviation where the data is considered 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

Return the standard deviation of values in each table

import "sampledata"

sampledata.int()
    |> stddev()

View example input and ouput


Was this page helpful?

Thank you for your feedback!


Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.