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.

This page remains the quick access point. The full documentation is in Overview, while How it works is available as a separate subpage.