Learn how probability, math, and statistics can be used to help baseball, football and basketball teams improve, player and lineup selection as well as in game strategy.

Loading...

Del curso dictado por University of Houston System

Math behind Moneyball

36 ratings

Learn how probability, math, and statistics can be used to help baseball, football and basketball teams improve, player and lineup selection as well as in game strategy.

De la lección

Module 7

You will learn about advanced basketball concepts such as Adjusted plus minus, ESPN’s RPM, SportVu data, and NBA in game decision-making.

- Professor Wayne WinstonVisiting Professor

Bauer College of Business

Okay, let's talk a little bit about adjusted plus minus.

And I'll tell you a couple stories.

You probably don't know about the origin of it.

But first, remember, we've talked about box score metrics.

In which you basically analyze a player by the box score.

But anybody who's played basketball knows a lot of what's good or

bad in basketball doesn't get picked up by the box.

In other words we talked about this taking the charge the hockey assist

boxing at your man when the other guy gets the rebound, setting the good screen.

That stuff doesn't really show up.

But basically if you're a good player and you know this if you play.

There are certain people who don't score points,

but basically their teams always win.

And the best story of this I've ever seen, you all know Bill Russell was the key,

probably more than anybody else, for the Celtics' 11 championships in 13 years.

Well a little story in Terry Pluto's book which was called, I believe, Loose Balls,

was whenever the Celtics would scrimmage during the early years of their dynasty,

Red Auerbach, the great coach would say, and I hated those teams.

I went to school at MIT and rooted against them every time.

Matter of fact I remember sitting with Jeff

next to a fan who threw an egg that hit Alex Hannum the 76er coach in the head.

And we always rooted for Chamberlain over Russell, I mean I don't know why.

But basically Terry Pluto story was

Casey Jones who has really bad box scores statistics.

And by any box score metric would be a bad player, Red Auerbach said

whichever team we scrimmage, whatever team Casey Jones is on, they win.

So he must do something right.

Even though he was really a bad shooter, and

we can look up his stats on basketball reference.

And we would see he just wasn't that good a player from statistic wise.

But he had to be a good player.

So Jeff I know, rated teams, and I went to see a Mavericks game with my family,

because our son was a Pacers fan in spring break.

We'd go to Dallas, and so

the Mavericks played the Pacers, and Mark was in the stands.

And he remembered me from having me in class.

He said do you have any way to make the Mavericks better?

So the next day I was swimming in the hotel pool.

I said hey Jeff rates teams.

Why don't we rate players?

And so the data set we need, basically, we hard to get then, but

we managed to get it.

Is basically every second who's on the court,

the ten players for each team, and how the score moves.

And if you're a good player the score should move in your favor, and

eventually that should pick up basically all the good things you do,

like set the pick, help out on defense, and things like that.

So I can show you a simple version of adjusted plus minus where

actually you have to rate every player in the league together which of

course is a lot of mathematical problems.

But let's suppose, let's look at those Warrior data points.

We have these 130 lineups and let's just focus on that as our dataset.

So we know the number of minutes, we know how many points the Warriors won by.

Okay?

And then basically we want to figure out how many points better or

worse than average NBA player each of those players is.

Okay.

Each player is and we'll focus on the 11 guys who played the most.

And we'll assume every other player has a minus four rating.

Now why is that a bad rating?

So minus four means You are four points

Worst than average for 48 minutes.

Average NBA player.

And what that means is if there were five of you on the court you'd lose by

20 points a game to an average NBA team.

So I mean, when you really work this out, if a guy is 10 points better than average

per game for the course of the season, he or she is a truly great player.

And over a short time period, the adjustment plus minus could be misleading.

But if you look at it over a long time span,

I think I can show you some data that would indicate

it does a pretty good job of picking out who the good players are.

And who the bad players are.

Also let's you rate defense.

Okay. You can have an adjusted plus minus

like a offense rating and defense rating.

And I think in the next video we'll show you some examples from our website that

