I can see Madison Square Garden from my Manhattan apartment. This year, the arena installed LED lights along the exterior columns of the building — blue, red and white for New York Rangers games; orange and blue for New York Knicks games. They outshine everything else along a drab stretch of Eighth Avenue. When the Knicks colors shine, I’m reminded that there’s a dreadful basketball team playing a few blocks from me.

The Knicks are 5-22 on the year, on pace for their worst season in the not-exactly-glorious history of the franchise. But unlike a lot of bad teams, the Knicks are not yet in rebuilding mode. Their only players to have performed at an above-average level so far this season are 30-year-old Carmelo Anthony, 32-year-old Amar’e Stoudemire and 37-year-old Pablo Prigioni. They have a few (not many) good players and a few (not many) young players, but there’s almost no overlap on the Venn diagram.

Just how dire is the Knicks’ situation? Are they worse off than the Los Angeles Lakers? Than the Philadelphia 76ers, who very much are in rebuilding mode and are 2-22?

Let’s take a longer view. What are the chances any of these franchises will field a championship-caliber team over the next five seasons (from this year through 2018-19)? On the flip side, which NBA franchise has the most reason to be optimistic about its future? Would you rather be the Cleveland Cavaliers or the Golden State Warriors? Would you rather be the Memphis Grizzlies, with a sterling record so far this season but no superstar, or the New Orleans Pelicans, who aren’t so good yet but have a potential world-beating talent in Anthony Davis?

There have been some valiant attempts to answer such questions before (see ESPN’s NBA Future Power Rankings). Our method here will be simpler and more statistically driven. The idea is to project the number of NBA championships a franchise might expect to win over the next five seasons based on three easily quantifiable factors:

How good is the team now?

How old the team?

How good is its best player?

To be clear, we are not claiming these are the only things that matter. You’d probably want to give a team some extra credit if it’s run by a genius like Gregg Popovich. You’d probably want to dock it if it has traded away some of its future draft picks (as the Knicks have) or if its salary cap situation is poor. And our approach will not be so great at handling teams with injuries to star players. But simple models like these can be a useful tool for understanding how NBA franchises evolve.

Some modestly technical bits follow. You can skip ahead a few paragraphs if you’re not sweating the small stuff.

As I mentioned, our goal is to estimate the likelihood of a team winning an NBA championship over the next five seasons. The method won’t give much credit to a team for being just decent. Unlike in certain other sports, an NBA team almost never backs into a championship by being slightly above average and then getting lucky in the postseason. A 52-win team in the regular season will win the NBA championship only about 2 percent of the time; a 64-win team will win it something like half the time.

More specifically, the model takes the form of a logistic regression analysis where the inputs are three factors I described above — age, overall team quality and the quality of its best player — and the output is the projected number of championships won. I’ve used data from the ABA-NBA merger season of 1976-77 onward.

To measure overall team quality, I’ve used the number of games a team won. But when looking toward future seasons, a team’s most recent win-loss record isn’t all that matters; so does the distribution of its talent. The presence of an actual or potential superstar significantly improves its chances of winning championships.

This shouldn’t be surprising. In the NBA’s economic structure, there are two types of players who routinely produce a high return on investment: young players (who often make far less than they would as free agents under the rookie salary scale) and superstar players (who are often underpaid because of the maximum salary). Teams built around superstars face downside risk; if the superstar leaves town or gets hurt, they’re screwed. But in the NBA, you’d rather take a high-risk, high-reward approach than settle for a No. 8 seed every year.

Our measure of superstar talent is how a team’s top player rated according to the statistic “wins added,” which is described at more length here. Wins added is based on a combination of Win Shares and Player Efficiency Rating (PER). Neither metric is perfect (far from it), but because each can be computed from readily available “box score” statistics, they allow us to compare players and teams on a level playing field dating back to 1976-77.

Having a younger team helps, of course, but it’s better to evaluate the age of a team’s best players rather than everyone on its roster. So, our calculation of a team’s average age is weighted based on wins added. This is important. The average New York Knick, weighted based on the number of minutes played this season, is about 28 years old. But the team’s better players are old; its average age is closer to 30 when weighted by wins added.

