Odds of Bankruptcy Flipping a Weighted Coin Infinity Times












1












$begingroup$


A random tangent I have been thinking about, please be gentle I am not a mathematician:



Imagine a coin toss where Heads means we win a coin and Tails means we lose a coin. We start with 1 coin and cannot go negative (i.e. if we flip a Tails on the first try, we lose and it's game over).



The coin is weighted so that it flips Tails with a probability of a. If a = 0, the probability of bankruptcy is 0%. At some value between 0 and 1, the probability of bankruptcy approaches 100%. For what value of a does this probability cross 50%?



So I drew a graph of the outcomes for three flips of a coin with a = 0.4:



       1
(0.4) / (0.6)
0 2
(0.4) / (0.6)
1 3
/ /
0 2 4

First Flip: P(0) = 40%, P(2) = 60%
Second Flip: P(0) = 40%, P(1) = 24%, P(3) = 36%
Third Flip: P(0) = 49.6%, P(2) = 28.8%, P(4) = 21.6%


The first thing I noticed is the probability of bankruptcy on evened-numbered flips (e.g. flip #2, flip #4, ...) does not increase. So you have a 40% of busting on the first hand, the probability remains unchanged on the second flip.



I attempted to try and solve this problem in a closed form solution shown below (sorry it's a picture, I don't know LaTeX...).



Attempt at a Closed Form Solution for Coin Flip Problem



For a = 1/2, I got a P(0) = 2/3. Obviously this is wrong because for a equally weighted coin, we would expect that playing infinitely long, you would succumb to gambler's ruin pretty quick.



So again restating the original question: How weighted does the coin have to be in our favor that after playing for an arbitrarily long amount of time, our odds of bankruptcy approaches 50%? Is this a problem that can be solved in closed form? Also if you can point out the fallacies in my attempt, I greatly appreciate it.



Thanks in advance!










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Martingale theory is closely related to this topic. Your coin tosses can be modeled using biased random walk. Afterwards you use the de Moivre's martingale and then using the optional sampling theorem you can derive probabilities for going bankrupt before reaching some winning value
    $endgroup$
    – Makina
    Dec 21 '18 at 4:16












  • $begingroup$
    Why is the probability of bankruptcy a continuous function of $a$? The probability of bankruptcy may be $100%$ for all $a$ except $a=0$.
    $endgroup$
    – Michael Burr
    Dec 21 '18 at 4:24






  • 1




    $begingroup$
    Possible duplicate of Hitting probability of biased random walk on the integer line
    $endgroup$
    – obscurans
    Dec 21 '18 at 6:48










  • $begingroup$
    True, will delete my answer.
    $endgroup$
    – Makina
    Dec 21 '18 at 7:22
















1












$begingroup$


A random tangent I have been thinking about, please be gentle I am not a mathematician:



Imagine a coin toss where Heads means we win a coin and Tails means we lose a coin. We start with 1 coin and cannot go negative (i.e. if we flip a Tails on the first try, we lose and it's game over).



The coin is weighted so that it flips Tails with a probability of a. If a = 0, the probability of bankruptcy is 0%. At some value between 0 and 1, the probability of bankruptcy approaches 100%. For what value of a does this probability cross 50%?



So I drew a graph of the outcomes for three flips of a coin with a = 0.4:



       1
(0.4) / (0.6)
0 2
(0.4) / (0.6)
1 3
/ /
0 2 4

First Flip: P(0) = 40%, P(2) = 60%
Second Flip: P(0) = 40%, P(1) = 24%, P(3) = 36%
Third Flip: P(0) = 49.6%, P(2) = 28.8%, P(4) = 21.6%


The first thing I noticed is the probability of bankruptcy on evened-numbered flips (e.g. flip #2, flip #4, ...) does not increase. So you have a 40% of busting on the first hand, the probability remains unchanged on the second flip.



I attempted to try and solve this problem in a closed form solution shown below (sorry it's a picture, I don't know LaTeX...).



Attempt at a Closed Form Solution for Coin Flip Problem



For a = 1/2, I got a P(0) = 2/3. Obviously this is wrong because for a equally weighted coin, we would expect that playing infinitely long, you would succumb to gambler's ruin pretty quick.



So again restating the original question: How weighted does the coin have to be in our favor that after playing for an arbitrarily long amount of time, our odds of bankruptcy approaches 50%? Is this a problem that can be solved in closed form? Also if you can point out the fallacies in my attempt, I greatly appreciate it.



Thanks in advance!










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Martingale theory is closely related to this topic. Your coin tosses can be modeled using biased random walk. Afterwards you use the de Moivre's martingale and then using the optional sampling theorem you can derive probabilities for going bankrupt before reaching some winning value
    $endgroup$
    – Makina
    Dec 21 '18 at 4:16












  • $begingroup$
    Why is the probability of bankruptcy a continuous function of $a$? The probability of bankruptcy may be $100%$ for all $a$ except $a=0$.
    $endgroup$
    – Michael Burr
    Dec 21 '18 at 4:24






  • 1




    $begingroup$
    Possible duplicate of Hitting probability of biased random walk on the integer line
    $endgroup$
    – obscurans
    Dec 21 '18 at 6:48










  • $begingroup$
    True, will delete my answer.
    $endgroup$
    – Makina
    Dec 21 '18 at 7:22














1












1








1





$begingroup$


A random tangent I have been thinking about, please be gentle I am not a mathematician:



Imagine a coin toss where Heads means we win a coin and Tails means we lose a coin. We start with 1 coin and cannot go negative (i.e. if we flip a Tails on the first try, we lose and it's game over).



The coin is weighted so that it flips Tails with a probability of a. If a = 0, the probability of bankruptcy is 0%. At some value between 0 and 1, the probability of bankruptcy approaches 100%. For what value of a does this probability cross 50%?



So I drew a graph of the outcomes for three flips of a coin with a = 0.4:



       1
(0.4) / (0.6)
0 2
(0.4) / (0.6)
1 3
/ /
0 2 4

First Flip: P(0) = 40%, P(2) = 60%
Second Flip: P(0) = 40%, P(1) = 24%, P(3) = 36%
Third Flip: P(0) = 49.6%, P(2) = 28.8%, P(4) = 21.6%


The first thing I noticed is the probability of bankruptcy on evened-numbered flips (e.g. flip #2, flip #4, ...) does not increase. So you have a 40% of busting on the first hand, the probability remains unchanged on the second flip.



I attempted to try and solve this problem in a closed form solution shown below (sorry it's a picture, I don't know LaTeX...).



Attempt at a Closed Form Solution for Coin Flip Problem



For a = 1/2, I got a P(0) = 2/3. Obviously this is wrong because for a equally weighted coin, we would expect that playing infinitely long, you would succumb to gambler's ruin pretty quick.



So again restating the original question: How weighted does the coin have to be in our favor that after playing for an arbitrarily long amount of time, our odds of bankruptcy approaches 50%? Is this a problem that can be solved in closed form? Also if you can point out the fallacies in my attempt, I greatly appreciate it.



Thanks in advance!










share|cite|improve this question









$endgroup$




A random tangent I have been thinking about, please be gentle I am not a mathematician:



Imagine a coin toss where Heads means we win a coin and Tails means we lose a coin. We start with 1 coin and cannot go negative (i.e. if we flip a Tails on the first try, we lose and it's game over).



The coin is weighted so that it flips Tails with a probability of a. If a = 0, the probability of bankruptcy is 0%. At some value between 0 and 1, the probability of bankruptcy approaches 100%. For what value of a does this probability cross 50%?



So I drew a graph of the outcomes for three flips of a coin with a = 0.4:



       1
(0.4) / (0.6)
0 2
(0.4) / (0.6)
1 3
/ /
0 2 4

First Flip: P(0) = 40%, P(2) = 60%
Second Flip: P(0) = 40%, P(1) = 24%, P(3) = 36%
Third Flip: P(0) = 49.6%, P(2) = 28.8%, P(4) = 21.6%


The first thing I noticed is the probability of bankruptcy on evened-numbered flips (e.g. flip #2, flip #4, ...) does not increase. So you have a 40% of busting on the first hand, the probability remains unchanged on the second flip.



I attempted to try and solve this problem in a closed form solution shown below (sorry it's a picture, I don't know LaTeX...).



Attempt at a Closed Form Solution for Coin Flip Problem



For a = 1/2, I got a P(0) = 2/3. Obviously this is wrong because for a equally weighted coin, we would expect that playing infinitely long, you would succumb to gambler's ruin pretty quick.



So again restating the original question: How weighted does the coin have to be in our favor that after playing for an arbitrarily long amount of time, our odds of bankruptcy approaches 50%? Is this a problem that can be solved in closed form? Also if you can point out the fallacies in my attempt, I greatly appreciate it.



Thanks in advance!







probability gambling






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 21 '18 at 3:59









Daniel BankDaniel Bank

1084




1084








  • 1




    $begingroup$
    Martingale theory is closely related to this topic. Your coin tosses can be modeled using biased random walk. Afterwards you use the de Moivre's martingale and then using the optional sampling theorem you can derive probabilities for going bankrupt before reaching some winning value
    $endgroup$
    – Makina
    Dec 21 '18 at 4:16












  • $begingroup$
    Why is the probability of bankruptcy a continuous function of $a$? The probability of bankruptcy may be $100%$ for all $a$ except $a=0$.
    $endgroup$
    – Michael Burr
    Dec 21 '18 at 4:24






  • 1




    $begingroup$
    Possible duplicate of Hitting probability of biased random walk on the integer line
    $endgroup$
    – obscurans
    Dec 21 '18 at 6:48










  • $begingroup$
    True, will delete my answer.
    $endgroup$
    – Makina
    Dec 21 '18 at 7:22














  • 1




    $begingroup$
    Martingale theory is closely related to this topic. Your coin tosses can be modeled using biased random walk. Afterwards you use the de Moivre's martingale and then using the optional sampling theorem you can derive probabilities for going bankrupt before reaching some winning value
    $endgroup$
    – Makina
    Dec 21 '18 at 4:16












  • $begingroup$
    Why is the probability of bankruptcy a continuous function of $a$? The probability of bankruptcy may be $100%$ for all $a$ except $a=0$.
    $endgroup$
    – Michael Burr
    Dec 21 '18 at 4:24






  • 1




    $begingroup$
    Possible duplicate of Hitting probability of biased random walk on the integer line
    $endgroup$
    – obscurans
    Dec 21 '18 at 6:48










  • $begingroup$
    True, will delete my answer.
    $endgroup$
    – Makina
    Dec 21 '18 at 7:22








1




1




$begingroup$
Martingale theory is closely related to this topic. Your coin tosses can be modeled using biased random walk. Afterwards you use the de Moivre's martingale and then using the optional sampling theorem you can derive probabilities for going bankrupt before reaching some winning value
$endgroup$
– Makina
Dec 21 '18 at 4:16






$begingroup$
Martingale theory is closely related to this topic. Your coin tosses can be modeled using biased random walk. Afterwards you use the de Moivre's martingale and then using the optional sampling theorem you can derive probabilities for going bankrupt before reaching some winning value
$endgroup$
– Makina
Dec 21 '18 at 4:16














$begingroup$
Why is the probability of bankruptcy a continuous function of $a$? The probability of bankruptcy may be $100%$ for all $a$ except $a=0$.
$endgroup$
– Michael Burr
Dec 21 '18 at 4:24




$begingroup$
Why is the probability of bankruptcy a continuous function of $a$? The probability of bankruptcy may be $100%$ for all $a$ except $a=0$.
$endgroup$
– Michael Burr
Dec 21 '18 at 4:24




1




1




$begingroup$
Possible duplicate of Hitting probability of biased random walk on the integer line
$endgroup$
– obscurans
Dec 21 '18 at 6:48




$begingroup$
Possible duplicate of Hitting probability of biased random walk on the integer line
$endgroup$
– obscurans
Dec 21 '18 at 6:48












$begingroup$
True, will delete my answer.
$endgroup$
– Makina
Dec 21 '18 at 7:22




$begingroup$
True, will delete my answer.
$endgroup$
– Makina
Dec 21 '18 at 7:22










1 Answer
1






active

oldest

votes


















1












$begingroup$

Here's a combinatorics way of doing the problem. Suppose $p$ is the probability of losing on any given flip.



Then the total probability of ruin is given by
$$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n$$
where $C_n$ counts the number of sequences of wins and losses on flips such that you lose your last coin on exactly turn $2n+1$.



This sort of restricted random walk shows up everywhere in combinatorics and the count $C_n$ is known as the Catalan numbers, with formulas such as $C_n=frac{1}{2n+1}binom{2n}{n}=binom{2n}{n}-binom{2n}{n+1}$.



In particular (see this link for a proof), we know the generating function for the Catalan numbers, that is to say
$$g_C(x)=sum_{n=0}^{infty}C_nx^n=frac{1-sqrt{1-4x}}{2x}text{.}$$



Now we can just simplify the probability of ruin as
$$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n=pg_Cbigl(p(1-p)bigr)=pfrac{1-sqrt{1-4p(1-p)}}{2p(1-p)}=frac{1-left|2p-1right|}{2(1-p)}=begin{cases}1&pgeqfrac{1}{2}\frac{p}{1-p}&pleqfrac{1}{2}end{cases}text{,}$$
where gambler's ruin manifests in the absolute value.



If specifically solving for $Pr($ruin$)=frac{1}{2}$, $p=frac{1}{3}$.






share|cite|improve this answer











$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048162%2fodds-of-bankruptcy-flipping-a-weighted-coin-infinity-times%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    Here's a combinatorics way of doing the problem. Suppose $p$ is the probability of losing on any given flip.



    Then the total probability of ruin is given by
    $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n$$
    where $C_n$ counts the number of sequences of wins and losses on flips such that you lose your last coin on exactly turn $2n+1$.



    This sort of restricted random walk shows up everywhere in combinatorics and the count $C_n$ is known as the Catalan numbers, with formulas such as $C_n=frac{1}{2n+1}binom{2n}{n}=binom{2n}{n}-binom{2n}{n+1}$.



    In particular (see this link for a proof), we know the generating function for the Catalan numbers, that is to say
    $$g_C(x)=sum_{n=0}^{infty}C_nx^n=frac{1-sqrt{1-4x}}{2x}text{.}$$



    Now we can just simplify the probability of ruin as
    $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n=pg_Cbigl(p(1-p)bigr)=pfrac{1-sqrt{1-4p(1-p)}}{2p(1-p)}=frac{1-left|2p-1right|}{2(1-p)}=begin{cases}1&pgeqfrac{1}{2}\frac{p}{1-p}&pleqfrac{1}{2}end{cases}text{,}$$
    where gambler's ruin manifests in the absolute value.



    If specifically solving for $Pr($ruin$)=frac{1}{2}$, $p=frac{1}{3}$.






    share|cite|improve this answer











    $endgroup$


















      1












      $begingroup$

      Here's a combinatorics way of doing the problem. Suppose $p$ is the probability of losing on any given flip.



      Then the total probability of ruin is given by
      $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n$$
      where $C_n$ counts the number of sequences of wins and losses on flips such that you lose your last coin on exactly turn $2n+1$.



      This sort of restricted random walk shows up everywhere in combinatorics and the count $C_n$ is known as the Catalan numbers, with formulas such as $C_n=frac{1}{2n+1}binom{2n}{n}=binom{2n}{n}-binom{2n}{n+1}$.



      In particular (see this link for a proof), we know the generating function for the Catalan numbers, that is to say
      $$g_C(x)=sum_{n=0}^{infty}C_nx^n=frac{1-sqrt{1-4x}}{2x}text{.}$$



      Now we can just simplify the probability of ruin as
      $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n=pg_Cbigl(p(1-p)bigr)=pfrac{1-sqrt{1-4p(1-p)}}{2p(1-p)}=frac{1-left|2p-1right|}{2(1-p)}=begin{cases}1&pgeqfrac{1}{2}\frac{p}{1-p}&pleqfrac{1}{2}end{cases}text{,}$$
      where gambler's ruin manifests in the absolute value.



      If specifically solving for $Pr($ruin$)=frac{1}{2}$, $p=frac{1}{3}$.






      share|cite|improve this answer











      $endgroup$
















        1












        1








        1





        $begingroup$

        Here's a combinatorics way of doing the problem. Suppose $p$ is the probability of losing on any given flip.



        Then the total probability of ruin is given by
        $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n$$
        where $C_n$ counts the number of sequences of wins and losses on flips such that you lose your last coin on exactly turn $2n+1$.



        This sort of restricted random walk shows up everywhere in combinatorics and the count $C_n$ is known as the Catalan numbers, with formulas such as $C_n=frac{1}{2n+1}binom{2n}{n}=binom{2n}{n}-binom{2n}{n+1}$.



        In particular (see this link for a proof), we know the generating function for the Catalan numbers, that is to say
        $$g_C(x)=sum_{n=0}^{infty}C_nx^n=frac{1-sqrt{1-4x}}{2x}text{.}$$



        Now we can just simplify the probability of ruin as
        $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n=pg_Cbigl(p(1-p)bigr)=pfrac{1-sqrt{1-4p(1-p)}}{2p(1-p)}=frac{1-left|2p-1right|}{2(1-p)}=begin{cases}1&pgeqfrac{1}{2}\frac{p}{1-p}&pleqfrac{1}{2}end{cases}text{,}$$
        where gambler's ruin manifests in the absolute value.



        If specifically solving for $Pr($ruin$)=frac{1}{2}$, $p=frac{1}{3}$.






        share|cite|improve this answer











        $endgroup$



        Here's a combinatorics way of doing the problem. Suppose $p$ is the probability of losing on any given flip.



        Then the total probability of ruin is given by
        $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n$$
        where $C_n$ counts the number of sequences of wins and losses on flips such that you lose your last coin on exactly turn $2n+1$.



        This sort of restricted random walk shows up everywhere in combinatorics and the count $C_n$ is known as the Catalan numbers, with formulas such as $C_n=frac{1}{2n+1}binom{2n}{n}=binom{2n}{n}-binom{2n}{n+1}$.



        In particular (see this link for a proof), we know the generating function for the Catalan numbers, that is to say
        $$g_C(x)=sum_{n=0}^{infty}C_nx^n=frac{1-sqrt{1-4x}}{2x}text{.}$$



        Now we can just simplify the probability of ruin as
        $$sum_{n=0}^{infty}C_np^{n+1}(1-p)^n=pg_Cbigl(p(1-p)bigr)=pfrac{1-sqrt{1-4p(1-p)}}{2p(1-p)}=frac{1-left|2p-1right|}{2(1-p)}=begin{cases}1&pgeqfrac{1}{2}\frac{p}{1-p}&pleqfrac{1}{2}end{cases}text{,}$$
        where gambler's ruin manifests in the absolute value.



        If specifically solving for $Pr($ruin$)=frac{1}{2}$, $p=frac{1}{3}$.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Dec 21 '18 at 7:39

























        answered Dec 21 '18 at 7:24









        obscuransobscurans

        1,152311




        1,152311






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048162%2fodds-of-bankruptcy-flipping-a-weighted-coin-infinity-times%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Wiesbaden

            To store a contact into the json file from server.js file using a class in NodeJS

            Marschland