StandardDeviation
✖
StandardDeviation

Details




- StandardDeviation is also known as volatility.
- StandardDeviation measures dispersion from the mean of data or distributions.
- For VectorQ data
with
=Mean[data], the standard deviation estimate
is given by
for reals and
for complexes.
- For MatrixQ data, the standard deviation estimate
is computed for each column vector with StandardDeviation[{{x1,y1,…},{x2,y2,…},…}] equivalent to {StandardDeviation[{x1,x2,…}],StandardDeviation[{y1,y2,…}]}. »
- For ArrayQ data, standard deviation is equivalent to ArrayReduce[StandardDeviation,data,1]. »
- For a real weighted WeightedData[{x1,x2,…},{w1,w2,…}], the standard deviation is given by
. »
- StandardDeviation handles both numerical and symbolic data.
- The data can have the following additional forms and interpretations:
-
Association the values (the keys are ignored) » SparseArray as an array, equivalent to Normal[data] » QuantityArray quantities as an array » WeightedData weighted variance, based on the underlying EmpiricalDistribution » EventData based on the underlying SurvivalDistribution » TimeSeries, TemporalData, … vector or array of values (the time stamps ignored) » Image,Image3D RGB channel's values or grayscale intensity value » Audio amplitude values of all channels » DateObject, TimeObject list of dates or list of times » - For a univariate distribution dist, the standard deviation is given by σ=Expectation[(x-μ)2,xdist]1/2 with μ=Mean[dist]. »
- For multivariate distribution dist, the standard deviation is given by {σx,σy,…}=Expectation[{(x-μx)2,(y-μy)2,…},{x,y,…}dist]1/2. »
- For a random process proc, the standard deviation function
can be computed for slice distribution at time t, SliceDistribution[proc,t], as σ[t]=StandardDeviation[SliceDistribution[proc,t]]. »






Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Standard deviation of a list of numbers:

https://wolfram.com/xid/0b0jxi8ylua-fbw

Standard deviation of elements in each column:

https://wolfram.com/xid/0b0jxi8ylua-b0o

Standard deviation of a list of dates:

https://wolfram.com/xid/0b0jxi8ylua-bpyuss

Standard deviation of a parametric distribution:

https://wolfram.com/xid/0b0jxi8ylua-n3bzeg

Scope (24)Survey of the scope of standard use cases
Basic Uses (8)
Exact input yields exact output:

https://wolfram.com/xid/0b0jxi8ylua-ug7y2


https://wolfram.com/xid/0b0jxi8ylua-bcry2t

Approximate input yields approximate output:

https://wolfram.com/xid/0b0jxi8ylua-ksx55


https://wolfram.com/xid/0b0jxi8ylua-d02ofx

Find the standard deviation of WeightedData:

https://wolfram.com/xid/0b0jxi8ylua-d0wc9z


https://wolfram.com/xid/0b0jxi8ylua-gbwndp

https://wolfram.com/xid/0b0jxi8ylua-h8f9w3

Find the standard deviation of EventData:

https://wolfram.com/xid/0b0jxi8ylua-i4ryy7

https://wolfram.com/xid/0b0jxi8ylua-m07ttq

Find the standard deviation of TemporalData:

https://wolfram.com/xid/0b0jxi8ylua-gx0rsr

https://wolfram.com/xid/0b0jxi8ylua-f5ij1t

https://wolfram.com/xid/0b0jxi8ylua-8e999

Find the standard deviation of a TimeSeries:

https://wolfram.com/xid/0b0jxi8ylua-b6530u

https://wolfram.com/xid/0b0jxi8ylua-k0xfjy

The standard deviation depends only on the values:

https://wolfram.com/xid/0b0jxi8ylua-nnfg9

Find a three-element moving standard deviation:

https://wolfram.com/xid/0b0jxi8ylua-divn3

Find the standard deviation of data involving quantities:

https://wolfram.com/xid/0b0jxi8ylua-jopin9


https://wolfram.com/xid/0b0jxi8ylua-e8c21s

Array Data (5)
StandardDeviation for a matrix gives columnwise standard deviations:

https://wolfram.com/xid/0b0jxi8ylua-ezu2uz

StandardDeviation for a tensor gives columnwise standard deviations at the first level:

https://wolfram.com/xid/0b0jxi8ylua-lw96ov


https://wolfram.com/xid/0b0jxi8ylua-nknun


https://wolfram.com/xid/0b0jxi8ylua-ma3v2m

When the input is an Association, StandardDeviation works on its values:

https://wolfram.com/xid/0b0jxi8ylua-cs7n5q


https://wolfram.com/xid/0b0jxi8ylua-dpcn8d

SparseArray data can be used just like dense arrays:

https://wolfram.com/xid/0b0jxi8ylua-n691tv


https://wolfram.com/xid/0b0jxi8ylua-drrysl

Find the standard deviation of a QuantityArray:

https://wolfram.com/xid/0b0jxi8ylua-lgwnaj


