Description Usage Arguments Details Value Examples

For an event that occurs with probability p, this function returns the probability of an occurrence given n repetitions. p is numeric and can be a vector.

1 | ```
probability_any(n, p)
``` |

`n` |
The number of times to repeat the event (independent) |

`p` |
The individual probability of the event happening |

The probability that any event p occurs with n repetitions is equal to the
reciprocal of the probability that p never occurs. The probability that p
never occurs with n repetitions is `(1 - p) ^ n`

. Thus, the probability
that any event p occurs after n repetitions is `1 - ( (1 - p) ^ n )`

.

The probability of an event with the specified probability, after n repetitions

1 2 3 | ```
probability_any(1, 0.5)
probability_any(2, 0.5)
probability_any(2, c(0.5, 1/3, 0.25))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.