StatsRunsCDF
StatsRunsCDF (n, r)
The StatsRunsCDF function returns the cumulative distribution function for the up and down runs distribution for total number of runs r in a random linear arrangement of n unequal elements. There is no closed form expression. It is computed numerically from the recursion of the probability density
with the intial condition
References
Bradley, J.V., Distribution-Free Statistical Tests, Prentice Hall, Englewood Cliffs, New Jersey, 1968.
Olmstead, P.S., Distribution of sample arrangements for runs up and down, Annals of Mathematical Statistics, 17, 24-33, 1946..