library(knitr)
opts_chunk$set(echo=FALSE, cache=TRUE)
Set up a simple function, wintielose, that when given the number of starters and relievers returns the probability of winning, ending up tied, or losing relative to the other team:
First we answer the question with the given parameters:
| starters | relievers | win | tie | lose |
|---|---|---|---|---|
| 6 | 3 | 0.6634 | 0.1656 | 0.1710 |
| 7 | 2 | 0.7163 | 0.1458 | 0.1378 |
This indicates that the seven-reliever strategy is about 5.3% more likely to lead to your team ending up ahead. We can ask how how robust this value is to our estimates of reliever and starter win probabilities (if it’s actually .4 rather than .45, for example):
(In each case, the probability not shown is held constant at the estimated value, .45 or .15).