Wednesday, October 14, 2009

Reliability and Reliability Engineering (Supplemental2)

This is another supplementary material for the entry Reliability Part1. In another entry I provided a JMP JSL script that demostrates the properties of a Weibull Distribution. In this entry I will provide a JMP JSL script that shows the properties of the Lognormal Distribution.
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 );

Friday, September 11, 2009

Capability Analysis in JMP

I received a note asking how to do a capability analysis in JMP 8. Actually nothing much have changed in how to do it. There are additional features which are really helpful but the basic steps on computing Cp, Cpk, Pp, and Ppk are basically shared by versions JMP 5, JMP 6, JMP 7, and JMP 8. Here are the detailed steps. I will be using JMP 8's sample data 'Semiconductor Capability.jmp'.

Capability Analysis in JMP

Method1
Step1: Data Requirements
Data should be in one column and data type set as continuous.
Step2: Go to Univariate Platform
Create a histogram of your measurement data as shown below.
Step3: Click on the second hot button
It is the red triangle as shown below. On the drop down menu, select 'Capability Analysis'
Step4: Specification Limits
On the resulting dialog box, fill up the necessary information regarding the specification limits and target values. In this case they are 104.41295,118.15322, and 131.89349. For Pp and Ppk, check on the tick box 'Long Term Sigma'. For Cp and Cpk, select either on the tick box 'Moving Range...' and specify the range span, or on the tick box 'Short Term Sigma...'. Note that whichever you choose JMP would use the terms Cp and Cpk in its output. It would specify in the title box of the output though the Sigma your analysis is referring to.
Step5: Capability Analysis Output
After pressing 'OK', JMP will give you this output.

Method2:
Step1: Data Requirements
Same as above
Step2: Set up the column that contains your data
Right click on the column header to see the following menu. Select 'Column Info'.
Step3: Column Properties
On the drop down menu 'Column Properties', select 'Spec Limits'.
Step4:Specification Limits
Fill up the necessary information regarding the specification limits and target values. In this case they are 104.41295,118.15322, and 131.89349, and then click 'OK'. Notice on the left side of your data table, and asterisk (*) sign is placed beside the column name where you just set up the specification limits.
Step5: Go to Univariate Platform
Create a histogram of your measurement data as shown below. Capability Analysis using Long Term Sigma is included by default.

Additional Features:
One of the reasons why I favor JMP over Minitab is its animated graphics. In JMP 8, Capability Analysis includes a feature called 'Capability Animation. To use this, click on the hot button as shown below.
The output window is like the one shown below.You can change the sigma to see its impact on the capability measures. For a JMP script like this where you can change the mean as well, refer to this entry or this entry.

Thursday, September 10, 2009

Analysis of Means (ANOM) in JMP

This is in response to the query sent to me regarding on how to do an Analysis of Means in JMP. For those who are not familiar with this method, you can refer to this SAS link regarding the definition and history of the Analysis of Means, and to this presentation for the technical details. With regards to how to do Analysis of Means in Minitab, refer to this video.

How to do Analysis of Means (ANOM) in JMP

From the 2005 Winter issue of JMPer cable (issue 16) it says that "ANOM is not a standard procedure in JMP. However, scripts generate ANOM decision charts for comparing means with either equal or unequal sample sizes.You can download these scripts at http://www.jmp.com/news/jmpercable. The script for equal sample sizes is named ANOMB.jsl and the script for unequal sample sizes is named ANOMUB.jsl."

The JMP JSL Scripts

Here are the JMP scripts that are downloadable from SAS JMP's website.
JMP's Analysis of Means for Equal Sample Sizes
Clear Globals();
R = Column Dialog(
 Resp = Col List( "Y, Response",
  Data Type( Numeric ),
  Min Col( 1 ),
  Max Col( 1 )
 ),
 Treat = Col List( "X, Treatment",
  Min Col( 1 ),
  Max Col( 1 )
 ),
 V List(
  "Alpha",
  SL = Radio Buttons( "0.1", "0.05", "0.01", "0.001" )
 )
);

If( r["Button"] == -1, Throw( "User cancelled" ) );

TN = Column( R["Treat"] );
RN = Column( R["Resp"] );
SigLevel = R["SL"];

alpha = {0.1, 0.05, 0.01, 0.001};

Summarize(
 a = By( TN ),
 c = Count,
 mean Response = Mean( RN ),
 stdev Response = Std Dev( RN )
);
Ymin = Min( mean Response );
Ymax = Max( mean Response );

k = N Items( a );
K1 = Log( k );
K2 = Log( k-2 );
a1 = a[1];

tc = Sum(c);
MSEnum=summation(i=1, k, (stdev Response[i]^2));
nu = tc - k;
MSE = MSEnum / k;

Insert Into( a, "Total" );
c|/= tc;
mean Response |/= (tmeanY = Col Mean( RN ));
stdev Response |/= Col Std Dev( RN );
 
Include( "Exact Factors for ANOM.JSL" );

Show(SigLevel);
Show(alpha);
PMP = h(SigLevel, k, nu) * Sqrt( MSE ) * Sqrt( (k-1) / tc );

UDL = tmeanY + PMP;
LDL = tmeanY - PMP;

cc = Control Chart(
 Sample Size( TN ),
 KSigma(3),
 Chart Col( RN,
  XBar(
   Needle(1),
   Connect Points(0),
   Show Control Limits(0)
  )
 )
);

ccr = cc << Report;

ccr[TextBox(3)] <<Delete;

ccr[AxisBox(2)] << Max( k+1 );

ccr[FrameBox(1)] << Add Graphics Script(
 Pen Color( 3 );
 H Line( LDL );
 H Line( UDL );
);

ccr[OutlineBox(2)] << Prepend(
 tb = Text Box( "alpha = " || Char( alpha[SigLevel] ) )
);

ccr[OutlineBox(2)] << Prepend(
 tb2 = Text Box( "LDL = " || Char( Round(LDL, 2) )  )
);


ccr[OutlineBox(2)] << Prepend(
 tb3 = Text Box( "UDL = " || Char( Round(UDL, 2) )  )
);

updateChart = Expr(
 PMP = h(SigLevel, k, nu) * Sqrt( MSE ) * Sqrt( (k-1) / tc );
 UDL = tmeanY + PMP;
 LDL = tmeanY - PMP;
 ccr[PictureBox(1)] << Reshow;
 tb << Set Text( "alpha = " || Char( alpha[SigLevel] ) );
 tb2 << Set Text( "LDL = " || Char( Round(LDL, 2) )  );
 tb3 << Set TExt( "UDL = " || Char( Round(UDL, 2) )  );
);

ccr << Append(
 OutlineBox( "Analysis of Means",
  H List Box(
   Button Box( "alpha = 0.1",
    SigLevel = 1;
    updateChart;
   ),
   Button Box( "alpha = 0.05",
    SigLevel = 2;
    updateChart;
   ),
   Button Box( "alpha = 0.01",
    SigLevel = 3;
    updateChart;
   ),
   Button Box( "alpha = 0.001",
    SigLevel = 4;
    updateChart;
   )
  ),
  Outline Box( "Means/Standard Deviations",
   Table Box(
    String Col Box( "Treatment", a ),
    Number Col Box( "Count", c ),
    Number Col Box( "Mean", mean Response ),
    Number Col Box( "Std Dev", stdev Response )
   )
  )
 )
);

JMP's Analysis of Means for Un-Equal Sample Sizes
Clear Globals();

R = Column Dialog(
 Resp = Col List( "Y, Response",
  Data Type( Numeric ),
  Min Col( 1 ),
  Max Col( 1 )
 ),
 Treat = Col List( "X, Treatment",
  Min Col( 1 ),
  Max Col( 1 )
 ),
 V List(
  "Alpha",
  SL = Radio Buttons( "0.1", "0.05", "0.01", "0.001" )
 )
);

If( r["Button"] == -1, Throw( "User cancelled" ) );

TN = Column( R["Treat"] );
RN = Column( R["Resp"] );
SigLevel = R["SL"];

alpha = {0.1, 0.05, 0.01, 0.001};

Summarize(
 a = By( TN ),
 c = Count,
 mean Response = Mean( RN ),
 stdev Response = Std Dev( RN )
);
Ymin = Min( mean Response );
Ymax = Max( mean Response );

k = N Items( a );
K1 = Log( k );
K2 = Log( k-2 );
a1 = a[1];

tc = Sum(c);
MSEnum = Summation( i=1, k, ((c[i]-1)*stdev Response[i]^2) );
nu = tc - k;
MSE = MSEnum / nu;

Insert Into( a, "Total" );
c |/= tc;
mean Response |/= (tmeanY = Col Mean( RN ));
stdev Response |/= Col Std Dev( RN );
 
Include( "Exact Factors for ANOMUB.JSL" );

Show( SigLevel );
Show( alpha );

PMP = {};

UDL = {};
LDL = {};

For( i=1, i<k+1, i++, Insert Into( PMP, m(SigLevel, k, nu) * Sqrt(MSE)*Sqrt((tc - c[i])/(tc*c[i]))));
For( i=1, i<k+1, i++, Insert Into( UDL, tmeanY + PMP[i]));
For( i=1, i<k+1, i++, Insert Into( LDL, tmeanY - PMP[i]));

cc = Control Chart(
 Sample Size( TN ),
 KSigma(3),
 Chart Col( RN,
  XBar(
   Needle(1),
   Connect Points(0),
   Show Control Limits(0)
  )
 )
);

