Stream live and on demand high school sports on the NFHS Network
 

Rankings

 

We have developed our own power rankings for all MPSSAA Schools.

Maryland Private Schools are displayed in their own rankings below.

Our rankings system is formulated with Python using 3 different formulas, averaged together, to get a rating number.

Key Components of the Optimization Formula:

  1. Objective Function (Error Minimization): The core of the formula revolves around minimizing the sum of squared errors between the actual point spreads in the games and the predicted point spreads derived from the team ratings and the Home Field Advantage (HFA). The optimization process seeks to find the set of ratings for all teams and the HFA value that best explains the observed game outcomes.
    • Actual Spread: This is the difference between the scores of the home and away teams in each game, provided in the dataset.
    • Predicted Spread: This is the difference between the Home Team Rating (HTR) and Away Team Rating (ATR), with an additional HFA value applied if the game is not played at a neutral site.

The objective function is defined as:

Error Sum=i=1n(Actual SpreadiPredicted Spreadi)2

Where:

  • n is the total number of games.
  • Actual Spreadi is the spread observed in game i.
  • Predicted Spreadi? is the spread predicted by the model for game i.
  1. Home Team Rating (HTR) and Away Team Rating (ATR):
    • Each team is assigned a rating that is adjusted throughout the optimization process.
    • The HTR is the rating of the home team in a particular game, while the ATR is the rating of the away team.
    • The ratings serve as proxies for team strength, with stronger teams expected to have higher ratings.
  2. Home Field Advantage (HFA):
    • The Home Field Advantage is a single variable that represents the average benefit a team receives when playing on its home field (as opposed to a neutral site).
    • If the game is not played at a neutral venue, the HFA is added to the home team’s rating to account for the home field’s influence on the outcome.
    • The predicted spread formula becomes: 

Predicted Apread=HTR+HFA-ATR

If the game is played at a neutral site, the formula is: 

Predicted Spread=HTR-ATR

  1. Minimization Process:
    • The script employs nonlinear optimization to minimize the objective function, which iteratively adjusts team ratings and the HFA until the sum of squared errors is minimized.
    • The optimization adjusts each team’s rating and the HFA in such a way that the predicted spreads most closely match the actual spreads observed in the data.

The function attempts to find the optimal values of HTR, ATR, and HFA that minimize the total error across all games.

Key Components of the SRS and SOS Formulae:

  1. Calculate Point Differential (PD)
  • The point differential measures the margin of victory or defeat for each team in each game.
  • For the home team: 

Home PD=Actual Spread

  • For the away team: 

Away PD=-Actual Spread

This gives us a positive value for a win and a negative value for a loss.

  1. Diminishing Returns on Margin of Victory (MOV)
  • Large margins of victory can distort ratings, especially if a team wins by a wide margin in one game. To mitigate this, the code applies a logarithmic transformation to the point differentials: 

Adjusted PD=sin (PD) *log (PD+1)

  • This transformation ensures that the effect of blowout victories is reduced while still rewarding larger wins.
  1. Dynamic Home-Field Advantage (HFA)
  • Instead of using a fixed home-field advantage, we calculate it dynamically from the dataset. The average point differential for home teams in games that were not played on neutral fields is computed as: 

Home-Field Advantage HFA=Home PD for Non-Neutral GamesNumber of Non-Neutral Games

  • This dynamic home-field advantage is then added to the adjusted point differential for home teams in non-neutral games: 

Home PD Adjusted=Adjusted Home PD+HFA

  • Away teams’ adjusted PD remains the same.
  1. Weight Recent Games More Heavily
  • The code uses an Exponentially Weighted Moving Average (EWMA) to give more importance to recent games. The weighted PD is computed as: 

Weighted PD=?*Current Games PD+1-?*Previous Games PD

where is a constant determined by the span parameter (higher span values give more weight to recent games).

  1. Strength of Schedule (SOS)
  • SOS measures the quality of the opponents that a team has played. It is calculated as the average point differential of the team’s opponents: 

SOS for team A=PD of Opponents Number of Games Played

  • The point differentials of opponents are averaged for both home and away games. The code retrieves each opponent’s weighted point differential and uses it to compute SOS for both the home and away teams: 

SOS Home=PD of Opponents for Home Games Number of Home Games

SOS Away=PD of Opponents for Away Games Number of Away Games

  • The final SOS for each team is a combination of home and away game results.

Overall Rating:

The overall rating for each team is calculated as follows:

Overall Rating=Optimization+SRS+SOS3*10

For preseason data, we go back the previous 2 years and apply all 3 formulae to the dataset. During the beginning of the season, the preseason rating is factored into the current season, diminished weights as the games progress.

0 Games Played = biased: 0% 2024 data, 100% preseason data

1 Game Played = biased: 33% 2024 data, 67% preseason data

2 Games Played = biased: 50% 2024 data, 50% preseason data

3 Games Played = biased: 60% 2024 data, 40% preseason data

4 or more Games Played = unbiased: 100% 2024 data

 
 
x