MATLAB: How are the critical value (F statistic) and the p-value in regress calculated

critical valuef statisticp-valueregress

Hi. I am running a multiple regression analysis with [b,bint,r,rint,stats] = regress(y,X). Regarding 'stats' I have the following questions: 1) What is the critical value (alpha) for the F statistic? I mean which value does Matlab 'assume' (e.g. alpha=0.01, alpha=0.05…)? 2) How does Matlab compute the p-value? The p-value(which should be smaller than the critical value of the F statistic in order to have a significant test) is normally the area beneath the right tail of the f distribution at the F-value, if I understood the concept correctly. With respect to the regress command – does Matlab simply calculate this area or does it calculate the p-value differently?
Thank you!

Best Answer

As stated in "help regress", the default test is at the 95% confidence level (i.e. alpha=0.05). You can also use a third input argument to specify a different value of alpha.
Yes, MATLAB calculates the area under the F cumulative distribution function.