I have 100 boxes. C of them have a gift. I can open up to 16 boxes. What is the number of C that will give me...











up vote
8
down vote

favorite
2












Details:
We start by opening a box. If nothing is in there, we open another one. Once we find a gift, we can stop. Each empty box that was opened is discarded (no revisit).
I can find the number of $C$ that will give probability over $0.5$ by writing a program to try for $C=1, C=2$ .. etc.. , but I can't solve the equation for $C$ to find a more "mathematical" and elegant answer.



My work until now is:



1) Found in 1st box: $P(1) = frac{C}{N}$



2) Found in 2nd box: $P(2) = frac{1-C}{N}cdotfrac{C}{N-1}$



4) Found in 3rd box: $P(3) = frac{1-C}{N}cdotfrac{1-C/}{N-1}cdotfrac{C}{N-2}$



Etc...



Adding them up makes things very complicated to solve for $C$.



Any ideas? Thank you in advance!










share|cite|improve this question









New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • There are $binom {100}6$ ways to choose $6$ boxes. How many ways are there to choose $6$ empty boxes?
    – lulu
    yesterday












  • Thanks for your response lulu! I do know that, but still it can not be solved for C. Again, this approach will require to try for consecutive values of C in order to find the needed value. Thanks though! :)
    – XuUserAC
    yesterday






  • 3




    Should the question in the title really be "What is the the minimum number of C..."?
    – Randall Stewart
    21 hours ago






  • 2




    This kind of sounds like a software developer’s question about how to rig their game’s loot boxes.
    – Josh Detwiler
    13 hours ago






  • 1




    I wouldnt bother opening them. They are all sweaters.
    – Keltari
    8 hours ago















up vote
8
down vote

favorite
2












Details:
We start by opening a box. If nothing is in there, we open another one. Once we find a gift, we can stop. Each empty box that was opened is discarded (no revisit).
I can find the number of $C$ that will give probability over $0.5$ by writing a program to try for $C=1, C=2$ .. etc.. , but I can't solve the equation for $C$ to find a more "mathematical" and elegant answer.



My work until now is:



1) Found in 1st box: $P(1) = frac{C}{N}$



2) Found in 2nd box: $P(2) = frac{1-C}{N}cdotfrac{C}{N-1}$



4) Found in 3rd box: $P(3) = frac{1-C}{N}cdotfrac{1-C/}{N-1}cdotfrac{C}{N-2}$



Etc...



Adding them up makes things very complicated to solve for $C$.



Any ideas? Thank you in advance!










share|cite|improve this question









New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • There are $binom {100}6$ ways to choose $6$ boxes. How many ways are there to choose $6$ empty boxes?
    – lulu
    yesterday












  • Thanks for your response lulu! I do know that, but still it can not be solved for C. Again, this approach will require to try for consecutive values of C in order to find the needed value. Thanks though! :)
    – XuUserAC
    yesterday






  • 3




    Should the question in the title really be "What is the the minimum number of C..."?
    – Randall Stewart
    21 hours ago






  • 2




    This kind of sounds like a software developer’s question about how to rig their game’s loot boxes.
    – Josh Detwiler
    13 hours ago






  • 1




    I wouldnt bother opening them. They are all sweaters.
    – Keltari
    8 hours ago













up vote
8
down vote

favorite
2









up vote
8
down vote

favorite
2






2





Details:
We start by opening a box. If nothing is in there, we open another one. Once we find a gift, we can stop. Each empty box that was opened is discarded (no revisit).
I can find the number of $C$ that will give probability over $0.5$ by writing a program to try for $C=1, C=2$ .. etc.. , but I can't solve the equation for $C$ to find a more "mathematical" and elegant answer.



My work until now is:



1) Found in 1st box: $P(1) = frac{C}{N}$



2) Found in 2nd box: $P(2) = frac{1-C}{N}cdotfrac{C}{N-1}$



4) Found in 3rd box: $P(3) = frac{1-C}{N}cdotfrac{1-C/}{N-1}cdotfrac{C}{N-2}$



Etc...



Adding them up makes things very complicated to solve for $C$.



Any ideas? Thank you in advance!










share|cite|improve this question









