inc = 0.0055

x <- inc*(1:100)

p <- df(x,5,25)

d <- mat.or.vec(100,1)

for (i in 2:100) d[i] <- (p[i]-p[i-1])/inc

idx <- 1:100
idx <- idx[d < 0]

for (i in idx) d[i] <- 0

grid <- mat.or.vec(10000,2)
for (i in 1:100){
for (j in 1:100){
  ij <- 100*(j-1)+i
  if ( (i>75) && (j/100<d[i]) ) {grid[ij,1]=i*inc; grid[ij,2]=j/100}
}
}
grid <- grid[grid[,1]>0,]

source("psopts.r");
postscript(file="fdist.eps");

plot(y=d, x=x, xlab="", ylab="", ylim=c(-.1,2.5), type="l")
lines(x=c(75*inc,75*inc), y=c(0,d[75]))
text(x=75*inc, y=-.093, "F", col="red", cex=1.5)
points(x=grid[,1], y=grid[,2], col="red", pch=".")
text(x=90*inc, y=0.7, "Area = P-value",col="red")

dev.off();
