Using R to Fix Data Quality: Section 6

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?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值