1 Retrospective Data Analysis

We will use data that has been already collected to find trends and patterns. Using previously collected data saves us time and effort. It also gives us an idea about the sample we have and the process.

library(qcc)
dat <- read.csv("C:/Users/Acer/Downloads/retrospective_resistivity.csv")

We read the data into dat. Now we will plot some charts to get better visual understanding.

x_bar <-qcc(data=dat, type="xbar", size=4, col="gold", title="Xbar")

We can see that there are two numbers are beyond the limit.

1.1 R chart

Now we will plot the R-chart

r_chart <- qcc(data = dat, type = "R", sizes = 4, title = "R Chart")

We will now Remove subgroups that are out of control

1.2 X bar chart

We will remove points 5 and 15. When we remove points we look at what was going on during the time of this runs. We look for anomalies like high/low temperature or pressure. We try to find an explanation for this anomalies in our data.

retroclean <- dat[-5, ]
retroclean1 <- retroclean[-14, ]
xbarchart <- qcc(data = retroclean1, type = "xbar", sizes = 4, title = "X Bar")

1.3 R chart

rchart <- qcc(data = retroclean1, type = "R", sizes = 4, title = "R Chart")

This is a controlled process now. The out of control points may happen because of external factors. We may try to find an explanation.

2 Online Resistivity

Now we will use the data we got from the previous testing to see if the current data is in control. We will use the CL,standard deviation,LCL and UCL.

onlinedat <- read.csv("C:/Users/Acer/Downloads/online_resistivity.csv")

2.0.1 Now we plot the X bar chart

online_xbar <- qcc(data = onlinedat, type = "xbar", sizes = 4,center =xbarchart$center,std.dev = xbarchart$std.dev,title = "X Bar Chart")

2.0.2 Now we will chart the R chart

online_r <- qcc(data = onlinedat, type = "R", sizes = 4,center = rchart$center,std.dev = rchart$std.dev,title = "R Chart")

As we can see the data is in control. We used a older sample to determine the CL , UCL and LCL. Then we removed the out of control points. Visual tools came in handy here. Then we just plotted the x bar chart and the r chart using the CL,UCL and LCL from the older data-set. The older data-set gives us a baseline to test the new data to test against. In the end the newer data-set is in control