ccr = cc << Report;

ccr[TextBox(3)] << Delete;

ccr[AxisBox(2)] << Max( k+1 );

For( i=1, i<k+1, i++,
 Eval(
  Substitute(
   Expr(
    ccr[FrameBox(1)] << Add Graphics Script(
     Pen Color( 3 );
     H Line( sss, eee, LDL[iii] );
     H Line( sss, eee, UDL[iii] );
    );
   ),
   Expr( sss ),
   i - 0.5,
   Expr( eee ),
   i + 0.5,
   Expr( iii ),
   i
  )
 );
);

ccr[OutlineBox(2)] << Prepend(
 tb = Text Box( "alpha = " || Char( alpha[SigLevel] ) )
);

ccr[OutlineBox(2)] << Prepend(
 tb2 = Text Box( "LDL = " || Char( Round(LDL, 2) )  )
);


ccr[OutlineBox(2)] << Prepend(
 tb3 = Text Box( "UDL = " || Char( Round(UDL, 2) )  )
);

updateChart = Expr(
 For(i=1, i<k+1, i++, PMP[i]=m(SigLevel, k, nu)* Sqrt(MSE)*Sqrt((tc - c[i])/(tc*c[i])));
 For(i=1, i<k+1, i++, UDL[i]= tmeanY + PMP[i]);
 For(i=1, i<k+1, i++, LDL[i] = tmeanY - PMP[i]);

 ccr[PictureBox(1)] <!<! Reshow;
 tb << Set Text( "alpha = " || Char( alpha[SigLevel] ) );
 tb2 << Set Text( "LDL = " || Char( Round(LDL, 2) )  );
 tb3 << Set TExt( "UDL = " || Char( Round(UDL, 2) )  );
);

ccr << Append(
 OutlineBox( "Analysis of Means",
  H List Box(
   Button Box( "alpha = 0.1",
    SigLevel = 1;
    updateChart;
   ),
   Button Box( "alpha = 0.05",
    SigLevel = 2;
    updateChart;
   ),
   Button Box( "alpha = 0.01",
    SigLevel = 3;
    updateChart;
   ),
   Button Box( "alpha = 0.001",
    SigLevel = 4;
    updateChart;
   )
  ),
  Outline Box( "Means/Standard Deviations",
   Table Box(
    String Col Box( "Treatment", a ),
    Number Col Box( "Count", c ),
    Number Col Box( "Mean", mean Response ),
    Number Col Box( "Std Dev", stdev Response )
   )
  )
 )
);

Wednesday, September 9, 2009

How to do Bartlett's Test and Levene's Test in JMP

Lately I have been receiving many queries regarding this topic. So here you go, the detailed steps on how to do variation comparison in JMP using Bartlett's Test and/or Levene's Test. Before you proceed though make sure to read my previous article regarding my experience with JMP's Levene's Testhere.


Step by Step of How to do Bartlett's Test and Levene's Test in JMP
Step1: Prepare your dataset like this
Note: Data is borrowed from JMP's sample dataset Baseball.jmp. Make sure your grouping is in one column (in this case the "Player") and your dataset is stacked (in this case the "Batting") like shown below.Notice that the grouping column is either an ordinal or nominal data while the measurement data is set as continous.
Step2: Go to the Two-way flatform
You will see the interface as shown below. Put your data into the "Y, Response",and the grouping variable into the "X, Factor".
Step3: Click on OK and you will see the following output
Step4: Test for Un-equal Variance
Conduct a Test for Un-equal varaince by selecting the option from the hot button. This is the red triangle as shown below:
Step5: You will see this output
Scroll down and you will see both Bartlett's Test and Levene's Test.
Other results like O'Brien and Brown-Forsythe are included as well.


Tuesday, September 8, 2009

Reliability and Reliability Engineering (Supplemental)

This is a supplementary material for the entry Reliability Part1. A bulk of reliability concepts revolves around the discussion of the Weibull Distribution and its associated Hazard Function.
The Weibull Distribution Function is characterized by 3 parameters namely Beta (for the shape), Eta (for the scale), and Gamma (for the location). Here is a JMP JSL script that demonstrates how the Weibull distribution changes as each of these parameters change. The output window is shown below:



The JMP JSL Script is shown below::



Beta_value = 1.5;
Eta_value = 2.0;
Gamma_value = 0;


EXPO = Expr(
MESSAGEBOX = New Window( "NOTICE:",
Border Box(
top( 10 ),
Left( 10 ),
Panel Box( "Read:",
Text Box( "If the value of the shape parameter Beta = 1, the Weibull becomes an Exponential Distribution" )
)
)
);
Wait( 2 );
MESSAGEBOX << CLOSE WINDOW;
);

TEXT_MESSAGE = "Shape parameter Beta = " || char(Beta_value) ||"; Scale parameter Eta = " || char(Eta_value) || "; Location parameter Gamma = " || char(Gamma_value);

NON_EXPO1 = Expr(Caption( "If the value of the shape parameter Beta = 1, the Weibull becomes an Exponential Distribution. " ));
NON_EXPO2 = Expr(Caption(TEXT_MESSAGE));

Weibull_Window = New Window( "Properties of the Weibull Density and Hazard Functions",
V List Box(
GraphWindow = Graph(
FrameSize(500,500),
Double Buffer,
FrameSize( 500, 300 ),
X Scale( 0, 3 ),
Y Scale( 0, 4 ),
Double Buffer,
Y Function( (Beta_value / x) * (x / eta_value) ^ Beta_value * Exp( -(x / eta_value) ^ Beta_value ), x ); /* density */
Y Function( (Beta_value / x) * (x / eta_value) ^ Beta_value, x ); /* hazard */
Pen Size( 2 );
Pen Color( "red" );
Text Color ("red");
Text Size(12);
text({1,.7},"Weibull Probability Distribution Function",);
Y Function(
(Beta_value / Eta_value) * ((x - gamma_value) / eta_value) ^ (Beta_value - 1) *
Exp( -1 * ((x - gamma_value) / eta_value) ^ Beta_value ),
x
);
Pen Color( "Blue" );
Text Color ("Blue");
Text Size(12);
text({0.8,1.2},"Hazard Function",);
Y Function( (Beta_value / Eta_value) * ((x - gamma_value) / eta_value) ^ (Beta_value - 1), x );
),
H List Box(
V List Box(
H List Box( TB1=Text Box("Shape Parameter Beta"), Text Box(" ") ),
Slider Box(
0,
10,
Beta_value,
TEXT_MESSAGE = "Shape parameter Beta = " || char(Beta_value) ||"; Scale parameter Eta = " || char(Eta_value) || "; Location parameter Gamma = " || char(Gamma_value);
GraphWindow << reshow;
Weibull_Window<<reshow;
If( BETA_value == 1,
NON_EXPO1,
NON_EXPO2
);
)
),
V List Box(
H List Box( TB2=Text Box( " Scale Parameter Eta" ), Text Box(" ") ),
Slider Box(
0,
10,
Eta_value,
TEXT_MESSAGE = "Shape parameter Beta = " || char(Beta_value) ||"; Scale parameter Eta = " || char(Eta_value) || "; Location parameter Gamma = " || char(Gamma_value);
GraphWindow << reshow;NON_EXPO2;
)
),
V List Box(
H List Box( TB3=Text Box( " Location Parameter Gamma" ), Text Box(" ") ),
Slider Box(
0,
10,
Gamma_value,
TEXT_MESSAGE = "Shape parameter Beta = " || char(Beta_value) ||"; Scale parameter Eta = " || char(Eta_value) || "; Location parameter Gamma = " || char(Gamma_value);
GraphWindow << reshow;NON_EXPO2;
)
)
)

)
);



TB1 << Font color( "BLUE" );
TB1 << set Font size( 10 );
TB2 << Font color( "BLUE" );
TB2 << set Font size( 10 );
TB3 << Font color( "BLUE" );
TB3 << set Font size( 10 );








Friday, September 4, 2009

Reliability and Reliability Engineering (Part 1)

From my previous entry 8 Dimensions of Quality I noted the Dr. David A. Garvin identified Reliability as one of the keys strategic objectives that quality practitioners can focus on. In this series I would discuss more the details of Reliability Management and Reliability Engineering. I will depend heavily on two great books, the “Quality Engineering Handbook” by Thomas Pyzdek (second edition, 2003 by Marcel Dekker, Inc), and of course “Juran’s Quality Handbook” by Joseph Juran and Blanton Godfrey (fifth edition, 1999 by McGraw-Hill). I will incorporate as well some examples on how to execute Reliability Analysis in JMP. I am using JMP 7.0.1 for this and will use its documentation as a reference.


Definition of Reliability


In the entry 8 Dimensions of Quality I differentiated quality and reliability by an analogy. If quality is a snapshot of the goodness of a product at a certain point in time, reliability is the consistency of that level of quality as time goes on. Thus, if quality is a photograph, reliability is a video. For a formal definition however, we will quote from Pyzdek’s book:
“…reliability is defined as the probability that a product or system will perform a specified function for a specified time without failure.”
In addition Pyzdek also cautions that for a reliability figure to be meaningful it has to be defined within the context of specific operating conditions. You do not expect a laptop to work in the same level of quality when it is submerged in water as when it is used in a room environment. For that exact reason, warranty is limited to a pre-defined correct way of using a product. In the same manner warranty claims are first examined if valid by comparing the condition in which it failed against the conditions stipulated in the warranty.


