## TO USE THIS CODE, MODIFY THE SECOND LAST LINE
## Code written by Dan Riskin April 13, 2015. No promises or guarantees that it works.
## Feel free to share/use/modify.whatever.
## hockey_odds plays a single playoff series
hockey_odds <- function(p,n){
# p is the probability of winning a single game
# n is the number of games you have to win
nWins=0
nLoss=0
while (nWins