SlideShare a Scribd company logo
Samples of Statistical Work
Presentation2
Operator=as.factor(c(rep("Operator 1", 4), rep("Operator 2", 4), rep("Operator 3", 4), rep("Operator 4", 4)))   ####
COLUMN EFFECT ####
Order=as.factor(c(rep(1:4, 4)))
Method=as.factor(c("C", "B", "A", "D", "D", "C", "B", "A", "A", "D", "C", "B", "B", "A", "D", "C"))
Time=c(10, 7, 5, 10, 14, 18, 10, 10, 7, 11, 11, 12, 8, 8, 9, 14)
tv.data=data.frame(Operator, Order, Method, Time)
tv.data
#### SOME EXPLORATORY PLOTS ####
plot.design(tv.data, main="Generated by Plot Design")
boxplot(split(Time, Method), main="Observations vs Method")
boxplot(split(Time, Operator), main="Observations vs Operator")
boxplot(split(Time, Order), main="Observations vs Order of Assembly")
Presentation2
Presentation2
Presentation2
Presentation2
Presentation2
Presentation2
Presentation2
#### ANOVA ####

milk.aov=aov(Obs ~ Solution + Days, data=milk.data)

summary(milk.aov)

anova(milk.aov)

#### SOME PLOTS ####

par(mfrow=c(2,2))

plot(milk.aov)


#### Fisher LSD ####
y.bar<-tapply(Obs, Solution, mean)
MSE<-anova(milk.aov)$Mean[3]

(t_cr<-qt(0.025,6,lower.tail=F))
(t_12<-(y.bar[1] - y.bar[2])/sqrt(MSE*2/4))
(t_13<-(y.bar[1] - y.bar[3])/sqrt(MSE*2/4))
(t_23<-(y.bar[2] - y.bar[3])/sqrt(MSE*2/4))

# We reject H0 if |t| > t_cr
abs(t_12)>t_cr
abs(t_13)>t_cr
abs(t_23)>t_cr

# Or we can compute P-value:
2*pt(abs(t_12), 6,lower.tail=F)
2*pt(abs(t_13), 6,lower.tail=F)
2*pt(abs(t_23), 6,lower.tail=F)
Presentation2

More Related Content

PPTX
Presentation2
DOCX
Implementation of strassens
PPTX
XIX PUG-PE - Pygame game development
TXT
Simulador carrera de caballos desarrollado en C++
PPT
Bayesian learning
PPTX
MapReduce
DOCX
แผนการจัดการเรียนรู้ที่ ๓
Presentation2
Implementation of strassens
XIX PUG-PE - Pygame game development
Simulador carrera de caballos desarrollado en C++
Bayesian learning
MapReduce
แผนการจัดการเรียนรู้ที่ ๓

What's hot (20)

PDF
Clock For My
PPTX
Cse presentation ratul
PDF
Pert2 management
DOCX
Control system lab nyquist plot
PDF
Pert management
PPTX
2 19-2018-mean of all runs
PDF
Lec 2 construction management
DOCX
Conversion from infix to prefix using stack
PPTX
Printf and scanf
PPTX
Plantas industriales .
PPTX
Orden de las operaciones
PDF
Gssl
PDF
openCypher Technology Compatibility Kit (TCK)
PPT
Module 2 topic 2 notes
PDF
Graph Connect: Tuning Cypher
PDF
Resource management
PDF
DSD-INT 2018 The new 3D Subsurface tool - Vermeulen
TXT
Transport in india
TXT
F(2)
Clock For My
Cse presentation ratul
Pert2 management
Control system lab nyquist plot
Pert management
2 19-2018-mean of all runs
Lec 2 construction management
Conversion from infix to prefix using stack
Printf and scanf
Plantas industriales .
Orden de las operaciones
Gssl
openCypher Technology Compatibility Kit (TCK)
Module 2 topic 2 notes
Graph Connect: Tuning Cypher
Resource management
DSD-INT 2018 The new 3D Subsurface tool - Vermeulen
Transport in india
F(2)
Ad

Viewers also liked (12)

