scipy.stats.mstats.theilslopes

scipy.stats.mstats.theilslopes(y, x=None, alpha=0.05)[source]

Computes the Theil slope over the dataset (x,y), as the median of all slopes between paired values.

Parameters :

y : sequence

Dependent variable.

x : {None, sequence}, optional

Independent variable. If None, use arange(len(y)) instead.

alpha : float

Confidence degree.

Returns :

medslope : float

Theil slope

medintercept : float

Intercept of the Theil line, as median(y)-medslope*median(x)

lo_slope : float

Lower bound of the confidence interval on medslope

up_slope : float

Upper bound of the confidence interval on medslope

Previous topic

scipy.stats.mstats.spearmanr

Next topic

scipy.stats.mstats.threshold