Do-it-yourself shuffling and the number of runs under randomness

A common class of problem in statistical science is estimating, as a benchmark, the probability of some event under randomness. For example, in a sequence of events in which several outcomes are possible and the length of the sequence and number of outcomes of each type known, the number of runs gives an indication of whether the outcomes are random, clustered, or alternating. This note explains and illustrates a simple method of random shuffling that is often useful. We show how the conditional probability distribution of the number of runs may be derived easily in Stata, thus yielding p-values for testing the null hypothesis that the type of outcome is random. We also compare our direct approach with that using the simulate command.


Issue Date:
2003
Publication Type:
Journal Article
DOI and Other Identifiers:
st0044 (Other)
PURL Identifier:
http://purl.umn.edu/116095
Published in:
Stata Journal, Volume 03, Number 3
Page range:
270-277
Total Pages:
8

Record appears in:



 Record created 2017-04-01, last modified 2017-08-26

Fulltext:
Download fulltext
PDF

Rate this document:

Rate this document:
1
2
3
 
(Not yet reviewed)