6.8.6.2.3. statsmodels.sandbox.stats.runs.TotalRunsProb

class statsmodels.sandbox.stats.runs.TotalRunsProb(n0, n1)[source]

class for the probability distribution of total runs

This is the exact probability distribution for the (Wald-Wolfowitz) runs test. The random variable is the total number of runs if the sample has (n0, n1) observations of groups 0 and 1.

Notes

Written as a class so I can store temporary calculations, but I don’t think it matters much.

Formulas taken from SAS manual for one-sided significance level.

Could be converted to a full univariate distribution, subclassing scipy.stats.distributions.

Status Not verified yet except for mean.

__init__(n0, n1)[source]

6.8.6.2.3.1. Methods

__init__(n0, n1)
cdf(r)
pdf(r)
runs_prob_even(r)
runs_prob_odd(r)