Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Probabilty of winning

  1. Nov 21, 2007 #1
    Say you are playing game in which you are betting money and you belive you have an advantage, (if you bet $X and win, you get $2X back). Given a bankroll X an bet unit of Y and an advantage of A, what is the probability of at some point having MX dollars, assuming you play untill you either run out of money or you reach your target?

    I have made simulations on excel and have found that it is easy to calculate when you have zero advantage (i.e. the probability of winning is 50%) because regardless of your bet size you always have a X/MX probability of reaching your target (MX).

    Example: you have $1,000 and will play a fair game untill either you reach $2,000 or zero, the odds of doing this is 50% regardless of bet size.

    So given all of this I am wondering what the probability will be when you change one factor (the advantage).

    According to my simulation If you have $600 and bet $10 at a time you have about a 90.28% chance of reaching $1200 before you reach zero, if your chance of winning is 51%. I say "about" 90.28 because I have only run it a couple thousand times and it is constantly changing. Since I'm doing it on excel it takes a couple minutes to rack up a thousand runs.

    I would like a way to calculate it exactly, but if anyone knows of some good simulation software that will do this, I would appreciate it if you told me.
    Last edited: Nov 21, 2007
  2. jcsd
  3. Nov 21, 2007 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You can do this by conditional probability

    P(winning|starting position) = P(winning|lose first)P(lose) + P(winning|win first)P(win first)

    So if the probability of winning is p, you call the probability of winning from position k pk and get

    pk = pk-1(1-p) + pk+1p

    which I'm fairly certain is solvable if you know how to do that sort of thing. You can get your boundary conditions by noting you always win if you start with the money you're trying to get, and always lose if you start with 0 dollars

    Note that in your simulation, you'd probably want to scale everything down by a factor of 10 (so you start at position 60, and win or lose 1 dollar each round)
  4. Nov 21, 2007 #3


    User Avatar
    Science Advisor
    Homework Helper

    See http://freestatistics.altervista.org/en/stat.php,

    "STATISTICAL LAB (3.5): interactive Tool To Simulate and Solve Statistical Problems (you need to have R installed)."

    Alternatively you can try programming it in C++ or Fortran, if you have a compiler -- these will run extremely fast.
    Last edited: Nov 21, 2007
  5. Nov 22, 2007 #4
    I'm not sure if that will work for what I am talking about, maybe if you give a demonstration.

    But anyways, shortly after posting this thread I figured out an easy way to do it by using geometric series.
    Last edited: Nov 22, 2007
  6. Nov 23, 2007 #5


    User Avatar

    What Office_Shredder indicated is the general method of solving these type of problems,
    known as difference equations, here which is of second order. No simulation is required.
    Last edited: Nov 23, 2007
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook