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

From the course by 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.

From the lesson

Module 5

You will learn basic concepts involving random variables (specifically the normal random variable, expected value, variance and standard deviation.) You will learn how regression can be used to analyze what makes NFL teams win and decode the NFL QB rating system. You will also learn that momentum and the “hot hand” is mostly a myth. Finally, you will use Excel text functions and the concept of Expected Points per play to analyze the effectiveness of a football team’s play calling.

- Professor Wayne WinstonVisiting Professor

Bauer College of Business

Let's continue with our analysis of play by play data from pro football.

So I went to the game index like field goal data, and

I came up with how the Texans did it in 2014 on offense, every first and ten play.

And so I want to analyze how they did on runs and passes.

So from the play by play data, if I see the word pass, it was a pass.

If I see the word sack, it was a sack, which really does count as a pass attempt.

And otherwise, it was a run.

So I first want to identify if each play was a pass or run.

So I would do an if error, and I'm going to find

the word pass in the play by play data.

Comma 1, otherwise I'll put a point.

>> And now with the sack

>> Comma 1, otherwise I'll put this, so

there are a couple of sacks probably.

Let's see if we can find one.

>> Here we go.

See, the word sack is there, so we know it's a sack.

[INAUDIBLE] OK, if the length of these two, length counts, how many characters?

>> It's is greater than zero.

>> Then I could say pass, otherwise it was a run.

>> So there's a run.

>> There's a pass.

And you could do the type of run like up the middle, left tackle,

I'm not going to worry about that.

So let's count if we could count how many passes.

It's an extra row.

>> And here's how many points per game on each play in column P.

We can count how many runs, and then we could take the average points.

OK, so the columns I really care about, I don't care about pass and sack.

But let's just name these columns.

>> So I'd go, formulas,

create from selection, top row, OK.

So in other words if I go the pass or run column is the key for me.

And then the points added column.

>> OK, those are the key columns.

So let's see how many times they pass the run, so

I could do a count if, and then I'll use F3, pass or run.

And I can say the word pass.

I can do count if, see notice those ranges make it so simple.

Pass or run.

Run, so see they run more than they pass.

And you'll see, and I think this is fairly stupid because they're running

was way worse than their passes.

As a matter of fact, the average points per play in the NFL is definitely

higher on passes than it is on runs.

Brian Burke's work shows that.

So now if I want to do an average if.

>> Well let's do that from the function, sort of might be easier,

so if I type average.

>> Here.

>> So if the play is a run, so

I do F3, pass or run.

And I would say, let's say, pass.

>> Then I would say.

>> Sorry.

Then I will go F3, that's messing up there.

I think I have to, shouldn't have to put the quotes there, but

let's see what happens.

OK. And then I would say points gained.

So that should, nope it's not working so let's see.

If I want to say average if, OK so the range would be pass or run.

And that's pass.

Then I want to average the points given and start typing.

>> OK, so on passes we gained an average

of 0.01 points [INAUDIBLE].

But now let's just copy this formula.

Let's say if it was a run.

OK, that's worse.

When the Texans ran it on first and ten they averaged losing 0.14 points per play.

When they pass they average gaining 0.01 points per play.

Now that's a lot different.

I mean we can talk about whether it's a significant difference,

but when you're losing, they ran twice as much and they did way worse.

OK, if you figure it out those running plays cost them this many points.

>> 39 points.

And you know 30 points in the NFL, 32 points, whatever, is a win.

So those running plays on first and ten actually cost them over one win.

You know, they missed the playoffs by one win.

Now a little trickier.

Well, in standard deviation, let's not worry about the standard deviation.

I think we'll do that in a separate video.

I think we have to teach you a little bit more about rates.

>> But in that video, in this video,

we've learned that basically the Texans were much less effective on 1st and

10 running, than passing, yet they ran what percentage at the time.

>> It ran almost two thirds of the time.

OK, it ran 62% if I passed 30, ran 63% of the time,

passed 37% of the time, so they did the play

that was worse much more of the time than they did the play that was better.

That just doesn't make much sense.

OK, in the next video we'll talk about using this play by play data to analyze

two NFL teams enough on fourth or one and two.

And we'll look at the great gameplay index,

we'll look at every play that was worth a one or two that NFL teams went for

it in 2014, and we'll look at the field goals and see on points per play.

Did teams do better when they went for it, then they field goaled?

The answer is yes, which means that they should have gone for it a lot more.

Coursera provides universal access to the world’s best education,
partnering with top universities and organizations to offer courses online.