we've sold to the Mavericks, the Knicks and a couple of other NBA teams.

But let's try and

rate how many points better than average each of these 11 players is.

Again, we're not looking at the strength of opponent.

Even if the starting players break even,

there are better than average players as a unit because they're playing against

the other team's starters who are usually better than average.

You really have to look at who you played with and who you played against.

And see that's the problem with regular plus minus.

In other words if I were to look at that

I can show you who leads, this is our dataset.

Okay so let's look

at 2012, 2013.

Players ordered by plus minus.

Okay.

So if you order players by raw plus minus for 48 they're always on good teams.

Okay.

So the teams that were the best this season, and

we'll talk about how to rate teams.

Miami was about seven points better than average.

Chicago didn't have that good.

The Spurs were six points better than average.

O K C was eight points better than average on raw plus minus.

The Knicks had a good year, won 50 games.

They were four points better than average.

And so you look at the top 20 players on raw plus minus.

They are Miami, Oklahoma City, San Antonio Spurs, Miami,

San Antonio Spurs, Oklahoma City.

How far down do I have to go to find somebody?

Memphis is good team, Pacers were good.

How far do I have to go down to find somebody who's on a below 500 team?

I mean there are good players on below 500 teams here.

But I'm still looking here.

Okay, all these teams were above average that year.

But basically on raw plus minus here, I'm still looking for

somebody who played for a bad team.

I don't even know How far I've gotta go down here.

Okay.

The Knicks again were very good that year.

So the top 50 players all played for teams that were above 500.

Okay.

I mean I'm going down here.

Amir Johnson.

That's a good example.

Amir Johnson always has a really good plus minus.

He doesn't do that great in per.

But every year in just the plus minus, Amir Johnson is a star for

the minutes he plays.

So he was probably the best player on raw plus minus among all the players

in the NBA in the 2012, 2013 season.

Okay.

So you can't just judge a player by his or her plus minus because basically it

depends on if they're on a good team, you can always have a good plus minus.

Like if you consider, let's look at the 2014, 2015 season.

Okay. So 76ers were bad.

So if you had a raw plus minus

Of plus one for 48.

On Minnesota, they had the worst record.

And you had a raw plus minus of

plus one on lets say I'll assume your

goal I hope Cleveland wins I think its a great story for the city if they win.

Let's look at Golden State who dominated all season at historic levels.

If you won by one point a game where you're on the court for Golden State,

you're not that good a player.

because Golden State was winning by about eight or nine, ten points a game.

But if you won by one point a game when you're on Minnesota,

you're a truly great player.

You made the worst game in the league above average.

So you have to look at who you played with and who you played against.

So how do we do that?

Well we use something called the Excel Solver which

we'll see a lot more of when we rate teams.

And you can add that in from file, options,

add-ins, go, and there is a Solver add in.

And now this will show up under data, solver.

Okay so there's three parts here.

You have a target cell you want to maximize or minimize.

You have changing cells, that will be the ratings of the players.

I'll explain the tourniquet cell in a minute.

And constraints we don't even need any here.

And this is what we'll call a non linear model,

because we're minimizing weighted squared errors as you'll see.

A linear model means you're multiplying the changing cells by constants and

adding them together.

We'll see a linear model when we talk about daily fantasy sports.

And we'll mostly see non-linear models when we rate sports teams.

Okay.

So here we have all this data and we want to best predict

how the Warriors did assuming they always played an averaged opponent.

So the changing cells are the ratings, how good each player is for

48 minutes better or worse than average.

And if it doesn't come out that Curry's the best player on the Warriors,

we know we screwed up.

Okay this is in every minute of the Warriors, so

every lineup is playing at least five minutes.

Okay.

So now we just hypothesize any numbers for these ratings.

We can start with anything in there, and then we look at the five players.

We look up each player's rating.

Gotta use [INAUDIBLE].

If you look up Paul's.

So that says find Harrison Barnes's rating in the second column of this table.

And if there's an error when we can't find the player, I'll make his rating minus 4.

