Click here to Skip to main content
13,631,589 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


13 bookmarked
Posted 8 Jun 2012
Licenced CPOL

Process Performance Determination in C#

, 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 DPMO.


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 first of a four part series that determines Process Performance.


This article describes how to determine the process performance from DPMO.  

The DPMO metric is a measure of capability for discrete (attribute) data found by:

DPMO=DPO x 1,000,000


DPO (Defect per Opportunity) = number of defects / (number of units ×number of opportunities per unit)

The DPMO metric is important because it allows you to compare different types of products.

For example, 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

First, determine the number of ways each defect can occur on each item. For this product, blurred printing occurs in only one way (the pencil slips in the fixture). And there are three independent places where dimensions are checked. Rolled ends can occur at the top and the bottom of the pencil, so there are two. The total number of opportunities per unit is: 1 + 3 + 2 = 6.

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

DPO = = 165 / (6×40000) = 0.0006875, and DPMO = 0.0006875 x 1000000 = 687.5


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 ProcessPerformanceFrDPMO object
  2. Input NumOfUnitProcessed, NumOfDefects, and NumOfDefectOpportunities
  3. Invoke its .Analyze() method
  4. Retrieve results from its .Result object.

Here is a typical user’s code:

ProcessPerformanceFrDPMO dpmo = new ProcessPerformanceFrDPMO();
dpmo.NumOfUnitProcessed = 40000;
dpmo.NumOfDefects = 165;
dpmo.NumOfDefectOpportunities = 6;
Console.WriteLine("DPO is: " + dpmo.Result.DPO);
Console.WriteLine("DPMO is: " + dpmo.Result.DPMO);
Console.WriteLine("Yield in % is: " + dpmo.Result.YieldInPercent);

Two classes are implemented:

  1. ProcessPerformanceFrDPMOResult
  2. ProcessPerformanceFrDPMO

ProcessPerformanceFrDPMOResult 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 DPMO Result class
/// </summary>
public class ProcessPerformanceFrDPMOResult
    /// <summary>
    /// Default constructor
    /// </summary>
    public ProcessPerformanceFrDPMOResult() { }
    /// <summary>
    /// Defects Per Opportunity
    /// </summary>
    public double DPO;
    /// <summary>
    /// Defects Per Million Opportunity
    /// </summary>
    public double DPMO;
    /// <summary>
    /// Yield in Percent
    /// </summary>
    public double YieldInPercent;   

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

Result Result stored in variable
Defect per Opportunity dpmo.Result.DPO
Defect per Million Opportunity dpmo.Result.DPMO
Yield in % dpmo.Result.YieldInPercent

ProcessPerformanceFrDPMO Class

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

/// <summary>
/// Determine Process Performance from DPMO
/// </summary>
public class ProcessPerformanceFrDPMO
    private int N = 0;
    private int D = 0;
    private int O = 0;
    private double DPO = 0;
    private double DPMO = 0;
    private double yieldInPercent = 0;
    /// <summary>
    /// ProcessPerformanceFrDPMO Result
    /// </summary>
    public ProcessPerformanceFrDPMOResult Result = new ProcessPerformanceFrDPMOResult();

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

#endregion //Constructors

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

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

    /// <summary>
    /// Write only property: number of defect opportunities
    /// </summary>
    public int NumOfDefectOpportunities
        set { O = value; }

Once the ProcessPerformanceFrDPMO object is instantiated, the user needs to set the input values for the number of units processed, number of defects, and the number of defect opportunities, as follows:

ProcessPerformanceFrDPMO dpmo = new ProcessPerformanceFrDPMO();
dpmo.NumOfUnitProcessed = 40000;
dpmo.NumOfDefects = 165;
dpmo.NumOfDefectOpportunities = 6;

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

The Analyze() method is implemented as follows:

/// <summary>
/// Calculate the process performance from DPMO
/// </summary>
public void Analyze()
    DPO = (double)D / N / O;
    DPMO = DPO * 1000000;
    yieldInPercent = 100 * (1 - DPO);
    Result.DPO = DPO;
    Result.DPMO = DPMO;
    Result.YieldInPercent = yieldInPercent;


The program presented here provides a simple way to obtain process performance through DPMO.


  • 8 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 4 Pin
Kanasz Robert6-Nov-12 2:31
mvpKanasz Robert6-Nov-12 2:31 
GeneralMy vote of 4 Pin
Sergio Andrés Gutiérrez Rojas14-Jun-12 11:29
memberSergio Andrés Gutiérrez Rojas14-Jun-12 11:29 
GeneralRe: My vote of 4 Pin
Sitt Chee Keen17-Jun-12 15:18
memberSitt Chee Keen17-Jun-12 15:18 
GeneralMy vote of 4 Pin
fredatcodeproject9-Jun-12 11:07
memberfredatcodeproject9-Jun-12 11:07 
GeneralRe: My vote of 4 Pin
Sitt Chee Keen11-Jun-12 16:50
memberSitt Chee Keen11-Jun-12 16:50 

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 | Cookies | Terms of Use | Mobile
Web03 | 2.8.180712.1 | Last Updated 14 Jun 2012
Article Copyright 2012 by Sitt Chee Keen
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid