Let’s go to the casino. You have a bankroll of $500, and play $10 *red* bets in
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}
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.