N. Smeeton
Do-it-yourself shuffling and the number of runs under randomness.
Smeeton, N.; Cox, N.J.
Abstract
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.
Citation
Smeeton, N., & Cox, N. (2003). Do-it-yourself shuffling and the number of runs under randomness. The Stata Journal, 3(3), 270-277
Journal Article Type | Article |
---|---|
Publication Date | 2003-07 |
Journal | The Stata Journal |
Print ISSN | 1536-867X |
Electronic ISSN | 1536-8734 |
Publisher | SAGE Publications |
Peer Reviewed | Peer Reviewed |
Volume | 3 |
Issue | 3 |
Pages | 270-277 |
Public URL | https://durham-repository.worktribe.com/output/1598029 |
Publisher URL | http://www.stata-journal.com/article.html?article=st0044 |
You might also like
Stata tip 151: Puzzling out some logical operators
(2023)
Journal Article
Speaking Stata: Automating axis labels: Nice numbers and transformed scales
(2022)
Journal Article
Stata tip 148: Searching for words within strings
(2022)
Journal Article
Speaking Stata: The largest five - A tale of tail values
(2022)
Journal Article
Stata tip 145: Numbering weeks within months
(2022)
Journal Article