math stddev for math
Returns the standard deviation of a list of numbers, or of each column in a table.
Signature
> math stddev {flags}
Flags
-
--sample, -s: Calculate sample standard deviation (i.e. using N-1 as the denominator).
Input/output types:
| input | output |
|---|---|
| list<number> | number |
| range | number |
| table | record |
| record | record |
Examples
Compute the standard deviation of a list of numbers.
> [1 2 3 4 5] | math stddev 1.4142135623730951
Compute the sample standard deviation of a list of numbers.
> [1 2 3 4 5] | math stddev --sample 1.5811388300841898
Compute the standard deviation of each column in a table.
> [[a b]; [1 2] [3 4]] | math stddev ╭───┬───╮ │ a │ 1 │ │ b │ 1 │ ╰───┴───╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/math_stddev.html