User Tools

Site Tools


summary_of_hypothesis_testing:code01

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

summary_of_hypothesis_testing:code01 [2025/11/30 15:29] – created hkimscilsummary_of_hypothesis_testing:code01 [2025/11/30 15:39] (current) hkimscil
Line 111: Line 111:
 m.p2 m.p2
  
 +x.p.est <- seq(m.treated.s-5*se.s, 
 +               m.treated.s+5*se.z1, 
 +               length.out = 500)
 +y.p.est <- dnorm(x.p.est, m.treated.s, se.s)
 +
 +plot(x.p.est, y.p.est, type = "l", 
 +     lwd=3, 
 +     main = "population mean estimated from a sample",
 +     xlab = "Value", ylab = "Density")
 +se1 <- c(m.treated.s-se.s, m.treated.s+se.s)
 +se2 <- c(m.treated.s-2*se.s, m.treated.s+2*se.s)
 +se3 <- c(m.treated.s-3*se.s, m.treated.s+3*se.s)
 +abline(v=c(m.treated.s,se1,se2,se3), 
 +       col=c('black', 'darkorange', 'darkorange',
 +             'darkgreen', 'darkgreen', 
 +             'darkblue', 'darkblue'), 
 +       lwd=2)
  
 pt(diff/se.s, df=n.s-1, lower.tail = F) * 2 pt(diff/se.s, df=n.s-1, lower.tail = F) * 2
 t.test(treated.s, mu=m.p1, var.equal = T) t.test(treated.s, mu=m.p1, var.equal = T)
- 
  
 </code> </code>
summary_of_hypothesis_testing/code01.txt · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki