Section: Random Number Generation
y = randf(n,m)
where n and m are vectors of the number of degrees of freedom
in the numerator and denominator of the chi-square random variables
whose ratio defines the statistic.
F_{n,m} is defined as the ratio of two chi-square
random variables:
The PDF is given by
where B(a,b) is the beta function.
randf to generate some F-distributed random variables,
and then again using the randchi function:
--> randf(5*ones(1,9),7)
ans =
0.5241 0.8414 0.4859 1.1266 0.4792 2.3743 2.9095 0.5825 0.4244
--> randchi(5*ones(1,9))./randchi(7*ones(1,9))
ans =
0.3737 0.2363 1.5733 0.7003 1.1385 0.6337 0.4597 0.2691 0.5190