dst_nbinom: Negative binomial Distribution

View source: R/dst_nbinom.R

dst_nbinomR Documentation

Negative binomial Distribution

Description

Makes a Negative Binomial distribution, corresponding to the number of failures in a sequence of independent trials until a given number of successes are observed.

Usage

dst_nbinom(size, prob)

Arguments

size

Number of successful trials; single positive numeric.

prob

Probability of a successful trial; single numeric between 0 and 1.

Value

A Negative Binomial distribution.

Examples

d <- dst_nbinom(10, 0.5)

# This version of the Negative Binomial distribution does not count
# the successes.
range(d)

vincenzocoia/distionary documentation built on Feb. 26, 2025, 11:09 a.m.