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...

來自 University of Houston System 的課程

Math behind Moneyball

39 個評分

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.

從本節課中

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 try and understand the Warriors lineups a bit better.

So what we're going to do is create three tables.

Okay.

And one table and we're only going to focus on their top 11 players here.

We want to see how every combination of two players in playing,

how many points they won for 48 minutes, the plus-minus for that combination.

Then we need to look at one player in and

other player out, how the combination played.

And both players out, so we'll fill in one of these and you can do the other two,

we'll use a two-way data table, okay.

So we have the data from last time, here's the players in each lineup.

Here's how many minutes the lineup played,

here's how many points it beat the other team by, they did have some bad lineups.

Notably without Steph Curry in, with Livingston at the point guard.

Okay, and so remember last time we had

a column that was a 1 if player 1 was in, 0 otherwise.

Well we want to now have a column which is a 1 if player 1, first player is out.

So we take 1 minus that.

We're going to have two players in our data,

we can analyze more than two players if we wanted to.

So then I have player 2 is in G2.

So if I can't find player 2 in the list of players for

that row I put a 1, otherwise a 0.

And then I do 1 minus that for player 2 out.

So when there's a 1, here I've got Livingston and Curry in.

Sorry, I have Livingston out and Curry in.

because it's player 1 out and player 2 in.

Now, If I

would make this be Draymond Green because they play together an awful lot.

Let's say Iguodala, Iguodala and Curry.

Okay, so here's Iguodala in, and Curry in, so that's a common lineup, but this,

Iguodala was out and Curry in.

So I only want to count the lineups in the first table,

I'll count the lineups for both the players are in.

So what I would do is sum up product the player 1 in column and

a player 2 in column times the minutes to get the minutes played.

Because I have to have a 1 in both columns.

So I would say, sum of product, can use F3, player 1 in,

comma F3 player 2 in, see, that's only going to be one,

the product of those columns, if they're both guys are in,

and then I should do the minutes played Okay.

So there are 1,022 minutes where we had Iguodala and Curry.

Now how did we do on points?

All I gotta do is copy this formula and change the minutes played to points.

So I do equals and I copy that formula, and the minutes played

I named all these columns here, so I call that points.

Oops.

I think it's pts.

All right, so they won by 381 points.

Now, for 48 minutes what is that?

Take the points per minute times 48.

18, yeah, so they won by 18 points per game.

Now, how can I set this up so I can put the minutes in and

the points per 48 in a nice format that a coach can really understand?

Well, the coach probably doesn't care about the decimals.

So what I'm going to do is round off, there's a round function in Excel, okay,

and then I can concatenate stuff and combine it in one cell using the and sign.

So I'd start with the plus-minus,

okay, and then I use the and sign and I'll put a space in.

And I do the and sign.

And then I guess I'd round the minutes To the nearest integer.

And then I guess I'd put an and sign, and I put the word m for minutes.

So let's see if that looks nice.

Again, the and sign concatenates it.

So that says they won by 18 points per game and played this many minutes.

Now, I can use a two-way data table,

we haven't done much of this, but a two-way data table, you can have

one output cell in the upper left hand corner list inputs going down and across.

So our inputs will be the players.

So the row input will be, I'll feed the name of

the player here into a player 1 column cell, and

then I'll feed the name of the player here into the player 2 cell,

and basically this will be the output.

Okay, so do Ctrl+Shift+right arrow, Ctrl+Shift+Down arrow,

Data > What-If Analysis > Data Table.

Now the row input,

it doesn't really matter but let's suppose that's the first player.

Column input is the second player, and if I click OK,

may have to hit F9 to make those change.

You can see there's a lot of situations they do really well in.

Okay.

Splash Brothers, that would be who, that would be Curry with Klay.

19 points per game.

Curry and Bogut's is really good.

You see when Curry's in they're really good.

Okay now down, we'll look at the ones with the Curry out.

But I'd like to format this and so let me show you the format I used.

I used that formula option, and I did this in these two other tables.

Let me just show you what the format looks like.

I did Home > Conditional Formatting, I look at Manage Rules.

You can see I used a formula, red.

Okay, I took the left three characters in the cell, and

basically if that's less than minus 9,

it's minus 10 or lower, and that's a bad lineup.

And also I added, in green, if the left three characters,

the value is greater than plus 9, that's a good line.

Now a little trick here, since I did this in these two tables.

These two tables, I'll explain where they came from in a minute.

What I can do is, I can highlight this, and I think,

paint the fence from Karate Kii.

There is Home > Format Painter, and if you double-click on a format painter,

you can basically just keep using it over and over.

But all I have to do is pick this range.

Okay, so every time we played more than 10 points better than average is in green.

And when we play more than 10 points worse than average,

like Ezeli and Livingston in is really bad for the Warriors, and

hopefully they won't use that that much in the playoffs here.

Okay, but there's a lot of good stuff.

Now the second table, okay, you can look at the formulas here.

When the row player is in and the column player is out,

I sum the product player 1 in with player 2 out, and the same for the points.

Okay.

And now what you'll see is where they have problems is when Livingston goes in for

Curry as the point guard.

That's 1,000 minutes and they lose by three points a game.

This doesn't adjust for strength of opponents, but that's, and

when Ezeli is in and Curry is out that's really bad too.

But Curry in, look what you can see why he's MVP.

When Curry is in everything is good.

When Curry is out, things are not so good.

Okay, I mean, but you could search through here.

We may talk about this later, what's the best lineup you can pick with Curry out?

I think we'll have something to say about that next video or in a couple of videos.

I haven't thought that far ahead.

But you can see you have big issues when Curry and Thompson,

both Splash Brothers are out.

They lose by five points a game.

And this doesn't surprise me at all.

When Iguodala and Draymond Green are out they lose by 14 points a game.

So, you pretty much have to have one of them in.

In other words, If you got Iguodala in and Green out, you're pretty much okay.

You win by five points a game.

So now we're getting really into,

I think stuff that can really help coaches during the season.

During the season, it's hard to make a trade.

But you certainly can look at your lineups as a form of experimentation.

And the Warriors I think did a very good job with that.

I mean, if we look down here at the lineups that

played at least five minutes that weren't very good.

And I haven't followed, I don't know, playoffs, but these two lineups,

you can see why they're pretty bad.

David Lee has, while he used to do very well, I think, he's just

had trouble fitting in with the Warriors the way they're playing this year.

And you can see, of these six worst lineups,

four of them have David Lee in there.

And I mean, Livingston is the point guard.

If you look at 1 2 3 4 5 6, the seven worst lineups,

they have [LAUGH] not David Livingstone, that one's Mr. Livingstone, I presume,

have Shaun Livingston as the point guard, okay, and so that lets you know that

that's probably not, or Barbosa might have been the point guard, I don't know.

But a lot of times, when they have Barbosa and Livingston,

most of these bad lineups have Barbosa and Livingston as the point guards.

Let's take a look at that.

So if I have Livingston in with Barbosa,

they lose by four points a game in 468 minutes.

So this really gets you into I think, understanding, if you download the data

from basketball-reference.com, what are good line ups and what aren't.