Difference between poissrnd and discrete random number (round(rand(1))).
8 views (last 30 days)
Show older comments
I am using Poissrnd(0.5) and round(rand(1)). Both functions gives discrete random numbers only. But if use poissrnd(0.5) program slow down compared to when I use round(rand(1)). It means program with round(rand(1)) is faster than program with poissrnd(0.5). So I want know any difference between these two functions(according functions wise).
0 Comments
Answers (1)
Roger Stafford
on 21 Dec 2013
The two random generators give vastly different results, Murali. The call round(rand) can only give 0 and 1 values which are equally probable, whereas poissrnd(0.5) can give any non-negative integer as a result and these have the characteristic Poisson distribution where the probabilities are certainly not equal. See the Wikipedia site:
http://en.wikipedia.org/wiki/Poisson_distribution
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!