How to generate an array of poisson distributed (without any built-in function) 0 and 1 of a known lambda value?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yun-Hui Chen
le 29 Oct 2020
Commenté : Yun-Hui Chen
le 2 Nov 2020
I want an array of 0 and 1 where the occurrences of the event are limited to '1' for a certain time of observation(bin). The values should be Poisson distributed, where I can input the lambda value. How can I code this on MATLAB without use any Poisson's built-in function?
4 commentaires
John D'Errico
le 29 Oct 2020
Modifié(e) : John D'Errico
le 29 Oct 2020
Do you have such a low Poisson rate that you KNOW there will never be anything larger than a 1? If you can never have more than 1 arrival, then it is not a true Poisson. So are you really sure this is a Poisson process? As Jeff points out, you can reduce this to a simple binomial sampling based on your statement. Just decide the rate you want to see.
Réponse acceptée
Ameer Hamza
le 29 Oct 2020
Read about inverse transform sampling() https://en.wikipedia.org/wiki/Inverse_transform_sampling . You will at least need to use rand().
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!