Statistics for
Data Science 1
Counting with order (permutations) and without order (combinations): the formulas, repeated letters, circular seating, solving for n and r, and how to choose the right one.
Chapters
- 01Permutations of Distinct ObjectsLecture 5.3
- 02Objects That Are Not DistinctLecture 5.4
- 03Circular PermutationsLecture 5.4
- 04Solving for n and rLecture 5.4
- 05CombinationsLecture 5.5
- 06Permutation or Combination?Lecture 5.6
- 07Week 6 Summary SheetAll lectures
Based on lectures by Usha Mohan, IIT Madras
Permutations of Distinct Objects
Ordered arrangements: the nPr formula, its special cases, repetition, and three lecture examples.
A permutation is an arrangement where order matters. AB and BA are two different permutations.
A permutation is an ordered arrangement of all or some of objects.
1.1Listing the arrangements
| Objects | Taking | Arrangements | Count |
|---|---|---|---|
| A, B, C | all 3 at a time | ABC, ACB, BAC, BCA, CAB, CBA | 6 |
| A, B, C | 2 at a time | AB, AC, BA, BC, CA, CB | 6 |
| A, B, C, D | all 4 at a time | ABCD, ABDC, ..., DCBA | 24 |
| A, B, C, D | 2 at a time | AB, AC, AD, BA, BC, BD, CA, CB, CD, DA, DB, DC | 12 |
Each box is a place and the number inside is how many objects can still go there: n choices for the first place, one fewer for the next, down to for the r-th place. This is Week 5's multiplication rule.
1.2The permutation formula (repetition not allowed)
The number of permutations of objects chosen from distinct objects is , written :
| Special case | Value | Meaning |
|---|---|---|
| only one ordered arrangement of 0 objects | ||
| n ways of choosing one object from n | ||
| n distinct objects can be arranged in n! ways |
| n | r | Calculation | Result |
|---|---|---|---|
| 3 | 3 | 6 | |
| 3 | 2 | 6 | |
| 4 | 4 | 24 | |
| 4 | 2 | 12 |
1.3Permutations when repetition is allowed
Now an object can be used again, for example AA, AB, AC, BA, ... from A, B, C. Each of the r places has n choices, so the count is (r times):
| Taking from A, B, C | n | r | |
|---|---|---|---|
| all 3 at a time (AAA, AAB, ..., CCC) | 3 | 3 | 27 |
| 2 at a time (AA, AB, ..., CC) | 3 | 2 | 9 |
1.4Lecture examples
Example 1: chairman and vice chairman
From a committee of 8 persons, in how many ways can we choose a chairman and a vice chairman, if one person cannot hold more than one position?
- Order matters (chairman is not vice chairman) and there is no repetition.
- Chairman: 8 ways. Vice chairman: 7 ways.
- Total = 8 × 7 = 56 = .
- Answer: 56.
Example 2: 4-digit numbers from 1, 2, 3, 4, 5
Find the number of 4-digit numbers that can be formed using the digits 1, 2, 3, 4, 5 if no digit is repeated. How many of these are even?
- Four places from five digits: 5 × 4 × 3 × 2 = 120 = .
- For an even number the last digit must be 2 or 4: 2 ways. Fill the restricted place first.
- The other three places come from the remaining 4 digits: 4 × 3 × 2 = 24.
- Even numbers = 2 × 24 = 48.
- Answer: 120 numbers; 48 of them are even.
Example 3: six people in a cinema row
Six people sit in a row of ten seats. Find the number of ways if (i) they can sit anywhere, (ii) all the empty seats are next to each other.
- (i) Choose and order 6 seats from 10: (1,51,200 in Indian notation).
- (ii) The 4 empty seats must stay together, so treat them as one block. Now there are 7 units: 6 people and 1 block.
- Arrange the 6 people into 7 positions in order: .
- Answer: (i) 151,200 (ii) 5,040.
1.5Going deeper
- The block trick. "Must be together" conditions are handled by gluing the group into one unit, counting, and (if the people inside can swap) multiplying by their internal arrangements. Empty seats are identical, so they have no internal order here.
- Restricted places first. In Example 2 the units digit is fixed first (2 ways); filling the free places first and then hoping for an even last digit leads to case work.
- only makes sense for (extra remark): you cannot fill more places than you have objects without repetition.
- Decide first: is repetition allowed? Then or .
- Write as the product of the top r numbers instead of computing big factorials.
- Using when repetition is not allowed.
- Forgetting to fill a restricted place first.
- Writing as 10!/6! instead of 10!/4!.
Objects That Are Not Distinct
Repeated letters: divide by the factorial of each repeat count.
If some objects are identical, swapping them gives nothing new. So we divide the full count by the arrangements of the identical ones.
2.1Rearranging the letters of DATA
There are 4 letters but only three distinct ones: D, A, T (A appears twice). The 12 arrangements are:
| ADTA | ADAT | ATDA | ATAD |
| AADT | AATD | DATA | DAAT |
| DTAA | TADA | TAAD | TDAA |
Idea. Treat the two A's as different, and . Then there would be 4! arrangements. But and can be swapped among themselves in 2! ways and these look the same. So the number of ways is
The number of permutations of objects, when of them are of one kind and the rest are distinct, is . In general, if are of one kind, of a second kind, ..., and of a k-th kind:
Example 4: the letters of STATISTICS
In how many ways can the letters of the word "STATISTICS" be rearranged?
- There are 10 letters. The distinct letters are S, T, A, I, C.
- S appears 3 times, T 3 times, A once, I twice and C once: , .
- Ways
- Answer: 50,400.
2.2Going deeper
- The 1! factors change nothing. Letters that appear once contribute , so they can be left out of the denominator.
- Check: the counts add up to n. 3 + 3 + 1 + 2 + 1 = 10 letters in STATISTICS. If they do not, a letter was missed.
- A small check (extra remark). LEVEL has L twice and E twice: ; listing all orders by computer also gives 30, and DATA gives exactly the 12 words above.
- Make a tally of each letter before writing the formula.
- Simplify before multiplying: cancel parts of n! against the denominator.
- Dividing by the number of repeated letters instead of its factorial.
- Counting a letter twice or missing one.
Circular Permutations
Round-table seating: (n − 1)!, and (n − 1)!/2 when mirror images are the same.
In a row, ABCD and BCDA are different. Around a round table, if everyone just shifts one seat, the arrangement is the same: nobody has a new neighbour. So we fix one person and arrange the rest.
Example: in how many ways can four people sit at a round table? We consider two cases: clockwise and anticlockwise different, or the same.
Read each circle clockwise from the top. In a row these four are different arrangements, but around a table each person has the same neighbours in the same order, so they count as one arrangement. Each seating appears n times among the n! row orders, so the count is .
3.1Clockwise and anticlockwise are different
Fix one person; arrange the other :
3.2Clockwise and anticlockwise are the same
A seating and its mirror image are counted as one, so divide by 2:
Example 5: four people at a round table
In how many ways can four people sit at a round table?
- Clockwise and anticlockwise different: .
- Clockwise and anticlockwise the same: .
- Answer: 6 (different), 3 (the same).
3.3Going deeper
- Checked by listing (extra remark). Grouping all orders of n people into seatings by computer gives 2, 6, 24, 120 for n = 3 to 6 when direction matters, and 1, 3, 12, 60 when it does not: exactly and .
- When to divide by 2. Divide only when a seating and its mirror image really are the same thing: beads on a necklace or flowers on a garland (you can flip them over). People at a table usually are not: clockwise neighbours differ from anticlockwise ones.
- Small n (extra remark). needs . For 2 people it gives 0.5, but there is clearly 1 seating: with two people a seating is its own mirror image, so nothing is double counted.
- Round table: fix one person first, then arrange the others in a row.
- Read the question for "clockwise and anticlockwise are the same" (necklace, garland).
- Using n! for a round table.
- Dividing by 2 for people at a table when the question does not say so.
Solving for n and r
Three equations solved with the permutation formula, each checked.
Write each permutation as a factorial fraction and cancel the common factorial. You get an ordinary equation in n or r. Reject any answer that does not make sense (negative, or r bigger than n).
Example 6: find n if
Find the value of n if .
- Cancel and write : this gives .
- So , that is : or .
- is rejected.
- Answer: n = 7.
Example 7: find n from a ratio
Find n if .
- Cancel: and , so .
- , so .
- Answer: n = 10.
Example 8: find r
Find r if .
- Write and cancel: .
- So , that is : or .
- Since , reject .
- Answer: r = 3.
4.1Going deeper
- Always check. Put the answer back into the original equation, as above; it catches algebra slips.
- Why reject. n counts objects, so it is a whole number at least r; r is at most n. A negative root or r = 10 with n = 5 has no meaning.
- The cancelling step is Week 5's trick: expand the bigger factorial down to the smaller one.
- Turn every into before cancelling.
- Expand the larger factorial only down to the smaller.
- Keeping the rejected root.
- Reading as .
Combinations
Selections without order: nCr, its identities and Pascal’s rule, and four lecture examples.
A combination is a selection where order does not matter. Choosing students A and B is the same as choosing B and A.
5.1From permutations to combinations
How many ways can we select two students from three (A, B, C)? We can choose AB, AC or BC: only 3. Each selection is a combination of 3 different objects taken 2 at a time. The concern is only which 2 are chosen, not the order.
Number of combinations × 2! = number of permutations. In general each combination of r objects gives r! arrangements.
5.2Notation and formula
The number of combinations of objects from distinct objects is written (also the binomial coefficient ):
5.3Useful results
| Result | In words |
|---|---|
| selecting r objects is the same as rejecting the other n − r | |
| and , for all n | choose everything or nothing: one way |
| , for | pick one special object: either it is in (choose r − 1 more) or it is out (choose r) |
The triangle lists row by row (row n, position r from 0). For example .
5.4Lecture examples
Example 9: choosing questions in an exam
A question paper has 12 questions in two parts: Part I has 7 questions and Part II has 5. A student must attempt 8 questions, selecting at least 3 from each part. In how many ways can the student select the questions?
- Possible splits (Part I, Part II) with 8 in total and at least 3 from each part: (3, 5), (4, 4), (5, 3).
- (3, 5): .
- (4, 4): .
- (5, 3): .
- The cases cannot happen together, so add: 35 + 175 + 210 = 420.
- Answer: 420.
Choose 4 cards from a deck of 52 cards (4 suits with 13 cards each; 2 colours with 26 cards each).
Example 10: choosing four cards
Find (1) the total number of ways to choose four cards, (2) the number of ways when all four are of the same suit, (3) when all four are of the same colour.
- (1)
- (2) Choose the suit ( ways), then 4 cards of it (): 4 × 715 = 2,860.
- (3) Choose the colour ( ways), then 4 cards of it (): 2 × 14,950 = 29,900.
- Answer: (1) 270,725 (2) 2,860 (3) 29,900.
Example 11: choosing a cricket team
Select a team of eleven from 17 players, of whom only 5 can bowl. The team must include exactly 4 bowlers. In how many ways can the selection be done?
- Choose the 4 bowlers from the 5 bowlers: .
- The other 7 players come from the 12 non-bowlers: .
- Both choices are made together, so multiply: 5 × 792 = 3,960.
- Answer: 3,960.
Example 12: drawing lines in a circle
Given n points on a circle, how many lines can be drawn connecting them?
- n = 2 points: 1 line (AB). n = 3 points: 3 lines (AB, AC, BC).
- A line is fixed by choosing 2 of the n points, and order does not matter, so the number of lines is
- Answer: .
5.5Going deeper
- Cases add, choices inside a case multiply. Example 9 uses both rules of Week 5: "and" inside a split, "or" across splits.
- Use symmetry to save work. : compute with the smaller of r and n − r.
- Week 4 again (extra remark). The number of pairs among N items, ½ × N × (N − 1) from CT Week 4, is exactly .
- All selections (extra remark). : every object is either in or out. For n = 5 that is 32.
- For "at least / exactly" questions, list the cases first, then count each.
- Compute as the top r factors divided by r!.
- Adding inside a case or multiplying across cases.
- Using for a selection.
- Forgetting the "same suit" choice of the suit (the factor 4).
Permutation or Combination?
One question decides it: does order matter? Three lecture examples on the same pools.
Ask one question: does order matter? If yes, use a permutation. If no, use a combination.
| Order matters → permutation | Order does not matter → combination |
|---|---|
| Gold, silver, bronze medals | Top 3 who advance |
| Captain and vice captain | Two leaders |
| Directed line segment: AB ≠ BA | Undirected line segment AB |
Example 13: finishing a race
Eight athletes run a 100 m race in a competition with several rounds. (1) In how many ways can the gold, silver and bronze medals be awarded? (2) In how many ways can the top three athletes be chosen to proceed to the next round?
- (1) Order is important, so use a permutation: .
- (2) Order is not important, so use a combination: .
- Answer: (1) 336 (2) 56.
Example 14: selecting a team
A class has forty students. (1) In how many ways can we choose two leaders? (2) In how many ways can we choose a captain and a vice captain?
- (1) Order does not matter: .
- (2) Order matters (the captain is different from the vice captain): .
- Answer: (1) 780 (2) 1,560.
Example 15: drawing lines in a circle, with direction
Given n points on a circle, how many lines can be drawn?
- If the segment has a direction, AB is different from BA, so order is important: ways.
- If it has no direction, AB is the same as BA: ways.
- Answer: (directed), (undirected).
Look at Example 14: (1,560 = 780 × 2). The permutation count is always the combination count times . Example 13: 336 = 56 × 3!.
6.1Going deeper
- Same pool, different question. 8 athletes give 336 medal orders but only 56 groups of three: every group can be ordered in 3! = 6 ways.
- Mixed questions (extra remark). "Choose a team of 3 and then a captain from it" can be done as : a selection followed by an ordered choice.
- Words that signal order: first/second, ranks, positions, titles, passwords, arrangements. Words that signal no order: group, team, committee, selection, hand of cards.
- Ask: if I swap two chosen items, do I get a different answer? Yes: order matters.
- Check with .
- Using a permutation for a committee.
- Using a combination for posts with different titles.
Week 6 Summary Sheet
Everything in Week 6 on one sheet.
Lectures 5.3 to 5.6 on one sheet, for a last-minute revision.
All formulas in one table
| Situation | Formula | Example value |
|---|---|---|
| Permutation, distinct, no repetition | ||
| Arrange all n | 4! = 24 | |
| Repetition allowed | 3² = 9, 3³ = 27 | |
| Some objects identical | STATISTICS: 50,400 | |
| Circular, direction matters | 4 people: 6 | |
| Circular, direction ignored | 4 people: 3 | |
| Combination | ||
| Relation | ||
| Symmetry, extremes | ; | |
| Pascal rule |
Formula sheet at a glance
Formulas
Use whenOrder matters: arrangements, ranks, posts, codes.
- Check whether repetition is allowed.
- No repetition: multiply the top r numbers from n.
- Repetition: multiplied r times.
Use whenArranging letters of a word with repeated letters.
- Tally each letter.
- n! on top, factorial of each tally below.
- Cancel and multiply.
Use whenPeople around a table; beads on a necklace.
- Fix one person.
- Arrange the remaining n − 1 in a row.
- Divide by 2 only if a seating and its mirror image are the same.
Use whenOrder does not matter: groups, teams, committees, hands of cards.
- Use the smaller of r and n − r.
- Top r numbers from n, divided by r!.
- For conditions, split into cases: multiply inside, add across.
Use whenAn equation involves nPr or nCr.
- Write every term as a factorial fraction.
- Expand the bigger factorial and cancel.
- Solve; reject negative n and r > n; check.
Values worked in the lectures
| Question | Answer |
|---|---|
| 4-digit numbers from 1–5 (even) | 120 (48) |
| 6 people, 10 seats: anywhere / empty seats together | 151,200 / 5,040 |
| DATA / STATISTICS | 12 / 50,400 |
| 4 people at a round table: direction matters / ignored | 6 / 3 |
| nP4 = 20 nP2; ratio 5/3; 5Pr = 2 × 6P(r−1) | n = 7; n = 10; r = 3 |
| Exam question selection | 420 |
| 4 cards from 52: any / same suit / same colour | 270,725 / 2,860 / 29,900 |
| Cricket team with exactly 4 bowlers | 3,960 |
| 8 athletes: medals / top three | 336 / 56 |
| 40 students: two leaders / captain and vice captain | 780 / 1,560 |
How to decide
- Does order matter? Yes: permutation. No: combination.
- Identical objects: divide by for each repeated kind.
- Round table: fix one person, .
- "At least" / "exactly": split into cases; multiply inside a case, add across cases.
- The title says Week 6; the lectures are numbered 5.3 to 5.6, continuing Week 5's lectures 5.1 and 5.2.
- The printed results "2, 70, 725" and "2, 99, 00" are 270,725 and 29,900.
- The round-table example gives no numbers on the slides; 6 and 3 come from its formulas.
- The source's extra practice questions are not reproduced, as the Statistics 1 notes carry worked examples only.
nPr = n!/(n − r)!
Repetition: n^r
DATA 12, STATISTICS 50,400
Mirror same: (n − 1)!/2
4 people: 6 or 3
Reject negative n, r > n
n = 7, n = 10, r = 3
Symmetry and Pascal
Cases: multiply, then add
Medals 336, top three 56
nPr = nCr × r!