# binom: Binomial Distribution In Distributacalcul: Probability Distribution Functions

## Description

Binomial distribution with size n and probability of success p.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```expValBinom(size, prob) varBinom(size, prob) expValTruncBinom(d, size, prob, less.than.d = TRUE) VatRBinom(kap, size, prob) TVatRBinom(kap, size, prob) pgfBinom(t, size, prob) mgfBinom(t, size, prob) ```

## Arguments

 `size` Number of trials (0 or more). `prob` Probability of success in each trial. `d` cut-off value. `less.than.d` logical; if `TRUE` (default) truncated mean for values <= d, otherwise, for values > d. `kap` probability. `t` t.

## Details

The binomial distribution with probability of success p for n trials has probability mass function :

Pr(X = k) = n!/(k!(n - k)!) p^n(1 - p)^(n - k)

for k = 0, 1, 2, ..., n, 0 <= p <= 1, and n > 0

## Value

Function :

• `mgfBinom` gives the moment generating function (MGF).

• `pgfBinom` gives the probability generating function (PGF).

• `expValBinom` gives the expected value.

• `varBinom` gives the variance.

• `expValTruncBinom` gives the truncated mean.

• `TVatRBinom` gives the Tail Value-at-Risk.

• `VatRBinom` gives the Value-at-Risk.

Invalid parameter values will return an error detailing which parameter is problematic.

## Note

Function VatRBinom is a wrapper of the `qbinom` function from the stats package.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17``` ```expValBinom(size = 3, prob = 0.5) varBinom(size = 3, prob = 0.5) expValTruncBinom(d = 2, size = 3, prob = 0.5) expValTruncBinom(d = 0, size = 3, prob = 0.5, less.than.d = FALSE) VatRBinom(kap = 0.8, size = 5, prob = 0.2) TVatRBinom(kap = 0.8, size = 5, prob = 0.2) pgfBinom(t = 1, size = 3, prob = 0.5) mgfBinom(t = 1, size = 3, prob = 0.5) ```

Distributacalcul documentation built on Sept. 13, 2020, 5:19 p.m.