Part II Probability Calculus
5.1 Introduction
Combinatorics is a special branch of mathematics. It has many applications not only in several interesting fields such as enumerative combinatorics (the classical application), but also in other fields, for example in graph theory and optimization.
First, we try to motivate and understand the role of combinatorics in statistics.
Consider a simple example in which someone goes to a cafe. The person would like a hot beverage and a cake. Assume that one can choose among three different beverages, for example cappuccino, hot chocolate, and green tea, and three different cakes, let us say carrot cake, chocolate cake, and lemon tart. The person may consider different beverage and cake combinations when placing the order, for example carrot cake and cappuccino, carrot cake and tea, and hot chocolate and lemon tart. From a statistical perspective, the customer is evaluating the possible combinations before making a decision. Depending on their preferences, the order will be placed by choosing one of the combinations.
In this example, it is easy to calculate the number of possible combinations.
There are three different beverages and three different cakes to choose from, leading to nine different (3×3) beverage and cake combinations. However, suppose there is a choice of 15 hot beverages and 8 different cakes. How many orders can be made? (Answer: 15×8) What if the person decides to order two cakes, how will it affect the number of possible combinations of choices? It will be a tedious task to count all the possibilities. So we need a systematic approach to count such possible combinations. Combinatorics deals with the counting of different possibilities in a systematic approach.
People often use the urn model to understand the system in the counting process.
The urn model deals with the drawing of balls from an urn. The balls in the urn
© Springer International Publishing Switzerland 2016 C. Heumann et al.,Introduction to Statistics and Data Analysis, DOI 10.1007/978-3-319-46162-5_5
97
(a) (b) (c)
(d) – – – ...
(e) – –
Fig. 5.1 aRepresentation of the urn model. Drawing from the urn modelbwith replacement andc without replacement. Compositions of three drawn balls:dall balls are distinguishable andesome balls are not distinguishable
represent the units of a population, or the features of a population. The balls may vary in colour or size to represent specific properties of a unit or feature. We illustrate this concept in more detail in Fig.5.1.
Suppose there are 5 balls of three different colours—two black, one grey, and two white (see Fig.5.1a). This can be generalized to a situation in which there arenballs in the urn and we want to drawmballs. Suppose we want to know
• how many different possibilities exist to drawmout ofnballs (thus determining the number of distinguishablecombinations).
To deal with such a question, we first need to decide whether a ball will be put back into the urn after it is drawn or not. Figure5.1b illustrates that a grey ball is drawn from the urn and then placed back (illustrated by the two-headed arrow). We say the ball is drawnwith replacement. Figure5.1c illustrates a different situation in which the grey ball is drawn from the urn and isnotplaced back into the urn (illustrated by the one-headed arrow). We say the ball is drawnwithout replacement.
Further, we may be interested in knowing the
• total number of ways in which the chosen set of balls can be arranged in a distin- guishable order (which we will define aspermutationslater in this chapter).
To answer the question how many permutations exist, we first need to decide whether all the chosen balls are distinguishable from each other or not. For example, in Fig.5.1d, the three chosen balls have different colours; therefore, they are distin- guishable. There are many options on how they can be arranged. In contrast, some
of the chosen balls in Fig.5.1e are the same colour, they are therefore not distin- guishable. Consequently, the number of combinations is much more limited. The concept of balls and urns just represents the features of observations from a sample.
We illustrate this in more detail in the following example.
Example 5.1.1 Say a father promises his daughter three scoops of ice cream if she cleans up her room. For simplicity, let us assume the daughter has a choice of four flavours: chocolate, banana, cherry, and lemon. How many different choices does the daughter have? If each scoop has to be a different flavour she obviously has much less choice than if the scoops can have the same flavour. In the urn model, this is rep- resented by the concept of “with/without replacement”. The urn contains 4 balls of 4 different colours which represent the ice cream flavours. For each of the three scoops, a ball is drawn to determine the flavour. If we draw with replacement, each flavour can be potentially chosen multiple times; however, if we draw without replacement each flavour can be chosen only once. Then, the number of possible combinations is easy to calculate: it is 4, i.e. (chocolate, banana, and cherry); (chocolate, banana, and lemon); (chocolate, cherry, and lemon); and (banana, cherry, and lemon). But what if we have more choices? Or if we can draw flavours multiple times? We then need calculation rules which help us counting the number of options.
Now, let us assume that the daughter picked the flavours (chocolate [C], banana [B], and lemon [L]). Like many other children, she prefers to eat her most favourite flavour (chocolate) last, and her least favourite flavour (cherry) first. Therefore, the order in which the scoops are placed on top of the cone are important! In how many different ways can the scoops be placed on top of the cone? This relates to the question of the number of distinguishable permutations. The answer is 6:
(C,B,L)–(C,L,B)–(B,L,C)–(B,C,L)–(L,B,C)–(L,C,B). But what if the daughter did pick a flavour multiple times, e.g. (chocolate, chocolate, lemon)? Since the two chocolate scoops are non-distinguishable, there are fewer permutations: (chocolate, chocolate, and lemon)–(chocolate, lemon, and chocolate)–(lemon, chocolate, and chocolate).
The bottom line of this example is that the number of combinations/options is determined by (i) whether we draw with or without replacement (i.e. allow flavours to be chosen more than once) and (ii) whether the arrangement in a particular order (=permutation) is of any specific interest.
Consider the urn example again. Suppose three balls of different colours, black, grey, and white, are drawn. Now there are two options: The first option is to take into account the order in which the balls are drawn. In such a situation, two possible sets of balls such as (black, grey, and white) and (white, black, and grey) constitute two different sets. Such a set is called anordered set. In the second option, we do not take into account the order in which the balls are drawn. In such a situation, the two possible sets of balls such as (black, grey, and white) and (white, black, and grey) are the same sets and constitute anunordered setof balls.
Definition 5.1.1 A group of elements is said to beorderedif the order in which these elements are drawn is of relevance. Otherwise, it is calledunordered.
Examples.
• Ordered samples:
– The first three places in an Olympic 100 m race are determined by the order in which the athletes arrive at the finishing line. If 8 athletes are competing with each other, the number of possible results for the first three places is of interest. In the urn language, we are taking draws without replacement (since every athlete can only have one distinct place).
– In a raffle with two prizes, the first drawn raffle ticket gets the first prize and the second raffle ticket gets the second prize.
– There exist various esoteric tarot card games which claim to foretell someone’s fortune with respect to several aspects of life. The order in which the cards are shown on the table is important for the interpretation.
• Unordered samples:
– The selected members for a national football team. The order in which the selected names are announced is irrelevant.
– Out of 10 economists, 10 medical doctors, and 10 statisticians, an advisory committee consisting of 4 economists, 3 medical doctors, and 2 statisticians is elected.
– Fishing 20 fish from a lake.
– A bunch of 10 flowers made from 21 flowers of 4 different colours.
Definition 5.1.2 The factorial functionn!is defined as n! =
1 for n=0
1·2·3· · ·n for n>0. (5.1) Example 5.1.2 It follows from the definition of the factorial function that
0! =1, 1! =1 2! =1·2=2, 3! =1·2·3=6. This can be calculated inRas follows:
factorial(n)