You could make a graph, like this:
expression=expr(Log10( (ChiSquare Quantile( alpha, df ) / df - Vratio) ^ 2 ));
alpha = 0.025;
Vratio = 0.39135;
df=2;
Minimize( expression, { df( 2, 1000 ) }, << Use Numeric Deriv( "true" ) );
show(df);
New Window( "Example",
Graph Box(xscale(-1,26),yscale(-10,0),
Pen Color( "red" );
Y Function( expression, df );
)
);
there is a sharp drop at the df found by the minimize function.
you can zoom in on the sharp drop and see it is going to be computationally difficult to get a perfect answer:
9 significant digits, and more to go.
minimize found df = 13.3517718809044;
I'd guess that the minimize algorithm hits a point on the curve that finds the next point on the far side of the true minimum, and might even be in a cycle bouncing across the minimum. With a different starting value, it might get close enough to decide to stop. Close enough is also a parameter you can pass to minimize (tolerance).
Craige