https://wolfram.com/xid/0b0jxi8ylua-k03qc6

Image and Audio Data (2)
Channelwise standard deviation of an RGB image:

https://wolfram.com/xid/0b0jxi8ylua-hfby9q

Standard deviation of a grayscale image:

https://wolfram.com/xid/0b0jxi8ylua-ue2gq5

On audio objects, StandardDeviation works channelwise:

https://wolfram.com/xid/0b0jxi8ylua-nq1jnz


https://wolfram.com/xid/0b0jxi8ylua-mjmudf


https://wolfram.com/xid/0b0jxi8ylua-bs38vd

Date and Time (5)
Compute standard deviation of dates:

https://wolfram.com/xid/0b0jxi8ylua-b1smxx

https://wolfram.com/xid/0b0jxi8ylua-pa4nmn


https://wolfram.com/xid/0b0jxi8ylua-uok1il

Compute the weighted standard deviation of dates:

https://wolfram.com/xid/0b0jxi8ylua-c98kbd


https://wolfram.com/xid/0b0jxi8ylua-8c1had

https://wolfram.com/xid/0b0jxi8ylua-t71b2h

Compute the standard deviation of dates given in different calendars:

https://wolfram.com/xid/0b0jxi8ylua-wbzcuv


https://wolfram.com/xid/0b0jxi8ylua-9ius88


https://wolfram.com/xid/0b0jxi8ylua-qe5gbw

Compute the standard deviation of times:

https://wolfram.com/xid/0b0jxi8ylua-et9bla


https://wolfram.com/xid/0b0jxi8ylua-ztsexm

Compute the standard deviation of times with different time zone specifications:

https://wolfram.com/xid/0b0jxi8ylua-mrqghz


https://wolfram.com/xid/0b0jxi8ylua-1d7sk5

Distributions and Processes (4)
Find the standard deviation for univariate distributions:

https://wolfram.com/xid/0b0jxi8ylua-rxz55


https://wolfram.com/xid/0b0jxi8ylua-hbq28j


https://wolfram.com/xid/0b0jxi8ylua-ek075b


https://wolfram.com/xid/0b0jxi8ylua-lzwoz3

Standard deviation for derived distributions:

https://wolfram.com/xid/0b0jxi8ylua-rgc72x


https://wolfram.com/xid/0b0jxi8ylua-byqvvz


https://wolfram.com/xid/0b0jxi8ylua-215ry

https://wolfram.com/xid/0b0jxi8ylua-fq5ptk

Standard deviation for distributions with quantities:

https://wolfram.com/xid/0b0jxi8ylua-e5ck8y


https://wolfram.com/xid/0b0jxi8ylua-gou96


https://wolfram.com/xid/0b0jxi8ylua-boeqrp

Standard deviation function for a random process:

https://wolfram.com/xid/0b0jxi8ylua-fugn


https://wolfram.com/xid/0b0jxi8ylua-g9pmgp

Applications (7)Sample problems that can be solved with this function
StandardDeviation is a measure of dispersion:

https://wolfram.com/xid/0b0jxi8ylua-bhnrki

https://wolfram.com/xid/0b0jxi8ylua-t94no


https://wolfram.com/xid/0b0jxi8ylua-o9323q

Transform data to have mean 0 and unit variance:

https://wolfram.com/xid/0b0jxi8ylua-b87ex


https://wolfram.com/xid/0b0jxi8ylua-he9td1


https://wolfram.com/xid/0b0jxi8ylua-hm408i


https://wolfram.com/xid/0b0jxi8ylua-jvusmq

Identify periods of high volatility in the S&P 500 using a five-year moving standard deviation:

https://wolfram.com/xid/0b0jxi8ylua-7mmaha

https://wolfram.com/xid/0b0jxi8ylua-kfgcti

https://wolfram.com/xid/0b0jxi8ylua-bef0x

Find the mean and standard deviation for the number of cycles to failure of deep-groove ball-bearings:

https://wolfram.com/xid/0b0jxi8ylua-t28mn

https://wolfram.com/xid/0b0jxi8ylua-kqueul


https://wolfram.com/xid/0b0jxi8ylua-d0uzg2


https://wolfram.com/xid/0b0jxi8ylua-6zu8tv

https://wolfram.com/xid/0b0jxi8ylua-ixtfte

Probability that the values lie within two standard deviations of the mean:

https://wolfram.com/xid/0b0jxi8ylua-bs6d63

Investigate weak stationarity of the process data by analyzing standard deviations of slices:

https://wolfram.com/xid/0b0jxi8ylua-r14k0m

https://wolfram.com/xid/0b0jxi8ylua-hq9gxo

https://wolfram.com/xid/0b0jxi8ylua-byyqpk

https://wolfram.com/xid/0b0jxi8ylua-nhaulq

Use a larger plot range to see how relatively small the variations are:

https://wolfram.com/xid/0b0jxi8ylua-xwv2xr

Compute standard deviation for slices of a collection of paths of a random process:

