Description Usage Arguments Details Value See Also Examples

These functions provide the density, distribution function, quantile function, and random generation for the Bernoulli distribution.

1 2 3 4 |

`x, q` |
These are each a vector of quantiles. |

`p` |
This is a vector of probabilities. |

`n` |
This is the number of observations. If |

`prob` |
This is the probability of success on each trial. |

`log, log.p` |
Logical. if |

`lower.tail` |
Logical. if |

Application: Continuous Univariate

Density:

*p(theta) = p^theta (1-p)^(1-theta)*,*theta = 0,1*Inventor: Jacob Bernoulli

Notation 1:

*theta ~ Bern(p)*Notation 2:

*p(theta) = Bern(theta | p)*Parameter 1: probability parameter

*0 <= p <= 1*Mean:

*E(theta) = p*Variance:

*var(theta) = p / (1-p)*Mode:

*mode(theta) =*

The Bernoulli distribution is a binomial distribution with
*n=1*, and one instance of a Bernoulli distribution is called a
Bernoulli trial. One coin flip is a Bernoulli trial, for example. The
categorical distribution is the generalization of the Bernoulli
distribution for variables with more than two discrete values. The
beta distribution is the conjugate prior distribution of the Bernoulli
distribution. The geometric distribution is the number of Bernoulli
trials needed to get one success.

`dbern`

gives the density,
`pbern`

gives the distribution function,
`qbern`

gives the quantile function, and
`rbern`

generates random deviates.

1 2 3 | ```
library(LaplacesDemon)
dbern(1, 0.7)
rbern(10, 0.5)
``` |

LaplacesDemonR/LaplacesDemon documentation built on Aug. 15, 2018, 4:34 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.