New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Details:
We start by opening a box. If nothing is in there, we open another one. Once we find a gift, we can stop. Each empty box that was opened is discarded (no revisit).
I can find the number of $C$ that will give probability over $0.5$ by writing a program to try for $C=1, C=2$ .. etc.. , but I can't solve the equation for $C$ to find a more "mathematical" and elegant answer.



My work until now is:



1) Found in 1st box: $P(1) = frac{C}{N}$



2) Found in 2nd box: $P(2) = frac{1-C}{N}cdotfrac{C}{N-1}$



4) Found in 3rd box: $P(3) = frac{1-C}{N}cdotfrac{1-C/}{N-1}cdotfrac{C}{N-2}$



Etc...



Adding them up makes things very complicated to solve for $C$.



Any ideas? Thank you in advance!







probability probability-theory






share|cite|improve this question









New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited yesterday









amWhy

191k27223437




191k27223437






New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









XuUserAC

442




442




New contributor




XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






XuUserAC is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • There are $binom {100}6$ ways to choose $6$ boxes. How many ways are there to choose $6$ empty boxes?
    – lulu
    yesterday












  • Thanks for your response lulu! I do know that, but still it can not be solved for C. Again, this approach will require to try for consecutive values of C in order to find the needed value. Thanks though! :)
    – XuUserAC
    yesterday






  • 3




    Should the question in the title really be "What is the the minimum number of C..."?
    – Randall Stewart
    21 hours ago






  • 2




    This kind of sounds like a software developer’s question about how to rig their game’s loot boxes.
    – Josh Detwiler
    13 hours ago






  • 1




    I wouldnt bother opening them. They are all sweaters.
    – Keltari
    8 hours ago


















  • There are $binom {100}6$ ways to choose $6$ boxes. How many ways are there to choose $6$ empty boxes?
    – lulu
    yesterday












  • Thanks for your response lulu! I do know that, but still it can not be solved for C. Again, this approach will require to try for consecutive values of C in order to find the needed value. Thanks though! :)
    – XuUserAC
    yesterday






  • 3




    Should the question in the title really be "What is the the minimum number of C..."?
    – Randall Stewart
    21 hours ago






  • 2




    This kind of sounds like a software developer’s question about how to rig their game’s loot boxes.
    – Josh Detwiler
    13 hours ago






  • 1




    I wouldnt bother opening them. They are all sweaters.
    – Keltari
    8 hours ago
















There are $binom {100}6$ ways to choose $6$ boxes. How many ways are there to choose $6$ empty boxes?
– lulu
yesterday






There are $binom {100}6$ ways to choose $6$ boxes. How many ways are there to choose $6$ empty boxes?
– lulu
yesterday














Thanks for your response lulu! I do know that, but still it can not be solved for C. Again, this approach will require to try for consecutive values of C in order to find the needed value. Thanks though! :)
– XuUserAC
yesterday




Thanks for your response lulu! I do know that, but still it can not be solved for C. Again, this approach will require to try for consecutive values of C in order to find the needed value. Thanks though! :)
– XuUserAC
yesterday




3




3




Should the question in the title really be "What is the the minimum number of C..."?
– Randall Stewart
21 hours ago




Should the question in the title really be "What is the the minimum number of C..."?
– Randall Stewart
21 hours ago




2




2




This kind of sounds like a software developer’s question about how to rig their game’s loot boxes.
– Josh Detwiler
13 hours ago




This kind of sounds like a software developer’s question about how to rig their game’s loot boxes.
– Josh Detwiler
13 hours ago




1




1




I wouldnt bother opening them. They are all sweaters.
– Keltari
8 hours ago




I wouldnt bother opening them. They are all sweaters.
– Keltari
8 hours ago










4 Answers
4






active

oldest

votes

















up vote
18
down vote













Start with a rough estimate: If the box contents were independent, the probability of losing would be $(1-C/100)^{16}$. Equating this to $0.5$ gives us $Capprox 4.2$.



Hence, we boldly check the cases $C=4$:
$C=4$ leads to a losing probability of $$frac{96choose 16}{100choose 16}=frac{96!84!}{80!100!}=frac{84cdot 83cdot 82cdot 81}{100cdot 99cdot 98cdot 97}approx 0.492$$
so a winning probability slightly above $frac12$. A close look reveals that $C=3$ leads to a winning probability below $frac12$, so the correct answer is $C=4$.





