Expectations and Variability

After reading arrdub's Seminole Stock Report - Updated Expectations, I decided to finally do a fanpost that I've been thinking about since before the season began.  Bud and others on here have been good about urging folks to temper their expectations by logically taking into account their own (subjective) probabilities of FSU's winning each individual game.  Their suggestion is to use these probabilities to compute an expected regular season win total for the season, which I agree is an imminently sensible thing to do. (Even the terminology is correct: probabilists and statisticians would call this the "expected number of wins" or, alternatively, the "mean number of wins".)

However, as a statistician, I would also like to see some measure of variation assigned to the expected win total, or even to see the distribution of possible win totals, i.e., the probabilities attached to each possible win total.  I also think that this would go a long way towards deepening the casual TN reader's understanding of variability and its implications.  For example, it might happen that at the end of the season the total number of wins is pretty far from your expected win total, but that does not necessarily imply that your expectations were unreasonable, as long as the outcome was within the range of likely outcomes predicted by your distribution of wins.

After the jump, we'll see how we can get at some of this.

Unfortunately, without some further assumptions, it is impossible to use the win probabilities for the individual games to compute the distribution of the total number of wins, or even to compute a simple measure of variability such as the standard deviation.  Probably the biggest simplifying assumption that one can make is that the outcomes of the games are statistically independent; that is, that the likelihood of winning any subset of the games is unaffected by whether or not FSU wins the other games.  This assumption is surely wrong, but the same could be said about any model that we might choose for the dependence between games.  A more pertinent question is whether the probabilities computed using this assumption provide a reasonable approximation to the true probabilities.  It may be possible to use data from past seasons to actually test this, but I won't be doing that before I retire, so I'm going to go ahead and assume independence, just for the sake of easily getting some numbers that we can all look at. I hope that this provides a decent approximation to reality, but regardless, I think that it is at least good enough to answer the obvious questions about what you could reasonably expect for the season, given your per-game win probabilities.

