crossrun (version 0.1.0)

exactbin: Exact Joint Probabilities for Low n

Description

Exact joint probabilities, for low n, of the number of crossings C and the longest run L in n independent Bernoulli observations with success probability p. Probabilites are multiplied by \(2^{n-1}\).

Usage

exactbin(n, p = 0.5, prec = 120)

Arguments

n

number, length of seqience, at most 6.

p

success probability.

prec

precision in mpfr calculations. Default 120.

Value

mpfr array

Examples

Run this code
# NOT RUN {
exactbin(n=6)
exactbin(n=5, p=0.6)
# }

Run the code above in your browser using DataCamp Workspace