staircase.Stairs.mean

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

Calculates the mean 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 mean

Return type:

float

Examples

>>> s1.plot()
>>> s1.mean(3, 4.5)
0.3333333333333333
../_images/staircase-Stairs-mean-1.png