Function Repository Resource:

PopulationStandardDeviation

Source Notebook

Compute the population standard deviation for a set of data

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["PopulationStandardDeviation"][{x1,x2,}]

gives the population standard deviation of the given data.

Details

ResourceFunction["PopulationStandardDeviation"][] is equivalent to Sqrt[ResourceFunction["PopulationVariance"][]].
ResourceFunction["PopulationStandardDeviation"] handles both numerical and symbolic data.

Examples

Basic Examples (3) 

Compute the population standard deviation of a list:

In[1]:=
ResourceFunction["PopulationStandardDeviation"][{1, 2, 3}]
Out[1]=

Compute the population standard deviation of another list:

In[2]:=
ResourceFunction[
 "PopulationStandardDeviation"][{2, 4, 4, 4, 5, 8, 7, 9}]
Out[2]=

Compute the population standard deviation of another list:

In[3]:=
list = {16, 11, 9, 8, 1};
ResourceFunction["PopulationStandardDeviation"][list]
Out[4]=

Compare with the known expression for population standard deviation as the root-mean-square difference to the mean:

In[5]:=
Sqrt[Total[(list - Mean[list])^2]/Length[list]]
Out[5]=

Scope (1) 

PopulationStandardDeviation works on both numeric and symbolic input:

In[6]:=
ResourceFunction["PopulationStandardDeviation"][{a, b, c}]
Out[6]=

Properties and Relations (2) 

The population standard deviation of a dataset differs from its sample standard deviation calculated with StandardDeviation due to Bessel's correction:

In[7]:=
Through[{ResourceFunction["PopulationStandardDeviation"], StandardDeviation}[Range[3]]] // N
Out[7]=

The fractional effect of this correction tends to be smaller for larger sample sizes:

In[8]:=
Through[{ResourceFunction["PopulationStandardDeviation"], StandardDeviation}[Range[2000]]] // N
Out[8]=

PopulationStandardDeviation[]is equivalent to Sqrt[ResourceFunction["PopulationVariance"][]]:

In[9]:=
data = RandomReal[{0, 1}, 5]
Out[9]=
In[10]:=
ResourceFunction["PopulationStandardDeviation"][data]
Out[10]=
In[11]:=
Sqrt[ResourceFunction["PopulationVariance"][data]]
Out[11]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 4.0.0 – 23 March 2023
  • 3.1.0 – 11 May 2021
  • 3.0.0 – 24 January 2020
  • 2.0.0 – 06 September 2019
  • 1.0.0 – 05 August 2019

Related Resources

License Information