Note that the "true" breaking point is thus between $3$ and $4$, not between $4$ and $5$ as the rough estimate suggested - the box contents are not independent after all (namely, if you find a - rare - gift, the probability of finding a gift in another box falls dramatically).






share|cite|improve this answer




























    up vote
    5
    down vote













    As pointed out in the comments, finding the chance of not getting a gift is rather easier, though the patterns involved assist with the computation. Suppose we had six, rather than sixteen, to choose. We have $$binom {100}{6}=frac {100!}{6!94!}=frac {100cdot 99 cdot 98cdot 97cdot 96cdot 95}{6!}$$ ways of choosing six boxes, and $$binom {100-C}{6}=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{6!}$$ ways of choosing six empty ones, so the probability of an empty box is $$p=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{100cdot 99 cdot 98cdot 97cdot 96cdot 95}$$



    Now setting this equal to $0.5$ we get a sextic for $C$. The numerator is monotone in $C$ so we know that trial can work. Can we do better? Well if we take $q=frac {98-C}{98}$ we can estimate the probability as $p=q^6$, and that gives us a potential starting place for trial to reduce the amount of effort involved.



    [I see there is another solution which works with a simpler, but slightly different, estimate]






    share|cite|improve this answer























    • Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
      – smci
      6 hours ago












    • @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
      – Mark Bennet
      2 hours ago












    • And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
      – smci
      2 hours ago




















    up vote
    1
    down vote













    As with a lot of binomial problems, the easiest way to calculate the probability of success from N tries is to start by calculating the probability of N failures and subtracting the answer from 1.



    The probability of opening 16 empty boxes (and thus failing to find a prize) in this case is:



    $frac{100-Cchoose 16}{100choose 16}
    = frac{(100-C)!}{16!(84-C)!}frac{16!84!}{100!}
    = frac{(100-C)!84!}{100!(84-C)!}
    = frac{84×83×...×(85-C)}{100×99×...×(101-C)}
    = frac{84}{100}×frac{83}{99}×...×frac{85-C}{101-C}
    $



    At this point we can proceed by trial and error multiplying by one term at a time.



    For C=1 we get $frac{84}{100}$ which is clearly $>frac{1}{2}$



    For C=2, $frac{84}{100}×frac{83}{99}=frac{6972}{9900} approx 0.704$



    For C=3, $frac{6972}{9900}×frac{82}{98} approx 0.589$



    For C=4, $0.589...×frac{81}{97} approx 0.492$



    So the minimum C for which the probability of losing drops below 0.5 (and thus the winning probability is above 0.5) is 4.






    share|cite|improve this answer




























      up vote
      -1
      down vote













      An alternative approach is to work in base 10 logarithms. Chance of failing on 16 tries is



      $displaystyle f(C) = left(frac{100-C}{100}right) times
      left(frac{99-C}{99}right) times
      left(frac{98-C}{98}right) times cdots times
      left(frac{85-C}{85}right).
      $



      Assume that you've written a computer program that calculates
      $;log_{10}n;$ for $nin{30, 31, cdots, 100}.$



      Then it becomes a simple matter to calculate
      $;g(C) = log_{10}f(C).$






      share|cite|improve this answer





















        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',
        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
        });


        }
        });






        XuUserAC is a new contributor. Be nice, and check out our Code of Conduct.










         

        draft saved


        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3003482%2fi-have-100-boxes-c-of-them-have-a-gift-i-can-open-up-to-16-boxes-what-is-the%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        18
        down vote













        Start with a rough estimate: If the box contents were independent, the probability of losing would be $(1-C/100)^{16}$. Equating this to $0.5$ gives us $Capprox 4.2$.



        Hence, we boldly check the cases $C=4$:
        $C=4$ leads to a losing probability of $$frac{96choose 16}{100choose 16}=frac{96!84!}{80!100!}=frac{84cdot 83cdot 82cdot 81}{100cdot 99cdot 98cdot 97}approx 0.492$$
        so a winning probability slightly above $frac12$. A close look reveals that $C=3$ leads to a winning probability below $frac12$, so the correct answer is $C=4$.





        Note that the "true" breaking point is thus between $3$ and $4$, not between $4$ and $5$ as the rough estimate suggested - the box contents are not independent after all (namely, if you find a - rare - gift, the probability of finding a gift in another box falls dramatically).






        share|cite|improve this answer

























          up vote
          18
          down vote













          Start with a rough estimate: If the box contents were independent, the probability of losing would be $(1-C/100)^{16}$. Equating this to $0.5$ gives us $Capprox 4.2$.



          Hence, we boldly check the cases $C=4$:
          $C=4$ leads to a losing probability of $$frac{96choose 16}{100choose 16}=frac{96!84!}{80!100!}=frac{84cdot 83cdot 82cdot 81}{100cdot 99cdot 98cdot 97}approx 0.492$$
          so a winning probability slightly above $frac12$. A close look reveals that $C=3$ leads to a winning probability below $frac12$, so the correct answer is $C=4$.





          Note that the "true" breaking point is thus between $3$ and $4$, not between $4$ and $5$ as the rough estimate suggested - the box contents are not independent after all (namely, if you find a - rare - gift, the probability of finding a gift in another box falls dramatically).






          share|cite|improve this answer























            up vote
            18
            down vote










            up vote
            18
            down vote









            Start with a rough estimate: If the box contents were independent, the probability of losing would be $(1-C/100)^{16}$. Equating this to $0.5$ gives us $Capprox 4.2$.



            Hence, we boldly check the cases $C=4$:
            $C=4$ leads to a losing probability of $$frac{96choose 16}{100choose 16}=frac{96!84!}{80!100!}=frac{84cdot 83cdot 82cdot 81}{100cdot 99cdot 98cdot 97}approx 0.492$$
            so a winning probability slightly above $frac12$. A close look reveals that $C=3$ leads to a winning probability below $frac12$, so the correct answer is $C=4$.





            Note that the "true" breaking point is thus between $3$ and $4$, not between $4$ and $5$ as the rough estimate suggested - the box contents are not independent after all (namely, if you find a - rare - gift, the probability of finding a gift in another box falls dramatically).






            share|cite|improve this answer












            Start with a rough estimate: If the box contents were independent, the probability of losing would be $(1-C/100)^{16}$. Equating this to $0.5$ gives us $Capprox 4.2$.



            Hence, we boldly check the cases $C=4$:
            $C=4$ leads to a losing probability of $$frac{96choose 16}{100choose 16}=frac{96!84!}{80!100!}=frac{84cdot 83cdot 82cdot 81}{100cdot 99cdot 98cdot 97}approx 0.492$$
            so a winning probability slightly above $frac12$. A close look reveals that $C=3$ leads to a winning probability below $frac12$, so the correct answer is $C=4$.





            Note that the "true" breaking point is thus between $3$ and $4$, not between $4$ and $5$ as the rough estimate suggested - the box contents are not independent after all (namely, if you find a - rare - gift, the probability of finding a gift in another box falls dramatically).







            share|cite|improve this answer












            share|cite|improve this answer



            share|cite|improve this answer










            answered yesterday









            Hagen von Eitzen

            273k21266493




            273k21266493






















                up vote
                5
                down vote













                As pointed out in the comments, finding the chance of not getting a gift is rather easier, though the patterns involved assist with the computation. Suppose we had six, rather than sixteen, to choose. We have $$binom {100}{6}=frac {100!}{6!94!}=frac {100cdot 99 cdot 98cdot 97cdot 96cdot 95}{6!}$$ ways of choosing six boxes, and $$binom {100-C}{6}=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{6!}$$ ways of choosing six empty ones, so the probability of an empty box is $$p=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{100cdot 99 cdot 98cdot 97cdot 96cdot 95}$$



                Now setting this equal to $0.5$ we get a sextic for $C$. The numerator is monotone in $C$ so we know that trial can work. Can we do better? Well if we take $q=frac {98-C}{98}$ we can estimate the probability as $p=q^6$, and that gives us a potential starting place for trial to reduce the amount of effort involved.



                [I see there is another solution which works with a simpler, but slightly different, estimate]






                share|cite|improve this answer























                • Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
                  – smci
                  6 hours ago












                • @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
                  – Mark Bennet
                  2 hours ago












                • And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
                  – smci
                  2 hours ago

















                up vote
                5
                down vote













                As pointed out in the comments, finding the chance of not getting a gift is rather easier, though the patterns involved assist with the computation. Suppose we had six, rather than sixteen, to choose. We have $$binom {100}{6}=frac {100!}{6!94!}=frac {100cdot 99 cdot 98cdot 97cdot 96cdot 95}{6!}$$ ways of choosing six boxes, and $$binom {100-C}{6}=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{6!}$$ ways of choosing six empty ones, so the probability of an empty box is $$p=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{100cdot 99 cdot 98cdot 97cdot 96cdot 95}$$



                Now setting this equal to $0.5$ we get a sextic for $C$. The numerator is monotone in $C$ so we know that trial can work. Can we do better? Well if we take $q=frac {98-C}{98}$ we can estimate the probability as $p=q^6$, and that gives us a potential starting place for trial to reduce the amount of effort involved.



                [I see there is another solution which works with a simpler, but slightly different, estimate]






                share|cite|improve this answer























                • Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
                  – smci
                  6 hours ago












                • @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
                  – Mark Bennet
                  2 hours ago












                • And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
                  – smci
                  2 hours ago















                up vote
                5
                down vote










                up vote
                5
                down vote









                As pointed out in the comments, finding the chance of not getting a gift is rather easier, though the patterns involved assist with the computation. Suppose we had six, rather than sixteen, to choose. We have $$binom {100}{6}=frac {100!}{6!94!}=frac {100cdot 99 cdot 98cdot 97cdot 96cdot 95}{6!}$$ ways of choosing six boxes, and $$binom {100-C}{6}=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{6!}$$ ways of choosing six empty ones, so the probability of an empty box is $$p=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{100cdot 99 cdot 98cdot 97cdot 96cdot 95}$$



                Now setting this equal to $0.5$ we get a sextic for $C$. The numerator is monotone in $C$ so we know that trial can work. Can we do better? Well if we take $q=frac {98-C}{98}$ we can estimate the probability as $p=q^6$, and that gives us a potential starting place for trial to reduce the amount of effort involved.



                [I see there is another solution which works with a simpler, but slightly different, estimate]






                share|cite|improve this answer














                As pointed out in the comments, finding the chance of not getting a gift is rather easier, though the patterns involved assist with the computation. Suppose we had six, rather than sixteen, to choose. We have $$binom {100}{6}=frac {100!}{6!94!}=frac {100cdot 99 cdot 98cdot 97cdot 96cdot 95}{6!}$$ ways of choosing six boxes, and $$binom {100-C}{6}=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{6!}$$ ways of choosing six empty ones, so the probability of an empty box is $$p=frac {(100-C)cdot (99-C) cdot (98-C)cdot (97-C)cdot (96-C)cdot (95-C)}{100cdot 99 cdot 98cdot 97cdot 96cdot 95}$$



                Now setting this equal to $0.5$ we get a sextic for $C$. The numerator is monotone in $C$ so we know that trial can work. Can we do better? Well if we take $q=frac {98-C}{98}$ we can estimate the probability as $p=q^6$, and that gives us a potential starting place for trial to reduce the amount of effort involved.



                [I see there is another solution which works with a simpler, but slightly different, estimate]







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited 10 hours ago

























                answered yesterday









                Mark Bennet

                79.6k978177




                79.6k978177












                • Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
                  – smci
                  6 hours ago












                • @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
                  – Mark Bennet
                  2 hours ago












                • And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
                  – smci
                  2 hours ago




















                • Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
                  – smci
                  6 hours ago












                • @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
                  – Mark Bennet
                  2 hours ago












                • And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
                  – smci
                  2 hours ago


















                Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
                – smci
                6 hours ago






                Given the symmetry, isn't $q=frac {97.5-C}{97.5}$ an even better approximation? Then $C approx 97.5(1-q)$ . Also, might as well develop the full expression for 16, not 6.
                – smci
                6 hours ago














                @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
                – Mark Bennet
                2 hours ago






                @smci Yes indeed. At the time I was writing this there was not much in the way of answer and discussion, so I didn't give a direct answer to the question which was being asked, but rather an indication of how to go about it, so that the person who asked the question would have to think about it a little more. Also there was an original focus on integers. But both your suggestions are good.
                – Mark Bennet
                2 hours ago














                And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
                – smci
                2 hours ago






                And since there were 16 boxes not 6, the arithmetic midpoint would be 92.5
                – smci
                2 hours ago












                up vote
                1
                down vote













                As with a lot of binomial problems, the easiest way to calculate the probability of success from N tries is to start by calculating the probability of N failures and subtracting the answer from 1.



                The probability of opening 16 empty boxes (and thus failing to find a prize) in this case is:



                $frac{100-Cchoose 16}{100choose 16}
                = frac{(100-C)!}{16!(84-C)!}frac{16!84!}{100!}
                = frac{(100-C)!84!}{100!(84-C)!}
                = frac{84×83×...×(85-C)}{100×99×...×(101-C)}
                = frac{84}{100}×frac{83}{99}×...×frac{85-C}{101-C}
                $



                At this point we can proceed by trial and error multiplying by one term at a time.



                For C=1 we get $frac{84}{100}$ which is clearly $>frac{1}{2}$



                For C=2, $frac{84}{100}×frac{83}{99}=frac{6972}{9900} approx 0.704$



                For C=3, $frac{6972}{9900}×frac{82}{98} approx 0.589$



                For C=4, $0.589...×frac{81}{97} approx 0.492$



                So the minimum C for which the probability of losing drops below 0.5 (and thus the winning probability is above 0.5) is 4.






                share|cite|improve this answer

























                  up vote
                  1
                  down vote













                  As with a lot of binomial problems, the easiest way to calculate the probability of success from N tries is to start by calculating the probability of N failures and subtracting the answer from 1.



                  The probability of opening 16 empty boxes (and thus failing to find a prize) in this case is:



                  $frac{100-Cchoose 16}{100choose 16}
                  = frac{(100-C)!}{16!(84-C)!}frac{16!84!}{100!}
                  = frac{(100-C)!84!}{100!(84-C)!}
                  = frac{84×83×...×(85-C)}{100×99×...×(101-C)}
                  = frac{84}{100}×frac{83}{99}×...×frac{85-C}{101-C}
                  $



                  At this point we can proceed by trial and error multiplying by one term at a time.



                  For C=1 we get $frac{84}{100}$ which is clearly $>frac{1}{2}$



                  For C=2, $frac{84}{100}×frac{83}{99}=frac{6972}{9900} approx 0.704$



                  For C=3, $frac{6972}{9900}×frac{82}{98} approx 0.589$



                  For C=4, $0.589...×frac{81}{97} approx 0.492$



                  So the minimum C for which the probability of losing drops below 0.5 (and thus the winning probability is above 0.5) is 4.






                  share|cite|improve this answer























                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    As with a lot of binomial problems, the easiest way to calculate the probability of success from N tries is to start by calculating the probability of N failures and subtracting the answer from 1.



                    The probability of opening 16 empty boxes (and thus failing to find a prize) in this case is:



                    $frac{100-Cchoose 16}{100choose 16}
                    = frac{(100-C)!}{16!(84-C)!}frac{16!84!}{100!}
                    = frac{(100-C)!84!}{100!(84-C)!}
                    = frac{84×83×...×(85-C)}{100×99×...×(101-C)}
                    = frac{84}{100}×frac{83}{99}×...×frac{85-C}{101-C}
                    $



                    At this point we can proceed by trial and error multiplying by one term at a time.



                    For C=1 we get $frac{84}{100}$ which is clearly $>frac{1}{2}$



                    For C=2, $frac{84}{100}×frac{83}{99}=frac{6972}{9900} approx 0.704$



                    For C=3, $frac{6972}{9900}×frac{82}{98} approx 0.589$



                    For C=4, $0.589...×frac{81}{97} approx 0.492$



                    So the minimum C for which the probability of losing drops below 0.5 (and thus the winning probability is above 0.5) is 4.






                    share|cite|improve this answer












                    As with a lot of binomial problems, the easiest way to calculate the probability of success from N tries is to start by calculating the probability of N failures and subtracting the answer from 1.



                    The probability of opening 16 empty boxes (and thus failing to find a prize) in this case is:



                    $frac{100-Cchoose 16}{100choose 16}
                    = frac{(100-C)!}{16!(84-C)!}frac{16!84!}{100!}
                    = frac{(100-C)!84!}{100!(84-C)!}
                    = frac{84×83×...×(85-C)}{100×99×...×(101-C)}
                    = frac{84}{100}×frac{83}{99}×...×frac{85-C}{101-C}
                    $



                    At this point we can proceed by trial and error multiplying by one term at a time.



                    For C=1 we get $frac{84}{100}$ which is clearly $>frac{1}{2}$



                    For C=2, $frac{84}{100}×frac{83}{99}=frac{6972}{9900} approx 0.704$



                    For C=3, $frac{6972}{9900}×frac{82}{98} approx 0.589$



                    For C=4, $0.589...×frac{81}{97} approx 0.492$



                    So the minimum C for which the probability of losing drops below 0.5 (and thus the winning probability is above 0.5) is 4.







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered 10 hours ago









                    IanF1

                    1,314812




                    1,314812






















                        up vote
                        -1
                        down vote













                        An alternative approach is to work in base 10 logarithms. Chance of failing on 16 tries is



                        $displaystyle f(C) = left(frac{100-C}{100}right) times
                        left(frac{99-C}{99}right) times
                        left(frac{98-C}{98}right) times cdots times
                        left(frac{85-C}{85}right).
                        $



                        Assume that you've written a computer program that calculates
                        $;log_{10}n;$ for $nin{30, 31, cdots, 100}.$



                        Then it becomes a simple matter to calculate
                        $;g(C) = log_{10}f(C).$






                        share|cite|improve this answer

























                          up vote
                          -1
                          down vote













                          An alternative approach is to work in base 10 logarithms. Chance of failing on 16 tries is



                          $displaystyle f(C) = left(frac{100-C}{100}right) times
                          left(frac{99-C}{99}right) times
                          left(frac{98-C}{98}right) times cdots times
                          left(frac{85-C}{85}right).
                          $



                          Assume that you've written a computer program that calculates
                          $;log_{10}n;$ for $nin{30, 31, cdots, 100}.$



                          Then it becomes a simple matter to calculate
                          $;g(C) = log_{10}f(C).$






                          share|cite|improve this answer























                            up vote
                            -1
                            down vote










                            up vote
                            -1
                            down vote









                            An alternative approach is to work in base 10 logarithms. Chance of failing on 16 tries is



                            $displaystyle f(C) = left(frac{100-C}{100}right) times
                            left(frac{99-C}{99}right) times
                            left(frac{98-C}{98}right) times cdots times
                            left(frac{85-C}{85}right).
                            $



                            Assume that you've written a computer program that calculates
                            $;log_{10}n;$ for $nin{30, 31, cdots, 100}.$



                            Then it becomes a simple matter to calculate
                            $;g(C) = log_{10}f(C).$






                            share|cite|improve this answer












                            An alternative approach is to work in base 10 logarithms. Chance of failing on 16 tries is



                            $displaystyle f(C) = left(frac{100-C}{100}right) times
                            left(frac{99-C}{99}right) times
                            left(frac{98-C}{98}right) times cdots times
                            left(frac{85-C}{85}right).
                            $



                            Assume that you've written a computer program that calculates
                            $;log_{10}n;$ for $nin{30, 31, cdots, 100}.$



                            Then it becomes a simple matter to calculate
                            $;g(C) = log_{10}f(C).$







                            share|cite|improve this answer












                            share|cite|improve this answer



                            share|cite|improve this answer










                            answered 15 hours ago









                            user2661923

                            411112




                            411112






















                                XuUserAC is a new contributor. Be nice, and check out our Code of Conduct.










                                 

                                draft saved


                                draft discarded


















                                XuUserAC is a new contributor. Be nice, and check out our Code of Conduct.













                                XuUserAC is a new contributor. Be nice, and check out our Code of Conduct.












                                XuUserAC is a new contributor. Be nice, and check out our Code of Conduct.















                                 


                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3003482%2fi-have-100-boxes-c-of-them-have-a-gift-i-can-open-up-to-16-boxes-what-is-the%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

                                android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                                SQL update select statement

                                'app-layout' is not a known element: how to share Component with different Modules