### ----------------------------------------------------------------------- ### Autor: Paul Fink, et. al. (Stand: SoSe 2017) ### ----------------------------------------------------------------------- ## ----t-test-daten-------------------------------------------------------- set.seed(12345) x <- rnorm(n = 50, mean = 4, sd = 2) ## ----t-test-------------------------------------------------------------- y <- t.test(x, mu = 4, alternative = "two.sided") y ## ----test-struktur------------------------------------------------------- str(y) ## ----test-pwert---------------------------------------------------------- pwert <- y$p.value pwert ## ----test-teststatistik-------------------------------------------------- teststatistik <- y$statistic teststatistik ## ----test-konfint-------------------------------------------------------- konfint <- y$conf.int konfint