https://wolfram.com/xid/0b0jxi8ylua-8se1zg

https://wolfram.com/xid/0b0jxi8ylua-52xxug
Compute standard deviations and means:

https://wolfram.com/xid/0b0jxi8ylua-iakfqb
Create a standard deviation band around the mean:

https://wolfram.com/xid/0b0jxi8ylua-n2cfrq
Plot standard deviations around the mean over these paths:

https://wolfram.com/xid/0b0jxi8ylua-tvmkqe

Find the standard deviation of the heights for the children in a class:

https://wolfram.com/xid/0b0jxi8ylua-cevfij

https://wolfram.com/xid/0b0jxi8ylua-fllmtw


https://wolfram.com/xid/0b0jxi8ylua-celepo

The heights within one standard deviation from the mean:

https://wolfram.com/xid/0b0jxi8ylua-ok4ok5

Properties & Relations (9)Properties of the function, and connections to other functions
The square of StandardDeviation is Variance:

https://wolfram.com/xid/0b0jxi8ylua-tfo


https://wolfram.com/xid/0b0jxi8ylua-g1y

StandardDeviation is a scaled Norm of deviations from the Mean:

https://wolfram.com/xid/0b0jxi8ylua-lp8ujb

https://wolfram.com/xid/0b0jxi8ylua-dt87yu


https://wolfram.com/xid/0b0jxi8ylua-k1qqbw

StandardDeviation is the square root of a scaled CentralMoment:

https://wolfram.com/xid/0b0jxi8ylua-bps8zf

https://wolfram.com/xid/0b0jxi8ylua-fess9s


https://wolfram.com/xid/0b0jxi8ylua-ct1qwp

StandardDeviation is a scaled RootMeanSquare of the deviations:

https://wolfram.com/xid/0b0jxi8ylua-hqtrtd

https://wolfram.com/xid/0b0jxi8ylua-cyyyvo


https://wolfram.com/xid/0b0jxi8ylua-efwiiv

StandardDeviation is the square root of a scaled Mean of squared deviations:

https://wolfram.com/xid/0b0jxi8ylua-brtwin

https://wolfram.com/xid/0b0jxi8ylua-hmk853


https://wolfram.com/xid/0b0jxi8ylua-cibwnc

StandardDeviation as a scaled EuclideanDistance from the Mean:

https://wolfram.com/xid/0b0jxi8ylua-cqnxdq

https://wolfram.com/xid/0b0jxi8ylua-kigjh4


https://wolfram.com/xid/0b0jxi8ylua-dnccw


https://wolfram.com/xid/0b0jxi8ylua-enaymy


https://wolfram.com/xid/0b0jxi8ylua-u9svr

StandardDeviation squared is less than MeanDeviation if all absolute deviations are less than 1:

https://wolfram.com/xid/0b0jxi8ylua-gqobe7

https://wolfram.com/xid/0b0jxi8ylua-e1pum5


https://wolfram.com/xid/0b0jxi8ylua-g876u6

StandardDeviation squared is greater than MeanDeviation if all absolute deviations are greater than 1:

https://wolfram.com/xid/0b0jxi8ylua-h25qvy

https://wolfram.com/xid/0b0jxi8ylua-b1r9du


https://wolfram.com/xid/0b0jxi8ylua-felohq

StandardDeviation of a random variable as the square root of Variance:

https://wolfram.com/xid/0b0jxi8ylua-c5emif

https://wolfram.com/xid/0b0jxi8ylua-btbopo


https://wolfram.com/xid/0b0jxi8ylua-ekl2fe


https://wolfram.com/xid/0b0jxi8ylua-d4gywe

Neat Examples (1)Surprising or curious use cases
The distribution of StandardDeviation estimates for 20, 100, and 300 samples:

https://wolfram.com/xid/0b0jxi8ylua-hcza1g


https://wolfram.com/xid/0b0jxi8ylua-8raem

Wolfram Research (2003), StandardDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/StandardDeviation.html (updated 2024).
Text
Wolfram Research (2003), StandardDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/StandardDeviation.html (updated 2024).
Wolfram Research (2003), StandardDeviation, Wolfram Language function, https://reference.wolfram.com/language/ref/StandardDeviation.html (updated 2024).
CMS
Wolfram Language. 2003. "StandardDeviation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/StandardDeviation.html.
Wolfram Language. 2003. "StandardDeviation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/StandardDeviation.html.
APA
Wolfram Language. (2003). StandardDeviation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StandardDeviation.html
Wolfram Language. (2003). StandardDeviation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StandardDeviation.html
BibTeX
@misc{reference.wolfram_2025_standarddeviation, author="Wolfram Research", title="{StandardDeviation}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/StandardDeviation.html}", note=[Accessed: 09-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_standarddeviation, organization={Wolfram Research}, title={StandardDeviation}, year={2024}, url={https://reference.wolfram.com/language/ref/StandardDeviation.html}, note=[Accessed: 09-July-2025
]}