pyguymer3.var

pyguymer3.var(arr, /, *, dof=0)[source]

Find the variance of an array.

This function finds the variance of an array, with optionally specified degrees of freedom.

Parameters:
  • arr (numpy.ndarray) – the array

  • dof (int, default=0) – the degrees of freedom

Returns:

ans – the variance of the array

Return type:

float

Notes

See the NumPy documentation.

In standard statistical practice:

  • dof=0 provides a maximum likelihood estimate of the variance for normally distributed variables; and

  • dof=1 provides an unbiased estimator of the variance of a hypothetical infinite population.

Copyright 2017 Thomas Guymer [1]

References