# F Distribution

• /
• Blog
• /
• F Distribution

The F-distribution, also known as the Fisher-Snedecor distribution, is a continuous probability distribution that is often used in hypothesis testing and analysis of variance (ANOVA). It is typically used to compare the variability of two population samples or to determine whether two population variances are equal.

The F-distribution is a right-skewed distribution with a minimum value of 0 and no maximum value. It is defined by two parameters, known as the degrees of freedom for the numerator (df1) and the degrees of freedom for the denominator (df2). The larger the degrees of freedom, the more the distribution resembles a normal distribution.

## Properties

The F distribution is a type of continuous probability distribution that is often used in statistical hypothesis testing. Some of the key properties of the F distribution include the following:

1. It is a non-symmetric distribution, which means that the graph of the distribution is not the same on either side of the peak.
2. The F distribution is always non-negative since the values of the random variables used to calculate it can never be negative.
3. The F distribution has two parameters, known as the degrees of freedom for the numerator and the degrees of freedom for the denominator. These parameters determine the shape of the distribution.
4. The F distribution is often used in the analysis of variance (ANOVA) to test whether the means of two or more groups are significantly different from each other. In this context, the F statistic is calculated by taking the ratio of the between-group variance to the within-group variance.

## PDF of F Distribution

The probability density function (PDF) of the F-distribution is given by the following formula:

$$f(x) = \frac{(n_1/n_2)^{n_1/2} x^{(n_1/2)-1}}{B(\frac{n_1}{2},\frac{n_2}{2}) (1+\frac{n_1}{n_2} x)^{(n_1+n_2)/2}}$$

In this formula, "x" is the value of the random variable, "n1" and "n2" are the degrees of freedom of the two samples being compared, and "B" is the beta function, which is defined as:

$$B(x,y) = \frac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)}$$

where "Gamma" is the gamma function, defined as:

$$\Gamma(x) = \int_0^{\infty} t^{x-1} e^{-t} dt$$

## F Distribution Calculator:

Find the area under the F Distribution (Left or Right Tail)

 function calculateAreaUnderCurve() { const fValueInput = document.getElementById('f-value'); const tailSelection = document.getElementById('tail-selection'); const df1Input = document.getElementById('df1'); const df2Input = document.getElementById('df2'); const resultContainer = document.getElementById('result'); const fValue = parseFloat(fValueInput.value); const tail = tailSelection.value; const df1 = parseFloat(df1Input.value); const df2 = parseFloat(df2Input.value); if (isNaN(fValue)) { alert('Please enter a valid F value.'); return; } if (isNaN(df1) || df1 <= 0 || isNaN(df2) || df2 <= 0) { alert('Please enter valid degrees of freedom values greater than 0.'); return; } let areaUnderCurve; if (tail === 'left') { areaUnderCurve = jStat.centralF.cdf(fValue, df1, df2); } else if (tail === 'right') { areaUnderCurve = 1 - jStat.centralF.cdf(fValue, df1, df2); } drawFDistributionCurve(fValue, tail, df1, df2); resultContainer.textContent = 'Area Under Curve: ' + areaUnderCurve.toFixed(4); } function calculateFValue() { const probabilityInput = document.getElementById("probability-input"); const tailSelectionZ = document.getElementById("tail-selection-z"); const df1InputZ = document.getElementById('df1-z'); const df2InputZ = document.getElementById('df2-z'); const resultContainerF = document.getElementById("result-f"); const probability = parseFloat(probabilityInput.value); const tail = tailSelectionZ.value; const df1 = parseFloat(df1InputZ.value); const df2 = parseFloat(df2InputZ.value); if (isNaN(probability) || probability < 0 || probability > 1) { alert('Please enter a valid probability between 0 and 1.'); return; } if (isNaN(df1) || df1 <= 0 || isNaN(df2) || df2 <= 0) { alert('Please enter valid degrees of freedom values greater than 0.'); return; } let fValue; if (tail === 'left') { fValue = jStat.centralF.inv(probability, df1, df2); } else if (tail === 'right') { fValue = jStat.centralF.inv(1 - probability, df1, df2); } resultContainerF.textContent = 'F Value: ' + fValue.toFixed(4); drawFDistributionCurve(fValue, tail, df1, df2); } function drawFDistributionCurve(fValue, tail, df1, df2) { const x = Array.from({ length: 1000 }, (_, i) => 0 + (i * 10) / 1000); const y = x.map(xi => jStat.centralF.pdf(xi, df1, df2)); let fillX, fillY; if (tail === 'left') { fillX = x.filter(xi => xi <= fValue); } else if (tail === 'right') { fillX = x.filter(xi => xi >= fValue); } fillY = fillX.map(xi => jStat.centralF.pdf(xi, df1, df2)); const trace1 = { x: x, y: y, mode: 'lines', line: { color: 'blue' }, name: 'F Distribution' }; const trace2 = { x: fillX, y: fillY, mode: 'lines', fill: 'tozeroy', line: { color: 'orange' }, name: 'Area Under Curve' }; const data = [trace1, trace2]; const layout = { title: 'F Distribution', xaxis: { title: 'F Value' }, yaxis: { title: 'Density' }, showlegend: true }; Plotly.newPlot('curve-plot', data, layout); } 

