# Probability of observing the ith nearest neighbour at a distance greater or equal to c and the (i-1)th nearest neighbour was observed at distance smaller or equal a

### Description

This function gives the probability of observing the ith nearest neighbour at a distance greater or equal to c and the (i-1)th nearest neighbour was observed at distance smaller or equal a $P(d_i >= c, d_(i-1) <= a)$

### Usage

1 |

### Arguments

`i` |
numeric, which nearest neighbour to consider |

`c` |
vector, the distance at which the ith NN was observed |

`a` |
vector, the distance at which the ith NN was observed. |

`N` |
numeric, size of the dataset |

### Details

The probability is calculated by ranking the data and assuming that the data lie on a torus. For details see Dümcke et al. "A novel test for independence derived from an exact distribution of ith nearest neighbours" (manuscript in preparation)

### Value

Probability vector, entries with value -1 if the probability does not exist

### Author(s)

Sebastian Dümcke duemcke@mpipz.mpg.de

### See Also

`P_ceq`

, `Pc_givena`

### Examples

1 | ```
P_cge_ale(10,4:8,2:6,30)
``` |

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.