Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Calculate the variance of a list along with its uncertainty
ResourceFunction["VarianceAround"][{x1,x2,x3,…}] gives an Around object describing the variance of xi and its uncertainty. |
Calculate the variance of some numbers:
In[1]:= | ![]() |
Out[1]= | ![]() |
VarianceAround works with symbolic expressions:
In[2]:= | ![]() |
Out[2]= | ![]() |
VarianceAround also works with quantities with units:
In[3]:= | ![]() |
Out[3]= | ![]() |
VarianceAround applied to symbolic expressions can get unwieldy fast:
In[4]:= | ![]() |
Out[4]= | ![]() |
The variance can not be calculated for a list with a single element:
In[5]:= | ![]() |
Out[5]= | ![]() |
Study the variance and its uncertainty for a sequence of values and compare it to the theoretical value of the distribution:
In[6]:= | ![]() |
Out[10]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License