0

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.

  • 1
    Does this help: https://stats.stackexchange.com/questions/301959/ – Joe May 12 '21 at 11:51
  • Thanks for the reference. I used that formula but I'm still two orders of magnitude off the value returned by the formal function. I'm also confused by the weights, like, it is $n_i-1$ in the within group variance but $n_i$ in the between group variance. – Reza Yahyaei May 12 '21 at 17:52
  • 1
    Oh ok there was a problem in my code, now it gives me the correct result. Thanks! – Reza Yahyaei May 12 '21 at 18:22

0 Answers0