Search All of the Math Forum:

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

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

 Search Thread: Advanced Search

 Pete sherer Posts: 81 Registered: 9/4/07
Simulating number of occurrence Neg Binomial
Posted: Apr 25, 2013 10:15 PM
 Plain Text Reply

Hi,
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;
lambda=0.3;
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);
sum(nOcc)/nSims

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

Do I understand it correctly?

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