<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Agora que pude testar o código, acho que encontrei a causa de falha.<br><br><span style="font-family:courier new,monospace">## Função de densidade: chisq.<br>fchisq <- function(x, n)<br>    (1/(2^(n/2)*gamma(n/2)))*x^(n/2-1)*exp(-x/2)<br><br>par(mfrow=c(1, 2))<br>plot(fchisq(x=1:100, n=10))<br>curve(dchisq(x, 10), col='red', lw=2, add=TRUE, n=1e3)<br>plot(fchisq(x=seq(0, 50, len=100), n=10))<br>curve(dchisq(x, df=10), col='red', lw=2, add=TRUE, n=1e3)<br><br><b>## Estava sendo usado o INDEX e não o valor de x!!!</b><br><br>x <- seq(0, 50, length.out=101)<br>plot(fchisq(x=x, n=10)~x)<br>curve(dchisq(x, df=10), col='red', lw=2, add=TRUE, n=1e3)<br><br></span>À disposição.<br>Walmes.<br></div>​</div>