liveBook · Manning

F-test

As explained in Statistics Slam Dunk

An F-test is a statistical test based on an F-distributed ratio used to compare variances or assess model-related hypotheses.

An F-test compares two variances by calculating their ratio and testing whether that ratio could plausibly be due to chance. Begin with a null hypothesis that the variances are equal, then use the returned p-value to decide whether to reject it. section 13.0 section 20.2

A practical F-test workflow is:

  • Calculate or inspect the standard deviations of the two data series; standard deviation is the square root of variance. section 13.8.3
  • Run base R's var.test() with the two numeric vectors. section 13.8.3
  • Compare the p-value with a predefined threshold, commonly 0.05: reject equal variances below the threshold and otherwise fail to reject the null hypothesis. section 20.2
  • Use the variance result to choose an appropriate effect-size interpretation when methods make different assumptions about standard deviations. section 13.8.3

Comparing win-share inequality

For Gini-index values in ws_giniX and ws_giniY, the standard deviations are 0.07 and 0.04. Run `var.test(ws_giniX$gini_index, ws_giniY$gini_index)`. The result is F = 2.6659 with p = 0.003528, so reject equal variances at the 5% threshold. Reversing the effect-size arguments then produces similar Cohen's d, Hedges' g, and Glass's delta conclusions: a small effect. section 13.8.3

var.test(ws_giniX$gini_index, ws_giniY$gini_index)
## 
##  F test to compare two variances
## 
## data:  ws_giniX$gini_index and ws_giniY$gini_index
## F = 2.6659, num df = 758, denom df = 26, p-value = 0.003528
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
##  1.410118 4.349496
## sample estimates:
## ratio of variances 
##           2.665942

Inspect the complete var.test() output, including the F statistic, degrees of freedom, p-value, confidence interval, and variance ratio. section 13.8.3

How Statistics Slam Dunk covers it

How deep it goes
Explains the variance ratio, null-hypothesis decision, R implementation, and interpretation, but does not derive the test mathematically.
Examples
Demonstrates win-share Gini indices, standard-deviation calculations, var.test() output, and competing effect-size estimates.
What it assumes
Assumes familiarity with numeric data, variance, standard deviation, p-values, and null-hypothesis decisions.
What you can do after
Apply it via base R's var.test() to evaluate whether two observed variances differ statistically.
How it connects
Connects variance, standard deviation, p-values, null hypotheses, significance testing, and effect sizes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.