I'm going to assume the players who didn't play much for

the Warriors are sort of replacement players.

So basically I have A rating for each player for 48 minutes.

And then I add those together.

Okay.

And then I divide by 48 to see per minute how good were those players per minute.

Just add together how much above average.

Like if I had a three, a four, a two, a minus two, and a minus four.

This is per 48.

That lineup would be nine minus six or

three points per 48 minutes better than average.

But basically I divide it by 48 to make it how good that lineup is per minute.

Okay. Then I compare that to the actual

points per minute.

So the Warriors lineup that plays for the most 800 minutes, okay.

That wins by, if you take points divided by minutes,

wins by 0.44 points per minute.

Okay. And

then I subtract off the prediction per minute.

And I square that and I weight it by the number of minutes in that lineup played.

because you don't care if the line of played

five minutes very much about predicting it that well.

Okay. So

then what you do is add those all up and you want to minimize that.

So now the solver window.

Okay. I mean we'll put it in from scratch here,

but here it's very simple once we set this up.

So if I would reset all.

Okay.

I want to minimize some of squared errors.

Weighted sum of square errors.

want to change the player ratings.

We can close that out and use that non-linear.

But let's suppose I'll just make up integer numbers here for these guys.

I don't have to start with the right answer.

See it looks up Barne's

is a plus four, Bogut's at plus three, Curry's at plus two,

Green's a minus one, so that would make us a plus eight.

And then Clay Thompson is a minus six.

That would say they played two points better than average.

Two divided by 48 would be 0.04, but they won by 0.44 points per minute.

Okay. So then I get the squared errors,

minimize that.

Let's make that the target cell if we did it already.

Okay. So we want to minimize some mis-squard

errors.

You don't check the nine negative box because you want to allow negatives here.

Some players could be worse than average and if you click solve it should quickly

get the answer and again this is not based on every minute.

But it says Curry is 15 points better than average.

And that's probably not that far off because I mean he's

really really a good player.

Okay. Get Andre Iguodala's the second

best player.

Thompson and Green third and fourth best.

David Lee hurt them when he was in in these lineups.

Sean Livingston and Barbosa don't come out that bad.

Okay. Because they were mainly in

us Marreese Speights comes out as not having helped them that much.

And Ezeli doesn't help them that much.

Again this is based on limited minutes, but

it gives you some idea about how the adjusted plus minus works.

And in the next video, we'll talk about ESPN's real plus minus,

which is a hybrid of adjusted plus minus.

Which has been worked on by a lot of people, but I think there's some tricks

that we have that I think other people haven't figured out.

I think you can really get misleading results with adjusted plus minus,

if you don't understand some tricks which I don't want to give away in this course,

to be honest.

because I think we have a better way to do it than

what I've seen on the internet Okay.

But we'll talk in the next video about where you can find ESPN's real plus minus.

I've basically copied all the data excluding the 2014, 2015 season and

you can see it does a pretty good job of picking out who the great players are.

So let me ask you this question before we go here in this video.

The top five players in the NBA For the decade of the 2000s.

Okay. Now pause the video,

maybe write down your own five.

But when I look at adjusted plus minus over that ten year

period who are our five best players.

I don't remember the order but

basically it's Kevin Garnett, it's Duncan, it's Kobe.

Dirk and of course LeBron.

So that's who our system says are the five best players of the decade 2000 to 2009.

Now if you've got a player that you would like to put in that list,

tell me who you'd take off and send me an email.

Maybe Chris Paul,

not Dwayne Wade because Dwayne Wade's had several bad years and injury.

Steve Nash early on, he had some great years.

But Steve Nash with the Maverick's was not a good defender.

Okay.

But basically you can break this prediction down, you can predict points

for and points against, and that's how you can measure defense.

So that's a quick introduction to adjusted plus minus.

Coursera brinda acceso universal a la mejor educación del mundo, al asociarse con las mejores universidades y organizaciones, para ofrecer cursos en línea.