Home Â» How to Calculate the P-Value of an F-Statistic in Excel

# How to Calculate the P-Value of an F-Statistic in Excel

An F-test produces an F-statistic. To find the p-value associated with an F-statistic in Excel, you can use the following command:

=F.DIST.RT(x, degree_freedom1, degree_freedom2)

where:

• x:Â the value of the F-statistic
• degree_freedom1:Â numerator degrees of freedom
• degree_freedom2:Â denominator degrees of freedom

For example, here is how to find the p-value associated with an F-statistic of 5.4, with numerator degrees of freedom = 2 and denominator degrees of freedom = 9:

The p-value isÂ 0.02878.

One of the most common uses of an F-test is for testing the overall significance of a regression model. In the following example, we show how to calculate the p-value of the F-statistic for a regression model.

### Example: Calculating p-value from F-statistic

Suppose we have a dataset that shows the total number of hours studied, total prep exams taken, and final exam score received for 12 different students:

If we fit a linear regression model to this data usingÂ study_hoursÂ andÂ prep_examsÂ as the explanatory variables and scoreÂ as the response variable, we will get the following output:

The F-statistic for the overall regression model is 5.0905. This F-statistic has 2 degrees of freedom for the numerator and 9 degrees of freedom for the denominator.

Excel automatically calculates that the p-value for this F-statistic is 0.0332:

In order to calculate this p-value ourselves, we could use the following code:

Notice that we get the same p-value as the linear regression output.