fTest#

swordfish.function.fTest()#

Conduct an F-test to compare the variances of two samples.

Parameters:
  • X (Constant) – A numeric vector indicating the first sample for the F-test.

  • Y (Constant) – A numeric vector indicating the second sample for the F-test.

  • ratio (Constant, optional) – A positive floating number indicating the ratio of the variances of X and Y in the null hypothesis. The default value is 1.

  • confLevel (Constant, optional) – A floating number between 0 and 1 indicating the confidence level of the test. It is optional and the default value is 0.95.

Returns:

A dictionary with the following keys:

  • stat: a table with p-value and confidence interval under 3 alternative hypotheses

  • numeratorDf: degree of freedom of the numerator

  • denominatorDf: degree of freedom of the denominator

  • confLevel: confidence level

  • method: “F test to compare two variances”

  • fValue: F-stat

Return type:

Constant