# S. 2
source(file.path(pfadu, "normalf.R"))
mu = 3.5
SE = sigma(1, 6)/sqrt(5)


# S. 3
a = qnorm(0.025, mu, SE)
b = qnorm(0.975, mu, SE)

# S. 5
werte = c(6,  5,  6,  9,  6,  5,  6,  8,  5,  6, 10,  9)
werte = werte - 6

# S. 7
mu = mean(werte)
n = length(werte)
SE = sd(werte)/sqrt(n)


# S. 9
curve(dnorm(x, 0, 1), -4, 4)
curve(dt(x, 3), add=T, col="blue")
curve(dt(x, 10), add=T, col="red")

# S. 10
df = n - 1
mu  + SE * qt(0.025, df) 
mu  + SE * qt(0.975, df)

# S. 12
F2 = read.table(file.path(pfadu, "bet.txt"))
F2unt = F2$betont - F2$unbeton 

# S. 13
boxplot(F2unt)

# S. 14
mu = mean(F2unt)
n = length(F2unt)
SE = sd(F2unt)/sqrt(n)
df = n - 1
unten = mu + SE * qt(0.025, df)
oben = mu + SE * qt(0.975, df)

# S. 16
t.test(F2unt)

# S. 18
e.df = read.table(file.path(pfadu, "e.txt"))
head(e.df)
boxplot(F2 ~ Sprache, data = e.df)
t.test(F2 ~ Sprache, data = e.df)

# S 21
rtaz = c(56, 49, 50, 39, 49, 60, 51, 39, 67, 49, 60, 46, 55, 54, 52)
rtun = c(95,  94, 121,  48, 135,  87,  94, 135,  98, 125,  92, 115,  80,  98, 108)

# S 22
owl = read.table(file.path(pfadu, "owl.txt"))
