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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!