brgen: Bernoulli Numbers

Description Usage Arguments Details Examples

View source: R/brgen.R

Description

Brgen function using cugen function to create bernoulli number with parameter p

Usage

1
brgen(p)

Arguments

p

Probability of success

Details

In probability theory and statistics, the Bernoulli distribution, named after Swiss mathematician Jacob Bernoulli,[1] is the probability distribution of a random variable which takes the value 1 with probability p \displaystyle p p and the value 0 with probability q = 1 <e2><88><92> p \displaystyle q=1-p q=1-p <e2><80><94> i.e., the probability distribution of any single experiment that asks a yes<e2><80><93>no question; the question results in a boolean-valued outcome, a single bit of information whose value is success/yes/true/one with probability p and failure/no/false/zero with probability q. It can be used to represent a coin toss where 1 and 0 would represent "head" and "tail" (or vice versa), respectively. In particular, unfair coins would have p <e2><89><a0> 0.5 \displaystyle p\neq 0.5 p\neq 0.5.

The Bernoulli distribution is a special case of the Binomial distribution where a single experiment/trial is conducted (n=1). It is also a special case of the two-point distribution, for which the outcome need not be a bit, i.e., the two possible outcomes need not be 0 and 1.

Examples

1
brgen(0.5)

moeinm98/distributions documentation built on May 17, 2019, 4:33 p.m.