brgen: Bernoulli Generator

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/brgen.R

Description

The Bernoulli distribution is the probability distribution of a random variable which takes the value 1 with probability p and the value 0 with probability q=1-p.This distribution is a special case of the Binomial distribution where a single experiment/trial is conducted (n=1).

Usage

1
brgen(p)

Arguments

p

p as the probability of success in the trial.

Details

The Bernoulli distribution is a special case of the binomial distribution with n=1. 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.

Value

The returned value is a boolean variable, having either True/1 of False/0 value, representing success or failure of the trial conducted.

Note

nothing to note!

Author(s)

P.Tayefeh Morsal

References

www.wikipedia.org

See Also

brgen.R

Examples

1
2
	brgen(0.7)
	

amoloudi/R-PKG-Distributions documentation built on May 23, 2019, 7:32 a.m.