How many terms are there in each of these sums?

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











up vote
3
down vote

favorite












It is written on Wikipedia that we have:



$mathbb P (displaystyle bigcup_i=1^nA_i)=displaystyle sum_i=1^n mathbb P (A_i) - displaystyle sum_i<j mathbb P(A_i cap A_j) + displaystyle sum_i<j<k mathbb P(A_i cap A_j cap A_k) - ... + (-1)^n-1 mathbb P (bigcap_i=1^n A_i) $



Now, I would like to know how many terms are there in each of the sums in this formula so to better understand this formula itself.



For example, in sum $displaystyle sum_i=1^n mathbb P (A_i)$ there are $n$ terms, in sum $displaystyle sum_i<j mathbb P(A_i cap A_j)$ there are $frac(n-1)n2$ terms, because for $j=2$ we have $i=1$, for $j=3$ we have $j=1,2$, for...for $j=n$ we have $i=1,2,...(n-1)$.



I know that this is easy problem for some of you, so would be nice to see how would you derive how many terms there are in each sum?



Thanks.










share|cite|improve this question



























    up vote
    3
    down vote

    favorite












    It is written on Wikipedia that we have:



    $mathbb P (displaystyle bigcup_i=1^nA_i)=displaystyle sum_i=1^n mathbb P (A_i) - displaystyle sum_i<j mathbb P(A_i cap A_j) + displaystyle sum_i<j<k mathbb P(A_i cap A_j cap A_k) - ... + (-1)^n-1 mathbb P (bigcap_i=1^n A_i) $



    Now, I would like to know how many terms are there in each of the sums in this formula so to better understand this formula itself.



    For example, in sum $displaystyle sum_i=1^n mathbb P (A_i)$ there are $n$ terms, in sum $displaystyle sum_i<j mathbb P(A_i cap A_j)$ there are $frac(n-1)n2$ terms, because for $j=2$ we have $i=1$, for $j=3$ we have $j=1,2$, for...for $j=n$ we have $i=1,2,...(n-1)$.



    I know that this is easy problem for some of you, so would be nice to see how would you derive how many terms there are in each sum?



    Thanks.










    share|cite|improve this question

























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      It is written on Wikipedia that we have:



      $mathbb P (displaystyle bigcup_i=1^nA_i)=displaystyle sum_i=1^n mathbb P (A_i) - displaystyle sum_i<j mathbb P(A_i cap A_j) + displaystyle sum_i<j<k mathbb P(A_i cap A_j cap A_k) - ... + (-1)^n-1 mathbb P (bigcap_i=1^n A_i) $



      Now, I would like to know how many terms are there in each of the sums in this formula so to better understand this formula itself.



      For example, in sum $displaystyle sum_i=1^n mathbb P (A_i)$ there are $n$ terms, in sum $displaystyle sum_i<j mathbb P(A_i cap A_j)$ there are $frac(n-1)n2$ terms, because for $j=2$ we have $i=1$, for $j=3$ we have $j=1,2$, for...for $j=n$ we have $i=1,2,...(n-1)$.



      I know that this is easy problem for some of you, so would be nice to see how would you derive how many terms there are in each sum?



      Thanks.










      share|cite|improve this question















      It is written on Wikipedia that we have:



      $mathbb P (displaystyle bigcup_i=1^nA_i)=displaystyle sum_i=1^n mathbb P (A_i) - displaystyle sum_i<j mathbb P(A_i cap A_j) + displaystyle sum_i<j<k mathbb P(A_i cap A_j cap A_k) - ... + (-1)^n-1 mathbb P (bigcap_i=1^n A_i) $



      Now, I would like to know how many terms are there in each of the sums in this formula so to better understand this formula itself.



      For example, in sum $displaystyle sum_i=1^n mathbb P (A_i)$ there are $n$ terms, in sum $displaystyle sum_i<j mathbb P(A_i cap A_j)$ there are $frac(n-1)n2$ terms, because for $j=2$ we have $i=1$, for $j=3$ we have $j=1,2$, for...for $j=n$ we have $i=1,2,...(n-1)$.



      I know that this is easy problem for some of you, so would be nice to see how would you derive how many terms there are in each sum?



      Thanks.







      combinatorics






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 30 at 6:25









      P. Quinton

      45410




      45410










      asked Aug 30 at 5:49









      Right

      1,051213




      1,051213




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          It would be the binomial coefficient :



          How many ways are there of choosing a set of $k$ elements amongst $n$ ?



          Well $nchoose k = fracn!k! (n-k)!$



          About intuition, why is that formula the one your looking for ? suppose you have a list of values from $1$ to $n$ :
          $$[1,2,dots,n]$$



          How many ways are there to shuffle it ? $n!$ since you have $n$ ways of placing $1$, then $n-1$ ways of placing $2$ amongst the remaining places, etc until you place $n$ in the last possible spot.



          Now suppose you select from this shuffled list only the $k$ first elements but you don't care about the ordering of the elements (since anyway you will sum only once because you have $i<j<k<...$). So you want to remove the order of the first $k$ elements but also the order of the $n-k$ last elements, all you care about is the elements that are actually the first $k$.
          We already know that there are $k!$ ways of ordering the first $k$ elements and $(n-k)!$ ways of ordering the $(n-k)$ last, so you need to "remove" that from the different ordering by dividing. And so you obtain $nchoose k = fracn!k! (n-k)!$



          A cool fact about that is that the binomial theorem tells you that total amount of terms in the end is



          $$sum_k=0^n nchoose k = sum_k=0^n nchoose k 1^k 1^n-k = 2^n$$



          which can be checked quite easily.






          share|cite|improve this answer






















          • +1 Nice explanation.
            – drhab
            Aug 30 at 7:03

















          up vote
          1
          down vote













          Once you note that the number is equal to the number of the ways of choosing $k$ elements from the $n$ elements in total, which is denoted by $n choose k$ or $C_n^k$, you can calculate $C_n^k$ just by generalizing your method.

          First multiplying from $n$ to $n-k+1$, that is to say, the first element has $n$ options, the second has $n-1$, and so on.

          However, there are many ways to choose the elements getting the same consequence finally, since the selected elements are actually the same although they were chosen in different order. And the number of $k$ elements in different order is $k!=k(k-1)...1$ which can be worked out analogously.

          Then the number you need is
          $$fracn(n-1)...(n-k+1)k(k-1)...1$$.
          This is a formula: $C_n^k=fracn!k!(n-k)!$






          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%2f2899180%2fhow-many-terms-are-there-in-each-of-these-sums%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote



            accepted










            It would be the binomial coefficient :



            How many ways are there of choosing a set of $k$ elements amongst $n$ ?



            Well $nchoose k = fracn!k! (n-k)!$



            About intuition, why is that formula the one your looking for ? suppose you have a list of values from $1$ to $n$ :
            $$[1,2,dots,n]$$



            How many ways are there to shuffle it ? $n!$ since you have $n$ ways of placing $1$, then $n-1$ ways of placing $2$ amongst the remaining places, etc until you place $n$ in the last possible spot.



            Now suppose you select from this shuffled list only the $k$ first elements but you don't care about the ordering of the elements (since anyway you will sum only once because you have $i<j<k<...$). So you want to remove the order of the first $k$ elements but also the order of the $n-k$ last elements, all you care about is the elements that are actually the first $k$.
            We already know that there are $k!$ ways of ordering the first $k$ elements and $(n-k)!$ ways of ordering the $(n-k)$ last, so you need to "remove" that from the different ordering by dividing. And so you obtain $nchoose k = fracn!k! (n-k)!$



            A cool fact about that is that the binomial theorem tells you that total amount of terms in the end is



            $$sum_k=0^n nchoose k = sum_k=0^n nchoose k 1^k 1^n-k = 2^n$$



            which can be checked quite easily.






            share|cite|improve this answer






















            • +1 Nice explanation.
              – drhab
              Aug 30 at 7:03














            up vote
            3
            down vote



            accepted










            It would be the binomial coefficient :



            How many ways are there of choosing a set of $k$ elements amongst $n$ ?



            Well $nchoose k = fracn!k! (n-k)!$



            About intuition, why is that formula the one your looking for ? suppose you have a list of values from $1$ to $n$ :
            $$[1,2,dots,n]$$



            How many ways are there to shuffle it ? $n!$ since you have $n$ ways of placing $1$, then $n-1$ ways of placing $2$ amongst the remaining places, etc until you place $n$ in the last possible spot.



            Now suppose you select from this shuffled list only the $k$ first elements but you don't care about the ordering of the elements (since anyway you will sum only once because you have $i<j<k<...$). So you want to remove the order of the first $k$ elements but also the order of the $n-k$ last elements, all you care about is the elements that are actually the first $k$.
            We already know that there are $k!$ ways of ordering the first $k$ elements and $(n-k)!$ ways of ordering the $(n-k)$ last, so you need to "remove" that from the different ordering by dividing. And so you obtain $nchoose k = fracn!k! (n-k)!$



            A cool fact about that is that the binomial theorem tells you that total amount of terms in the end is



            $$sum_k=0^n nchoose k = sum_k=0^n nchoose k 1^k 1^n-k = 2^n$$



            which can be checked quite easily.






            share|cite|improve this answer






















            • +1 Nice explanation.
              – drhab
              Aug 30 at 7:03












            up vote
            3
            down vote



            accepted







            up vote
            3
            down vote



            accepted






            It would be the binomial coefficient :



            How many ways are there of choosing a set of $k$ elements amongst $n$ ?



            Well $nchoose k = fracn!k! (n-k)!$



            About intuition, why is that formula the one your looking for ? suppose you have a list of values from $1$ to $n$ :
            $$[1,2,dots,n]$$



            How many ways are there to shuffle it ? $n!$ since you have $n$ ways of placing $1$, then $n-1$ ways of placing $2$ amongst the remaining places, etc until you place $n$ in the last possible spot.



            Now suppose you select from this shuffled list only the $k$ first elements but you don't care about the ordering of the elements (since anyway you will sum only once because you have $i<j<k<...$). So you want to remove the order of the first $k$ elements but also the order of the $n-k$ last elements, all you care about is the elements that are actually the first $k$.
            We already know that there are $k!$ ways of ordering the first $k$ elements and $(n-k)!$ ways of ordering the $(n-k)$ last, so you need to "remove" that from the different ordering by dividing. And so you obtain $nchoose k = fracn!k! (n-k)!$



            A cool fact about that is that the binomial theorem tells you that total amount of terms in the end is



            $$sum_k=0^n nchoose k = sum_k=0^n nchoose k 1^k 1^n-k = 2^n$$



            which can be checked quite easily.






            share|cite|improve this answer














            It would be the binomial coefficient :



            How many ways are there of choosing a set of $k$ elements amongst $n$ ?



            Well $nchoose k = fracn!k! (n-k)!$



            About intuition, why is that formula the one your looking for ? suppose you have a list of values from $1$ to $n$ :
            $$[1,2,dots,n]$$



            How many ways are there to shuffle it ? $n!$ since you have $n$ ways of placing $1$, then $n-1$ ways of placing $2$ amongst the remaining places, etc until you place $n$ in the last possible spot.



            Now suppose you select from this shuffled list only the $k$ first elements but you don't care about the ordering of the elements (since anyway you will sum only once because you have $i<j<k<...$). So you want to remove the order of the first $k$ elements but also the order of the $n-k$ last elements, all you care about is the elements that are actually the first $k$.
            We already know that there are $k!$ ways of ordering the first $k$ elements and $(n-k)!$ ways of ordering the $(n-k)$ last, so you need to "remove" that from the different ordering by dividing. And so you obtain $nchoose k = fracn!k! (n-k)!$



            A cool fact about that is that the binomial theorem tells you that total amount of terms in the end is



            $$sum_k=0^n nchoose k = sum_k=0^n nchoose k 1^k 1^n-k = 2^n$$



            which can be checked quite easily.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Aug 30 at 6:12

























            answered Aug 30 at 6:04









            P. Quinton

            45410




            45410











            • +1 Nice explanation.
              – drhab
              Aug 30 at 7:03
















            • +1 Nice explanation.
              – drhab
              Aug 30 at 7:03















            +1 Nice explanation.
            – drhab
            Aug 30 at 7:03




            +1 Nice explanation.
            – drhab
            Aug 30 at 7:03










            up vote
            1
            down vote













            Once you note that the number is equal to the number of the ways of choosing $k$ elements from the $n$ elements in total, which is denoted by $n choose k$ or $C_n^k$, you can calculate $C_n^k$ just by generalizing your method.

            First multiplying from $n$ to $n-k+1$, that is to say, the first element has $n$ options, the second has $n-1$, and so on.

            However, there are many ways to choose the elements getting the same consequence finally, since the selected elements are actually the same although they were chosen in different order. And the number of $k$ elements in different order is $k!=k(k-1)...1$ which can be worked out analogously.

            Then the number you need is
            $$fracn(n-1)...(n-k+1)k(k-1)...1$$.
            This is a formula: $C_n^k=fracn!k!(n-k)!$






            share|cite|improve this answer


























              up vote
              1
              down vote













              Once you note that the number is equal to the number of the ways of choosing $k$ elements from the $n$ elements in total, which is denoted by $n choose k$ or $C_n^k$, you can calculate $C_n^k$ just by generalizing your method.

              First multiplying from $n$ to $n-k+1$, that is to say, the first element has $n$ options, the second has $n-1$, and so on.

              However, there are many ways to choose the elements getting the same consequence finally, since the selected elements are actually the same although they were chosen in different order. And the number of $k$ elements in different order is $k!=k(k-1)...1$ which can be worked out analogously.

              Then the number you need is
              $$fracn(n-1)...(n-k+1)k(k-1)...1$$.
              This is a formula: $C_n^k=fracn!k!(n-k)!$






              share|cite|improve this answer
























                up vote
                1
                down vote










                up vote
                1
                down vote









                Once you note that the number is equal to the number of the ways of choosing $k$ elements from the $n$ elements in total, which is denoted by $n choose k$ or $C_n^k$, you can calculate $C_n^k$ just by generalizing your method.

                First multiplying from $n$ to $n-k+1$, that is to say, the first element has $n$ options, the second has $n-1$, and so on.

                However, there are many ways to choose the elements getting the same consequence finally, since the selected elements are actually the same although they were chosen in different order. And the number of $k$ elements in different order is $k!=k(k-1)...1$ which can be worked out analogously.

                Then the number you need is
                $$fracn(n-1)...(n-k+1)k(k-1)...1$$.
                This is a formula: $C_n^k=fracn!k!(n-k)!$






                share|cite|improve this answer














                Once you note that the number is equal to the number of the ways of choosing $k$ elements from the $n$ elements in total, which is denoted by $n choose k$ or $C_n^k$, you can calculate $C_n^k$ just by generalizing your method.

                First multiplying from $n$ to $n-k+1$, that is to say, the first element has $n$ options, the second has $n-1$, and so on.

                However, there are many ways to choose the elements getting the same consequence finally, since the selected elements are actually the same although they were chosen in different order. And the number of $k$ elements in different order is $k!=k(k-1)...1$ which can be worked out analogously.

                Then the number you need is
                $$fracn(n-1)...(n-k+1)k(k-1)...1$$.
                This is a formula: $C_n^k=fracn!k!(n-k)!$







                share|cite|improve this answer














                share|cite|improve this answer



                share|cite|improve this answer








                edited Aug 30 at 6:37









                P. Quinton

                45410




                45410










                answered Aug 30 at 6:11









                Hugo

                1029




                1029



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2899180%2fhow-many-terms-are-there-in-each-of-these-sums%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    這個網誌中的熱門文章

                    How to combine Bézier curves to a surface?

                    Mutual Information Always Non-negative

                    Why am i infinitely getting the same tweet with the Twitter Search API?