Permutations and Combinations; Logarithms

Permutations and Combinations; Logarithms

CHAPTER 12 Permutations and Combinations; Logarithms PERMUTATIONS Consider selecting k objects from a set of n objects and arranging them in order; w...

48KB Sizes 0 Downloads 59 Views

CHAPTER 12

Permutations and Combinations; Logarithms PERMUTATIONS Consider selecting k objects from a set of n objects and arranging them in order; we can select all the objects in the population (k ¼ n) or a subset of them. Such an arrangement is a permutation of n objects, taken k at a time. For example, a license plate with 7 characters (numbers, letters) is a permutation of length 7 out of 36 characters (0, 1, ..., 9, A, B, … Z). The order of the objects is important. License plate 2NNP386 is not the same as license plate 2PNN836, even though they use the same characters. The number of possible permutations depends on whether the same selection can appear more than once (“with replacement” into the selection pool), or is excluded from future selection (“without replacement,” or withdrawn from the selection pool). For the license plate, both letters and numbers can be selected with repetition. The number of possible permutations of n objects, taken k at a time, is nk. Proof: The first position can be filled in n ways. The second position can be filled in n ways, and because these choices are independent, the first two positions can be filled in n  n ¼ n2 ways. Similarly, the first three positions can be filled in n3 ways, and so on, so that the number of possible license plate permutations is 367 ¼ 78,364,164,096. If the objects are chosen without repetition, then the number of permutations is given n! by : ðn  kÞ! Proof: The first position can be chosen in n ways, leaving n – 1 objects. The second position can therefore be filled in (n – 1) ways, so that the first two positions can be filled in n(n – 1) ways. The third position can be filled in (n – 2) ways, so that the first 3 positions can be filled in n(n – 1)(n – 2) ways. Therefore the first k positions can be filled in n(n – 1)(n–2)…(n – k + 1) ways. This can be rewritten as ½ðn  kÞðn  k  1Þ:::::1 ½ðn  kÞðn  k  1Þ:::::1 ½nðn  1Þðn  2Þ:…ðn  k + 1Þ  ½ðn  kÞðn  k  1Þ:::::1 n! ¼ ¼ ½ðn  kÞðn  k  1Þ:::::1 ðn  kÞ!

½nðn  1Þðn  2Þ:…ðn  k + 1Þ 

½ðn! ¼ nðn  1Þðn  2Þðn  3Þ……ð1Þ:5! ¼ 5  4  3  2  1 ¼ 120Þ: If all the objects are chosen, then k ¼ n, and the formula reduces to n! because by definition 0! ¼ 1. Basic Biostatistics for Medical and Biomedical Practitioners https://doi.org/10.1016/B978-0-12-817084-7.00012-7

© 2019 Elsevier Inc. All rights reserved.

189

190

Basic Biostatistics for Medical and Biomedical Practitioners

COMBINATIONS Sometimes the order of the arrangements has no meaning, and we are interested only in how many of each type of object we have. Such an unordered selection is called a combination of n objects taken k at a time. The number of combinations of k items chosen from a total of n items is less than the number of permutations. Because any k items can be arranged in k! ways, dividing the number of permutations of n objects taken k at a time by the number of permutations of k objects, which is k!, gives   n! n! n divided by k! ¼ . This is denoted by or nCk. k ðn  kÞ! k!ðn  kÞ! These problems and many variations on them are described well by Ash (1993) and Ross (1984).     n n Note that ¼ , because both sides of the equation can be written k nk n! . k!ðn  kÞ! If we choose a committee of 4 people out of 12 applicants, we can do this in 12! 12  11  10  9  8  7  6  5  4  3  2  1 12  11  10  9 ¼ ¼ ¼ 495 4!ð12  4Þ! ð4  3  2  1Þð8  7  6  5  4  3  2  1Þ 4321 ways. Therefore there are also 495 ways in which the other 8 applicants can be not chosen. These calculations can be done online at http://stattrek.com/onlinecalculator/combinations-permutations.aspx, http://www.mathsisfun.com/ combinatorics/combinations-permutations-calculator.html, http://www.calctool.org/ CALC/math/probability/combinations, http://www.statisticshowto.com/calculators/ permutation-calculator-and-combination-calculator/, https://www.calculatorsoup. com/calculators/discretemathematics/permutations.php, and http://www. calculatorsoup.com/calculators/discretemathematics/combinations.php. In some permutation problems there may be sets of identical objects; for example, A, A, A, B, B, C. To know how many permutations there are, calculate N! , n1 !n2 !:…nk ! where N is the total, and n1, n2,..., nk are the numbers of identical objects ni in each set over k sets. 6! For the alphabetic problem before the number of permutations is ¼ 60 3!2!1! (Example 12.1). Example 12.1 How many permutations can be made from the word Tennessee?, n1 ¼ 1, n2–4, n3 ¼ 2, 9! n4–2, and N ¼ 9, so that the number of permutations is ¼ 7560. 1!4!2!2!

