您的位置:首页 > 其它

Using R to Fix Data Quality: Section 6

2013-04-13 20:22 260 查看

Section 6: Control Charts

Overview

A common issue in the field of process control and manufacturing is that how to find the sudden spike in productions. A control chart can make a view to show us which productions are different from others. In this section, we are going to talk about how
to create a control chart.

Proportions Control Charts

There is more than one way to create a control chart. In this demo, we prefer to create a proportions control charts.

A reference of it: http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc332.htm

Read CSV data

The data we are going to use in this demo is wafers.csv. As can be seen, there are two columns in the table. One is Sample.Number, and the other is Fraction.Defectives

> data = read.csv('wafers.csv')

> head(data)

Sample.Number Fraction.Defectives

1 1 0.24

2 2 0.30

3 3 0.16

4 4 0.20

5 5 0.08

6 6 0.14

Count the mean of defectives:

> pbar=mean(data$Fraction.Defectives)

Count the upper control limit (UCL) and lower control limit (LCL):

> sd=sqrt((pbar*(1-pbar))/50)

> ucl=pbar +(3*sd)

> lcl=pbar-(3*sd)

Create the chart:

> plot(data$Fraction.Defectives, type="b", ylim=c(0,1), ylab="proportion defective")

> abline(h=pbar,lw=2)

> abline(h=ucl,lw=1)

> abline(h=lcl,lw=1)

Congratulations! You have completed your Control Chart.

Practice Question

1. Is there any process out of control? If so, which points?

2. What are the values of the UCL and LCL?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: