EconPapers    
Economics at your fingertips  
 

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

Nigel Smeeton () and Nicholas Cox
Additional contact information
Nigel Smeeton: King's College, London

Stata Journal, 2003, vol. 3, issue 3, 270-277

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. Copyright 2003 by StataCorp LP.

Keywords: alternation; categorical data; clustering; conditional distribution; forvalues; p-value; permutation; run; sequence; simulate; simulation (search for similar items in EconPapers)
Date: 2003
References: Add references at CitEc
Citations: View citations in EconPapers (2)

Downloads: (external link)
http://www.stata-journal.com/sjpdf.html?articlenum=st0044 (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:tsj:stataj:v:3:y:2003:i:3:p:270-277

Ordering information: This journal article can be ordered from
http://www.stata-journal.com/subscription.html

Access Statistics for this article

Stata Journal is currently edited by Nicholas J. Cox and Stephen P. Jenkins

More articles in Stata Journal from StataCorp LLC
Bibliographic data for series maintained by Christopher F. Baum () and Lisa Gilmore ().

 
Page updated 2025-03-29
Handle: RePEc:tsj:stataj:v:3:y:2003:i:3:p:270-277