Suppose the Sixers and the Warriors are playing in the NBA finals (a seven game series). The first team to win four games wins the series. Assume the Sixers have a win probability for each game of 0.483. If the Sixers lose the first game, what is the probability that they win the series? Perform a Monte Carlo simulation to answer this question.
use r-studio!!! plz
A Mote Carlo Simulation code (in RStudio) to simulate the seven games times and calculating the probability of win of Sixers if they loose the first game is given below.
set.seed((57778))
n <- 10000
p <- 0
for( i in 1:n)
{
X <- sample(c(1,0),size=7,replace = TRUE, prob=c(0.483,1-0.483))
# 1 stands for Sixers win, 0 loss
if(X[1]==0)
{
if(length(X[which(X==1)])>=4)
{
p <- p + 1/n
}
}
}
p
We find the probability of win to
be 0.1538.
Get Answers For Free
Most questions answered within 1 hours.