Am I calculating the F-statistic wrongly?

26 Views Asked by At

So in several websites the formula for calculating f-statistic is given as:

$\textrm{F-statistic} = \frac{\text{variance between sample means}}{\text{mean of variance within samples}}$

I produced two random array distributions in matlab, one uniformly distributed in the range (0,1), the other in (0,2). I computed the f-statistic first manually with the above formula and then used a statistical package. The answers are different however. It looks like the answer given by the package function is the multiple of degrees of freedom (which depends on the size of the random arrays) and the result of the above formula.