```
x <- rnorm(25, 100, 5)
ZTest(x, mu=99, sd_pop=5)
# the classic interface
with(sleep, ZTest(extra[group == 1], extra[group == 2], sd_pop=2))
# the formula interface
ZTest(extra ~ group, data = sleep, sd_pop=2)
# Stahel (2002), pp. 186, 196
d.tyres <- data.frame(A=c(44.5,55,52.5,50.2,45.3,46.1,52.1,50.5,50.6,49.2),
B=c(44.9,54.8,55.6,55.2,55.6,47.7,53,49.1,52.3,50.7))
with(d.tyres, ZTest(A, B, sd_pop=3, paired=TRUE))
d.oxen <- data.frame(ext=c(2.7,2.7,1.1,3.0,1.9,3.0,3.8,3.8,0.3,1.9,1.9),
int=c(6.5,5.4,8.1,3.5,0.5,3.8,6.8,4.9,9.5,6.2,4.1))
with(d.oxen, ZTest(int, ext, sd_pop=1.8, paired=FALSE))
```

Run the code above in your browser using DataLab