Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Computes the circular variance
ResourceFunction["CircularVariance"][list] calculates the circular variance for the circular data list. | |
ResourceFunction["CircularVariance"][list→weights] calculates the circular variance for the circular data list using the weights weights. |
Calculate the circular variance from some data:
| In[1]:= |
| Out[2]= |
Provide weights:
| In[3]:= | ![]() |
| Out[4]= |
Visualize some data:
| In[5]:= |
| Out[6]= | ![]() |
Using the standard Variance does not take into account the circularity and the result will be much larger:
| In[7]:= |
| Out[7]= |
Taking the circular nature into account give the expected result:
| In[8]:= |
| Out[8]= |
For small spread the circular variance is approximately half the 'linear' variance:
| In[9]:= | ![]() |
| Out[11]= |
For constant data the variance is equal to 0:
| In[12]:= |
| Out[12]= |
An empty list spawns an error but returns 0:
| In[13]:= |
| Out[13]= |
The data and the weights should be commensurate:
| In[14]:= |
The circular variance approaches 1 for a uniform distribution:
| In[15]:= |
| Out[15]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License