Permutations and Combinations; Logarithms

To see the effect of this calculation, consider two five member sets: a,e,i,o,u and b,e,e, b,e. The first of these, with no duplications, has 5! ¼ 120 permutations. The second has fewer permutations because of the duplications, and there are 5!/(2!3!) ¼ 10 permutations.

LOGARITHMS Exponents 10  10  10 can be written as 103, where the superscript 3 shows the number of times 10 is multiplied by itself. The superscript is called the exponent.

Logarithms A logarithm answers the question: 10? ¼ 1000. Because 103 ¼ 1000, we can write log101000 ¼ 3. Ten is the base. We could also ask: 2? ¼ 8. Because 2  2  2 ¼ 8, we can write log28 ¼ 3. The subscript 2 is the base, 8 is the answer, and 3 is the number of times the base must be multiplied by itself to get the answer. Often the base is the value of e ¼ 2.71828. This is written as logeX or lognX (for natural logarithm).

Antilogarithms Obtain the antilogarithm of the number from tables or calculators. On the calculators, the antilogarithm symbol is ex for logarithms to base e and 10x for logarithms to base 10. Taking antilogarithms is often called exponiation. These conversions may be done online at https://www.rapidtables.com/calc/math/ Log_Calculator.html, http://www.1728.org/logrithm.htm, https://www.calculator. net/log-calculator.html, https://ncalculators.com/number-conversion/log-logarithmcalculator.htm, and https://ncalculators.com/number-conversion/anti-log-logarithmcalculator.htm. Almost all hand calculators will calculate logarithms and antilogarithms.

WORKED PROBLEMS 1. The dean wishes to select a committee of 5 from a senior faculty of 30 members. In how many ways can this be done? Answer: Because the order of selection is not important, we need the combinations. 30! The answer is ¼ 142,506. 5!25! 2. 10 of the 30 senior faculty are women. The dean wants to select 3 women and two men. How many combinations are there?

191

192

Basic Biostatistics for Medical and Biomedical Practitioners

10! ¼ 120 ways. 3!7! 20! ¼ 190 ways. 2 men can be selected in 2!18! These are independent combinations, so that the final set of 5 people can be selected in 120  190 ¼ 22,800 ways. 3. Of the 10 women, 6 are clinicians and 4 are from basic sciences. Of the 20 men, 15 are clinicians and 5 from basic sciences. How many combinations of 2 female clinicians, 1 female basic scientist, 1 male clinician, and 1 male basic scientist are there? This is equivalent to selecting 2 female clinicians out of 6, 1 female basic scientist out of 4, 1 male clinician out of 15, and 1 male basic scientist out of 5. The numbers of combinations are, respectively: 6! 4! 15! 5! ¼ 15, ¼ 4, ¼ 15, and ¼ 5. As these are independent, the total 2!4! 1!3! 1!4! 1!4! number of combinations is 15  4  15  5 ¼ 4500. 3 women can be selected in

4. A poker hand consists of any 5 cards from a deck of 52 cards. What are the chances of having the ace of spades? 52! The number of combinations of 5 cards is ¼ 2,598, 960: 5!  47! The number of combinations of any 4 cards that do not include the ace of spades is 51! ¼ 249, 900. Therefore, the number of 5 card hands that include the ace of 4!  47! 249,900 ¼ 0:096, or 1/10.4. spades is determined from 2,598,960 This can be calculated more simply as 5 chances of drawing an ace of spades out of 5 52 cards ¼ ¼ 0:096: 52 Problem 12.1. What are the chances of a flush (all the 5 cards of the same suit)?

Problem 12.2. What are the chances of having a straight, that is, a numerical sequence, no matter what the suits are?

Problem 12.3. What are the chances of getting a straight flush, that is, a numerical sequence of the same suit?

REFERENCES Ash, C., 1993. The Probability Tutoring Book. An Intuitive Course for Engineers and Scientists. IEEE Press, New York, p. 470. Ross, S., 1984. A First Course in Probability. Macmillan Publishing Company, New York.