- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to plot a normal curve by "Normal Density" function in JSL?
Feb 10, 2009 03:08 PM
(4422 views)
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?
Fred
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?
Fred
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to plot a normal curve by "Normal Density" function in JSL?
Fred,
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" ) )
);
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" ) )
);