# t distribution # ===================== # first plot standard normal in black curve(dnorm(x), -4,4, main="red=2df,green=5df, blue=25df,black=z", ylab="density") # now plot t curves with various degrees of freedom k <- 2 ; curve(dt(x, df=k), lty=k, add=TRUE, col=2) #df = 2 k <- 5 ; curve(dt(x, df=k), lty=k, add=TRUE, col=3) #df = 5 k <- 25 ; curve(dt(x, df=k), lty=k, add=TRUE, col=4) #df = 25