Skip to content

Reference found for runs test length distribution #8280

Open

Description

@shusheer

Describe the bug

https://github.com/statsmodels/statsmodels/blob/main/statsmodels/sandbox/stats/runs.py includes the following comment:

"This should be extended once I figure out what the distribution of runs of any length k is."

Here's a reference that describes exactly this, with expected value, variance and distribution.

https://www.eg.bucknell.edu/~xmeng/Course/CS6337/Note/master/node44.html

Also describes the distribution of up/down runs, so you could in theory combine all three types of runs tests to give an overall probability that the data is random.

Activity

  1. josef-pkt commented on Sep 26, 2022

    @josef-pkt
    Member

    Thanks for the reference

    so you could in theory combine all three types of runs tests to give an overall probability that the data is random

    Do you know how those are combined?
    The three types of runs tests will not be independent, so we cannot just simply combine them like independent tests.

    I had up on runs tests when I got stuck trying to figure out the literature on exact distributions of runs.
    However, using the chisquare test for run length frequencies in the reference looks not too difficult.

  2. added this to the 0.15 milestone on Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions