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
Get step-by-step solutions from verified subject matter experts
