Re: Probability Density Function?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 19 Sep 2006 14:40:05 -0600 (MDT)

>My question:
>In NCL, how do you random vectors (gaussian) with Lognormal distribution?
>How can I display a histogram of probability density function?
>I see the commands for cumulative distribution function. Can I create
>a pdf histogram of such data in NCL?
>Any suggestion would be greatly appreciated.

NCL does not have a built-in function to generate
numbers with a log-normal distribution.

If you have the NAG math libraries available
you can use the G05DEF function to generate
a log-normal distribution.

On the other hand ...
lognormal variables are those whose logarithms 
follow normal distributions. 
Seems to me that you could use random_normal
to generate numbers with a normal distribution
  av    = 10.0
  sd    =  3.0
  nor   = random_normal(av, sd, (/100/))  ; nor(1000)
  lognor = exp( nor ) ; lognormal <== exponetial(normal)
plot the lognor using histograms. 
ncl-talk mailing list
Received on Tue Sep 19 2006 - 14:40:05 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 25 2006 - 11:45:06 MDT