crossrunbin {crossrun}R Documentation

Joint Distribution for Crossings and Runs

Description

Joint probability distribution for the number of crossings C and the longest run L in a sequence of n independent Bernoulli observations with success probability p. To enhance precision, results are stored in mpfr arrays and the probabilities are multiplied by m^{n-1} for a multiplier m.

Usage

crossrunbin(nmax = 100, prob = 0.5, mult = 2, prec = 120, printn = FALSE)

Arguments

nmax

max sequence length.

prob

success probability.

mult

multiplier for joint probabilities.

prec

mpft precision.

printn

logical for progress output.

Value

list of joint probabilities.

Examples

crb10.6 <- crossrunbin(nmax=10, prob=.6, printn=TRUE)
print(crb10.6$pt[[10]])

[Package crossrun version 0.1.1 Index]