liveBook · Manning

Combination

A combination is a selection of elements in which the order of selection does not matter.

How 3 Manning books explain it

Statistics Every Programmer Needs

A combination is a selection of items in which order does not matter.

How it is used
Uses order-independent selection to structure counting and probability calculations.
How deep it goes
Explains order, replacement conditions, formulas, Pascal’s triangle, and Python implementations through worked small examples.
Examples
Uses a basketball lineup, Pascal’s triangle, and Python calculations with n = 5 and r = 3.
What you can do after
Apply it via Python’s math module to count order-independent selections with or without replacement.

Read how Statistics Every Programmer Needs explains combination →

Fabulous Adventures in Data Structures and Algorithms

A combination is a subsequence or subset selected from a sequence without changing the original element order.

How it is used
Uses combinations to generate cases where sequence items are skipped and to select items from arbitrary lists through their indices.
How deep it goes
Develops mutable and recursive enumeration, counting identities, an iterative Choose implementation, and direct retrieval by position.
Examples
Works through ABCDE with k = 3, selecting foods by index, and advancing the four-index combination 1245 to 0345.
What you can do after
Build it from scratch: enumerate combinations, count them with Choose, or retrieve one directly by its position.

Read how Fabulous Adventures in Data Structures and Algorithms explains combination →

Statistics Slam Dunk

A combination is a selection of objects or values in which the order of the selected elements does not matter.

How it is used
Frames combinations as a classification step before counting possibilities or analyzing NBA scheduling data.
How deep it goes
Defines order-independent selection and contrasts it with permutations, but does not develop a combination-counting formula.
Examples
Uses a Warriors starting lineup, locker numbers, division standings, and NBA teams’ prior days off.
What you can do after
Evaluate whether a counting problem requires combinations or permutations before computing it in R.

Read how Statistics Slam Dunk explains combination →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.