# Generic Chi-Squared Graph at 5 D of F. x <- seq(0, 20, length=100) hx <- dchisq(x, 5) plot(x, hx, type="l", col="red", xlab="test statistics", ylab="Density", main="Chi-Squared Distribution") segments( x0=9.26, y0=0, x1=9.236, y1=max(hx), lty=2 ) text( 12, 0.12, "cv=9.236" ) legend( "topright", inset=0.05, c("df = 5"), lty=c(1), col=c("red") )