# exactbin: Exact Joint Probabilities for Low n In crossrun: Joint Distribution of Number of Crossings and Longest Run

## 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

 `1` ```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.

mpfr array

## Examples

 ```1 2``` ```exactbin(n=6) exactbin(n=5, p=0.6) ```

### Example output

```'mpfrMatrix' of dim(.) =  (6, 6) of precision  120   bits
1
0                                        0.
1                                        0.
2                                        0.
3                                        0.
4                                        0.
5 0.031250000000000000000000000000000000000
2
0                                        0.
1                                        0.
2 0.031250000000000000000000000000000000000
3  0.18750000000000000000000000000000000000
4  0.15625000000000000000000000000000000000
5                                        0.
3
0                                        0.
1 0.031250000000000000000000000000000000000
2  0.18750000000000000000000000000000000000
3  0.12500000000000000000000000000000000000
4                                        0.
5                                        0.
4
0                                        0.
1 0.062500000000000000000000000000000000000
2 0.093750000000000000000000000000000000000
3                                        0.
4                                        0.
5                                        0.
5
0                                        0.
1 0.062500000000000000000000000000000000000
2                                        0.
3                                        0.
4                                        0.
5                                        0.
6
0 0.031250000000000000000000000000000000000
1                                        0.
2                                        0.
3                                        0.
4                                        0.
5                                        0.
'mpfrMatrix' of dim(.) =  (5, 5) of precision  120   bits
1
0                                        0.
1                                        0.
2                                        0.
3                                        0.
4 0.057600000000000002131628207280300340677
2
0                                       0.
1                                       0.
2 0.18240000000000000230926389122032532793
3 0.23040000000000000852651282912120136271
4                                       0.
3
0                                       0.
1 0.11520000000000000426325641456060068135
2 0.19199999999999999822364316059974963388
3                                       0.
4                                       0.
4
0                                       0.
1 0.13439999999999999609201495331944929334
2                                       0.
3                                       0.
4                                       0.
5
0 0.087999999999999988453680543898373360150
1                                        0.
2                                        0.
3                                        0.
4                                        0.
```

crossrun documentation built on May 2, 2019, 10:58 a.m.