Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the determinant of the covariance matrix
| ResourceFunction["GeneralizedVariance"][matrix] gives the generalized variance for matrix. | 
GeneralizedVariance of real-valued bivariate data:
| In[1]:= | ![ResourceFunction[
  "GeneralizedVariance"][{{a, b}, {c, d}, {e, f}}] // ComplexExpand](https://www.wolframcloud.com/obj/resourcesystem/images/be6/be68dac3-95af-4ded-b4e1-2c6bb16f4aad/3083063e94beb840.png) | 
| Out[1]= |  | 
GeneralizedVariance is equivalent to the determinant of the covariance matrix:
| In[2]:= | ![ResourceFunction[
  "GeneralizedVariance"][{{1, 0}, {0, 2}, {3, 4}, {4, 2}}] == Det[Covariance[{{1, 0}, {0, 2}, {3, 4}, {4, 2}}]]](https://www.wolframcloud.com/obj/resourcesystem/images/be6/be68dac3-95af-4ded-b4e1-2c6bb16f4aad/556eba11ff636dce.png) | 
| Out[2]= |  | 
GeneralizedVariance is equal to the product of the principal component variances:
| In[3]:= | ![ResourceFunction[
   "GeneralizedVariance"][{{1, 0}, {0, 2}, {3, 4}, {4, 2}}] == Apply[Times, Variance[
    PrincipalComponents[{{1, 0}, {0, 2}, {3, 4}, {4, 2}}]]] // Simplify](https://www.wolframcloud.com/obj/resourcesystem/images/be6/be68dac3-95af-4ded-b4e1-2c6bb16f4aad/23c4dfbc890ee214.png) | 
| Out[3]= |  | 
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License