Calculate slot machine game multiplier












0














I'm developing a slot machine game with 5 slots, each slot has 6 options (pear, lemon, ..., etc.).



Each spin, 5 random values get generated, one for each slot, making the slots spin to the option bound to their random number. When 3 or more consecutive numbers get generated in a spin eg.: (12444 or 42223 or 11111) the player "wins" the spin.



The won amount should be calculated depending on the number of consecutive equal numbers in a won spin, the amount the player bet that spin, and the value of the consecutive numbers (1 should be worth less than 6).



See included image for an example win chart, in short the question would be: how can I calculate the multiplier for each option (eg. 25* 5* in the image) which would result in a +-48% chance of making a profit on the machine?










share|cite|improve this question







New contributor




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

























    0














    I'm developing a slot machine game with 5 slots, each slot has 6 options (pear, lemon, ..., etc.).



    Each spin, 5 random values get generated, one for each slot, making the slots spin to the option bound to their random number. When 3 or more consecutive numbers get generated in a spin eg.: (12444 or 42223 or 11111) the player "wins" the spin.



    The won amount should be calculated depending on the number of consecutive equal numbers in a won spin, the amount the player bet that spin, and the value of the consecutive numbers (1 should be worth less than 6).



    See included image for an example win chart, in short the question would be: how can I calculate the multiplier for each option (eg. 25* 5* in the image) which would result in a +-48% chance of making a profit on the machine?










    share|cite|improve this question







    New contributor




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























      0












      0








      0







      I'm developing a slot machine game with 5 slots, each slot has 6 options (pear, lemon, ..., etc.).



      Each spin, 5 random values get generated, one for each slot, making the slots spin to the option bound to their random number. When 3 or more consecutive numbers get generated in a spin eg.: (12444 or 42223 or 11111) the player "wins" the spin.



      The won amount should be calculated depending on the number of consecutive equal numbers in a won spin, the amount the player bet that spin, and the value of the consecutive numbers (1 should be worth less than 6).



      See included image for an example win chart, in short the question would be: how can I calculate the multiplier for each option (eg. 25* 5* in the image) which would result in a +-48% chance of making a profit on the machine?










      share|cite|improve this question







      New contributor




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











      I'm developing a slot machine game with 5 slots, each slot has 6 options (pear, lemon, ..., etc.).



      Each spin, 5 random values get generated, one for each slot, making the slots spin to the option bound to their random number. When 3 or more consecutive numbers get generated in a spin eg.: (12444 or 42223 or 11111) the player "wins" the spin.



      The won amount should be calculated depending on the number of consecutive equal numbers in a won spin, the amount the player bet that spin, and the value of the consecutive numbers (1 should be worth less than 6).



      See included image for an example win chart, in short the question would be: how can I calculate the multiplier for each option (eg. 25* 5* in the image) which would result in a +-48% chance of making a profit on the machine?







      gambling






      share|cite|improve this question







      New contributor




      Bram 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




      Bram 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






      New contributor




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









      asked Jan 3 at 21:24









      Bram

      1




      1




      New contributor




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





      New contributor





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






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






















          1 Answer
          1






          active

          oldest

          votes


















          0














          There aren't exactly nice formulas for these things; you just have to use inclusion/exclusion.



          If all six symbols are equally likely, the chance of getting all five the same is the chance that the left symbol matches each of the subsequent ones,



          $(1/6)^4 = 1/1296$.



          The chance of getting exactly four in a row is the chance of getting the first four in a row, plus the chance of getting the last four in a row, minus twice the chance of getting all five in a row (since this is counted twice, once in each case). So that's



          $2(1/6)^3 - 2(1/6)^4 = 5/648$



          The chance of getting three in a row can be calculated similarly with an uglier expression.



          Then you just pick numbers to make the probability come out to what you want; there are lots of potential solutions.



          That said, you probably want to optimize the expected value rather than the chance of winning, assuming the payout is higher for four in a row than for three in a row.






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


            }
            });






            Bram 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%2f3061016%2fcalculate-slot-machine-game-multiplier%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









            0














            There aren't exactly nice formulas for these things; you just have to use inclusion/exclusion.



            If all six symbols are equally likely, the chance of getting all five the same is the chance that the left symbol matches each of the subsequent ones,



            $(1/6)^4 = 1/1296$.



            The chance of getting exactly four in a row is the chance of getting the first four in a row, plus the chance of getting the last four in a row, minus twice the chance of getting all five in a row (since this is counted twice, once in each case). So that's



            $2(1/6)^3 - 2(1/6)^4 = 5/648$



            The chance of getting three in a row can be calculated similarly with an uglier expression.



            Then you just pick numbers to make the probability come out to what you want; there are lots of potential solutions.



            That said, you probably want to optimize the expected value rather than the chance of winning, assuming the payout is higher for four in a row than for three in a row.






            share|cite|improve this answer


























              0














              There aren't exactly nice formulas for these things; you just have to use inclusion/exclusion.



              If all six symbols are equally likely, the chance of getting all five the same is the chance that the left symbol matches each of the subsequent ones,



              $(1/6)^4 = 1/1296$.



              The chance of getting exactly four in a row is the chance of getting the first four in a row, plus the chance of getting the last four in a row, minus twice the chance of getting all five in a row (since this is counted twice, once in each case). So that's



              $2(1/6)^3 - 2(1/6)^4 = 5/648$



              The chance of getting three in a row can be calculated similarly with an uglier expression.



              Then you just pick numbers to make the probability come out to what you want; there are lots of potential solutions.



              That said, you probably want to optimize the expected value rather than the chance of winning, assuming the payout is higher for four in a row than for three in a row.






              share|cite|improve this answer
























                0












                0








                0






                There aren't exactly nice formulas for these things; you just have to use inclusion/exclusion.



                If all six symbols are equally likely, the chance of getting all five the same is the chance that the left symbol matches each of the subsequent ones,



                $(1/6)^4 = 1/1296$.



                The chance of getting exactly four in a row is the chance of getting the first four in a row, plus the chance of getting the last four in a row, minus twice the chance of getting all five in a row (since this is counted twice, once in each case). So that's



                $2(1/6)^3 - 2(1/6)^4 = 5/648$



                The chance of getting three in a row can be calculated similarly with an uglier expression.



                Then you just pick numbers to make the probability come out to what you want; there are lots of potential solutions.



                That said, you probably want to optimize the expected value rather than the chance of winning, assuming the payout is higher for four in a row than for three in a row.






                share|cite|improve this answer












                There aren't exactly nice formulas for these things; you just have to use inclusion/exclusion.



                If all six symbols are equally likely, the chance of getting all five the same is the chance that the left symbol matches each of the subsequent ones,



                $(1/6)^4 = 1/1296$.



                The chance of getting exactly four in a row is the chance of getting the first four in a row, plus the chance of getting the last four in a row, minus twice the chance of getting all five in a row (since this is counted twice, once in each case). So that's



                $2(1/6)^3 - 2(1/6)^4 = 5/648$



                The chance of getting three in a row can be calculated similarly with an uglier expression.



                Then you just pick numbers to make the probability come out to what you want; there are lots of potential solutions.



                That said, you probably want to optimize the expected value rather than the chance of winning, assuming the payout is higher for four in a row than for three in a row.







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Jan 3 at 22:04









                Daniel McLaury

                15.6k32977




                15.6k32977






















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










                    draft saved

                    draft discarded


















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













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












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
















                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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.


                    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%2f3061016%2fcalculate-slot-machine-game-multiplier%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

                    An IMO inspired problem

                    Management

                    Has there ever been an instance of an active nuclear power plant within or near a war zone?