tools.tools.ECDF()

statsmodels.tools.tools.ECDF

class statsmodels.tools.tools.ECDF(x, side='right')

Return the Empirical CDF of an array as a step function.

Parameters:

x : array-like

Observations

side : {?left?, ?right?}, optional

Default is ?right?. Defines the shape of the intervals constituting the steps. ?right? correspond to [a, b) intervals and ?left? to (a, b].

Returns:

Empirical CDF as a step function. :

Examples

1
2
3
4
5
6
7
>>> import numpy as np
>>> from statsmodels.distributions.empirical_distribution import ECDF
>>>
>>> ecdf = ECDF([3, 3, 1, 4])
>>>
>>> ecdf([3, 55, 0.5, 1.5])
array([ 0.751.  0.  0.25])

Methods

doc_statsmodels
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.