FreeMat: RANDNF Generate Noncentral F-Distribution Random Variable

FreeMat

- Main Page
- Related Pages

RANDNF Generate Noncentral F-Distribution Random Variable

Section: Random Number Generation

# Usage

Generates a vector of non-central F-distributed random variables with the specified parameters. The general syntax for its use is

       y = randnf(n,m,c)

where `n` is the number of degrees of freedom in the numerator, and `m` is the number of degrees of freedom in the denominator. The vector `c` determines the non-centrality shift of the numerator.

# Internals

A non-central F-distributed random variable is the ratio of a non-central chi-square random variable and a central chi-square random variable, i.e.,

# Example

Here we use the `randf` to generate some non-central F-distributed random variables:

    --> randnf(5*ones(1,9),7,1.34)

    ans =

     Columns 1 to 7

        0.5880    1.6093    0.4639    0.7857    2.5543    0.5044    3.3383

     Columns 8 to 9

        1.4102    1.1489