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
http://www.ncl.ucar.edu/Document/Functions/Built-in/random_normal.shtml
  av    = 10.0
  sd    =  3.0
  nor   = random_normal(av, sd, (/100/))  ; nor(1000)
then
  lognor = exp( nor ) ; lognormal <== exponetial(normal)
------
plot the lognor using histograms.
  http://www.ncl.ucar.edu/Applications/histo.shtml 
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
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