BookmarkSubscribeSubscribe to RSS Feed

How to plot a normal curve by "Normal Density" function in JSL?

Hi, I want to plot a nornal curve given a set of data by also pre-define the sigma and mean values.

How to use the function "Normal Density()"?
What's the arguments?

I could not find the details in JMP Help, which seems sucks in looking
some JSL functions.

Anyone can help me out?


The arguments are Normal Density(x, mu, sigma). For example, the code

Normal Density(98, 100, 10)

returns the value 0.039104269.

Just for fun, the code below draws a normal curve with sliders for the mean and sigma. You can modify the code to fit your purposes.

mu = 0;
sigma = 1;

New Window( "Normal Curve",
gdey = Graph Box(
Y Scale( -.05, .5 ),
X Scale( -10, 10 ),
XName( "y" ),
Pen Color( "red" );
Y Function( normal density(y, mu, sigma), y );
H List Box( Slider Box( -5, 5, mu, gdey << reshow ), Text Box( "mu" ) ),
H List Box( Slider Box( 0, 5, sigma, gdey << reshow ), Text Box( "sigma" ) )