The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Simulating number of occurrence Neg Binomial
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Pete sherer

Posts: 81
Registered: 9/4/07
Simulating number of occurrence Neg Binomial
Posted: Apr 25, 2013 10:15 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a question regarding how to simulate the number of random occurrence for tornado outbreak.

Say if I have mean annual occurrence rate of 0.3, I can put that parameter in Poisson and simulate the number of outcome for 100k years.
nSims = 100000;
nOcc=poissrnd(lambda,[nSims, 1]);
sum(nOcc)/nSims % close to input lambda

I read that I can also simulate the random number of occurrence using negative binomial. My question is what R parameter should be. Below I use 1, but clearly the average number is way too large compared to lambda.
nOcc= nbinrnd( 1,lambda, nSims, 1);

ans = 2.3341 % on average we will see 2.3 Tornado per year?

Do I understand it correctly?

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.