Binomial — Binomial distribution

Usage

Binomial(N: Int, p: Double) → Distribution<Int>

Arguments

N:

Number of independent trials, a nonnegative integer

p:

Probability of success in each trial, between 0 and 1 inclusive

Description

The Binomial distribution counts successes in N independent trials, each with the same success probability p. Results are integers from 0 through N. Equivalently, it is the distribution of the sum of N independent Bernoulli random variables with success probability p.

Examples

~Binomial(N=10, p=0.25)
~IID(10, Binomial(10, 0.25))
density(Binomial(10, 0.25), 2)

See also