There are a couple of further details in the footnotes, but let’s see how this works in practice. Here’s how the 30 NBA teams ranked in future championship potential based on their statistics at the end of last season. We’ll run the numbers based on the current season’s data in a moment.

At the end of last year, the Oklahoma City Thunder had the most hopeful situation in the league, projecting to win 0.8 championships over the next five years. This total includes cases where the Thunder would win multiple championships, so this is not quite the same as saying they had an 80 percent chance of winning at least one championship. (Titles in the NBA can come in bunches.)

Still, this was a reasonably impressive figure; since 1976-77, only 12 teams had a better projection. The top one belonged to the Chicago Bulls going into the 1996-97 season. They projected to win 1.2 more championships to go with the four that Michael Jordan had won already; Jordan won two more in reality.

But the NBA is a tough league. Some of the teams that projected almost as highly as Jordan’s Bulls never won a championship. The Cleveland Cavaliers projected to win about 1.2 championships over their next five seasons heading into the 2009-10 season — but LeBron James left, and they didn’t win any. (A championship in Cleveland this season now that James has returned would be one year too late to count within the five-year window.) Other teams appeared likely to follow one championship with more but failed to do so. The Philadelphia 76ers, coming off a 67-win championship season in 1982-83, projected to add another title to Julius Erving’s mantle but never did.

Last season is old news, however. So, we’ve also come up with a projection that accounts for roster turnover and a team’s performance so far this year. This required a few modifications to our original model:

Team win totals are projected based on John Hollinger’s playoff odds, which account for potential reversion to the mean.

For individual players, wins added are projected based on a combination of a player’s performance so far this year and in recent past seasons.

Team ages are weighted based on projected wins added.

To estimate a team’s chances of winning a title this year (2014-15), I used Hollinger’s playoff odds simulation. For the remaining seasons in the five-year window through 2018-19, I used the figures from our model instead.

All projections are based on stats through Tuesday evening.

One team is clearly ahead of the pack. It’s the Golden State Warriors.

The Dubs project to win 0.95 championships between now and 2018-19. Some of that is because they’re the favorite to win the title this year, according to Hollinger’s method, with a 36 percent chance. But they also rate as the best bet to win the championship in each subsequent season through 2018-19.

This isn’t rocket science: the Warriors are really good. They’re young — in fact, their average age has declined slightly from last year as older players like Andre Iguodala have come to play less important roles. And they have a superstar in Stephen Curry.

Following the Warriors on the list:

At No. 2, the Los Angeles Clippers. They’re not off to the start the Warriors are, and they’re a little older. But they have the talent they’ll need.

At No. 3, the Cavaliers, who have a young core surrounding James, but who don’t yet look like they’ll stand head and shoulders above the pack as James’s teams did some years in Miami.

At No. 4, the Toronto Raptors, another obvious choice. They’re young, Kyle Lowry is on the verge of being a superstar, and they have the benefit of playing in the Eastern Conference.

At No. 5, the Houston Rockets, whose projection is largely unchanged from the end of last season despite a disappointing off-season.

At No. 6, the Grizzlies. Note, however, that this year is probably their best hope of a championship drive. The roster is fairly old, and there’s not a true superstar to build around.

At No. 7, the Pelicans. They haven’t gotten off to an especially strong start this year and have little shot of title contention this spring. But Davis has as bright a future as anyone in the league and the team’s average age (weighted by wins added) is just 23.6. They project to be the second- or third-best team in the league by the end of the five-year window, according to the model.

At No. 8, the Portland Trail Blazers, whose numbers are similar to the Raptors across the board but who play in the tougher conference.

At No. 9, the Chicago Bulls. Theirs is a decent projection, but the Bulls are older than you might think, and Derrick Rose hasn’t played like a superstar lately, even on the rare occasion he’s played. Instead, wins added thinks that Jimmy Butler is their best player.

