The F-statistic tests a regression model’s overall statistical significance: do its predictors collectively influence the outcome? It compares explained with unexplained variation. Read it with its p-value, which indicates how unusual an F-statistic at least this large would be if the predictors collectively had no influence. section 9.1.2
The F-test asks a different question from an individual predictor’s t-test. R-squared describes how much outcome variation the predictors explain; adjusted R-squared also accounts for added predictors. These measures help put an F-test result in context, but none replaces a check of the model’s residuals. section 9.1.2 section 9.2.2
From a promising result to a data check
A regression of daily rat sightings on temperature, wind speed, and weekday produced a large, statistically significant overall F-statistic. Residual inspection then revealed unusual records, including one whose missing weather values had been filled with zero. Statistical significance was a reason to investigate the model—not a reason to stop checking it. section 9.2.2
import statsmodels.api as sm
import pandas as pd
housing_prices = pd.read_csv("housing_prices.csv") #1
X = housing_prices[["sq_footage", "n_bedrooms"]]
y = housing_prices["price"] #2
X = sm.add_constant(X) #3
model = sm.OLS(y, X).fit() #4
print(model.summary())
Fit an ordinary least squares housing-price model with statsmodels and print its summary to inspect the F-statistic alongside other diagnostics. section 9.1.2

