fixedTimeEvents: An R package for the distribution of distances between discrete events in fixed time
Journal : SoftwareX , vol. 5 , p. 227–233 , 2016
Publisher : Elsevier
International Standard Numbers
Printed : 2352-7110
Electronic : 2352-7110
Publication type : Academic article
ARKIV : http://hdl.handle.net/11250/24...
DOI : doi.org/10.1016/j.softx.2016.0...
If you have questions about the publication, you may contact Nofima’s Chief Librarian.
When a series of Bernoulli trials occur within a fixed time frame or limited space, it is often interesting to assess if the successful outcomes have occurred completely at random, or if they tend to group together. One example, in genetics, is detecting grouping of genes within a genome. Approximations of the distribution of successes are possible, but they become inaccurate for small sample sizes. In this article, we describe the exact distribution of time between random, non-overlapping successes in discrete time of fixed length. A complete description of the probability mass function, the cumulative distribution function, mean, variance and recurrence relation is included. We propose an associated test for the over-representation of short distances and illustrate the methodology through relevant examples. The theory is implemented in an R package including probability mass, cumulative distribution, quantile function, random number generator, simulation functions, and functions for testing.