And at No. 10, the Thunder, whose projection has declined more than any other team since the end of last season.

Does this underrate OKC? Yeah, probably. As I’ve said, our simple method is liable to underrate teams dealing with injury problems. The Thunder have played pretty well since Kevin Durant and Russell Westbrook have returned to the lineup. But two points to consider.

First, when a team has the talent the Thunder do, there’s no time like the present to win a title. But the Thunder are unlikely to win the championship this year. They’d be the No. 8 seed in the Western Conference if the playoffs started today, and while Hollinger’s method may underrate them, there’s a big gap between the Thunder and the top seven seeds. Even if they improve to (for instance) the No. 6 seed, they’ll probably have to win four playoff series as the road team to win the Larry O’Brien Championship Trophy. Not. Easy.

Second, Durant is a superstar by any definition, but the degree of superstardom matters. If Durant is the star Sirius, as he was last season, shining brighter than anyone else in the NBA firmament, the Thunder will always have a leg up on the rest of the league, other things held equal. If he’s merely “in the conversation” as the league’s best player, along with Curry, James, Chris Paul, James Harden and Davis, then the Thunder will perennially compete with Curry’s Warriors, James’s Cavs, Paul’s Clippers, Harden’s Rockets and Davis’s Pelicans — but not necessarily beat them.

To be even more geeky about it, championship contention in the NBA is nonlinear function. Being a 56-win team instead of a 60-win team — because, say, Durant has become a half-step slower or more injury-prone — could matter a great deal.

But how overjoyed Gotham would be if blue and orange stood for the Manhattan Thunder and not the Knicks! The Knicks, obviously, will not win the championship this season. And here’s how the model pegs their chances over the next four seasons. In 2015-16, they have a 0.3 percent of winning the title. In 2016-17, their chances are 0.6 percent. And then in the two subsequent seasons, 0.9 percent and 1.0 percent. Overall, there’s about a 3 percent chance the Knicks will win the NBA title in the next five years.

Three percent is not zero percent, so naturally you’ll find the exception to the rule if you dig in deep enough. The 2007-08 Miami Heat, who finished at 15-67, are the most favorable precedent. Their situation wasn’t entirely different from the Knicks’; in a down season, their roster featured one star (Dwyane Wade) and a lot of aging and overpriced “talent” around him. Three seasons later, they signed LeBron James, and in 2011-12 they won the NBA title.

So, maybe the Knicks will luck into Jahlil Okafor in next year’s draft. And maybe Durant signs with them two years from now, and maybe Anthony has a gentle decline. I’m telling you there’s a chance, Knicks fans! It’s just not bloody likely.

The Knicks, however, do not quite have the worst projection in the league; instead that belongs to the 76ers, whose title chances are lower still.

If your eyes are on the long-term, wouldn’t you rather be in a tanking rebuilding situation like Philly than in the predicament of the Knicks or Lakers? Maybe, but the history of teams who have been as laughably bad as this year’s Sixers is not good. Since the ABA merger, 51 teams have finished with fewer than 20 wins in a 82-game season or the equivalent amount in a shortened season. How many of them won a championship in the next five years? Only one — the aforementioned 2007-08 Heat, whose situation was more analogous to that of the Lakers or Knicks than that faced by the 76ers.

The thing about starting from a 15-win baseline is that you can add a 20-win megawatt superstar from the draft, and sign a 10-win free agent, and have another guy develop into a five-win talent … and still be a 50-win team, a No. 5 or 6 seed. It’s not clear there’s anyone on the Sixers’ roster who is a good bet to develop into a better-than-average NBA player. A team like the Detroit Pistons, who at least have Andre Drummond, is about twice as likely to develop into a championship contender, according to the model. The Pistons also face extremely long odds, but you’d rather have Drummond and a slightly inferior lottery position than the other way around. Tanking doesn’t pay, kids!

But there are a lot of ways to be awful in the NBA, and only one team wins the title. Golden State is the best bet to be pouring the champagne soon.