The Lognormal Distribution Function is characterized by 2 parameters which are the Scale and the Shape. This distribution is usually used to model Faulure Times where aging is the most dominant cause of failure. Here is a JMP JSL script that demonstrates how the Lognormal distribution changes as each of these parameters change.
The JMP JSL Script is shown below
Clear Globals();
Shap = 2;
Scal = 4;
PDF_fx = Expr( Exp( -(Log( x ) - Log( Scal )) ^ 2 / (2 * Shap ^ 2) ) / (Shap * x * Sqrt( 2 * Pi() )) );
Log_Window = New Window( "Properties of the LogLogistic Density and Hazard Functions",
V List Box(
GraphWindow = Graph(
FrameSize( 500, 500 ),
Double Buffer,
FrameSize( 500, 300 ),
X Scale( 0, 3 ),
Y Scale( 0, 1 ),
Double Buffer,
A = Scal;
B = Shap;
TEXT_MESSAGE = "; Scale parameter A = " || Char( A ) || "; Shape parameter B = " || Char( B );
NON_EXPO2 = Expr( Caption( TEXT_MESSAGE ) );
Pen Size( 2 );
Pen Color( "red" );
Text Color( "red" );
Text Size( 12 );
Text( {1, .7}, "LogNormal Probability Distribution Function" );
Y Function( PDF_fx, x );
),
H List Box(
V List Box(
H List Box( TB1 = Text Box( " Scale Parameter A" ), Text Box( " " ) ),
Slider Box(
0.0001,
20,
Scal,
GraphWindow << reshow;
Log_Window << reshow;
A = Scal;
B = Shap;
TEXT_MESSAGE = "; Scale parameter A = " || Char( A ) || "; Shape parameter B = " || Char( B );
NON_EXPO2;
)
),
V List Box(
H List Box( TB2 = Text Box( " Shape Parameter B" ), Text Box( " " ) ),
Slider Box(
0.0001,
10,
Shap,
GraphWindow << reshow;
A = Scal;
B = Shap;
TEXT_MESSAGE = "; Scale parameter A = " || Char( A ) || "; Shape parameter B = " || Char( B );
NON_EXPO2;
)
)
)
)
);
TB1 << Font color( "BLUE" );
TB1 << set Font size( 10 );
TB2 << Font color( "BLUE" );
TB2 << set Font size( 10 );

No comments:
Post a Comment