檢視圖片(df=1)
x <- seq(-pi*2, 2*pi, .05)
z <- dnorm(x)
y <- dt(x, df=1)
plot(x, z, type="l", bty="L", xlab="Standard unit", ylab="Density")
polygon(c(x, rev(x)), c(y, rev(z)), col='aliceblue')
lines(x, y, col='cadetblue')檢視圖片(df=10)
x <- seq(-pi*2, 2*pi, .05)
z <- dnorm(x) # 常態分佈
y <- dt(x, df=10) # x所對應的密度
plot(x, z, type="l", bty="L", xlab="Standard unit", ylab="Density")
polygon(c(x, rev(x)), c(y, rev(z)), col='aliceblue')
lines(x, y, col='cadetblue')