Key Measures of Reliability


The following is a list of the common measures of reliability.
  • Mean Time to Fail (MTTF) or Mean Time to First Failure (MTFF) – This applies to products (or systems in general) that can not be repaired once it fails or break-down. When buying a light bulb for example, we assess how long it will take before it finally breaks down. The longer the time before it finally fails, the better we say that light bulb is.
  • Mean Time between Failures (MTBF) – This applies to products (or systems in general) that breaks down but can be repaired and return to use. MTBF is defined as the average exposure a product will take until it will fail again. This exposure value may take a unit of time or count of usage. Within the context of the unit used, the higher the value of MTBF, the better the reliability is. Thus a machine that broke down 20 days after the repair is better than the one that took only half a day. In the same way, an oven that has to be re-calibrated by a thermocouple every 20 uses is much worse than an oven that needs only recalibration every after 500 uses. Both MTBF and MTTF can satisfactory be modelled by an Exponential distribution or by its generalized form, the Weibull distribution
  • Failure Rate – This is the value of 1/MTBF. It is defined as the number of failures per unit of exposure. From the example above an MTBF of 20 days means failure rate of 1 machine per 20 days or 0.05 failures per day. Failure rate is important as it is often can be modelled by a Poisson distribution which facilitates ease of analysis.
  • Mean Time to Repair (MTTR) – This measures the amount of time the product or tool or system in general is down. It is defined as the elapsed time between occurrence of failure and re-endorsement for use. Because of this definition MTTR is only applicable for repairable entities.
  • Availability – This is defined as the proportion of time a product, or tool, or system in general is in a usable or operable state. Thus it is the ratio of time it is not under repair, to the total available time. Thus, Availability = MTBF/ (MTBF+MTTR).


The Life Cycle Model


Most failures of a product occurs either at the early stage (in cases there is an issue in the manufacturing process), or at the late stage where wear, tear, and degradation begins to take effect. This concept is called the System Life Cycle usually modelled by what is known as the Bathtub Curve. A typical Bathtub curve is shown below.



The Bathtub Curve above is produced by a Beta Distribution. In practice though, the infant stage is modelled by a Weibull distribution. That is, we can see the Bathtub Curve as an overlap of Weibull Distributions one of which is for the Infant Stage as shown below:





..to be continued

Wednesday, September 2, 2009

BASIC SPC CONCEPTS: Definition of Quality Part 2

...continuation from previous post

----------------------------

The 8 Dimensions of Quality



In his Harvard Review article, Harvard professor David A. Garvin developed a framework in which he categorized different aspects of quality. He identified eight categories of which he called the 8 Dimensions of Quality. These are Performance, Features, Reliability, Conformance, Durability, Serviceability, Aesthetics, and Perceived Quality. By itself this framework is enough to serve as a guide in developing a quality-focused strategic objectives.

The 8 Dimensions of Quality are as follows:

Performance
Performance refers to the primary reasons why the product or serviced is bought or sought. It is the main measures of a product’s edge against its competitions. For your computer’s Hard Disk Drive for example, performance would be characterized by Memory Capacity, Data Seek Time, and Power consumption. This dimension of quality can be measured and compared from brand to brand. This allows companies to benchmark the performance of their products against competitors and the consumers to objectively rank brands based on individual aspects of performance. This can also be done in the service oriented industries. A heart surgeon’s success rate for example can be compared against other surgeons. Overall performance rankings, however, are more difficult to develop for some cases of services, especially when they involve customer’s judgement and preferences. Haircut’s goodness for example is difficult to compare from barber to barber since it depends on each individual customer’s point of view.

Features
Features are the additional surprises or offers that a product or service has in addition to its performance characteristics. They are usually secondary aspects next to performance, and may not be necessary but provide convenience supplements to the basic functions or services. A regular cell phone for example provides features like clocks, stop watches, and reminder alarms. Cell phones are not mainly bought due to its clocks, but users tend to attracted to cell phones that provides more additional functions and offers more convenience to the users. It is not always easy to separate primary performance functions from secondary convenient features as it is often dependent on the consumer’s needs and wants. A rule of thumb however is that performance involve objective, measurable attributes and being a must, it can be compared from brand to brand or from provider to provider. Features on the other hand can be subjective and not necessarily present for all brands or service providers. Aside from this individual needs and wants can bias a perception on products’ features giving prejudices in how a product is viewed as something of quality.
A note is in order here. A product can derive considerable success in market share by driving its features as a norm and translating a wanted feature into a needed performance measure.

Reliability
Quality is a snapshot. It is the goodness or fitness of use at this present point of time. Reliability however is about maintaining this level of quality for a sustained period of time. Reliability is the assurance that quality will be the same throughout the promised span of time. This period is usually called the warranty period. The Reliability dimension reflects this chance of a product malfunctioning or failing within this warranty period. These are commonly measured in terms of Mean Time to Failure (MTTF), Mean Time between Failures (MTBF), and Failure Rate per Unit Time (lambda, or failure rate). Note that these measures imply that a product is to be in use for a span of time, making it undefined for services or products that are consumed instantaneously. For example, when buying a decaf from a coffee shop, coffee’s reliability may not make any sense. Insurance and other pre-need services do have a reliability dimension though, even if they are services and not products. The key factor is time. If a product or service is to be extended or to be used for a sustained period of time, reliability is a relevant dimension of quality.

Conformance
Conformance is how much the product or service agrees to the expectations. These expectations are usually laid-out through the specifications or a well-accepted standard. This dimension can be measured in either defect rates or customer complaints. It should be emphasized that conformance cut both ways. A product or service should not be below expectation or above expectations. It should be just within the standard. The reason for this is that the best is for sure to be made by the customers or consumers as the baseline for comparison. If one product is above expectation, it will not be viewed as such. Customers will see it as all others are below the norm.

Durability
If Reliability is the assurance that quality will be the same throughout the promised span of time, Durability is the measure of the length of that promised span of time. It is the measure of product life. It can be defined as how much or how long the product can be of use before it needs replacement. A battery’s durability for example can be measured by its service time when used continuously. A punching bag’s durability meanwhile can be measured by the amount of hits and kicks it can take before deteriorating.

Serviceability
Serviceability is about the repair after the product breaks down. It is usually labelled as Customer Support of Product Support. It is how easy or fast the repair can be done, or in the case of a service given it is the courtesy given to the customer. For products or services that re not used or consumed instantaneously, customers usually accepts that it is a given that product will break down or a service will fail. In such cases, concerns about the time before service is restored or how fast a product can be mend arises. As an example I do pay for an internet connection from an Internet Service Provider (ISP). Sometimes the service breaks down and in such cases how the service personnel deals with my calls, how fast can the service be restored, and how effective their corrective actions are do matter to me as a consumer. And as such it greatly affects my decision on either retain my provider’s services or evaluate the possibility of having another provider.

Aesthetics
Aesthetics is the looks of the product or the feel of the service. It is more than the physical look, feel, sounds, taste, or smell however but more on how it is perceived as good by the customer, how the people around the customer see it as good and desirable. Much like the features it depends heavily on personal biases and preferences. As such, this dimension of quality is very difficult to measure. It provides a guide however on which target market to make a niche. For example a gold watch may look good for a top executive, but is a no for an adventurous athlete.

Perceived Quality
Perceived Quality is psychological rather than physical. It is how potential customers or consumers rate the product as good even without experiencing it. It can be of course influenced by exposure or aggressive marketing strategies. The heaviest influence though is reputation based on historical performance. No advertising can amount to the same impact as one catastrophic field failure. In the same manner, no advertising is more credible than a friend’s personal testimony. In cases when potential customers have not experienced the product or the service yet, then connotations of the brand name, its reputations and images, can influence inferences about its perceived quality. This is important because it can be a driving factor in impulsive buying, and can draw the line between being a commodity and a branded product or service.

Friday, August 28, 2009

BASIC SPC CONCEPTS: Definition of Quality

“The further we can look back, the better we see what is ahead.” --Adapted from W.E Deming.


Introduction


In my past entries, I jumped in immediately in posting JMP scripts that are useful for SPC practitioners. I have not spent much time though in introducing, defining, and explaining what SPC is. Allow me to back step this time. In this entry I would take time to look at the basic concepts in detail, and there is no better jumping board than the Definition of Quality.

Definition of Quality


About 8 years ago I was already visualizing myself pursuing a career in Quality Management. I was daydreaming of solving very complex problems, deploying quality management systems, initiating customer-focused activities, and all other things that could convince even the hardest person that I am the God’s gift to the Quality Community. But then my professor in Statistical Process Control course came in our classroom and threw a question to start a discussion. After a long pause made by waiting for someone to answer, the professor looked at me and asked, “How about you Rey, how would you define Quality? What is Quality for you?” I was dumbfounded of course. Not only because I know I can not give a satisfactory answer, but more of the realization that I was dreaming big while not even knowing what it is I was dreaming about. How could I manage Quality if I can not even define what Quality is in the first place? Well I gave the professor a reply, “Quality is consistently exceeding the expectations”, but after that my mind wandered-off for the rest of the class. I have learned that very moment that I do not know enough. Actually I learned that I really do not know a thing about Quality, and that lesson is enough for me for one day.
After that incident I decided to do some personal research. Here is what I recall of what I came up with.

