Click here to Skip to main content
13,297,513 members (43,934 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


7 bookmarked
Posted 13 Jun 2012

Process Performance Determination in C#: Part 2

, 14 Jun 2012
Rate this:
Please Sign up or sign in to vote.
The program presented here provides a simple way to obtain process performance through PPM.


Process performance metrics are important to determine the performance capability (of a process) in terms of customer requirement. Process performance can be determined via the following ways:

  • DPMO (Defect per Million Opportunity)
  • PPM (Part per Million)
  • Yield
  • Z-transformation

This is the second of a four part series that determines Process Performance.

For the first part (via DPMO), please see Process Performance Determination in C#.


This article describes how to determine the process performance from PPM (Part per Million). The PPM metric is a measure of capability for discrete (attribute) data found by:

PPM=DPU x 1,000,000


DPU (Defects per Unit) = number of defects / number of units.

The PPM metric usually indicates the number of times a defective part will occur in 1 million parts produced. By contrast, the DPMO metric reflects the number of defects occurring in 1 million opportunities. If we follow the definitions above, PPM and DPMO are identical only when the number of opportunities for a defect per unit or part is 1. Although the difference between DPMO and PPM is minor, it deserves to have its own "class", as we can see from the following example.

Using the example in part 1, a process produces 40,000 pencils. Three types of defects can occur. The number of occurrences of each defect type is:

  • Blurred printing: 36
  • Too long: 118
  • Rolled ends: 11

Total number of defects: 165

The discussion in part 1 doesn't necessarily mean there are 165 defective pencils (defective parts). It can be a defective pencil has blurred printing and too long. In our discussion in part-2 here, we are assuming the number of opportunities per unit is 1. It means there are 165 defective pencils (e.g., 36 pencils with blurred printing, 118 too long, and 11 rolled ends).

Applying the PPM formula, you can readily determine the PPM metric:

DPU = 165 / 40000 = 0.004125, and PPM = 0.004125 x 1000000 = 4125


To run the code, you need to have the following:

  • .NET Framework 2.0 and above
  • Microsoft Visual Studio 2005 if you want to open the project files included in the download project
  • Nunit 2.4 if you want to run the unit tests included in the download project

Using the code

We envisage that the user will perform the following code to get the desired results. This involves a simple four-step process:

  1. Instantiate a ProcessPerformanceFrPPM object
  2. Input NumOfUnitProcessed and NumOfDefectivePart
  3. Invoke its .Analyze() method
  4. Retrieve results from its .Result object.

Here is a typical user’s code:

ProcessPerformanceFrPPM ppm = new ProcessPerformanceFrPPM();
ppm.NumOfUnitProcessed = 40000;
ppm.NumOfDefectivePart = 165;
Console.WriteLine("DPU is: " + ppm.Result.DPU);
Console.WriteLine("PPM is: " + ppm.Result.PPM);
Console.WriteLine("Yield in % is: " + ppm.Result.YieldInPercent);

Two classes are implemented:

  1. ProcessPerformanceFrPPMResult
  2. ProcessPerformanceFrPPM

ProcessPerformanceFrPPMResult is a class from which a result object derives, which holds the analysis results. In our implementation, the .Result member variable is defined as follows:

/// <summary>
/// Process Performance from PPM (Part per Million) Result class
/// </summary>
public class ProcessPerformanceFrPPMResult
    /// <summary>
    /// Default constructor
    /// </summary>
    public ProcessPerformanceFrPPMResult() { }
    /// <summary>
    /// Defect Per Unit
    /// </summary>
    public double DPU;
    /// <summary>
    /// Part Per Million
    /// </summary>
    public double PPM;        
    /// <summary>
    /// Yield in Percent
    /// </summary>
    public double YieldInPercent;

The following table lists the available results (assuming that the ProcessPerformanceFrPPM object name you use is ppm):

Result Result stored in variable
Defect per Unit ppm.Result.DPU
Part per Million ppm.Result.PPM
Yield in % ppm.Result.YieldInPercent

ProcessPerformanceFrDPMO Class

The ProcessPerformanceFrPPM class does the analysis (calculation), and it is implemented as follows:

/// <summary>
/// Determine Process Performance from PPM
/// </summary>
public class ProcessPerformanceFrPPM
    private int N = 0;
    private int D = 0;
    private double dpu = 0;
    private double ppm = 0;
    private double yieldInPercent = 0;
    /// <summary>
    /// ProcessPerformanceFrPPM Result
    /// </summary>
    public ProcessPerformanceFrPPMResult Result = new ProcessPerformanceFrPPMResult();

    #region Constructors
    /// <summary>
    /// Process performace from PPM constructor
    /// </summary>
    public ProcessPerformanceFrPPM() { } //default empty constructor

    #endregion //Constructors

    /// <summary>
    /// Write only property: total number of units
    /// </summary>
    public int NumOfUnitProcessed
        set { N = value; }

    /// <summary>
    /// Write only property: total number of defective parts
    /// </summary>
    public int NumOfDefectivePart
        set { D = value; }

Once the ProcessPerformanceFrPPM object is instantiated, the user needs to set input values for the number of units processed, and number of defective parts, as follows:

ProcessPerformanceFrPPM ppm = new ProcessPerformanceFrPPM();
ppm.NumOfUnitProcessed = 40000;
ppm.NumOfDefectivePart = 165;

Then the .Analyze() method is called to perform the analysis. Subsequently, the user can retrieve the analysis results from the .Result object in the ProcessPerformanceFrPPM object.

The Analyze() method is implemented as follows:

/// <summary>
/// Calculate the Process Performance from PPM
/// </summary>
public void Analyze()
    dpu = (double)D / N;
    ppm = (double)D / N * 1000000;
    yieldInPercent = (1 - ppm / 1000000) * 100;
    Result.DPU = dpu;
    Result.PPM = ppm;
    Result.YieldInPercent = yieldInPercent;


The program presented here provides a simple way to obtain process performance through PPM. Although the difference between DPMO and PPM is minor, it deserves to have its own "class". I observed that confusion and misunderstanding arise if this minor difference is ignored. 


  • 13 June 2012: Initial post.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sitt Chee Keen
Malaysia Malaysia

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
Kanasz Robert6-Nov-12 1:05
mvpKanasz Robert6-Nov-12 1:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.171207.1 | Last Updated 14 Jun 2012
Article Copyright 2012 by Sitt Chee Keen
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid