(Of course, there are a lot of complicating factors. Some teams intentionally take long or short possessions. And possessions that start with an offensive rebound are likely to be shorter than ones that don't. And so on. But I did say this was a simple model.)
A "possession" is typically defined as a period during which one team or the other continuously controls the ball. The traditional way to calculate the number of possessions in a game is to use a formula that looks something like this (there are several widely used variants):
Possessions = FGA - Oreb + 0.475*FTA + TOIf you look at the first two terms, you'll see that if a team has the ball, makes a shot attempt, gets the rebound and makes another shot attempt, that will equate to one possession, because the offensive rebound will "cancel out" the first shot attempt.
However, I'm interested in a different definition of possession -- one that corresponds with a team receiving a fresh shot clock. This equates to the number of times a team "runs it's offense". With this definition, if a team has the ball, makes a shot attempt, gets the rebound and makes another shot attempt, that will equate to two possessions.
After some experimentation, a fairly good equation for estimating that number seems to be:
Possessions = FGA + 0.666*FTA + TO + 3(This is based upon counting the possessions from play-by-play data and performing a linear regression for games from the 2013 season.)
If you calculate the number of possessions for each team, you can then calculate the average length of possession for the game, but you cannot determine the average length of possession for each team. To do that, you need to analyze the play-by-play data. Fortunately, the ESPN Scoreboard provides play-by-play data for the majority of games, and the format is fairly standardized.
I've spent the last couple of weeks figuring out how to scrape the play by play data and analyze it to determine change-of-possession and average length of possession. Whether these statistics are useful for prediction remains to be seen.