15.4 카이제곱분포 확률밀도곡선 : stat_function(fun = dchisq)
# 카이제곱분포 : fun = dchisq
ggplot(data.frame(x=c(0,10)), aes(x=x)) +
stat_function(fun=dchisq, args=list(df=1), colour="black", size=1.2) +
geom_text(x=0.6, y=1, label="df=1") +
stat_function(fun=dchisq, args=list(df=2), colour="blue", size=1.2) +
geom_text(x=0, y=0.55, label="df=2") +
stat_function(fun=dchisq, args=list(df=3), colour="red", size=1.2) +
geom_text(x=0.5, y=0.05, label="df=3") +
ggtitle("Chisq-Distribution")