n_list<-c(2,5,7,9) # Ç¥º»¼ö(n) df_list<-n_list-1 # ÀÚÀ¯µµ list<-c("df=1", "df=4", "df=6", "df=8") curve(dchisq(x, 1, ncp=0), add=T, col="blue", xlim=c(0, 16), ylim=c(0, 0.8), xlab="chisq", ylab="f(chisq)") text(x=1,y=.4, label="df=1",cex=0.7) curve(dchisq(x, 4, ncp=0), add=T, col="red", xlim=c(0, 16), ylim=c(0, 0.8), xlab="chisq", ylab="f(chisq)") text(x=3,y=.2, label="df=4",cex=0.7) curve(dchisq(x, 6, ncp=0), add=T, col="green", xlim=c(0, 16), ylim=c(0, 0.8), xlab="chisq", ylab="f(chisq)") text(x=5,y=.15, label="df=6",cex=0.7) curve(dchisq(x, 8, ncp=0), add=T, col="black", xlim=c(0, 16), ylim=c(0, 0.8), xlab="chisq", ylab="f(chisq)") text(x=8,y=.13, label="df=8",cex=0.7) #legend("topright", legend=list) par(mfrow=c(2,2)) for (i in 1:length(df_list)) { curve(dchisq(x, df_list[i], ncp=0), add=F, xlim=c(0, 16), ylim=c(0, 0.8), xlab="chisq", ylab="f(chisq)", main=paste("df=", df_list[i])) }