[SciPy-User] runstest and distribution of run lengths
Wed Dec 29 08:43:05 CST 2010
On Fri, Dec 24, 2010 at 5:19 PM, <email@example.com> wrote:
> Does anyone know the distribution of run lengths in a sequence of
> bernoulli trial?
> I thought, I can implement a runstest as a quick exercise, but I got
> (kind of) stuck.
> I implemented the Wald-Wolfowitz runs test (plus one and two sample
> versions) according to Wikipedia
> and the SAS manual. This test only looks at the total number of runs,
> and the SAS manual has both the exact distribution for small samples
> and the normal approximation for large sample. So, this went ok.
> But the runstest in the NIST manual and in dataplot, has the entire
> distribution of run lengths
> They mention a book, Bradley, 1968, that I don't have, but they don't
> say what the formulas and distribution for the expected values and
> standard deviation that they use are.
> Does anyone have an idea or knows a more easily accessible reference?
Only other one I've come across (via Stata)
Swed, F.S. and Eisenhart, C. 1943. "Tables for testing randomness of
grouping in a sequence of alternatives." The Annals of Mathematical
Statistics. 14.1, 66-87.
More information about the SciPy-User