Documentation/Calc Functions/F.TEST

    From The Document Foundation Wiki

    Function name:

    F.TEST

    Category:

    Statistical Analysis

    Summary:

    Calculates the result of a two-tailed F-test to determine whether the variances of two sample sets are significantly different.

    A returned value that is greater than some predetermined significance threshold (often taken to be 0.05 or 5% for example) indicates that the null hypothesis, that there is no difference between the variances of the two populations, should not be rejected. A smaller value than the significance threshold supports the alternative hypothesis that the variances of the two populations are not equal.

    Syntax:

    F.TEST(Data 1; Data 2)

    Returns:

    Returns a real number in the range [0, 1], which is the result of the F-test expressed as a two-tailed probability.

    Arguments:

    Data 1 is an array of real numbers that is one of the sample data sets. This argument can take the form of an explicit cell range, the name of a named range, the name of a database range, or an inline constant array. Data 1 must contain at least two numbers.

    Data 2 is an array of real numbers that is the other sample data set. This argument can take the form of an explicit cell range, the name of a named range, the name of a database range, or an inline constant array. Data 2 must contain at least two numbers. Data 2 need not have the same dimensions as Data 1.

    • If either Data 1 or Data 2 is not a multi-cell array, then F.TEST reports a #VALUE! error.
    • F.TEST ignores any referenced cell that contains text or is empty.
    • If either Data 1 or Data 2 contains less than two numeric values, then F.TEST reports a #VALUE! error.
    • If either Data 1 or Data 2 has a variance of 0, then F.TEST reports a #VALUE! error.

    Additional details:

    • Calc's FTEST and F.TEST functions perform identical calculations. The requirements for FTEST are specified in ODF 1.2; F.TEST is provided for interoperability with Microsoft Excel.
    • F.TEST calculates an F-statistic ([math]\displaystyle{ F\_stat }[/math]) from the supplied data arrays using the formula:
    [math]\displaystyle{ F\_stat~=~\frac{s_{larger}^2}{s_{smaller}^2} }[/math]
    where [math]\displaystyle{ s_{larger}^2 }[/math] and [math]\displaystyle{ s_{smaller}^2 }[/math] represent the sample variances of the two data sets, arranged so that the larger is the numerator and the smaller is the denominator.
    • F.TEST then returns the value:
    [math]\displaystyle{ \text{F.TEST}~=~2\:\times\:\text{FDIST}(F\_stat;\:C_{larger}-1;\:C_{smaller}-1) }[/math]
    where [math]\displaystyle{ C_{larger} }[/math] is the count of numbers in the array with the larger variance and [math]\displaystyle{ C_{smaller} }[/math] is the count of numbers in the array with the smaller variance.
    • The name space for F.TEST is COM.MICROSOFT.F.TEST.
    • For more information about F-tests, visit Wikipedia's F-test page.

    Examples:

    The data in the following table is utilized in the first example below.

    A B
    1 200 123
    2 123 181
    3 138 169
    4 103 143
    5 186 179
    6 179 165


    Formula Description Returns
    =F.TEST(A1:A6; B1:B6) where cells A1:B6 contain the data shown in the table above. Here the function indicates a 26% probability that the variances of these two samples are not significantly different. Assuming a significance threshold of 0.05 or 5%, this result does not provide justification for rejecting the null hypothesis that there is no difference between the variances of the two populations. Note that the formulas =FTEST(A1:A6; B1:B6) and =F.TEST(B1:B6; A1:A6) return the same result. 0.25968413745016
    =F.TEST({9;8;6;8}; {5;6;7}) Here the function indicates an 82% probability that the variances of these two samples are not significantly different. Note that the two inline arrays passed as arguments have different dimensions. 0.819367454566714
    =F.TEST({10;6;2;10;4}; {87;12;43;18;82}) Here the function returns a very small probability of less than 1% and this undermines the null hypothesis and indicates that the two data sets may be taken from populations that have different variances. 0.000637904251872183

    Related LibreOffice functions:

    F.DIST

    F.DIST.RT

    F.INV

    F.INV.RT

    FDIST

    FINV

    FTEST

    T.TEST

    TTEST

    Z.TEST

    ZTEST

    ODF standard:

    Section 6.18.30, part 2

    Related (or similar) Excel functions:

    F.TEST