staircase.Stairs.var

Stairs.var(lower=-inf, upper=inf)

Calculates the variance of the step function.

Parameters:
  • lower (int, float or pandas.Timestamp) – lower bound of the interval on which to perform the calculation
  • upper (int, float or pandas.Timestamp) – upper bound of the interval on which to perform the calculation
Returns:

The variance of the step function

Return type:

float

See also

Stairs.std()

Examples

>>> s1.plot()
../_images/staircase-Stairs-var-1.png
>>> s1.var()
0.6875
>>> s1.var(lower=0, upper=6)
0.4722222222222224