difference between bernoulli and binomial random variables

3 visualizaciones (últimos 30 días)
Josh
Josh el 11 de Jul. de 2014
Editada: John D'Errico el 11 de Jul. de 2014
I'm try to generate both Bernoulli and binomial random variables; for binomial distribution, I can use binornd(N,P). What is the equivalent for Bernoulli random variable distribution?

Respuestas (2)

Shashank Prasanna
Shashank Prasanna el 11 de Jul. de 2014
The Bernoulli distribution is a special case of the binomial distribution, with the number of trials n = 1.
https://en.wikipedia.org/wiki/Bernoulli_distribution

John D'Errico
John D'Errico el 11 de Jul. de 2014
Editada: John D'Errico el 11 de Jul. de 2014
binornd
Yeah. The same thing. Just use n=1, and you get a Bernoulli random variable.
Think about it. What is a binomial random variable ? Back to probability 101.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by