“Quality is Fitness of Use” – Joseph M. Juran
Joseph Juran is the chief editor of The Quality Handbook (1999) and is the person behind the Pareto Concept (Vital Few, Trivial Many). Juran defines quality as fitness of use. According to him, quality is the freedom from deficiencies. Quality from his point of view therefore costs less, since this implies fewer defects and less scrap rates. It also means gain in productivity brought about by decreasing reworks, and increase in customer satisfaction made by products or services that are free from flaws.

“Quality is Conformance to Requirements” – Philip B. Crosby
Philip Crosby is credited for popularizing the concepts Zero Defect and Quality is Free. According to Crosby quality is the conformance to the requirements, and therefore does not cost any. What adds cost is not doing it right the first time. This additional cost he termed as the Cost of Poor Quality. Crosby shares with Juran the concept that quality actually costs less. They differ however on the perspective of how the end product is used. For Juran, it is the customer who ultimately decides if the end product or service is of quality. For Crosby however, it is the conformance to the specifications or written procedures that defines the quality. The question of whether that specification is “fit for use” is irrelevant. As long as the requirement is met, quality is present.
An important note must be made at this point. A Quality Practitioner should be able to distinguish between Juran's and Crosby’s concepts. It should be clear that they are referring to two different aspects of quality. One is the Quality of Design, while the other is the Quality of Conformance. A product may have been able to meet the design requirements but if the design itself is poor the product may end up as unfit for use. On the other hand it is also possible to have a superb design, but when an end product can not conform to its specifications quality is not present either.


“Quality is How the Customers Define it” – W. Edwards Deming
Edwards Deming is the person behind the well known Plan-Do-Check-Act Cycle. His advocacy on Quality is that only the customers can define it, and it typically changes from time to time. Focus therefore should be on understanding the customer, translating their needs and wants into measurable quality characteristics, and continuously reducing product variations in terms of these characteristics. For Deming, quality increases as the variation decreases. From this perspective, Quality does not necessarily mean less cost. Since quality from this definition may mean meeting customer wants, improving process performances, and tightening of tolerances, then quality may actually cost more.

“Quality has 8 Dimensions” – David A. Garvin
David Garvin is a Harvard Professor famous for his development of the 8 Dimensions of Quality concept. According to Garvin quality is multi-faceted and has 8 faces. These are the following:
1. Performance
2. Features
3. Reliability
4. Conformance
5. Durability
6. Serviceability
7. Aesthetics
8. Perceived Quality


--to be continued…

Tuesday, August 18, 2009

Minitab's Levene's Test vs JMP's Levene's Test

I once used Levene's test in JMP and found that the results are obviously counter-intuitive to my understanding of the data im testing. Being a logical person and a practitioner of applied statistics, I refuse to accept the results in its face value without understanding first why it contradicts my personal understanding of the statistical problem. So the first thing I did was to try to replicate JMP's Levene's test result using another statistical software. As i have an immediate access only to Minitab that time, I used Minitab 15. And guess what? The conclusion disagrees with JMP!
Minitab agreed with my intuition, but that does not mean we are correct and JMP is wrong. It could be the other way around. Now I have no choice but to examine the internal formula and algoritms used by the softwares. Good thing is that both of them have superb documentations. That is where i found their differences. But before I tell you about the details of what I found, it is necessary that I give you enough background of the Levene's Test.

The Levene's Test of Homogeniety of Variances

To test whether a sample variance is equal to some hypothesized value, we use the Chi-square test for variance. If there are two sample variances we wish to compare, we use the F-test for two variances. If more than two samples are involved and we want to simultaneously check the homogeneity of their variances, we use Bartlett's Test.

These tests however are very sensitive in the assumption that the sample data being examined are coming from a population that are normally distributed. By sensitive we mean that if the data are not from a normal population, the test would give inaccurate results. The alpha, or probability of False Negatives (you conclude as no difference but in reality there is), would be much higher than what we expect it to be. It is in this backdrop that the Levene's test comes in.
So what do we do when the data are not from a normal distribution? We do a trade off. We do a more generalized test which is applicable for other distributions, but in return we lose power. By power we mean the ability to detect differences. A more powerful test means that it can discern even slight differences,and give the conclusion that there is a difference if it sees one. A less powerful test means that it is more conservative in saying that there is no difference between the samples.
The tests Chi-square, F-test,and Bartlett's test are very powerful, but only for normally distributed data. That is why given the choice,and your data is tested to be normally distributed, these tests should be the first choice. However when the data is not from a normal distribution, we should use Levene's test. Levene's test is one of the non-parametric tests available to statisticians. Non-parametric test means it does not assume a distribution for it to be usable.
Now originally there is only one Levene's test. It is a formula for a test statistic where it uses an averaging of the data. Later on it evolved into 2 more forms. One uses the median, and the other one uses the trimmed mean. So currently there are 3 Levene's test. There is a fourth variation that is being used by JMP. It uses the mean, but in addition, instead of using the classical squared (Xi-Xmean), it uses the absolute value of the (Xi-Xmean) in its computation of the data spread. For the details of the formula, you may refer to this link while the fourth method is described in JMP's Statistics documentation.

Minitab vs JMP

We alredy described JMP's Levene's test method. JMP uses the mean and absolute value of (Xi-Xmean). Minitab on the other hand uses the median and the square of the (Xi-Xmean). So which is correct? You may have guessed this right. The answer is both of them are correct. (of course! or else they would be severely criticized). But mind also that both of them can also be wrong. The 3 variants of the Levene's test (where in JMP's fourth method can be classified as being the same as the first method) are applicable for different situations. I will quoute NIST here, from the URL provided above:

"The three choices for defining Zij determine the robustness and power of Levene's test. By robustness, we mean the ability of the test to not falsely detect unequal variances when the underlying data are not normally distributed and the variables are in fact equal. By power, we mean the ability of the test to detect unequal variances when the variances are in fact unequal.

Levene's original paper only proposed using the mean. Brown and Forsythe (1974)) extended Levene's test to use either the median or the trimmed mean in addition to the mean. They performed Monte Carlo studies that indicated that using the trimmed mean performed best when the underlying data followed a Cauchy distribution (i.e., heavy-tailed) and the median performed best when the underlying data followed a (i.e., skewed) distribution. Using the mean provided the best power for symmetric, moderate-tailed, distributions.

Although the optimal choice depends on the underlying distribution, the definition based on the median is recommended as the choice that provides good robustness against many types of non-normal data while retaining good power. If you have knowledge of the underlying distribution of the data, this may indicate using one of the other choices. "

Going Back to my Problem

So what is correct conclusion for my case? Since I am testing the variance of samples coming from a Poisson distribution which has a heavy tail on the right, Minitab's method is the one correct for me. So in the end, my intuition was proven to be correct. But the lesson learned in here is not about intuition. It is about making sense of the data, and verifying the conclusion against reality. A novice would always be excited to plug data into a statistical software, click on some buttons, copy some charts and values,and then paste it into his/her presentation. An expert does the thinking first. Then uses the tools to quantify uncertainties. In the end it is he/she that does the thinking, and not the software that is run on the machine.

Monday, August 10, 2009

