What Is the Probability of Winning in a Gambler's Ruin Scenario?

  • Thread starter Thread starter AASaunders
  • Start date Start date
  • Tags Tags
    Loop Matlab
Click For Summary
SUMMARY

The probability of winning in a Gambler's Ruin scenario, where a gambler starts with £1 and aims to reach £100 with equal chances of winning or losing, can be modeled using simulation techniques in MATLAB. The discussion highlights the use of nested loops, specifically recommending two nested "while" loops to effectively simulate the gambling process. The outer loop manages the overall game progression, while the inner loop handles the win/loss conditions. This approach allows for a clear structure to calculate the probability of achieving the goal.

PREREQUISITES
  • Understanding of probability theory, specifically Gambler's Ruin problems.
  • Basic proficiency in MATLAB programming.
  • Familiarity with control structures, particularly loops in programming.
  • Knowledge of simulation techniques for probabilistic modeling.
NEXT STEPS
  • Research "Gambler's Ruin probability calculations" for theoretical insights.
  • Learn about "MATLAB nested loops" to implement the simulation effectively.
  • Explore "MATLAB random number generation" for simulating wins and losses.
  • Investigate "Monte Carlo simulations" for broader applications in probability scenarios.
USEFUL FOR

Students in probability theory, MATLAB programmers, and anyone interested in modeling gambling scenarios or understanding stochastic processes.

AASaunders
Messages
4
Reaction score
0
Hi guys, I have been given a problem to complete, but at the moment my progress has been minimal.

A gambler has £1 to gamble, he plays a game in which the probability of winning and losing are equal. If he wins he gains a pound, and loses a pound if he does not win. He starts with £1 and must stop once he has no money remaining. He has a goal of £100, if he achieve this he will stop and consider himself to have beat the casino. What is the probability of the gambler winning?

I have only had two classes on using Matlab since September, thus I am not very experienced.

To complete this problem I know I need to use nested For loops but I just don't know where to start, so any guidance would be appreciated very much.
 
Physics news on Phys.org
Hello AASaunders,

I would say it would be easier with 2 nested "while" loops.

The outer one to make sure you get a few wins, the inner one to break free of the game once you lose or win.

J.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 24 ·
Replies
24
Views
10K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K