# difference between normal(z) distribution and t distribution
curve(dnorm(x), from = -4, to = 3+4,
main = "normalized distribution of sample means",
ylab = "Density", xlab = "z-value", col = "black", lwd = 2)
curve(dt(x, 3), from = -4, to = 3+4,
main = "normalized distribution of sample \n means from p1 and p2 (n=16)",
ylab = "Density", xlab = "z-value", col = "red", lwd = 2, add=T)
curve(dt(x, 7), from = -4, to = 3+4,
main = "normalized distribution of sample \n means from p1 and p2 (n=16)",
ylab = "Density", xlab = "z-value", col = "red", lwd = 2, add=T)
curve(dt(x, 15), from = -4, to = 3+4,
main = "normalized distribution of sample \n means from p1 and p2 (n=16)",
ylab = "Density", xlab = "z-value", col = "red", lwd = 2, add=T)
curve(dt(x, 30), from = -4, to = 3+4,
main = "normalized distribution of sample \n means from p1 and p2 (n=16)",
ylab = "Density", xlab = "z-value", col = "red", lwd = 2, add=T)
{{.:pasted:20260414-232752.png}}
# difference between normal(z) distribution and t distribution
curve(dnorm(x), from = -4, to = 3+4,
main = "normalized distribution of sample means",
ylab = "Density", xlab = "z-value", col = "black", lwd = 2)
curve(dt(x, 3), from = -4, to = 3+4,
main = "normalized distribution of sample \n means from p1 and p2 (n=16)",
ylab = "Density", xlab = "z-value", col = "red", lwd = 2, add=T)
curve(dt(x, 10000000), from = -4, to = 3+4,
main = "normalized distribution of sample \n means from p1 and p2 (n=16)",
ylab = "Density", xlab = "z-value", col = "green", lwd = 2, add=T)
{{.:pasted:20260414-232849.png}}
qnorm(1-.05/2)
qt(1-.05/2, 5)
qt(1-.05/2, 50)
qt(1-.05/2, 50000000)
pnorm(2)
pt(2, 5)
pt(2, 30)
pt(2, 90)
pt(2, 190)
pt(2, 250)
pt(2, 400)
pt(2, 600)
pt(2, 1000)
pt(2, 1600)
pt(2, 2600)
pt(2, 10000)
pt(2, 100000)
pt(2, 1000000)