Learn R Programming

distionary (version 0.1.0)

dst_hyper: Hypergeometric Distribution

Description

Creates a Hypergeometric distribution. The parameterization used here is the same as for stats::phyper(), where the outcome can be thought of as the number of red balls drawn from an urn of coloured balls, using a scoop that holds a fixed number of balls.

Usage

dst_hyper(m, n, k)

Value

A Hypergeometric distribution.

Arguments

m

The number of red balls in the urn; single positive integer.

n

The number of non-red balls in the urn; single positive integer.

k

the number of balls drawn from the urn (between 0 and m + n); single positive integer.

Examples

Run this code
dst_hyper(15, 50, 10)

Run the code above in your browser using DataLab