# np Control Charts to Monitor Number of Defectives

• /
• Blog
• /
• np Control Charts to Monitor Number of Defectives

np control charts are a valuable tool in the field of statistical process control, which is widely used to monitor the stability and performance of a production process. Specifically, an np control chart is employed to track the number of defective items in a process where the sample size is constant. In this blog post, we will discuss the basics of np control charts, the formulas used, and how to interpret the results.

## What is an np Control Chart?

An np control chart is a type of control chart that monitors the number of defective items in a constant sample size (n) over time. It is particularly useful for processes that produce a large number of items, and it helps to identify variations that may signal a change in the process. By tracking the proportion of defective items, organizations can assess the stability and capability of a process and make data-driven decisions to improve quality.

## Formula Used:

The np control chart relies on three main components: the center line (CL), upper control limit (UCL), and lower control limit (LCL). These components are calculated using the following formulas:

• CL = np̄, where p̄ is the average proportion of defective items
• UCL = np̄ + 3 * √(np̄ * (1 - p̄))
• LCL = np̄ - 3 * √(np̄ * (1 - p̄)) (if LCL < 0, set LCL to 0)

## How to Use the np Control Chart Tool

Using the np control chart tool is a straightforward process. By following these simple steps, you can quickly analyze your data and make informed decisions based on the results.

### Step 1: Prepare Your Data

Before using the tool, ensure your data is organized into two columns. The first column should contain the sample size for each subgroup (n), and the second column should contain the number of defectives in each subgroup (p). Both columns should have a header. The sample sizes must be equal for all subgroups.

### Step 2: Input Your Data

Once your data is formatted correctly, copy it from your spreadsheet application (such as Microsoft Excel or Google Sheets) and paste it into the "Paste Excel data (two columns with header)" text area field in the tool.

### Step 3: Draw the Control Chart

Click the "Draw Control Chart" button. The tool will verify if the sample sizes in the first column are equal. If they are, the np control chart will be plotted below the button, along with the calculated mean, upper control limit (UCL), and lower control limit (LCL). If the sample sizes are not equal, a warning message will be displayed, and the chart will not be plotted.

### Step 4: Interpret the Results

Now that the np control chart is displayed, you can analyze the chart to identify any patterns or trends in your data. Look for points that fall outside the control limits or display a non-random pattern. These could indicate a special cause of variation, and further investigation may be required.

### np Control Chart

``` function processData(textData) { const lines = textData.trim().split('\n'); const data = lines.slice(1).map(line => line.split('\t').map(Number)); return { header: lines[0], data: data }; } function drawControlChart() { const textData = document.getElementById('data-input').value; const { header, data } = processData(textData); const sampleSizes = data.map(row => row[0]); const isEqualSampleSize = sampleSizes.every(sampleSize => sampleSize === sampleSizes[0]); if (!isEqualSampleSize) { document.getElementById('np-chart').innerHTML = ''; document.getElementById('np-chart-stats').innerHTML = ''; document.getElementById('warning').innerHTML = 'Warning: np chart is for equal sample size.'; return; } const sampleSize = data[0][0]; const defectiveItems = data.map(row => row[1]); const totalDefectives = defectiveItems.reduce((acc, val) => acc + val, 0); const averageProportion = totalDefectives / (data.length * sampleSize); const centerLine = sampleSize * averageProportion; const ucl = centerLine + 3 * Math.sqrt(sampleSize * averageProportion * (1 - averageProportion)); const lcl = Math.max(centerLine - 3 * Math.sqrt(sampleSize * averageProportion * (1 - averageProportion)), 0); drawNpChart(header, defectiveItems, centerLine, ucl, lcl); document.getElementById('np-chart-stats').innerHTML = `np Chart - Mean: \${centerLine.toFixed(2)}, UCL: \${ucl.toFixed(2)}, LCL: \${lcl.toFixed(2)}`; } function drawNpChart(header, data, centerLine, ucl, lcl) { const traceWithin = { x: data.map((_, index) => index + 1), y: data, mode: 'lines+markers', name: 'Data', marker: { color: data.map(value => (value >= lcl && value <= ucl) ? 'blue' : 'rgba(0, 0, 0, 0)'), size: 8 }, line: { color: 'blue' }, legendgroup: 'data', showlegend: false }; const traceOutside = { x: data.map((_, index) => index + 1), y: data, mode: 'markers', name: 'Out of control', marker: { color: data.map(value => (value < lcl || value > ucl) ? 'red' : 'rgba(0, 0, 0, 0)'), size: 10, symbol: data.map(value => (value < lcl || value > ucl) ? 'square' : 'circle') }, legendgroup: 'data', showlegend: true }; const traceCenterLine = { x: [0, data.length], y: [centerLine, centerLine], mode: 'lines', name: 'Mean', line: { color: 'grey', width: 2 } }; const traceUCL = { x: [0, data.length], y: [ucl, ucl], mode: 'lines', name: 'UCL', line: { color: 'red', width: 2, dash: 'dash' } }; const traceLCL = { x: [0, data.length], y: [lcl, lcl], mode: 'lines', name: 'LCL', line: { color: 'red', width: 2, dash: 'dash' } }; const layout = { title: `\${header} - np Chart`, xaxis: { title: 'Sample Number' }, yaxis: { title: header } }; Plotly.newPlot('np-chart', [traceWithin, traceOutside, traceCenterLine, traceUCL, traceLCL], layout); } ``` ``` const defaultData = "Sample Size\tNumber of Defectives\n50\t3\n50\t4\n50\t2\n50\t3\n50\t1\n50\t2\n50\t3\n50\t2\n50\t4\n50\t2"; document.getElementById("data-input").value = defaultData; drawControlChart(); ```

## How to Interpret an np Control Chart:

Once you have plotted the np control chart, it's essential to analyze and interpret the results. Here are some guidelines for interpreting an np control chart:

1. Observe the center line (CL), which represents the average number of defective items per sample. A stable process should have a consistent CL over time.
2. Check for points outside the control limits (UCL and LCL). If any data points fall beyond these limits, it indicates that the process may be out of control and requires further investigation.
3. Look for patterns or trends in the data, such as a shift in the center line or a continuous increase/decrease in the number of defective items. These patterns may indicate a change in the process, and identifying the cause can lead to improvements in process performance.

## Conclusion:

np control charts are a powerful tool for monitoring and analyzing the proportion of defective items in a process with a constant sample size. By understanding the principles behind np control charts and interpreting the results accurately, organizations can effectively manage process stability, enhance quality control, and drive continuous improvement in their production processes.

Similar Posts:

February 18, 2024

## Lean Six Sigma Green Belt (Accredited) Certification – CSSGB/LSSGB Exam Preparation

Lean Six Sigma Green Belt (Accredited) Certification – CSSGB/LSSGB Exam Preparation

February 19, 2024

## Practice Tests – Lean Six Sigma White Belt

Practice Tests – Lean Six Sigma White Belt

March 18, 2024

## Summary Sheets – Six Sigma Black Belt

Summary Sheets – Six Sigma Black Belt

December 27, 2022

## Geometric Distribution

Geometric Distribution

December 24, 2021

## Seven Quality Tools – Histogram

Seven Quality Tools – Histogram

December 18, 2022

## Calculating the Range: A Quick Guide

Calculating the Range: A Quick Guide

49 Courses on SALE!