Irreproducible results ----------------------
^irrepro^ [ ^, b^lack^(^#^) w^hite^(^#^) a^dd^(^#^)^ ^c^onnect^(^str^) s^ymbol^(^str^)^ graph_options ]
^irrepron^ [ ^, b^lack^(^#^) w^hite^(^#^) a^dd^(^#^)^ ^g^enerate^(^newvar^)^ ]
Description -----------
Imagine an urn containing w white and b black balls, together with inexhaustible supplies of white and black balls. Pick one ball from the urn randomly, and replace it in the urn, together with a additional balls of the same colour. Repeat indefinitely. What happens to (say) the proportion of white balls in the urn?
Experiment indicates, and analysis confirms, that in any particular experiment the proportion stabilises rapidly, but on an unrepeatable value. A set of experiments approximates a distribution of limiting proportions that is beta over the whole range from 0 to 1 (uniform if b = w = a = 1). In effect, early choices are crucial, even though each history looks increasingly flat.
^irrepro^ runs the experiment once and plots proportion white against number of picks.
^irrepron^ (think: ^irrepro^ run ^n^ times) runs the experiment for as many times as there are observations. Under Windows, the effect is a movie with as many frames as there are observations.
Remarks -------
If there are no data in memory, ^irrepro^ sets the number of observations to 200. This is suggested as a suitable number.
The user must have installed ^distplot^ previously.
This model was discussed by Eggenberger and P\'olya (1923). Cohen (1976) and May (1976) give accessible discussions of the model and its interpretation.
Options -------
^black(^#^)^ specifies the number of black balls (default 1).
^white(^#^)^ specifies the number of white balls (default 1).
^add(^#^)^ specifies the number of balls to be added (default 1).
^connect(^ ^)^ can be used to suppress connection of data points. The default is ^l^.
^symbol(^ ^)^ can be used to specify a plotting symbol. The default is ^.^ (dot).
^generate(^newvar^)^ can be used to save the results of n experiments each producing a proportion white after n picks.
graph_options refers to options of ^graph, twoway^ other than ^xla( )^ ^yla( ) gap( ) t1( )^.
Examples --------
. ^irrepro^ . ^irrepron^
References ----------
Cohen, J.E. 1976. Irreproducible results and the breeding of pigs (or nondegenerate limit random variables in biology). BioScience 26, 391-4.
Eggenberger, F. and P\'olya, G. 1923. \"Uber die Statistik verketteter Vorg\"ange. Zeitschrift f\"ur angewandte Mathematik und Mechanik 3, 279-289.
May, R.M. 1976. Irreproducible results. Nature 262, 646.
Author ------
Nicholas J. Cox, University of Durham, U.K. n.j.cox@@durham.ac.uk