  {"id":3286,"date":"2023-03-15T16:20:40","date_gmt":"2023-03-15T15:20:40","guid":{"rendered":"https:\/\/www.gironi.it\/blog\/?p=3286"},"modified":"2024-10-16T16:23:50","modified_gmt":"2024-10-16T15:23:50","slug":"first-steps-into-the-world-of-probability-sample-space-events-permutations-and-combinations","status":"publish","type":"post","link":"https:\/\/www.gironi.it\/blog\/en\/first-steps-into-the-world-of-probability-sample-space-events-permutations-and-combinations\/","title":{"rendered":"First Steps into the World of Probability: Sample Space, Events, Permutations, and Combinations"},"content":{"rendered":"\n<p><strong>Probability<\/strong> and <strong>combinatorics<\/strong> are two fundamental concepts in mathematics and statistics that help us understand and interpret many phenomena in everyday life. In this introductory post, we&#8217;ll &#8220;touch upon&#8221; the main concepts together, seeing how they can be applied in various contexts.<\/p>\n\n\n\n<!--more-->\n\n\n\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-dd0eddc7      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tWhat we&#8217;ll discuss\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#probability\" class=\"uagb-toc-link__trigger\">Probability<\/a><li class=\"uagb-toc__list\"><a href=\"#the-principle-of-additivity-of-probabilities-for-incompatible-events\" class=\"uagb-toc-link__trigger\">The Principle of Additivity of Probabilities for Incompatible Events<\/a><li class=\"uagb-toc__list\"><a href=\"#the-principle-of-multiplication-of-probabilities\" class=\"uagb-toc-link__trigger\">The Principle of Multiplication of Probabilities<\/a><li class=\"uagb-toc__list\"><a href=\"#permutation\" class=\"uagb-toc-link__trigger\">Permutation<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#how-many-different-ways-are-there-to-arrange-4-books-on-a-shelf\" class=\"uagb-toc-link__trigger\">How many different ways are there to arrange 4 books on a shelf?<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#how-many-permutations-can-i-make-with-a-set-of-5-letters\" class=\"uagb-toc-link__trigger\">How many permutations can I make with a set of 5 letters?<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#how-many-permutations-are-possible-with-5-letters-taken-in-groups-of-3\" class=\"uagb-toc-link__trigger\">How many permutations are possible with 5 letters taken in groups of 3?<\/a><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#the-concept-of-combination\" class=\"uagb-toc-link__trigger\">The Concept of Combination<\/a><ul class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#how-many-combinations-are-possible-for-a-set-of-10-people-taken-in-groups-of-3\" class=\"uagb-toc-link__trigger\">How many combinations are possible for a set of 10 people taken in groups of 3?<\/a><li class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#a-class-consists-of-12-boys-and-4-girls-if-three-students-are-chosen-at-random-what-is-the-probability-that-they-are-all-boys\" class=\"uagb-toc-link__trigger\">A class consists of 12 boys and 4 girls. If three students are chosen at random, what is the probability that they are all boys?<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"uagb-toc__list\"><a href=\"#the-binomial-distribution-as-an-application-of-probability-and-combinatorics\" class=\"uagb-toc-link__trigger\">The Binomial Distribution as an Application of Probability and Combinatorics<\/a><\/ul><\/ul><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<h2 class=\"wp-block-heading\">Probability<\/h2>\n\n\n\n<p class=\"has-light-gray-background-color has-background\">Probability is a mathematical measure that indicates the likelihood of an event occurring. In other words, probability tells us how many favorable cases there are relative to all possible cases.<\/p>\n\n\n\n<p class=\"has-text-align-left has-white-background-color has-background\">Probability is based on two fundamental concepts: the <strong>sample space<\/strong> and the <strong>event<\/strong>.<\/p>\n\n\n\n<p>The <strong>sample space<\/strong> is the set of all possible outcomes of a random experiment. <br>For example, if we flip a coin, the sample space is {heads, tails}. If we roll two dice, the sample space is {(1,1), (1,2), &#8230;, (6,6)}.<\/p>\n\n\n\n<p>An <strong>event<\/strong> is a subset of the sample space that we&#8217;re interested in. <br>For instance, if we flip a coin and we&#8217;re interested in whether it will be heads or tails, the event is {heads} or {tails}. If we roll two dice and want to know if the sum of the numbers is even or odd, the event is {(2,2), (2,4), &#8230;, (6,6)} or {(1,2), (1,4), &#8230;, (5,6)}.<\/p>\n\n\n\n<p class=\"has-light-gray-background-color has-background\"><strong>The probability of an event is calculated by dividing the number of favorable cases for the event to occur by the number of possible cases in the sample space.<\/strong><\/p>\n\n\n\n<div class=\"wp-block-uagb-image aligncenter uagb-block-9e81534e wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" srcset=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2023\/03\/probabilita.jpg \" src=\"https:\/\/www.gironi.it\/blog\/wp-content\/uploads\/2023\/03\/probabilita.jpg\" alt=\"image of dice to suggest the concept of probability\" class=\"uag-image-2774\" width=\"\" height=\"\" title=\"\" loading=\"lazy\"\/><\/figure><\/div>\n\n\n\n<p>For example:<\/p>\n\n\n\n<p>If we have a six-sided die and want to know the probability of getting a 4 when rolling the die, we have 1 favorable case (the face with the number 4) out of 6 possible cases (the six faces of the die). <br><strong>Therefore, the probability of getting a 4 is 1\/6.<\/strong><\/p>\n\n\n\n<p>Other simple examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The probability of getting heads when flipping a coin is 1\/2<\/li>\n\n\n\n<li>The probability that the sum of the numbers is even when rolling two dice is 18\/36 = 1\/2<\/li>\n<\/ul>\n\n\n\n<p class=\"has-light-gray-background-color has-background\"><strong>Probability is expressed in numbers between 0 and 1, where 0 indicates the impossibility of the event and 1 indicates the certainty of the event.<\/strong><\/p>\n\n\n\n<p>A probability value close to 0 indicates a low possibility that the event will occur, while a probability value close to 1 indicates a high possibility that the event will occur.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Principle of Additivity of Probabilities for Incompatible Events<\/h2>\n\n\n\n<p class=\"has-light-gray-background-color has-background\">The principle of additivity of probabilities for <strong>incompatible events<\/strong> states that the probability of the union of two or more incompatible events is equal to the sum of their probabilities.<\/p>\n\n\n\n<p>Incompatible events are events that cannot occur simultaneously, i.e., if one occurs, the other cannot occur.\nFor example, in rolling a die, the events &#8220;rolling a 3&#8221; and &#8220;rolling a 5&#8221; are incompatible. In this case, the probability of the union of the events (i.e., rolling a 3 or a 5) is equal to the sum of their probabilities (1\/6 + 1\/6 = 1\/3).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Principle of Multiplication of Probabilities<\/h2>\n\n\n\n<p class=\"has-light-gray-background-color has-background\">The principle of multiplication of probabilities states that the probability of the intersection of two events is equal to the product of their individual probabilities, <strong>if the events are independent<\/strong>.<\/p>\n\n\n\n<p>In other words, if A and B are two independent events in a probability experiment, then the probability that both occur simultaneously is given by the product of their individual probabilities:<\/p>\n\n\n\n<p>P(A \u2229 B) = P(A) x P(B).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>To calculate the probability of more complex or combined events, the rules of <strong>combinatorics<\/strong> are used, which study the ways in which groups of objects can be formed according to specific criteria.<\/p>\n\n\n\n<p>Two important concepts in combinatorics are <strong>permutations<\/strong> and <strong>combinations<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Permutation<\/h2>\n\n\n\n<p><strong>Permutations are the ways in which n distinct objects can be arranged in n different positions<\/strong>. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The permutations of the letters A, B, C are ABC, ACB, BAC, BCA, CAB, CBA<\/li>\n\n\n\n<li>The number of permutations of n distinct objects is calculated using the factorial n!, i.e., the product of the natural numbers from 1 to n<\/li>\n\n\n\n<li>The number of permutations of A, B, C is 3! = 3 x 2 x 1 = 6<\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s see a few more examples:<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>How many different ways are there to arrange 4 books on a shelf?<\/strong><\/h6>\n\n\n\n<p>The answer is: n!\nRemember that &#8220;!&#8221; denotes the factorial, i.e., the product of all positive integers from 1 to n.<\/p>\n\n\n\n<p>Solution: 4! (4 factorial) = 24 different ways<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong><em>How many permutations can I make with a set of 5 letters?<\/em><\/strong><\/h6>\n\n\n\n<p>5! = 5 x 4 x 3 x 2 x 1 = 120<\/p>\n\n\n\n<p>There are 120 possible permutations of 5 letters.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong><em>How many permutations are possible with 5 letters taken in groups of 3?<\/em><\/strong><\/h6>\n\n\n\n<p>n! \/ (n &#8211; r)!<\/p>\n\n\n\n<p>where &#8220;n&#8221; represents the total number of objects (in this case, the 5 letters), and &#8220;r&#8221; represents the number of objects we want to choose and arrange in a specific order (in this case, 3 letters).<\/p>\n\n\n\n<p>So, substituting the values, we get:<\/p>\n\n\n\n<p>5! \/ (5 &#8211; 3)! = 5! \/ 2! = (5 x 4 x 3 x 2 x 1) \/ (2 x 1) = 60<\/p>\n\n\n\n<p>Therefore, there are 60 possible permutations of 5 letters taken in groups of 3.<\/p>\n\n\n\n<p class=\"has-light-gray-background-color has-background\">It&#8217;s essential to note that, when selecting a group of objects from a larger set, <strong>the order in which the objects are chosen matters<\/strong>. If the order didn&#8217;t matter, we would need to use the combination formula.<\/p>\n\n\nEcco la traduzione in inglese del testo, mantenendo i tags WordPress:\n\n\n<h2 class=\"wp-block-heading\">The Concept of Combination<\/h2>\n\n\n\n<p>Combinations are the ways in which k objects can be chosen from n distinct objects <strong>without considering the order<\/strong>. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The combinations of two letters from A, B, C are AB, AC, BC<\/li>\n\n\n\n<li>The number of combinations of k objects from n distinct objects is calculated using the binomial coefficient C(n, k) = n! \/ (k! x (n-k)!)<\/li>\n\n\n\n<li>The number of combinations of two letters from A, B, C is C(3, 2) = 3! \/ (2! x (3-2)!) = 3<\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s see a few more examples:<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong><em>How many combinations are possible for a set of 10 people taken in groups of 3?<\/em><\/strong><\/h6>\n\n\n\n<p>To calculate the number of combinations possible for a set of 10 people taken in groups of 3, we can use the combination formula:<\/p>\n\n\n\n<p>n! \/ (k! * (n &#8211; k)!)<\/p>\n\n\n\n<p>where &#8220;n&#8221; represents the total number of objects (in this case, the 10 people) and &#8220;k&#8221; represents the number of objects we want to choose without considering the order (in this case, 3 people).<\/p>\n\n\n\n<p>So, substituting the values, we get:<\/p>\n\n\n\n<p>10! \/ (3! * (10 &#8211; 3)!) = (10 x 9 x 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1) \/ ((3 x 2 x 1) * (7 x 6 x 5 x 4 x 3 x 2 x 1)) = 120<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><strong><em>A class consists of 12 boys and 4 girls. If three students are chosen at random, what is the probability that they are all boys?<\/em><\/strong><\/h6>\n\n\n\n<p>This example is taken from the State Exam, math topic 1 (PNI, a.s. 2000-2001 &#8211; Scientific High School Course)<\/p>\n\n\n\n<p>The probability of choosing three all-boy students can be calculated as the ratio between the number of ways to choose three boys (if we want to choose three all-boy students, we must consider all possible groups of 3 boy students that can be formed from the 12 boy students) and the total number of ways to choose three students from all sixteen.<\/p>\n\n\n\n<p>The number of ways to choose three boys from the class of 12 boys is given by the combination of 3 elements chosen from the 12 boy students. We can calculate this number using the combination formula:<\/p>\n\n\n\n<p>C(12, 3) = 12! \/ (3! * (12-3)!) = 220<\/p>\n\n\n\n<p>The total number of ways to choose three students from the class of 16 students is given by the combination of 3 elements chosen from the 16 students.<\/p>\n\n\n\n<p>C(16, 3) = 16! \/ (3! * (16-3)!) = 560<\/p>\n\n\n\n<p>Therefore, the probability of choosing three all-boy students is:<\/p>\n\n\n\n<p>P(three boys) = C(12, 3) \/ C(16, 3) = 220 \/ 560 = 11 \/ 28<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Binomial Distribution as an Application of Probability and Combinatorics<\/h2>\n\n\n\n<p>In a <strong><a href=\"https:\/\/www.gironi.it\/blog\/distribuzioni-di-probabilita-distribuzioni-discrete-la-binomiale\/\" target=\"_blank\" rel=\"noreferrer noopener\">post specifically dedicated to probability distributions<\/a><\/strong>, I examined in detail the properties of the <strong><a href=\"https:\/\/www.gironi.it\/blog\/distribuzioni-di-probabilita-distribuzioni-discrete-la-binomiale\/\" target=\"_blank\" rel=\"noreferrer noopener\">binomial distribution<\/a><\/strong>. I refer to the post for all the details.<br>In this context, I would like to briefly introduce the binomial distribution in a direct and practical way, solely to answer questions like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I want to know the probability of getting heads 5 times or less in 10 coin tosses.<\/li>\n\n\n\n<li>I want to calculate the probability of answering correctly 15 questions or more out of 20 multiple-choice questions, answering completely randomly.<\/li>\n\n\n\n<li>I want to find the probability of drawing less than 20 white balls in 100 draws (with replacement) from an urn containing 10 white balls and 90 black balls.<\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s look at the first question. I want to know the probability of getting heads 5 times or less in 10 coin tosses. <br>Proceeding logically, I should calculate the sum of the binomial probabilities for k = 0, 1, 2, 3, 4, and 5. That is:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">P(X &lt;= 5) = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) + P(X = 4) + P(X = 5)<\/pre>\n\n\n\n<p>Using the binomial probability formula and substituting n = 10 and p = 1\/2, we get:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">P(X &lt;= 5) = C(10,0) x (1\/2)^0 x (1\/2)^10 + C(10,1) x (1\/2)^1 x (1\/2)^9 + \u2026 + C(10,5) x (1\/2)^5 x (1\/2)^5<\/pre>\n\n\n\n<p>Simplifying the calculations and using a calculator, we get:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">P(X &lt;= 5) = &lt;0.001 + &lt;0.01 + &lt;0.04 + &lt;0.12 + &lt;0.21 + &lt;0.25\n\nP(X &lt;= 5) = 0.63<\/pre>\n\n\n\n<p>So, the probability of getting heads 5 times or less in 10 coin tosses is approximately 63%.<\/p>\n\n\n\n<p>Is there a simpler method to arrive at the correct result? <\/p>\n\n\n\n<p>We can introduce the <strong>binomial distribution&#8217;s cumulative distribution function (CDF)<\/strong>.<\/p>\n\n\n\n<p>The CDF is a function that calculates the probability that the random variable X is less than or equal to a certain value k. It is denoted by F(k) and defined as:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">F(k) = P(X &lt;= k) = sum of binomial probabilities for i = 0, 1, \u2026, k<\/pre>\n\n\n\n<p>This function can be calculated using an approximate formula or a precompiled table. For example, using an online table like this:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.statisticshowto.com\/tables\/binomial-distribution-table\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.statisticshowto.com\/tables\/binomial-distribution-table\/<\/a><\/\n","protected":false},"excerpt":{"rendered":"<p>Probability and combinatorics are two fundamental concepts in mathematics and statistics that help us understand and interpret many phenomena in everyday life. In this introductory post, we&#8217;ll &#8220;touch upon&#8221; the main concepts together, seeing how they can be applied in various contexts.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[161,645],"tags":[],"class_list":["post-3286","post","type-post","status-publish","format-standard","hentry","category-statistics","category-probability"],"lang":"en","translations":{"en":3286,"it":2731},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"paolo","author_link":"https:\/\/www.gironi.it\/blog\/author\/paolo\/"},"uagb_comment_info":0,"uagb_excerpt":"Probability and combinatorics are two fundamental concepts in mathematics and statistics that help us understand and interpret many phenomena in everyday life. In this introductory post, we&#8217;ll &#8220;touch upon&#8221; the main concepts together, seeing how they can be applied in various contexts.","_links":{"self":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/comments?post=3286"}],"version-history":[{"count":4,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3286\/revisions"}],"predecessor-version":[{"id":3290,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/posts\/3286\/revisions\/3290"}],"wp:attachment":[{"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/media?parent=3286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/categories?post=3286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironi.it\/blog\/wp-json\/wp\/v2\/tags?post=3286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}