[Date Index] [Thread Index] [Author Index]
RE: mean of geometric and negative binomial distributions
It is a matter of definition. Most sources define the geometric distribution as the waiting time for the occurrence of a binomial event, i.e., the number of trials up to and including the first "success". In this case the expected value is 1/p. However, Mathematica uses the definition "number of trials before the first success", and then the expected value is (1 - p)/p. Here the number of trials is one less than in the former case, and then the expected value is equal to 1/p - 1 = (1 - p)/p. A similar reasoning provides the answer for the negative binomial distribution (which is the distribution of a sum of independent and identically distributed geometric random variables). Tomas Garza Mexico City (temporarily in Barcelona) ---- Gareth Russell wrote: Can anyone tell me why Mathematica returns (1-p)/p for Mean[ GeometricDistribution[p]] and n(1-p)/p for Mean[NegativeBinomialDistribution[ p]], when all sources I have to hand (such as CRC Standard Mathematical Formulae) give these as 1/p and n/p respectively? The variance expressions agree with CRC, it's just the means that are different.