I'm going to do the calculations using R, "a freely available language and environment for statistical computing and graphics," and I will provide an R function at the end of this post that you can use with your own probabilities.  R can be downloaded from CRAN (for Windows you can just click here).  Unfortunately I probably won't have time to help anyone with installing or using R, nor to participate as much as I would like an any discussion that may or may not follow this post.  I do know that ricobert1 uses R (I'm pretty sure that he used it to make that histogram showing all the short runs by DeMarco Murray in the Utah State game a few weeks ago), and I think some others here do too, so maybe they can help answer any questions about that.

Here are arrdubs's win probabilities for the individual games, taken from his post.  Note that a 1 is assigned to games we've already won and a 0 to games we've already lost.  This is the format I used to enter them in R (it one should be just one line, but it wouldn't fit here that way and R won't care).

arrdub <- c(Sam=1,OU=0,BYU=1,WF=.9,UVa=.7,Miami=.4,BC=.8,
The labels for the games are not required and I don't use them for anything here, so I could have just entered:
arrdub <- c(1,0,1,.9,.7,.4,.8,.65,.65,.65,.85,.4)

The expected number of wins is computed simply by summing the probabilities (this is a special case; calculation of expected values is generally much more complicated).  For arrdub this is

which yields 8. (Its unusual to get an integer.  Don't get confused by the "expected" terminology: usually the expectation will not be an integer.)

Everything from here on assumes independence between games, so don't say that I didn't warn you.

The standard deviation of the number of wins for arrdub's probabilities can be computed as (and again, this is unusually simple)

which yields 1.32.  If the distribution is not too strange, then any result within 1.5 or even 2 standard deviations of the expectation would not be considered surprising, so arrdub shouldn't be surprised if FSU wins anywhere from 6 to 10 games.  But the fun thing is that we don't have to settle for such vague statements, because we can compute the probabilities for all the possible win totals using R. 

First cut and paste this function definition into the R window (you could also save it into a plain text file named wintotpr.R and load it into R through some menu or the other or with R's source command):

wintotpr <- function(p, as.pct=TRUE, cumulative = "none") {
  n <- length(p)
  outcomes <- matrix(rep(c(FALSE,TRUE), n), ncol = n)
  outcomes <- t(expand.grid(data.frame(outcomes)))
  row.names(outcomes) <- names(p)
  probs <- rep(p, times=dim(outcomes)[2])
  probs[!outcomes] <- 1 - probs[!outcomes]
  dim(probs) <- dim(outcomes)
  seasontot <- apply(outcomes, 2, sum)
  seasonprob <- apply(probs, 2, prod)
  res <- tapply(seasonprob, seasontot, sum)
  res <- switch(cumulative,
                left = cumsum(res),
                right = rev(cumsum(rev(res))),
  if (as.pct) round(100*res,1) else res

Now running

gives the following results (I've reformatted them and removed the probabilities for 0, 1, and 12, which of course are zero anyway)

3(0%), 4(0.4%), 5(2.7%), 6(9.6%), 7(21.4%), 8(29.4%), 9(24%), 10(10.5%), 11(1.9%)

So 8 wins is arrdub's most likely total, but he shouldn't be too surprised with any of 6, 7, 8, 9, or 10 wins.

Here is one way of plotting that distribution:

plot(0:12, wintotpr(arrdub,as.pct=FALSE), type = "h",
     xlab="Number of Wins", ylab="Probability")

It is also interesting to look at the probabilities of "X or fewer" wins and of "X or more" wins, which can be computed with

wintotpr(arrdub, cumulative="left")

3(0%), 4(0.5%), 5(3.2%), 6(12.8%), 7(34.2%), 8(63.6%), 9(87.6%), 10(98.1%), 11(100%)


3(100$), 4(100%), 5(99.5%), 6(96.8%),7(87.2%), 8(65.8%), 9(36.4%), 10(12.4%), 11(1.9%)

We can also compute the distribution of the number of ACC wins.  The ACC games on our schedule are games 4 through 11, and I'll use their indicies to pick them out (I could have used the team names) by defining

ACC <- 4:11
In case you want to modify it to look at a group of nonconsecutive games, I could also have defined the list of ACC games with
ACC <- c(4,5,6,7,8,9,10,11)
arrdub's expected number of ACC wins is then computed with
which yields 5.6, with a standard deviation of 1.23 computed by
arrdub's probability distribution on the number of ACC wins is computed by
0(0%), 1(0.1%), 2(0.7%), 3(4%), 4(13.4%), 5(26.8%), 6(31.2%), 7(19.2%), 8(4.7%)

I hope some of you will try this out for yourselves.

A few more technical comments. Even if you're still awake at this point, you may want to skip this.

The first time I posted about this (in a comment to a preseason post on TN), I was using R to simulate actual seasons and then average over many simulated seasons to get standard deviations and probabilities.  That was easy and actually pretty fast, but after some back and forth with ricobert1 and others, it struck me that since I was assuming independence in my simulations anyway, it would be just as easy to forgo simulation and compute the probabilities exactly, which is what I have done here.

In that earlier discussion, ricobert1 also suggested using a normal (i.e., "bell curve") approximation for the probabilities.  I didn't expect this to work very well because the distribution of win totals is "very discrete" (it restricted to the integers 0, 1, ..., 12), while the normal distribution is continuous; and because I expected the distribution of win totals to be pretty skewed for most people's choices of the per game probabilities, while a normal distribution is symmetric.  But I tried it anyway, and if you do it correctly, the normal approximation is surprisingly accurate for the distributions we were looking at that day (the central limit theorem is a powerful thing).

Having said all that, the exact distribution is very easy to calculate, and since the normal approximation also assumes independence (to obtain the standard deviation for the approximating normal distribution) and is still only an approximation, I don't really see any advantage to it.  Also, it could yield a pretty bad approximation for someone who's per-game winning probabilities were fairly weird, or if we were doing things later in the season (with fewer games to add up, the central limit theorem won't help much).

And finally one more comment on the independence assumption.  Most of us might suspect that there is some positive dependence between the win/loss outcomes of games, in the sense that an FSU win against, say, Miami, might increase the (conditional) probability of a win in the BC game while a loss to Miami would decrease the probability of beating BC.  If the games are positively dependent in this way, then the standard deviation of the total number of wins would be greater than the value obtained assuming independence, which would mean even more variability in the number of wins.

ADDENDUM: This sequence of commands will plot Bud's and arrdub's distributions side-by-side. You will see that they're pretty similar, which isn't surprising, since their per-game probabilities are pretty similar. Just enter one command at a time into R, noting that each command takes two lines here due to the formatting.

bud <- c(Sam=1,OU=0,BYU=1,WF=.95,UVa=.825,Miami=.4,BC=.65,

plot((0:12)-0.1,wintotpr(bud,as.pct=FALSE),type = "h",
     xlab="Number of Wins",ylab="Probability", col = "red")

lines((0:12)+0.1,wintotpr(arrdub,as.pct=FALSE),type = "h",
       col = "blue")

legend("topleft", legend = c("bud","arrdub"), lwd = 1,
        col = c("red","blue"))

Fanposts are a section for the fans and do NOT reflect the views of Tomahawk Nation.