Question
IN PYTHON Two players A and B play a game consisting of several bets at a dollar each. Player A wins a one dollar bet
IN PYTHON
Two players A and B play a game consisting of several bets at a dollar each. Player A wins a one dollar bet with probability p and loses with probability q. Assuming that its initial capital is in dollars while the capital of player B is b dollars and that the game continues until A loses its capital or until its capital is a + b. Make a function in R that simulates the game including a graph that shows the capital of A at each moment. Estimate the probability that player A loses all his capital. Also estimate the expected duration of the game.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started