On this page Signature

API Reference / mespy.variance

variance

Signature

variance(
    x: ArrayLike,
    w: ArrayLike | None = None,
    ddof: int | float = 0,
) -> float

variance computes the variance of a sample in the unweighted case or, alternatively, in the weighted case with the denominator corrected by ddof.

Overview summarizes purpose, parameters, errors and a usage example; Implementation walks through the internal flow and the implemented formulas step by step.