Statistics and Tests for Phase 2

In this document, we present the statistics of their experience on Rust’s safety rules.

PA and PB

Answers of PA (“No” is correct):

dat = read.csv('../survey-responses/responses.csv')
x = table(dat$PA.Answer)
x
## 
##  No Yes 
##  84  17

Answers of PB (“Yes” is correct):

x = table(dat$PB.Answer)
x
## 
##  No Yes 
##  23  78

Both answers are correct:

nrow(dat[dat$PB.Answer=='Yes'&dat$PA.Answer=='No', ])
## [1] 71

PC and PD

Q1: Error Token Highlighting

main effect of PC, \(p\)-value:

result$ANOVA$p
## [1] 0.003977352

main effect of PD, \(p\)-value:

result$ANOVA$p
## [1] 0.0305516

pairwise test for PC:

pairwise.t.test(dat$PC.Q1.rating, dat$Which.PC., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PC.Q1.rating and dat$Which.PC. 
## 
##    C1     C2    
## C2 0.0033 -     
## C3 0.8213 0.0561
## 
## P value adjustment method: bonferroni

pairwise test for PD:

pairwise.t.test(dat$PD.Q1.rating, dat$Which.PD., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PD.Q1.rating and dat$Which.PD. 
## 
##    D1    D2   
## D2 0.173 -    
## D3 1.000 0.033
## 
## P value adjustment method: bonferroni

Q2

main effect of PC, \(p\)-value:

result$ANOVA$p
## [1] 0.1788164

main effect of PD, \(p\)-value:

result$ANOVA$p
## [1] 0.008989766

pairwise test for PC:

pairwise.t.test(dat$PC.Q2..b..Please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10....1...means...very.easy....and...10...means...very.difficult...., dat$Which.PC., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PC.Q2..b..Please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10....1...means...very.easy....and...10...means...very.difficult.... and dat$Which.PC. 
## 
##    C1   C2  
## C2 0.47 -   
## C3 1.00 0.22
## 
## P value adjustment method: bonferroni

pairwise test for PD:

pairwise.t.test(dat$PD.Q2..b..Please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10....1...means...very.easy....and...10...means...very.difficult...., dat$Which.PD., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PD.Q2..b..Please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10....1...means...very.easy....and...10...means...very.difficult.... and dat$Which.PD. 
## 
##    D1     D2    
## D2 0.0098 -     
## D3 1.0000 0.0765
## 
## P value adjustment method: bonferroni

Q3

main effect of PC, \(p\)-value:

result$p.value
## [1] 0.003987513

main effect of PD, \(p\)-value:

result$p.value
## [1] 0.008461801

pairwise test for PC:

tabs = xtabs(~Which.PC.+PC.Q3.rating, dat)
chisq.post.hoc(tabs,control=c("bonferroni"))
## Adjusted p-values used the bonferroni method.
##   comparison  raw.p  adj.p
## 1  C1 vs. C2 0.0348 0.1045
## 2  C1 vs. C3 0.5527 1.0000
## 3  C2 vs. C3 0.0030 0.0090

pairwise test for PD:

tabs = xtabs(~Which.PD.+PD.Q3.rating, dat)
chisq.post.hoc(tabs,control=c("bonferroni"))
## Adjusted p-values used the bonferroni method.
##   comparison  raw.p  adj.p
## 1  D1 vs. D2 0.0029 0.0086
## 2  D1 vs. D3 0.1935 0.5805
## 3  D2 vs. D3 0.0935 0.2804

Q4

main effect of PC, \(p\)-value:

result$ANOVA$p
## [1] 0.546303

main effect of PD, \(p\)-value:

result$ANOVA$p
## [1] 0.01590166

pairwise test for PC:

pairwise.t.test(dat$PC.Q4..d..Given.the.above.error.messages..please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10.., dat$Which.PC., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PC.Q4..d..Given.the.above.error.messages..please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10.. and dat$Which.PC. 
## 
##    C1   C2  
## C2 1.00 -   
## C3 1.00 0.83
## 
## P value adjustment method: bonferroni

pairwise test for PD:

pairwise.t.test(dat$PD.Q4..d..Given.the.above.error.messages..please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10.., dat$Which.PD., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PD.Q4..d..Given.the.above.error.messages..please.rate.how.easy.or.how.difficult.it.is.to.figure.out.the.error.of.the.above.program.on.a.scale.from.1.to.10.. and dat$Which.PD. 
## 
##    D1    D2   
## D2 0.014 -    
## D3 0.949 0.171
## 
## P value adjustment method: bonferroni

Q5

main effect of PC, \(p\)-value:

result$ANOVA$p
## [1] 0.1626395

main effect of PD, \(p\)-value:

result$ANOVA$p
## [1] 0.03938776

pairwise test for PC:

pairwise.t.test(dat$PC.Q5..e..Please.rate.the.helpfulness.of.the.above.error.messages.to.your.understanding.of.the.error.on.a.scale.from.1.to.10.., dat$Which.PC., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PC.Q5..e..Please.rate.the.helpfulness.of.the.above.error.messages.to.your.understanding.of.the.error.on.a.scale.from.1.to.10.. and dat$Which.PC. 
## 
##    C1   C2  
## C2 0.20 -   
## C3 0.51 1.00
## 
## P value adjustment method: bonferroni

pairwise test for PD:

pairwise.t.test(dat$PD.Q5..e..Please.rate.the.helpfulness.of.the.above.error.messages.to.your.understanding.of.the.error.on.a.scale.from.1.to.10.., dat$Which.PD., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PD.Q5..e..Please.rate.the.helpfulness.of.the.above.error.messages.to.your.understanding.of.the.error.on.a.scale.from.1.to.10.. and dat$Which.PD. 
## 
##    D1    D2   
## D2 0.216 -    
## D3 1.000 0.042
## 
## P value adjustment method: bonferroni

Q6

main effect of PC, \(p\)-value:

result$ANOVA$p
## [1] 0.03076242

main effect of PD, \(p\)-value:

result$ANOVA$p
## [1] 0.03088257

pairwise test for PC:

pairwise.t.test(dat$PC.Q6.rating, dat$Which.PC., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PC.Q6.rating and dat$Which.PC. 
## 
##    C1    C2   
## C2 0.197 -    
## C3 1.000 0.029
## 
## P value adjustment method: bonferroni

pairwise test for PD:

pairwise.t.test(dat$PD.Q6.rating, dat$Which.PD., p.adjust = "bonferroni", pooled.sd=T)
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  dat$PD.Q6.rating and dat$Which.PD. 
## 
##    D1    D2   
## D2 0.519 -    
## D3 0.632 0.026
## 
## P value adjustment method: bonferroni