Probability of observing r NN distances at distance c, all previous NN distances at distance < c and all following NN distances at a distance > c

1 2 | ```
parameters(r, i0, c, N)
kr(r, i0, c)
``` |

`r` |
the number of points that are at the same distance c |

`i0` |
which i0-th nearest neighbour we are considering. |

`c` |
the distance of the i-th nearest neighbour |

`N` |
sample size |

for `kr`

the number of possibilities to place r points onto the same distance when we already observed i0 points at a smaller distance

for `parameters`

the probability of observing r NN distances at distance c, all previous NN distances at distance < c and all following NN distances at a distance > c

Sebastian Dümcke duemcke@mpipz.mpg.de

1 2 | ```
knnIndep:::kr(3,5,6)
knnIndep:::parameters(3,5,6,20)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.