In the previous module we learned about various probability rules. In this module, we will start by covering the last of the probability rules permutations and combinations. I'll be honest, people usually either love or hate these topics. A lot of fun probability problems are based in these two rules, but they also can be tricky. Let's dive in. A permutation is an ordered arrangement of distinct objects. The number of ways of ordering the arrangement of r objects taken from a set of n objects is abbreviated as nPr. In permutations, the fact that we are ordering the items rather than taking them as an unordered group matters. The formula for nPr is n!/(n- r)!. Most scientific calculators have an nPr key. And you can also use Excel with the function; =Permut(n,r). For example, suppose with your newfound knowledge of probability, you've managed to win the lottery and are celebrating by hiring a private yacht to sail you and your closest friends around the Caribbean for a week. How many seven-day itineraries are possible? If you plan to visit one different island nation per day, and there are 28 island nations to choose from. Here we have 28 islands to choose from, so that is our n. We're going to visit 7 of them, so that is our r. And in an itinerary, the order that you visit the islands matters. So, permutations is appropriate. That leaves us with 28 P7, which is calculated 28!/(28-7)!. Alternatively, you could type in =PERMUT(28,7) in an empty cell in Excel. That comes out to 5,967,561,600, almost 6 billion. Permutations grow very quickly. Whichever of those itineraries you chose though, I'd be happy to go along. Now, what if you weren't interested in the order of the itinerary, but rather, just which seven islands you ended up visiting overall? Permutations would no longer be the tool to use. For that, we would need to use combinations. With combinations, we are just taking a group of items and not putting them in order. The abbreviation is nCr, and the formula is nCr equals n!/[r!(n-r)!]. Again, there's often a calculator function, or you can use =Combin(n,r) in Excel. So, with the island yachting adventure we would have 28 C7, which is 28!/[7!(28-7)!], or =Combin(28,7) in Excel. That value is 1,184,040. That is still a large number, but the values for combinations will be significantly smaller than permutations because we don't care about the order. With both permutations and combinations we are taking a subset of size r from the whole group n. The difference is that we use permutations when order matters and combinations when order does not matter. One trick to keep the two straight is to think Permutations = Places. Both start with the letter P, and when running a race, you care what place you finish in. Being first is different than being third, even though both end up on the medal stand. And then, Combinations = Committees, both start with C. Whether your chosen first or third to be on a committee makes no difference. You still need to do the same amount of work. Let's look at a few more examples. If you're hosting a dinner party and randomly choosing which wine to pair with each of the 5 courses you're serving from the 35 varieties in your wine cellar, would you use permutations or combinations? That would be permutations because whether a wine is paired with your salad course or your dessert course is different, the order matters. On the other hand, if you're hosting a cocktail party instead and just putting out five types of wine on the counter for guests to help themselves, then the order the wines are chosen by you doesn't matter anymore. And we would use combinations. What about if you've received a lot of 100 items from your supplier and are going to randomly select 5 of them for quality testing to determine if you will accept the lot? If you find more than one defect, you will reject the lot. Does the order you sample the items matter? No, it doesn't. Whether the defects are found toward the beginning or the end, you will reject the lot if there are two or more defects, so we would use combinations.