Let’s go to the casino. You have a bankroll of $500, and play $10 *red* bets in
Need help with this assignment?Get an original answer from a qualified tutor — from $10/page.
Get it written →Let’s go to the casino. You have a bankroll of $500, and play $10 *red* bets in
roulette. Consider one *trip* to the casino to end with either surpassing $2,000,
playing 300 games, or running out of money. A *bankroll trajectory* tracks the
amount of money in your bankroll over time.
Simulate and plot one bankroll trajectory for one trip to the casino.
Hint: one of the discussion files includes a similar scenario.
“`{r simulate_casino_trip}
“`
## Question 2
Same scenario as question 1, simulate 1,000 trips to the casino. Estimate and
plot the 10th percentile, 50th percentile (median), and 90th percentile for
for your bankroll over time.
Hint 1: The “quantile“ function in R allows you to calculate any arbitrary
quantile for an input vector “x“. Assemble the trajectories into a
single matrix, then use “apply“ with the function “quantile(x, c(0.1, 0.5, 0.9))“.
Plot the 10%ile and 90%ile with a muted color and dashed lines, and the median
with a bold color and solid line.
Hint 2: use “lty“ argument in “lines“ to specify line type.
“`{r Q2}
“`
## Question 3
Same as Question 2, but change the bet type to *Street*, $lbrace 1, 2, 3rbrace$.
“`{r Q3}
“`
## Question 4
Same as Question 2, but use Martingale doubling strategy with the *black* bet.
If you can’t make the *next* bet, make the largest bet you can. Same exit conditions
as Question 1.
“`{r Q4}
“`
## Question 5
Estimate the probability of winning the pass-line bet, by simulating 100,000
games. Note: The shooter has not started the game yet. You must include in
simulation all possibilities that can happen during play (both on come-out roll,
and in point phase)
“`{r Q5}
“`
## Question 6 (Bonus)
You are playing blackjack. On a fresh deck, with no other players at the table,
you have a 10 and 8, and decided to stand. The dealer is showing a 4.
Via simulation, estimate the probability of your winning the hand. Note: In
this casino, the dealer has to hit on a soft 17.
“`{r Q5}
Get a plagiarism-free answer to this question
Send us your instructions and we’ll match you with the best writer in your subject.
- 100% human-written, zero AI
- Turnitin report included
- Confidential — we never share your data
- Free revisions & refunds