PPT
Icai cochi - ipr - 23.08.2013
PDF
Lee youtaidanny _fyp
PPTX
Share and Care with your Lunch Box
PDF
交點台中Vol.3 - 兩分鐘自我介紹
PPTX
How to use Socrative
PPTX
Reports Project
PPTX
Presentation
PDF
Ghumrahi k jhute khuda
ODP
Some yritysasiakas
PDF
Cl31377380
PPTX
Artes clásicas y practicas artísticas
PPTX
акк із добутку та дробу
Icai cochi - ipr - 23.08.2013
Lee youtaidanny _fyp
Share and Care with your Lunch Box
交點台中Vol.3 - 兩分鐘自我介紹
How to use Socrative
Reports Project
Presentation
Ghumrahi k jhute khuda
Some yritysasiakas
Cl31377380
Artes clásicas y practicas artísticas
акк із добутку та дробу
Ad

Similar to Presentation2 (20)

PDF
Useful javascript
PDF
RDataMining slides-r-programming
PDF
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
PPTX
PDF
Regression and Classification with R
DOCX
Data structure new lab manual
PPTX
R programming language
PDF
Are we ready to Go?
DOCX
Basic python laboratoty_ PSPP Manual .docx
DOCX
Lab loop
DOCX
Operating system labs
PDF
JavaScript Event Loop
DOCX
ECE-PYTHON.docx
PDF
Using the following code Install Packages pip install .pdf
PDF
Machine Learning With R
PDF
Palestra sobre Collections com Python
DOCX
Cd practical file (1) start se
PDF
Coscup2021-rust-toturial
PDF
Os lab upto_1st_mid
PDF
Os lab 1st mid
Useful javascript
RDataMining slides-r-programming
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
Regression and Classification with R
Data structure new lab manual
R programming language
Are we ready to Go?
Basic python laboratoty_ PSPP Manual .docx
Lab loop
Operating system labs
JavaScript Event Loop
ECE-PYTHON.docx
Using the following code Install Packages pip install .pdf
Machine Learning With R
Palestra sobre Collections com Python
Cd practical file (1) start se
Coscup2021-rust-toturial
Os lab upto_1st_mid
Os lab 1st mid

More from chian2208 (9)

PPTX
Presentation
PPTX
Presentation2
PPTX
Presentation
PPTX
Presentation
PPTX
Presentation
PPTX
Presentation
PPTX
Presentation
PPTX
Presentation
PPTX
Presentation
Presentation
Presentation2
Presentation
Presentation
Presentation
Presentation
Presentation
Presentation
Presentation

Presentation2

  • 3. Operator=as.factor(c(rep("Operator 1", 4), rep("Operator 2", 4), rep("Operator 3", 4), rep("Operator 4", 4))) #### COLUMN EFFECT #### Order=as.factor(c(rep(1:4, 4))) Method=as.factor(c("C", "B", "A", "D", "D", "C", "B", "A", "A", "D", "C", "B", "B", "A", "D", "C")) Time=c(10, 7, 5, 10, 14, 18, 10, 10, 7, 11, 11, 12, 8, 8, 9, 14) tv.data=data.frame(Operator, Order, Method, Time) tv.data #### SOME EXPLORATORY PLOTS #### plot.design(tv.data, main="Generated by Plot Design") boxplot(split(Time, Method), main="Observations vs Method") boxplot(split(Time, Operator), main="Observations vs Operator") boxplot(split(Time, Order), main="Observations vs Order of Assembly")
  • 11. #### ANOVA #### milk.aov=aov(Obs ~ Solution + Days, data=milk.data) summary(milk.aov) anova(milk.aov) #### SOME PLOTS #### par(mfrow=c(2,2)) plot(milk.aov) #### Fisher LSD #### y.bar<-tapply(Obs, Solution, mean) MSE<-anova(milk.aov)$Mean[3] (t_cr<-qt(0.025,6,lower.tail=F)) (t_12<-(y.bar[1] - y.bar[2])/sqrt(MSE*2/4)) (t_13<-(y.bar[1] - y.bar[3])/sqrt(MSE*2/4)) (t_23<-(y.bar[2] - y.bar[3])/sqrt(MSE*2/4)) # We reject H0 if |t| > t_cr abs(t_12)>t_cr abs(t_13)>t_cr abs(t_23)>t_cr # Or we can compute P-value: 2*pt(abs(t_12), 6,lower.tail=F) 2*pt(abs(t_13), 6,lower.tail=F) 2*pt(abs(t_23), 6,lower.tail=F)