SlideShare una empresa de Scribd logo
1 de 12
Samples of Statistical Work
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")
#### 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

Más contenido relacionado

La actualidad más candente

Conversion from infix to prefix using stack
Conversion from infix to prefix using stackConversion from infix to prefix using stack
Conversion from infix to prefix using stack
Haqnawaz Ch
 
Gssl
GsslGssl
Gssl
ncct
 

La actualidad más candente (20)

Clock For My
Clock For MyClock For My
Clock For My
 
Cse presentation ratul
Cse presentation ratulCse presentation ratul
Cse presentation ratul
 
Pert2 management
Pert2 managementPert2 management
Pert2 management
 
Control system lab nyquist plot
Control system lab nyquist plotControl system lab nyquist plot
Control system lab nyquist plot
 
Pert management
Pert management Pert management
Pert management
 
2 19-2018-mean of all runs
2 19-2018-mean of all runs2 19-2018-mean of all runs
2 19-2018-mean of all runs
 
Lec 2 construction management
Lec 2 construction managementLec 2 construction management
Lec 2 construction management
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stackConversion from infix to prefix using stack
Conversion from infix to prefix using stack
 
Printf and scanf
Printf and scanfPrintf and scanf
Printf and scanf
 
Plantas industriales .
Plantas industriales . Plantas industriales .
Plantas industriales .
 
Orden de las operaciones
Orden de las operacionesOrden de las operaciones
Orden de las operaciones
 
6
66
6
 
Gssl
GsslGssl
Gssl
 
openCypher Technology Compatibility Kit (TCK)
openCypher Technology Compatibility Kit (TCK)openCypher Technology Compatibility Kit (TCK)
openCypher Technology Compatibility Kit (TCK)
 
Module 2 topic 2 notes
Module 2 topic 2 notesModule 2 topic 2 notes
Module 2 topic 2 notes
 
Graph Connect: Tuning Cypher
Graph Connect: Tuning CypherGraph Connect: Tuning Cypher
Graph Connect: Tuning Cypher
 
Resource management
Resource managementResource management
Resource management
 
DSD-INT 2018 The new 3D Subsurface tool - Vermeulen
DSD-INT 2018 The new 3D Subsurface tool - VermeulenDSD-INT 2018 The new 3D Subsurface tool - Vermeulen
DSD-INT 2018 The new 3D Subsurface tool - Vermeulen
 
Transport in india
Transport in indiaTransport in india
Transport in india
 
F(2)
F(2)F(2)
F(2)
 

Destacado (12)

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

Similar a Presentation2

Useful javascript
Useful javascriptUseful javascript
Useful javascript
Lei Kang
 
Data structure new lab manual
Data structure  new lab manualData structure  new lab manual
Data structure new lab manual
SANTOSH RATH
 
Using the following code Install Packages pip install .pdf
Using the following code Install Packages   pip install .pdfUsing the following code Install Packages   pip install .pdf
Using the following code Install Packages pip install .pdf
picscamshoppe
 
Palestra sobre Collections com Python
Palestra sobre Collections com PythonPalestra sobre Collections com Python
Palestra sobre Collections com Python
pugpe
 

Similar a Presentation2 (20)

Useful javascript
Useful javascriptUseful javascript
Useful javascript
 
RDataMining slides-r-programming
RDataMining slides-r-programmingRDataMining slides-r-programming
RDataMining slides-r-programming
 
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
 
R
RR
R
 
Regression and Classification with R
Regression and Classification with RRegression and Classification with R
Regression and Classification with R
 
Data structure new lab manual
Data structure  new lab manualData structure  new lab manual
Data structure new lab manual
 
R programming language
R programming languageR programming language
R programming language
 
Are we ready to Go?
Are we ready to Go?Are we ready to Go?
Are we ready to Go?
 
Lab loop
Lab loopLab loop
Lab loop
 
Operating system labs
Operating system labsOperating system labs
Operating system labs
 
JavaScript Event Loop
JavaScript Event LoopJavaScript Event Loop
JavaScript Event Loop
 
ECE-PYTHON.docx
ECE-PYTHON.docxECE-PYTHON.docx
ECE-PYTHON.docx
 
Using the following code Install Packages pip install .pdf
Using the following code Install Packages   pip install .pdfUsing the following code Install Packages   pip install .pdf
Using the following code Install Packages pip install .pdf
 
Machine Learning With R
Machine Learning With RMachine Learning With R
Machine Learning With R
 
Palestra sobre Collections com Python
Palestra sobre Collections com PythonPalestra sobre Collections com Python
Palestra sobre Collections com Python
 
Cd practical file (1) start se
Cd practical file (1) start seCd practical file (1) start se
Cd practical file (1) start se
 
Coscup2021-rust-toturial
Coscup2021-rust-toturialCoscup2021-rust-toturial
Coscup2021-rust-toturial
 
Os lab 1st mid
Os lab 1st midOs lab 1st mid
Os lab 1st mid
 
Os lab upto_1st_mid
Os lab upto_1st_midOs lab upto_1st_mid
Os lab upto_1st_mid
 
Os lab upto 1st mid
Os lab upto 1st midOs lab upto 1st mid
Os lab upto 1st mid
 

Más de chian2208

Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation2
Presentation2Presentation2
Presentation2
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 
Presentation
PresentationPresentation
Presentation
chian2208
 

Más de chian2208 (9)

Presentation
PresentationPresentation
Presentation
 
Presentation2
Presentation2Presentation2
Presentation2
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 
Presentation
PresentationPresentation
Presentation
 

Presentation2

  • 2.
  • 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")
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 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)