# u Control Chart

• /
• Blog
• /
• u Control Chart

Process quality control is an essential aspect of manufacturing and service industries. Control charts have long been used to monitor and identify potential issues in these processes. The u chart, in particular, is a powerful tool for assessing the number of nonconforming items in a process over varying sample sizes. In this post, we'll explore the basics of u charts, how they work, and how to create one using a simple web application.

## The u Chart:

The u chart, also known as the "defects per unit" chart, is a type of control chart used to monitor the number of nonconforming items per unit in a process. It is ideal for situations where the sample sizes differ from one inspection period to another. The u chart can help determine if a process is stable or if there are any special causes of variation that need to be addressed.

## How the u Chart Works:

The u chart plots the number of nonconforming items per unit for each sample. The horizontal axis represents the sample number, while the vertical axis shows the number of nonconforming items per unit.

The centerline of the chart represents the average number of nonconforming items per unit, calculated as the total number of nonconforming items divided by the total sample size. Additionally, the chart features an upper control limit (UCL) and a lower control limit (LCL), which are used to identify potential outliers in the process. The UCL and LCL are calculated based on the average count and the sample size.

## Formula and Calculation:

The centerline of the chart represents the average number of nonconforming items per unit (ū), calculated as the total number of nonconforming items (Σc) divided by the total sample size (Σn):

ū = Σc / Σn

Additionally, the chart features an upper control limit (UCL) and a lower control limit (LCL), which are used to identify potential outliers in the process. The UCL and LCL are calculated based on the average count (ū) and the sample size (n) for each data point:

UCL = ū + 3 * sqrt(ū / n) LCL = max(0, ū - 3 * sqrt(ū / n))

## Using the u Chart Web Application:

Creating a u chart web application is made easy with HTML, CSS, and JavaScript, along with the Plotly library for data visualization. To use the application:

1. Prepare your data in two columns: sample size and the number of nonconforming items. Ensure the data has a header row.
2. Copy the data from a spreadsheet (e.g., Excel) or other sources.
3. Paste the data into the text area provided in the web application.
4. Click the "Draw Control Chart" button to generate the u chart.

The application will process the input data and display the u chart, highlighting points that fall outside the control limits. These points indicate potential issues in the process that may require further investigation.

## u Chart Online Calculator:

### u 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, data: data }; } function drawControlChart() { const textData = document.getElementById('data-input').value; const { header, data } = processData(textData); const sampleSizes = data.map(row => row); const nonconformingItems = data.map(row => row); const totalNonconformingItems = nonconformingItems.reduce((acc, val) => acc + val, 0); const totalSampleSize = sampleSizes.reduce((acc, val) => acc + val, 0); const averageCount = totalNonconformingItems / totalSampleSize; const ucl = sampleSizes.map(size => averageCount + 3 * Math.sqrt(averageCount / size)); const lcl = sampleSizes.map(size => Math.max(0, averageCount - 3 * Math.sqrt(averageCount / size))); drawUChart(header, nonconformingItems, sampleSizes, averageCount, ucl, lcl); } function drawUChart(header, data, sampleSizes, centerLine, ucl, lcl) { const proportions = data.map((value, index) => value / sampleSizes[index]); const traceData = { x: proportions.map((_, index) => index + 1), y: proportions, mode: 'lines+markers', name: 'Data', marker: { color: proportions.map((value, index) => (value >= lcl[index] && value <= ucl[index]) ? 'blue' : 'red'), size: 8, symbol: proportions.map((value, index) => (value >= lcl[index] && value <= ucl[index]) ? 'circle' : 'square') }, line: { color: 'blue' }, showlegend: false }; const traceUCL = { x: data.map((_, index) => index + 1), y: ucl, mode: 'lines', name: 'UCL', line: { color: 'red', width: 2, dash: 'dash' } }; const traceLCL = { x: data.map((_, index) => index + 1), y: lcl, mode: 'lines', name: 'LCL', line: { color: 'red', width: 2, dash: 'dash' } }; const traceCenterLine = { x: [0, data.length], y: [centerLine, centerLine], mode: 'lines', name: 'Mean', line: { color: 'grey', width: 2 } }; const layout = { title: `\${header} - u Chart`, xaxis: { title: 'Sample Number' }, yaxis: { title: header } }; Plotly.newPlot('u-chart', [traceData, traceUCL, traceLCL, traceCenterLine], layout); } const defaultData = "Sample Size\tNumber of Nonconforming Items\n50\t3\n50\t4\n60\t2\n50\t3\n50\t1\n50\t2\n70\t3\n50\t2\n50\t4\n50\t2"; document.getElementById("data-input").value = defaultData; drawControlChart(); ```

## Conclusion:

The u chart is a valuable tool for monitoring the number of nonconforming items in a process with varying sample sizes. By understanding its fundamentals, formula, and creating a simple web application, you can effectively assess process quality and identify areas for improvement. With this knowledge, you can work toward ensuring a stable and efficient process that meets the required quality standards.

Posted on April 16, 2023 by  Quality Gurus

Similar Posts:

January 6, 2023

## Trystorming: Unlock Creative Possibilities

Trystorming: Unlock Creative Possibilities

November 27, 2021

## The Future of Quality: Quality 4.0

The Future of Quality: Quality 4.0

April 16, 2023

## np Control Charts to Monitor Number of Defectives

np Control Charts to Monitor Number of Defectives

32 Courses on SALE!