Hypothesis Test For Independence in Trials?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












Problem



Let's say you have virtual cases in a video game, and each case has one of four distinct items inside. Let's say the items are:



  • $A$ with general probability $0.4$

  • $B$ with general probability $0.3$

  • $C$ with general probability $0.2$

  • $D$ with general probability $0.1$

However, there is rumor that these cases are programmed so that you are less likely to obtain duplicate items, as in, when opening a lot of cases, if you open $B$ in one case, for example, the probability of opening $B$ on the very next case is less than what it was originally, $0.3$



I was wondering how I would be able to test that rumor using a hypothesis test.



My guess / Attempt



Seeing as how $A$ is the most common item, I would use that one for my hypothesis test and test



$$H_0: P(A_k) = P(A_k | A_k-1)$$



That is, the probability of opening $A$ on the $k^th$ case is the same as the probability of opening $A$ on the $k^th$ case given we just opened $A$ the case before



Is this a good / viable way to test what I want? And how would I proceed from here after gathering data? Would it be similar to testing for a population proportion?



Thanks for any help given







share|cite|improve this question

























    up vote
    3
    down vote

    favorite












    Problem



    Let's say you have virtual cases in a video game, and each case has one of four distinct items inside. Let's say the items are:



    • $A$ with general probability $0.4$

    • $B$ with general probability $0.3$

    • $C$ with general probability $0.2$

    • $D$ with general probability $0.1$

    However, there is rumor that these cases are programmed so that you are less likely to obtain duplicate items, as in, when opening a lot of cases, if you open $B$ in one case, for example, the probability of opening $B$ on the very next case is less than what it was originally, $0.3$



    I was wondering how I would be able to test that rumor using a hypothesis test.



    My guess / Attempt



    Seeing as how $A$ is the most common item, I would use that one for my hypothesis test and test



    $$H_0: P(A_k) = P(A_k | A_k-1)$$



    That is, the probability of opening $A$ on the $k^th$ case is the same as the probability of opening $A$ on the $k^th$ case given we just opened $A$ the case before



    Is this a good / viable way to test what I want? And how would I proceed from here after gathering data? Would it be similar to testing for a population proportion?



    Thanks for any help given







    share|cite|improve this question























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      Problem



      Let's say you have virtual cases in a video game, and each case has one of four distinct items inside. Let's say the items are:



      • $A$ with general probability $0.4$

      • $B$ with general probability $0.3$

      • $C$ with general probability $0.2$

      • $D$ with general probability $0.1$

      However, there is rumor that these cases are programmed so that you are less likely to obtain duplicate items, as in, when opening a lot of cases, if you open $B$ in one case, for example, the probability of opening $B$ on the very next case is less than what it was originally, $0.3$



      I was wondering how I would be able to test that rumor using a hypothesis test.



      My guess / Attempt



      Seeing as how $A$ is the most common item, I would use that one for my hypothesis test and test



      $$H_0: P(A_k) = P(A_k | A_k-1)$$



      That is, the probability of opening $A$ on the $k^th$ case is the same as the probability of opening $A$ on the $k^th$ case given we just opened $A$ the case before



      Is this a good / viable way to test what I want? And how would I proceed from here after gathering data? Would it be similar to testing for a population proportion?



      Thanks for any help given







      share|cite|improve this question













      Problem



      Let's say you have virtual cases in a video game, and each case has one of four distinct items inside. Let's say the items are:



      • $A$ with general probability $0.4$

      • $B$ with general probability $0.3$

      • $C$ with general probability $0.2$

      • $D$ with general probability $0.1$

      However, there is rumor that these cases are programmed so that you are less likely to obtain duplicate items, as in, when opening a lot of cases, if you open $B$ in one case, for example, the probability of opening $B$ on the very next case is less than what it was originally, $0.3$



      I was wondering how I would be able to test that rumor using a hypothesis test.



      My guess / Attempt



      Seeing as how $A$ is the most common item, I would use that one for my hypothesis test and test



      $$H_0: P(A_k) = P(A_k | A_k-1)$$



      That is, the probability of opening $A$ on the $k^th$ case is the same as the probability of opening $A$ on the $k^th$ case given we just opened $A$ the case before



      Is this a good / viable way to test what I want? And how would I proceed from here after gathering data? Would it be similar to testing for a population proportion?



      Thanks for any help given









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 24 at 13:59
























      asked Jul 24 at 13:52









      WaveX

      1,8111616




      1,8111616




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Some inspiration from the answer posted at Stat.Stackexchange



          The Runs Test was suggested, and after doing some research I learned about the extension of the runs test to $k$ categories instead of being binary (we are not restricted to "+" and "-" )



          The expected number of runs is :



          $$mu_r = fracn(n+1) - sumn_i^2n$$
          For $i$ going from $1$ to $k$ and $n_i$ is the number of times category $i$ appears in the sequence.



          The variance is $$sigma_r^2 = fracsumn_i^2 left( sumn_i^2+ n(n+1) right) -2nsumn_i^3 - n^3n^2(n-1)$$



          The source of this formula was found at NCSS Analysis Of Runs (pdf)






          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: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            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%2f2861359%2fhypothesis-test-for-independence-in-trials%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Some inspiration from the answer posted at Stat.Stackexchange



            The Runs Test was suggested, and after doing some research I learned about the extension of the runs test to $k$ categories instead of being binary (we are not restricted to "+" and "-" )



            The expected number of runs is :



            $$mu_r = fracn(n+1) - sumn_i^2n$$
            For $i$ going from $1$ to $k$ and $n_i$ is the number of times category $i$ appears in the sequence.



            The variance is $$sigma_r^2 = fracsumn_i^2 left( sumn_i^2+ n(n+1) right) -2nsumn_i^3 - n^3n^2(n-1)$$



            The source of this formula was found at NCSS Analysis Of Runs (pdf)






            share|cite|improve this answer

























              up vote
              0
              down vote













              Some inspiration from the answer posted at Stat.Stackexchange



              The Runs Test was suggested, and after doing some research I learned about the extension of the runs test to $k$ categories instead of being binary (we are not restricted to "+" and "-" )



              The expected number of runs is :



              $$mu_r = fracn(n+1) - sumn_i^2n$$
              For $i$ going from $1$ to $k$ and $n_i$ is the number of times category $i$ appears in the sequence.



              The variance is $$sigma_r^2 = fracsumn_i^2 left( sumn_i^2+ n(n+1) right) -2nsumn_i^3 - n^3n^2(n-1)$$



              The source of this formula was found at NCSS Analysis Of Runs (pdf)






              share|cite|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Some inspiration from the answer posted at Stat.Stackexchange



                The Runs Test was suggested, and after doing some research I learned about the extension of the runs test to $k$ categories instead of being binary (we are not restricted to "+" and "-" )



                The expected number of runs is :



                $$mu_r = fracn(n+1) - sumn_i^2n$$
                For $i$ going from $1$ to $k$ and $n_i$ is the number of times category $i$ appears in the sequence.



                The variance is $$sigma_r^2 = fracsumn_i^2 left( sumn_i^2+ n(n+1) right) -2nsumn_i^3 - n^3n^2(n-1)$$



                The source of this formula was found at NCSS Analysis Of Runs (pdf)






                share|cite|improve this answer













                Some inspiration from the answer posted at Stat.Stackexchange



                The Runs Test was suggested, and after doing some research I learned about the extension of the runs test to $k$ categories instead of being binary (we are not restricted to "+" and "-" )



                The expected number of runs is :



                $$mu_r = fracn(n+1) - sumn_i^2n$$
                For $i$ going from $1$ to $k$ and $n_i$ is the number of times category $i$ appears in the sequence.



                The variance is $$sigma_r^2 = fracsumn_i^2 left( sumn_i^2+ n(n+1) right) -2nsumn_i^3 - n^3n^2(n-1)$$



                The source of this formula was found at NCSS Analysis Of Runs (pdf)







                share|cite|improve this answer













                share|cite|improve this answer



                share|cite|improve this answer











                answered Jul 24 at 21:39









                WaveX

                1,8111616




                1,8111616






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2861359%2fhypothesis-test-for-independence-in-trials%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What is the equation of a 3D cone with generalised tilt?

                    Color the edges and diagonals of a regular polygon

                    Relationship between determinant of matrix and determinant of adjoint?