# Hi all please i need to know how to generate a Poisson distributed number using the built-in function (poissrnd).use this command to generate 5000 numbers and use maxlikelihood estimate for poission distribution to complete its means

6 views (last 30 days)
mubashar ali on 23 Apr 2019
Answered: Joel Van Sickel on 24 Aug 2020
Hi all please i need to know how to generate a Poisson distributed number using the built-in function (poissrnd).use this command to generate 5000 numbers and use maxlikelihood estimate for poission distribution to complete its means

Adam Danz on 23 Apr 2019
That's not how I interpreted part-1 of your problem.
" i need to know how to generate a Poisson distributed number using the built-in function (poissrnd).use this command to generate 5000 numbers "
I suppose you should choose one value for your lambda and create 5000 random poisson numbers based on that single lambda.
lambda = 100;
r = poissrnd(lambda, 1,5000);
histogram(r) %look at the distribution (centered at lambda)
Part-2 of your assigment is to "use maxlikelihood estimate for poission distribution to complete its means"
To achieve that, follow the recommendations by Torsten to read the documentation for poissfit().
mubashar ali on 23 Apr 2019
Thanks sir

Joel Van Sickel on 24 Aug 2020
Adam Danz on 23 Apr 2019
That's not how I interpreted part-1 of your problem.
" i need to know how to generate a Poisson distributed number using the built-in function (poissrnd).use this command to generate 5000 numbers "
I suppose you should choose one value for your lambda and create 5000 random poisson numbers based on that single lambda.
lambda = 100;
r = poissrnd(lambda, 1,5000);
histogram(r) %look at the distribution (centered at lambda)
Part-2 of your assigment is to "use maxlikelihood estimate for poission distribution to complete its means"
To achieve that, follow the recommendations by Torsten to read the documentation for poissfit().