Visualizing Sigma: A JMP JSL Demostration (reposted from http://elsmar.com/Forums/blog.php?b=135)

This is a repost from: http://elsmar.com/Forums/blog.php?b=135
Hope it would help someone out there.

In the elmar's cove forum, i have written this note:




This is again for the JMP users out there.

Lately I have been noticing that whenever I am conducting trainings, it helps when the participants have a way to visualize the concepts that are being presented to them. In a recent example I was asked what is the basis of the value 6 in the Pp formula (USL-LSL)/(6*StdDev). Here is JMP JSL script that illustrates the logic behind the value 6.

A sample window is shown below. It is interactive. After showing this, you may then explain that the sigma is equivalent to distance from the center to the point of inflection on a normal curve,and you can fit about 6 of this length from one end of the curve to the other end. The output window is like this:

Note: You can freely use and share this script. I would be grateful though if you would give credit to me and point to this forum as the source.

Regards,
Reynald Francisco





The JMP output window is shown below:







The JMP JSL Scripth5>



Clear Globals();







/*Define constants*/

rsqrt2pi = 1 / Sqrt( 2 * Pi() );

e = e();

/*Define intial average

Define initial Sigma within

Get user information through a dialog box*/



dlg = Dialog(

"VISUALIZING SIGMA: A DEMOSTRATION",

" ",

"Enter the following information to begin, then click on OK",

" ",

V List(

V List(

" Population parameter:",

"",

Line Up( 2,

" Mean", mu = Edit Number( 0 ),

" Standard Deviation", sigma = Edit Number( 1 )

),

"",



)

),



" ",

H List( Button( "OK" ), Button( "Cancel" ) )

);





If( dlg["Button"] == -1,

Throw( "User cancelled" )

);

Remove From( dlg );

Eval List( dlg );





/*Define the output window*/

OUT_WINDOW = New Window( "VISUALIZING SIGMA: A JMP JSL DEMOSTRATION",

Border Box(

TOP( 5 ),

Left( 5 ),

Panel Box( "VISUALIZING SIGMA",

V List Box(

T1 = Text Box( "Move the slider below to adjust the Sigma." ),

T2 = Text Box( "Move the handle of the curve to adjust the Mean" ),

NormCurve = Graph Box(

FrameSize( 500, 350 ),

Y Scale( 0, 1.40 * rsqrt2pi / sigma ),

X Scale( mu - 10 * sigma, mu + 10 * sigma ),

Double Buffer,

Pen Color( "red" );

Text Color( "red" );

Text( {mu + 1 * sigma, rsqrt2pi / sigma * e ^ (-1 / 2)}, "Sigma = ", sigma );

LINEMATRIX_X = {mu, mu + sigma};

LINEMATRIX_X = Matrix( LINEMATRIX_X );

LINEMATRIX_Y = {rsqrt2pi / sigma * e ^ (-1 / 2), rsqrt2pi / sigma * e ^ (-1 / 2

)};

LINEMATRIX_Y = Matrix( LINEMATRIX_Y );

Arrow( LINEMATRIX_X, LINEMATRIX_Y );

LINEMATRIX_X1 = {mu + sigma, mu};

LINEMATRIX_X1 = Matrix( LINEMATRIX_X1 );

LINEMATRIX_Y1 = {rsqrt2pi / sigma * e ^ (-1 / 2), rsqrt2pi / sigma * e ^ (-1 /

2)};

LINEMATRIX_Y1 = Matrix( LINEMATRIX_Y1 );

Arrow( LINEMATRIX_X1, LINEMATRIX_Y1 );

Pen Color( "blue" );

Text Color( "blue" );

Pen Size( 2 );

Text Color( "BLUE" );

Text( {mu, rsqrt2pi / sigma}, "----->Mean = ", Char( Round( mu, 3 ) ) );

Y Function( Normal Density( (x - mu) / sigma ) / sigma, x );

Pen Size( 1 );

Pen Color( "Green" );

V Line( mu, 0, rsqrt2pi / sigma );

Line Style( 2 );

/*V Line( mu + sigma, 0, rsqrt2pi / sigma * e ^ (-1 / 2) );*/

V Line( mu + 2 * sigma, 0, rsqrt2pi / sigma * e ^ (-4 / 2) );

V Line( mu + 3 * sigma, 0, rsqrt2pi / sigma * e ^ (-9 / 2) );

V Line( mu - sigma, 0, rsqrt2pi / sigma * e ^ (-1 / 2) );

V Line( mu - 2 * sigma, 0, rsqrt2pi / sigma * e ^ (-4 / 2) );

V Line( mu - 3 * sigma, 0, rsqrt2pi / sigma * e ^ (-9 / 2) );

Pen Color( "Red" );

ARROW_MAT_X = {mu + sigma, mu + sigma};

ARROW_MAT_Y = {rsqrt2pi / sigma * e ^ (-1 / 2), 0};

ARROW_MAT_X = Matrix( ARROW_MAT_X );

ARROW_MAT_Y = Matrix( ARROW_MAT_Y );

Arrow( ARROW_MAT_X, ARROW_MAT_Y );

Handle( mu, rsqrt2pi / sigma, mu = x );

),





H List Box(

Text Color( "BLUE" );

T3 = Text Box( "SIGMA VALUE" );,

SB1 = Slider Box( 0.5 * sigma, 10 * sigma, sigma, NormCurve <<>









Thursday, August 6, 2009

Cp vs Cpk: Illustrating the Impact of Mean Shift and Sigma Changes

This is a script I developed to help me in explaining the concepts of Cp/Pp and Cpk/Ppk whenever I am conducting Six Sigma trainings. This is one of the reasons I appreciate JMP's JSL. It allows me to customize demostrations for my trainees that visually aid them in grasping Six Sigma concepts.
You may freely use. I would be grateful if you would give the credit to me and refer to this blog.

Reynald Francisco
http://statisticalprocesscontrols.blogspot.com/



The JMP JSL Script




dlg = Dialog(
V List(V List("Cpk Parameters","",
Line Up(2,
"Mean", mu = Edit Number(0),
"Standard Deviation", sigma = Edit Number(1)
),"","",
"Define Specifications","",
Line Up( 2,
"USL ",USL = Edit Number(2)
),Line Up( 2,
"LSL ",LSL = Edit Number(-2)
)
),
H List( Button("OK"), Button("Cancel") )
));


If( dlg["Button"] == -1, Throw( "User cancelled" ) );
Remove From( dlg ); Eval List( dlg );






rsqrt2pi = 1/sqrt(2*pi());

New Window("Cpk Demostration",

Graph Box(
FrameSize(500,500),
XScale(mu-8*sigma,mu+8*sigma),
yScale(0,1.40*rsqrt2pi/sigma),
Double Buffer,
Pencolor("blue"),
pensize(1),
text size(12),
TextColor("black"),
YFunction(Normal Density((x-mu)/sigma)/sigma, x); /*Y-scale is Normalized to Z-scores*/
YFunction(Normal Density((x-mu)/sigma)/sigma, x,fill(20),max(LSL)); /*Fill low*/
YFunction(Normal Density((x-mu)/sigma)/sigma, x,fill(20),min(USL)); /*Fill high*/
Handle(mu,rsqrt2pi/sigma,mu=x;sigma=rsqrt2pi/y);
Pencolor("red"),
pensize(1),
text size(10),
TextColor("black"),
XFunction(LSL, y);
Handle(LSL,0.45*rsqrt2pi/sigma,LSL=x);
XFunction(USL, y);
Handle(USL,0.55*rsqrt2pi/sigma,USL=x);
text({mu,0.85*rsqrt2pi/sigma},"mu ",mu," sigma ",sigma);
textcolor("red");
text({LSL,0.45*rsqrt2pi/sigma},"LSL= ",LSL);
text({USL,0.55*rsqrt2pi/sigma},"USL= ",USL);
Pencolor("blue"),
pensize(1),
text size(11),
TextColor("blue"),
Cpu=(USL-mu)/(3*sigma);
Zu=(USL-mu)/sigma;
Zl=(LSL-mu)/sigma;
yield=normal distribution(Zu)- normal distribution(Zl);
Cpl=(mu-LSL)/(3*sigma);
Cpk=min(Cpu,Cpl);
text({mu,1.15*rsqrt2pi/sigma},"Cpk= ",Cpk);
text({mu,1.35*rsqrt2pi/sigma},"Cpu= ",Cpu);
text({mu,1.25*rsqrt2pi/sigma},"Cpl= ",Cpl);
text({mu,1.05*rsqrt2pi/sigma},"Estimated Yield= ",yield);
) /* Close Graph Box parenthesis*/
); /* Close New Window parenthesis*/

Thursday, July 30, 2009

Process Capability Measures Cp and Cpk: A JMP JSL Demostration

I am often asked about the diffence between Cp and Cpk. Usually it is followed up by a question on why there is a need for two measures. I then answer that while Cpk is the real capability, Cp reflects the potential capability that can still be achieved just by centering your process. This is a difficult concept to grasp if just verbally described, so I usually illustrate this using a graphical demostration.
This JMP script demostrates the differences between the two Process Capability Measures Cp and Cpk.


The JMP JSL Script




dlg = Dialog(
V List(
V List(
"Cp Parameters",
"",
Line Up( 2,
/*"Mean", mu = Edit Number(0),*/
"Standard Deviation", sigma = Edit Number( 1 )
),
"",
"",
"Define Specifications",
"",
Line Up( 2, "USL ", upspecs = Edit Number( 2 ) ),
Line Up( 2, "LSL ", lowspecs = Edit Number( -2 ) )
),
H List( Button( "OK" ), Button( "Cancel" ) )
)
);


If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
Remove From( dlg );
Eval List( dlg );


/*ADDED line for Cp only*/
LSL = lowspecs;
USL = upspecs;
mu = lowspecs + (upspecs - lowspecs) / 2;
mid = (upspecs - lowspecs);
/*END of added line*/


rsqrt2pi = 1 / Sqrt( 2 * Pi() );

New Window( "Process Capability Demostration",
V List Box(
H List Box(
Panel Box( "Cpk Window",
T1=Text Box ("Move the Handle in the curve to change the value of the Mean"),
g1 = Graph Box(
FrameSize( 425, 400 ),
X Scale( mu - 8 * sigma, mu + 8 * sigma ),
Y Scale( 0, 1.40 * rsqrt2pi / sigma ),
Double Buffer,
Pen Color( "blue" ),
Pen Size( 1 ),
Text Size( 12 ),
Text Color( "black" ),
Y Function( Normal Density( (x - mu) / sigma ) / sigma, x ); /*Y-scale is Normalized to Z-scores*/
Y Function(
Normal Density( (x - mu) / sigma ) / sigma,
x,
fill( 20 ),
Max( LSL )
); /*Fill low*/
Y Function(
Normal Density( (x - mu) / sigma ) / sigma,
x,
fill( 20 ),
Min( USL )
); /*Fill high*/
Pen Color( "red" );,
Pen Size( 1 ),
Text Size( 10 ),
Text Color( "black" ),
X Function( LSL, y );
Handle( mu, rsqrt2pi / sigma, mu = x;g2<<reshow; );
g2 << reshow;
Handle( LSL, 0.45 * rsqrt2pi / sigma, LSL = x );
g2 << reshow;
Handle( USL, 0.45 * rsqrt2pi / sigma, USL = x );
X Function( USL, y );
delta = mu - LSL;
Text( {mu, 0.85 * rsqrt2pi / sigma}, "mu ", mu, " sigma ", sigma );
Text Color( "red" );
Text( {LSL, 0.45 * rsqrt2pi / sigma}, "LSL= ", LSL );
Text( {USL, 0.55 * rsqrt2pi / sigma}, "USL= ", USL );
Pen Color( "blue" );,
Pen Size( 1 ),
Text Size( 11 ),
Text Color( "blue" ),
Cp = (USL - LSL) / (6 * sigma);
Cpu = (USL - mu) / (3 * sigma);
Zu = (USL - mu) / sigma;
Zl = (LSL - mu) / sigma;
yield = Normal Distribution( Zu ) - Normal Distribution( Zl );
Cpl = (mu - LSL) / (3 * sigma);
Cpk = Min( Cpu, Cpl );
Text( {mu, 1.25 * rsqrt2pi / sigma}, "Cpk= ", Cpk );
Text( {mu, 1.15 * rsqrt2pi / sigma}, "Cp= ", Cp );
Text( {mu, 1.05 * rsqrt2pi / sigma}, "Estimated Yield= ", yield );
) /* Close Graph Box parenthesis*/
),
Panel Box( "Cp Window",
T2=Text Box ("Move the Handle in the curve to change the value of the Sigma");,
g2 = Graph Box(
FrameSize( 425, 400 ),
X Scale( mu - 8 * sigma, mu + 8 * sigma ),
Y Scale( 0, 1.40 * rsqrt2pi / sigma ),
Double Buffer,
Handle( mu, rsqrt2pi / sigma, sigma = rsqrt2pi / y; g1<<reshow; );
delta = mu - LSL;
USL2 = mu + delta;
Pen Color( "red" );,
Pen Size( 1 ),
Text Size( 10 ),
Text Color( "black" ),
X Function( LSL, y );
X Function( USL2, y );
Text( {mu, 0.85 * rsqrt2pi / sigma}, "mu ", mu, " sigma ", sigma );
Text Color( "red" );
Text( {LSL, 0.45 * rsqrt2pi / sigma}, "LSL= ", LSL );
Text( {USL2, 0.55 * rsqrt2pi / sigma}, "USL= ", USL2 );
Pen Color( "blue" );,
Pen Size( 1 ),
Text Size( 11 ),
Text Color( "blue" ),
Cpu = (USL2 - mu) / (3 * sigma);
Zu = (USL2 - mu) / sigma;
Zl = (LSL - mu) / sigma;
yield2 = Normal Distribution( Zu ) - Normal Distribution( Zl );
Cpl = (mu - LSL) / (3 * sigma);
Cp2 = (USL2 - LSL) / (6 * sigma);
Text( {mu, 1.15 * rsqrt2pi / sigma}, "Cp= ", Cp2 );
Text( {mu, 1.05 * rsqrt2pi / sigma}, "Estimated Yield= ", yield2 );
Pen Color( "blue" );,
Pen Size( 1 ),
Text Size( 12 ),
Text Color( "black" ),
Y Function( Normal Density( (x - mu) / sigma ) / sigma, x ); /*Y-scale is Normalized to Z-scores*/
Y Function(
Normal Density( (x - mu) / sigma ) / sigma,
x,
fill( 20 ),
Max( LSL )
); /*Fill low*/
Y Function(
Normal Density( (x - mu) / sigma ) / sigma,
x,
fill( 20 ),
Min( USL2 )
); /*Fill high*/
)
)
)
)/*END Of BORDER BOX*/
); /* Close New Window parenthesis*/

T1<<Text Color("BLUE");
T2<<Text Color("BLUE");

Tuesday, July 28, 2009

Control Chart as a Feedback System: A JMP JSL Demostration

This script was written using SAS JMP's version 5.1.
It demostrates how a control chart can feedback any change in distribution's central tendency and/or measure of dispersion/variation.

For any feedback, kindly send it to me @ rsfrancisco at up dot edu dot com

Regards,
Reynald Francisco



The JMP JSL Script





/*
DETAILS,
>>SIGMA OF THE MEAN IS COMPUTED USING THE CENTRAL LIMIT THEOREM
>>CONTROL LIMITS ARE COMPUTED USING Individuals and Moving Range Method (IMR) in which each mean and sigma of the sample are treated as an individual measure/data point.
>>DATA USED IS A RANDOMLY GENRERATED NORMALLY DISTRIBUTED VARIABLE WITH MEAN = MU (user specified) AND STDEV = SIGMA (user specified).
*/

dlg = Dialog(
V List(V List("Population parameter","",
Line Up(2,
"Mean", mu = Edit Number(0),
"Standard Deviation", sigma = Edit Number(1)
),"","",
"Define Sampling Plan","",
Line Up( 2,
"Sampling Size ",n = Edit Number(5),
"Initial Sub-groups ",m = Edit Number(25)
)
),
H List( Button("OK"), Button("Cancel") )
));


If( dlg["Button"] == -1, Throw( "User cancelled" ) );
Remove From( dlg ); Eval List( dlg );






rsqrt2pi = 1/sqrt(2*pi());





/*MODULE3*/


dt = New Table( "Process Data" );



col = dt << New Column( "Parameter" );

/* add new column to object 'dt' , which is a data table. Name the new column as "Parameter". Let new column be referred to as new object 'col' */

/*set global constants 'pmean' and 'pSD'*/

pMean = mu;
pSD = sigma;
sigmasample=sigma/sqrt(n);

/*CREATING A MATRIX to contain Normal Random*/




x = J( m, 1, 0 );

For( i=1, i<m+1, i++,
x[i] = mu + sigmasample * Random Normal()
);
musample=0;
For( i=1, i<m+1, i++,
musample=musample + x[i]
);
musample=musample/m;
/* ADDING THE VALUES from the MATRIX into the CREATED COLUMN in the TABLE*/
col << Values( x );

/* CREATE a new window object called 'w' */

w = New Window( "Control Chart Simulation",
H List Box(
(Graph Box(FrameSize(313,313), XScale(mu-6.5*sigma,mu+6.5*sigma), yScale(0,1.10*rsqrt2pi/(sigma/sqrt(n))), Double Buffer,


Handle(mu,rsqrt2pi/sigma,mu=x;sigma=rsqrt2pi/y),

text({musample,rsqrt2pi/sigmasample},"mu_sample= ",musample," \!rsigmasample= ",sigmasample),

sigmasample=sigma/sqrt(n);

Pencolor("blue"),pensize(1), text size(8),TextColor("blue"),

YFunction(Normal Density((x-mu)/sigma)/sigma, x),

text({mu,rsqrt2pi/(pSD/sqrt(n))},"mu= ",mu," sigma= ",(pSD/sqrt(n))),

Pencolor("red"),pensize(1), text size(10),TextColor("red"),
YFunction(Normal Density((x-musample)/(pSD/sqrt(n)))/(pSD/sqrt(n)), x), /*Y-scale is Normalized to Z-scores*/

Pencolor(4),
text({mu,rsqrt2pi/sigmasample},"mu= ",mu," sigma= ",sigmasample),
YFunction(Normal Density((x-mu)/sigmasample)/sigmasample, x) /*Y-scale is Normalized to Z-scores*/
)),



Control Chart(
Sample Label(Empty()),
KSigma(3),
Chart Col(
:Parameter,
Individual Measurement,
Moving Range
),
Show Zones(1),
All Tests(1),

SendToReport(Dispatch({}, "Control Chart", OutlineBox,
Set Title("Control Chart Simulation")),
Dispatch({"Individual Measurement of Parameter"},
"Control Charts", FrameBox, Frame Size(300, 250)),
Dispatch({"Moving Range of Parameter"}, "1",
ScaleBox, {Scale(Linear), Format(Best), Min(4), Max(38), Inc(3),
Minor Ticks(2)}), Dispatch({"Moving Range of Parameter"},
"Control Chart", FrameBox, Frame Size(300, 250)),
Dispatch({"Moving Range of Parameter"},
"Control Charts", FrameBox, Frame Size(80, 90))),

Alarm Script(
Write(
"\!rOut of Control for test ",
qc_test,
" in column ",
qc_col,
" in sample ",
qc_sample
)
)
),

Button Box( "End Simulation",
w << Close Window;
Close( dt, No Save )
)
)
)
;

While( 2,
Wait(1);
dt << Add Rows( 1 );
col[i++] = mu + sigmasample * Random Normal();
);


Monday, July 27, 2009

When Xbar-R wont work...

I am trying to build a case. I want to argue that there are instances that the commonly used control chart Xbar-R does not always work for manufacturing data. This is even when the famous Central Limit Theorem is invoked as a justification of the method.
In here I am developing a JMP JSL to demonstrate it's weaknesses.
I am not yet done, but almost 80% complete. This script is already operational, but not yet as I intended it to be.

Hope you find it useful. I will post the complete blog when I find the time.

Regards,
Reynald Francisco




The JMP JSL Script





Clear Globals();

Run_Num = 1;
//FUNCTIONS

GEN_DATA = Expr(
a = 1;
b = 1;
//Generate Subgroup Means
SubMeans_Matrix = {};
For( a = 1, a <= SubCount, a++,
SubMeans_Matrix[a] = mu + (SigmaBet * Random Normal())
);



a = 1;
b = 1;
i = 1;
NormList = {};
NormTemp = {};
NormData = {};
NormData_b = {};
For( a = 1, a <=SubCount, a++,

b = 1;
For( b = 1, b <= SubSize, b++,
NormTemp[i] = SubMeans_Matrix[a] + (SigmaWith * Random Normal());
NormData_b = NormTemp[i];
NormTemp = {};
NormData = Matrix( NormData );
NormData_b = Matrix( NormData_b );
NormData = NormData || NormData_b;
NormData_b = {};
);
NormList = Matrix( NormList );
NormData = Matrix( NormData );
NormList = NormList |/ NormData;
NormData = {};
);


a = 1;
b = 1;
NormMatrix = Matrix( NormList );


//GENERATE RANDOM DATA;


b = 1;
SigmaWith_Matrix = {};
For( b = 1, b <= SubCount, b++,
SigmaWith_Matrix[b] = (Max( NormMatrix[b, 0] )) - Min( NormMatrix[b, 0] )
);


//sigma = Std Dev( NormMatrix );
//SigmaTot = sigma;
//SigmaWith = Mean(SigmaWith_Matrix)*A2_constant/3;
//SigmaBet = Sqrt( (SigmaTot ^ 2) - (SigmaWith ^ 2) );
SigmaTot_new = SigmaTot;
SigmaWith_new = SigmaWith;


a = 1;
b = 1;
dt = New Table( "Simulation Data-" || Char( Run_Num ) );
m_col = dt << New Column( "Measurement Number", formula( Row() ) );
m_col << set modelling type( ordinal );
For( a = 1, a <= SubSize, a++,
col = dt <<New Column( "Measurement" || Char( a ) );
col << Set Values( NormMatrix[0, a] );
);

Mean_Matrix = {};
a = 1;
b = 1;
For( b = 1, b <= SubCount, b++,
Mean_Matrix[b] = Mean( NormMatrix[b, 0] )
);
Mean_Matrix = Matrix( Mean_Matrix );
col = dt << New Column( "Average Measurement" );
col << Set Values( Mean_Matrix );

SigmaWith_Matrix = Matrix( SigmaWith_Matrix );
col = dt << New Column( "Measurement Range" );
col << Set Values( SigmaWith_Matrix );

Run_Num = Run_Num + 1;
dt <<Select All Rows;
dt << colors( 5 );
dt << markers( 8 );
); //END OF EXPRESSION: GEN_DATA


GEN_CHART = Expr(
OUT_WINDOW << Append(
CChat = Panel Box( "Resulting Control Chart",
Overlay Plot(
X( :Measurement Number ),
Y( :Average Measurement ),
Y Axis[1] << {{Scale( Linear ), Format( "Best" ), Min(
Col Mean( Column( "Average Measurement" ) ) - 1.10 * A2_constant * Col Mean( Column( "Measurement Range" ) )
), Max(
Col Mean( Column( "Average Measurement" ) ) + 1.10 * A2_constant * Col Mean( Column( "Measurement Range" ) )
), Inc( 1 ), Add Ref Line(
Col Mean( Column( "Average Measurement" ) ) - A2_constant * Col Mean( Column( "Measurement Range" ) ),
Solid,
Dark Red
), Add Ref Line(
Col Mean( Column( "Average Measurement" ) ) + A2_constant * Col Mean( Column( "Measurement Range" ) ),
Solid,
Dark Red
), Add Ref Line( Col Mean( Column( "Average Measurement" ) ), Dashed, Red )}},
Separate Axes( 1 ),
Connect Points( 1 ),
:Average Measurement( Connect Color( 21 ) ),
SendToReport(
Dispatch( {}, "Overlay Plot", OutlineBox, Set Title( "Control Chart for Simulated Data-" || Char( Run_Num ) ) )
),
SendToReport(
Dispatch(
{},
"106",
ScaleBox,
{Scale( Linear ), Format( "Fixed Dec", 3 ), Min(
Col Mean( Column( "Average Measurement" ) ) - 1.10 * A2_constant *
Col Mean( Column( "Measurement Range" ) )
), Max(
Col Mean( Column( "Average Measurement" ) ) + 1.10 * A2_constant *
Col Mean( Column( "Measurement Range" ) )
), Inc( Round( (2 * A2_constant * Col Mean( Column( "Measurement Range" ) )) / 20, 2 ) )}
),
Dispatch(
{},
"101",
ScaleBox,
{Scale( Linear ), Format( "Best" ), Min( 0.5 ), Max( SubCount + 0.5 ), Inc( 1 ), Minor Ticks( 0 ),
Rotated Labels( 1 )}
),
Dispatch(
{},
"Overlay Plot",
FrameBox,
{Frame Size( 840, 300 ), DispatchSeg( LineSeg( 1 ), {Line Color( "Medium Dark Blue" )} )}
)
)
)
)//END OF GRAPH BOX
);//END OF NEW WINDOW

Run_Num = Run_Num + 1;
);//END OF EXPRESSION GEN_CHART


//Define constants
rsqrt2pi = 1 / Sqrt( 2 * Pi() );

//Define Subgrouping (limit from 2-9 for XbarR charts)
//Define intial average
//Define initial Sigma within
//Get user information through a dialog box



SamplingSizes = {"2", "3", "4", "5", "6", "7", "8", "9"};
SubgroupSizes = {"20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35"};

dlg = Dialog(
"When Xbar-R will not work: A JMP demonstration",
" ",
"Enter the following information to begin",
" ",
V List(
V List(
" Population parameter:",
"",
Line Up( 2, " Mean", mu = Edit Number( 0 ), " Standard Deviation", sigma = Edit Number( 1 ) ),
"",
"",
" Define Sampling Plan:",
"",
H LIST(
V LIST( " Subgroup Size ", H LIST( " ", n = Combo Box( SamplingSizes ) ) ),
" ",
V LIST( " Number of Subgroups ", H LIST( " ", m = Combo Box( SubgroupSizes ) ) )
)
)
),
" ",
H List( Button( "OK" ), Button( "Cancel" ) )
);


If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
Remove From( dlg );
Eval List( dlg );




SubSize = Match( n, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9 );
SubCount = Match( m,
1, 20,
2, 21,
3, 22,
4, 23,
5, 24,
6, 25,
7, 26,
8, 27,
9, 28,
10, 29,
11, 30,
12, 31,
13, 32,
14, 33,
15, 34,
16, 35
);

A2_constant = Match( SubSize, 2, 1.8806, 3, 1.0231, 4, 0.7286, 5, 0.5768, 6, 0.4833, 7, 0.4193, 8, 0.3725, 9, 0.3367 );

SigmaTot = sigma;
SigmaWith = (SigmaTot / A2_constant) / 3;
SigmaBet = Sqrt( (SigmaTot ^ 2) - (SigmaWith ^ 2) );



/**********************************CODE OUTPUT INTERFACE*********************************************/


//Define the output window
OUT_WINDOW = New Window( "When Xbar-R will not work: A JMP demonstration",
Border Box(
TOP( 5 ),
Left( 5 ),
Panel Box( "MOVE THE SLIDER BOXES BELOW TO ADJUST THE RELATIVE VALUES OF SIGMAS:",
V List Box(
H List Box(
V List Box(
NormCurve = Graph Box(
FrameSize( 500, 300 ),
Y Scale( 0, y = 0.8 * rsqrt2pi / (sigma / Sqrt( SubSize )) ),
X Scale( mu - 10.0 * sigma, mu + 10.0 * sigma ),
Double Buffer,
Pen Size( 2 );
Pen Color( "red" );
Text Color( "red" );
Text( {mu + 2.0 * SigmaTot, 0.5 * y}, "Sigma Total" );
Y Function( Normal Density( ((x - mu) / SigmaTot) ), x );
Pen Color( "blue" );
Text Color( "blue" );
Text( {mu + 2.5 * SigmaWith, 0.1 * y}, "Sigma Within" );
Y Function( Normal Density( ((x - mu) / SigmaWith) ), x );
Pen Color( "green" );
Text Color( "green" );
Text( {mu + 3.0 * SigmaBet, 0.3 * y}, "Sigma Between" );
Y Function( Normal Density( ((x - mu) / SigmaBet) ), x );
),


H List Box(
Text Color( "black" );
T1 = Text Box( " SIGMA BETWEEN: " );,
SB1 = Slider Box(
0.5 * SigmaTot,
10 * SigmaTot,
SigmaBet,
SigmaTot = Sqrt( SigmaWith ^ 2 + SigmaBet ^ 2 );
NormCurve << reshow;
Tri << reshow;
SB2 << reshow;


);
),
H List Box(
Pen Color( "blue" );
T2 = Text Box( " SIGMA WITHIN: " );,
SB2 = Slider Box(
0.5 * SigmaTot,
10 * SigmaTot,
SigmaWith,
//SIGMA_WIDTH_EXPR;
SigmaTot = Sqrt( SigmaWith ^ 2 + SigmaBet ^ 2 );
NormCurve << reshow;
Tri << reshow;
SB1 << reshow;
)
);



),
Tri = Graph Box(
framesize( 300, 300 ),
X Scale( -0.5, 10.5 * SigmaTot ),
Y Scale( -0.50, 10.5 * SigmaTot ),
XCOR = {0, SigmaWith, 0, 0};
YCOR = {0, 0, SigmaBet, 0};
XCOR = Matrix( XCOR );
YCOR = Matrix( YCOR );
Pen Color( "Gray" );
Fill Color( "Gray" );
Polygon( XCOR, YCOR );
Pen Size( 2 );
Pen Color( "blue" );
Line( {SigmaWith, 0}, {0, 0} );
Pen Color( "green" );
Line( {0, 0}, {0, SigmaBet} );
Pen Color( "red" );
Line( {0, SigmaBet}, {SigmaWith, 0} );
)
),
Text Box( " " ),
H List Box(
Panel Box( "COMMAND OPTIONS",
V List Box(
Button Box( "GENERATE SIMULATED DATA", GEN_DATA ),
Button Box( "GENERATE SIMULATED DATA AND CHARTS",
GEN_DATA;
Run_Num = Run_Num - 1;
GEN_CHART;
Out_Window << Bring Window To Front;
)
)
),
Panel Box( "HELP OPTIONS",
V List Box(
Button Box( "ABOUT THE AUTHOR", Caption( "wala pa" ) ),
Button Box( "HELP LINKS", Caption( "WALA PA" ) )
)
),
Panel Box( "OTHER OPTIONS",
V List Box(
Button Box( "EXIT", OUT_WINDOW << CLOSE WINDOW ),
Button Box( "WWW.SIXSIGMAPRACTICE.COM", Web( "WWW.SIXSIGMAPRACTICE.COM" ) )
)
)
)//END OF HLIST
) //END OF BORDER BOX
) //END OF END OF PANEL BOX
) // END OF BORDER BOX
);//END OF NEW WINDOW OUT_WINDOW
T1 << font color( "GREEN" );
T2 << font color( "BLUE" );
Show( NormCurve );
NormCurve << reshow;
Tri << reshow;

Out_Window << Bring Window To Front;


Sunday, July 26, 2009

Chebyshev's Inequality to Roughly Estimate Area Under an Unknown Probability Density Curve: Reposted from www.SixSigmaPractice.multiply.com

I have always been fascinated by this generalized area under the curve theorem.
Though the estimate in itself is very weak, Chebyshev's inequality provides a very strong statistical basis for control charting.
Here is a utility that compares the actual area under the curve against to that estimated by Chebyshev's inequality.


The JMP JSL Script




Clear Globals();
new=EXPR(dt=open());
use_curr=expr(dt=Current Data Table());
if(is empty(Current Data Table()),new,use_curr);
bound=1.5;
j = 1;
col_list = {};
For( j = 1, j <= N Col( dt ), j++,
col_list[j] = Column( j ) << get name
);


COMM_RUN = Expr(
col = Column( col_name );
modelling=col<<get modeling type;
CONT=EXPR(
val1 = col << get as matrix;
counter = N Rows( val1 );
T_counter = 0;
mu = Mean( val1 );
sigma = Std Dev( val1 );
i = 1;
For( i = 1, i <= counter, i++,
If( val1[i, 1] <= mu + bound * sigma & val1[i, 1] >= mu - bound * sigma,
T_counter = T_counter + 1;
i = i + 1;
,
i = i + 1
)
);

Actual = T_counter / counter * 100;
T_estimate = (1 - (1 / (bound ^ 2))) * 100;
);
NON_CONT=EXPR(Throw ("Data Column does not contain a continous variable data"));
if(modelling=="Continuous",CONT,NON_CONT);
);

COMM_PRINT = Expr(
PRINT_TEXT = "Actual area inside mean +/- " ||char(bound) || "*sigma is " || Char( round(Actual,2) ) || " while Chebyshev's inequality estimate is " || Char( round(T_estimate,2) );
PRINT_VALUES = "Mean is equal to " ||char(round(mu,3)) || ". Sigma is equal to " ||char(round(sigma,3)) || ". The bounded interval is equal to " ||char(round(mu-bound*sigma,3)) || " to " ||char(round(mu+bound*sigma,3)) || ".";
Print( PRINT_VALUES );
Print( PRINT_TEXT );
);


COMM_OUTPUT = Expr(
OUTPUT_REPORT = New Window( "Results",
Border Box(
Left( 10 ),
Panel Box( "Simulation Result for " || char(col),
Text Box(" "),
V LIST BOX(
Text Box( "" ),
Text Box( PRINT_VALUES ),
Text Box( " " ),
Text Box( PRINT_TEXT ),
Text Box(" "),
Text Box( "sixsigmapractice.multiply.com" )
)
)
)
)
);

New Window( "Interface",
Border Box(
Left( 10 ),
Panel Box( "Set values and click on RUN",
V List Box(
V List Box(
H List Box(
Text Box( "Set Bound = k" ),
Text Box( " " ),
combo_list = Combo Box(
{"1.5", "2", "2.5", "3", "3.5", "4", "4.5", "5", "5.5", "6"},
COMBO_COMM = Expr(
k = combo_list << getselected;
bound = Num( k );
);
COMBO_COMM;
),

),
Text Box( " " ),
H List Box(
Text Box( "Select Column" ),
Text Box( " " ),
col_select = Combo Box( col_list ),
COL_COMM = Expr( col_name = col_select << get );
COL_COMM;
)
),
Text Box( " " ),
Panel Box( "Command Button",
Button Box( "RUN ESTIMATE",
COMBO_COMM;
COL_COMM;
COMM_RUN;
COMM_PRINT;
COMM_OUTPUT;
OUTPUT_REPORT << reshow;
OUTPUT_REPORT<<move window(250,50)
)
)
)
)
)
);

Sigma Level as a Measure of Process Capabiltity (Reposted from www.SixSigmaPractice.multiply.com

There are many available measures of Process Capability.
In fact anything that relates process variation to specification
limits,and measures how often the process meets these specifications can be considered as a measure of Process Capability.
Process Capability can be measured either by Percent Yield, Percent Defect, Cp, Pp, Cpk, Ppk, or Sigma Level. This JSL script uses JMP's graphical capability to demostrate how the standard Normal Curve defines the relationships between the Sigma Level, percent Yield, and percent defect.
 
Note: You may use freely but the author will appreciate it the author will be given credit, and this webpage will be sited.
Reynald Francisco
http://www.sixsigmapractice.multiply.com/



The JMP JSL Script

When the JMP script is run, an initial dialog box would prompt the user the input initial values as shown below.
Input Dialog Box:




The output image is a graph as shown below:




The JMP JSL Script is shown below::

dlg = Dialog(
V List(
V List(
"ENTER THE FOLLOWING INFORMATION:",
"",
V List(
"Input Option",
V List(
TestType = Radio
Buttons( "YIELD RATE", "DEFECT RATE", "SIGMA LEVEL" ),
Line Up( 2, "Input
Value ", x = Edit Number( 0.5 ) )
)
),
"",
"Note: Input Yield
Rate and Defect Rate in decimal format."
),
H List( Button( "OK" ),
Button( "Cancel" ) )
)
);

If( dlg["Button"] == -1,
Throw(
"User cancelled" )
);
Remove From( dlg );
Eval List( dlg );

If(
TestType != 3 & x >= 1,
Caption( "Input Yield Rate
and Defect Rate in decimal format. Right click to close message." );
Throw(
"User cancelled" );,
TestType != 3 & x <= 0,
Caption( "Input
value is not valid. Right click to close message." );
Throw( "User
cancelled" );,
TestType == 3 & x < 0,
Caption( "Input value is
not valid. Right click to close message." );
Throw( "User cancelled" );
);

mu = 0;
sigma = 1;
rsqrt2pi = 1 / Sqrt( 2 * Pi() );

If(
TestType == 3, SigmaLevel = x,
TestType == 1, SigmaLevel =
Normal Quantile( x ),
TestType == 2, SigmaLevel = Normal Quantile( 1 - x )
);

New Window( "Sigma Level Demostration",
Graph Box(
FrameSize( 900, 500 ),
X Scale( -10, 10 ),
Y Scale( 0, 0.5 ),
Double Buffer,
Pen Color( "blue" ),
Pen Size( 1 ),
Text Size( 12
),
Text Color( "black" ),
Y Function( Normal Density( (x - mu) / sigma )
/ sigma, x ); /*Y-scale is Normalized to Z-scores*/
If( TestType == 2,
Y
Function( Normal Density( (x - mu) / sigma ) / sigma, x, fill( 1 ), Min(
SigmaLevel ) ),
Y Function( Normal Density( (x - mu) / sigma ) / sigma, x,
fill( 1 ), Max( SigmaLevel ) )
);
Pen Color( "red" );,
Pen Size( 1
),
Text Size( 10 ),
Text Color( "black" ),
X Function( SigmaLevel, y
);
Handle( SigmaLevel, 0.45 * rsqrt2pi / sigma, SigmaLevel = x );
Text
Color( "black" );
Text( {SigmaLevel, 0.45 * rsqrt2pi / sigma}, "<--Move
this point" );
Text Color( "red" );
Text( {SigmaLevel, 0.55 * rsqrt2pi /
sigma}, "Sigma Level= ", SigmaLevel );
Pen Color( "blue" );,
Pen Size( 1
),
Text Size( 11 ),
Text Color( "blue" ),
Z = (SigmaLevel - mu) /
sigma;
Yield = Normal Distribution( Z );
Defect = (1 - Yield);
Text(
{mu, 1.15 * rsqrt2pi / sigma}, "YIELD= ", yield * 100, "%" );
Text( {mu,
1.05 * rsqrt2pi / sigma}, "DEFECT= ", defect * 100, "%" );
) /* Close Graph
Box parenthesis*/
); /* Close New Window parenthesis*/





Saturday, July 11, 2009

Extending Your JMP's Capability Thru Scripting

If your are a JMP user do you know that you can increase your JMP's capability by leaps and bounds through scripting?

Yes you can! I do create scipts which utilities range from an ordinary alarm clock, mail sender, matrix solver, to report generator, and so on. Some of my work are shared online and can be found here:
http://sixsigmapractice.multiply.com/

http://www.sas.com/apps/demosdownloads/jmpFileExchange_PROD__sysdep.jsp?packageID=000416&jmpflag=Y&searchvar=userName&searchval=Reynald%20Francisco

In my multiply account, i do post many JSL scripts. In here i will try to foucs more on teaching how to script.

Till next entry!
 
Custom Search