## F Test Statistic

The F test is a statistical test that is used to compare the variances of two samples. It is based on the F-distribution, which is a continuous probability distribution that is used to compare the variances of two samples or to test the equality of variances in two groups.

The F-test statistic is calculated as the ratio of the variances of the two samples being compared. Specifically, the F test statistic is calculated as follows:

$$\Large{F = \frac{s1^2}{s2^2}}$$

where $$s1^2$$ and $$s2^2$$ are the variances of the two samples, respectively.

## Mean, Standard Deviation and Variance of F Distribution

Mean:

The mean of the F-distribution is given by the following formula:

$$\text{Mean} = \frac{n_2}{n_2 - 2}$$

for n2 > 2, where "n1" and "n2" are the degrees of freedom of the two samples being compared.

Standard Deviation:

The standard deviation of the F-distribution is given by the following formula:

$$\text{Standard deviation} = \sqrt{\frac{2n_2^2(n_1 + n_2 - 2)}{n_1(n_2 - 2)^2(n_2 - 4)}}$$

for n2 > 4, where "n1" and "n2" are the degrees of freedom of the two samples being compared, and "sqrt" is the square root function.

Variance:

The following formula gives the variance of the F-distribution:

$$\text{Variance} = \frac{2n_2^2(n_1 + n_2 - 2)}{n_1^2(n_2 - 2)^2(n_2 - 4)}$$

for n2 > 4, where "n1" and "n2" are the degrees of freedom of the two samples being compared.

## What are the most common uses of F Distribution?

The F-distribution is commonly used in hypothesis testing and analysis of variance (ANOVA). In hypothesis testing, the F-distribution is often used to compare the variability of two population samples or to determine whether two population variances are equal. In ANOVA, the F-distribution is used to test the null hypothesis that the means of two or more groups are equal.

The ANOVA (including F-distribution) can also be useful in other statistical applications, such as regression analysis and the design of experiments. For example, in multiple regression analysis and DoE, the ANOVA / F-test can be used to test the regression model's overall significance and determine the number of factors to retain in the model.

Overall, the F-distribution is a versatile and widely used distribution in statistics and data analysis.

## Using Microsoft Excel

### F.DIST(x,deg_freedom1,deg_freedom2, cumulative):

The F.DIST function in Microsoft Excel can be used to calculate the probability density function (PDF) or cumulative distribution function (CDF) of the F-distribution.

To use the F.DIST(x, deg_freedom1, deg_freedom2, cumulative) function, you need to provide the following input arguments:

• x: The value for which you want to calculate the probability density or cumulative probability.
• Degrees of freedom 1: The number of degrees of freedom for the first sample in the F-distribution.
• Degrees of freedom 2: The number of degrees of freedom for the second sample in the F-distribution.
• Cumulative: A logical value that specifies whether you want to calculate the PDF (cumulative = FALSE) or CDF (cumulative = TRUE)

Posted on December 26, 2022 by  Quality Gurus

Similar Posts:

March 31, 2018

## Types of Customers and Customer Segmentation

Types of Customers and Customer Segmentation

March 31, 2018

## Benchmarking – Definition, Types and Steps

Benchmarking – Definition, Types and Steps

March 31, 2018

## 4 Types of Team Roles

4 Types of Team Roles

32 Courses on SALE!