Means of pareto samples ([R] Need help..)

Prof Brian D Ripley ripley at stats.ox.ac.uk
Wed Nov 24 20:36:32 CET 1999


On Wed, 24 Nov 1999, Ajit K Jena wrote:

> I am trying to generate some Pareto random variates
> using the inverse method. This is really straightfoward
> and my R function looks as below :
> 
> pareto <- function(c, a, cnt=1000)
> {
> 	u <- runif(cnt)
> 
> 	x <- (c / ((u ^ (1 / a))))
> 
> 	mean.theo <- ((c * a) / (a - 1))
> 	mean.gen <- mean(x)
> 	cat('Pareto mean : theoritical', mean.theo, 
> 		'generated', mean.gen, '\n') 
> 
> 	return(x)
> }
> 
> I am also giving the outputs below to illustrate my
> point. I understand the point that as 'a' is less
> than 2.0, the variance does not exist. But as 'a'
> approaches 1.0, the mean goes down approximately to
> 1/3 of the theoritical mean. I understand it is
> getting slowly into unstable mean syndrome but I am
> really baffled that it should remain so low consistently.
> 
> Am I missing something here ? Can anyone please suggest
> some better method ? 

You need to be more patient. The mean is dominated by a few 
very large and very rare values, and those values are always 
positive.  The 99.99% point of your example with a=1.1 is about
4.5e6. Consider

> pareto(1000, 1.1, 50000) -> junk
[1] 141980763
Pareto mean : theoritical 11000 generated 10499.47 
> pareto(1000, 1.1, 50000) -> junk
[1] 19794974
Pareto mean : theoritical 11000 generated 6782.521 

where I am printing the maximum values generated. The sample mean is just
extremely variable, with a very long right tail to its distribution too.

What I really mean is that you can't expect to estimate the mean
by simulation. Hopefully what you really want this for is less
sensitive. It is possible that you will see problems with poor
PRNGs in studying extremal behaviour, but I no evidence that is the 
issue here.


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list