Learn R Programming

distionary (version 0.1.0)

dst_nbinom: 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)

Value

A Negative Binomial distribution.

Arguments

size

Number of successful trials; single positive numeric.

prob

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

Examples

Run this code
d <- dst_nbinom(10, 0.5)

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

Run the code above in your browser using DataLab