Idea Transcript
Process Improvement Using , ylim=ylim, xlab="Sequence order", ylab="Room temperature [K]") 14 15 16 17
16
https://en.wikipedia.org/wiki/Quantization_(signal_processing) http://openmv.net/info/website-traffic http://openmv.net/info/room-temperature http://openmv.net
Chapter 1. Visualizing Process ) col="black") pch='o', col="black")
legend(20, 300, legend=c("Front left", "Front right", "Back left", "Back right"), col=c("blue", "blue", "black", "black"), lwd=2, pch=c(NA, "o", NA, "o")) dev.off()
A sequence plot of the , width=6, heigh=5) par(mar=c(2, 4, 0.2, 0.2)) # (bottom, left, top, right) spacing around plot boxplot(first100, ylab="Thickness [mils]") dev.off() 19 20 21
18
https://cran.r-project.org/web/packages/YaleToolkit/ http://learnche.mcmaster.ca/4C3/Software_tutorial/Extending_R_with_packages http://openmv.net/info/six-point-board-thickness
Chapter 1. Visualizing Process )
A built-in function exists in R that runs the above calculations and shows a scatter plot. The 45 degree line is added using the qqline(...) function. However, a better function that adds a confidence limit
2.7. Normal distribution
39
Process Improvement Using ) # also proves it isn't
40
Chapter 2. Univariate ) # Now use the identify(...) command, with the same Particle size: level identify(rm$size3, labels=rm$Sample) plot(rm$density1, ylab="Particle density: identify(rm$density1, labels=rm$Sample) plot(rm$density2, ylab="Particle density: identify(rm$density2, labels=rm$Sample) plot(rm$density3, ylab="Particle density: identify(rm$density3, labels=rm$Sample) 36 37
2") 3") level 1") level 2") level 3")
http://openmv.net/info/raw-material-properties http://learnche.mcmaster.ca/4C3/Software_tutorial
2.15. Exercises
65
Process Improvement Using , xlab="Energy required over 24 hours (W.h)", col="White", ylim=c(0,20)) 42 43
https://en.wikipedia.org/wiki/Biochemical_oxygen_demand http://openmv.net/info/batch-yields
2.15. Exercises
71
Process Improvement Using ] Visits[DayOfWeek=="Tuesday"] Visits[DayOfWeek=="Wednesday"] Visits[DayOfWeek=="Thursday"] Visits[DayOfWeek=="Friday"] Visits[DayOfWeek=="Saturday"] Visits[DayOfWeek=="Sunday"]
# Look at a boxplot of the , width=7, height=7, res=250, pointsize=14) par(mar=c(4.2, 4.2, 0.2, 0.2)) # (bottom, left, top, right) boxplot(visits.Fri, visits.Sat, names=c("Friday", "Saturday"), ylab="Number of visits", cex.lab=1.5, cex.main=1.8, cex.sub=1.8, cex.axis=1.8) dev.off() # Use the "group_difference" function from question 4 group_difference(visits.Sat, visits.Fri) # z = 3.104152 # t.critical = 0.9985255 (1-0.001474538) # # # # # # # # # #
All differences: z-values ---------------------------Mon Tue Wed Mon 0.0000000 NA NA Tue -0.2333225 0.000000 NA Wed -0.7431203 -0.496627 0.000000 Thu 0.8535025 1.070370 1.593312 Fri 2.4971347 2.683246 3.249602 Sat 5.4320361 5.552498 6.151868 Sun 3.9917201 4.141035 4.695493
74
Thu
Fri Sat NA NA NA NA NA NA NA NA NA 0.000000 NA NA 1.619699 0.000000 NA 4.578921 3.104152 0.000000 3.166001 1.691208 -1.258885
Sun NA NA NA NA NA NA 0
Chapter 2. Univariate , width=12, height=7, res=300, pointsize=14) par(mar=c(4.2, 4.2, 2.2, 0.2)) layout(matrix(c(1,2), 1, 2)) plot(z, norm, type="p", pch=".", cex=5, main="Normal and t-distribution (df=6)", ylab="Cumulative probability") lines(z, pt(z, df=6), type="l", lwd=2) legend(0.5, y=0.35, legend=c("Normal distribution", "t-distribution (df=8)"), pch=c(".", "-"), pt.cex=c(5, 2)) plot(z, norm, type="p", pch=".", cex=5, main="Normal and t-distribution (df=35)", ylab="Cumulative probability") lines(z, pt(z, df=35), type="l", lwd=2) legend(0.5, y=0.35, legend=c("Normal distribution", "t-distribution (df=35)"), pch=c(".", "-"), pt.cex=c(5, 2)) dev.off()
The above source code and figure output shows that the 𝑡-distribution starts being indistinguishable from the normal distribution after about 35 to 40 degrees of freedom. This means that when we deal with large sample sizes (over 40 or 50 samples), then we can use critical values from the normal distribution rather than the 𝑡-distribution. Furthermore, it indicates that our estimate of the variance is a pretty good estimate of the population variance for largish sample sizes. Question 21
Explain why tests of differences are insensitive to unit changes. If this were not the case, then one could show a significant difference for a weight-loss supplement when measuring waist size in millimetres, yet show no significant difference when measuring in inches!
76
Chapter 2. Univariate , ylab="Subgroup average") plot(subgroup.sd, type="b", ylab="Subgroup spread") # Report your target value, lower control limit and upper control limit, showing # the calculations you made. target