2.0 Intro
A fundamental problem in combinatorics is determining the number of ways to choose k items from a set containing n distinct items. The method for counting depends on two crucial questions:
- Does the order of selection matter? (Is the selection ordered or unordered?)
- Can items be selected more than once? (Is the selection with replacement or without replacement?)
| Selection Type | Replacement? | Order Matters? | Formula |
|---|---|---|---|
| Tuple | Yes | Yes | |
| k-Permutation | No | Yes | |
| Combination / Set | No | No | |
| Multiset / Stars and Bars | Yes | No |
2.0.1 Ordered Selection with Replacement - Tuples
Derivation: This uses the basic multiplication principle of counting. We have independent choices to make, and each choice has possibilities.
- Total ways = (Choices for slot 1) (Choices for slot 2) (Choices for slot k)
- Total ways = ( times)
Formula: The number of ways is . We get an ordered list of length , often called a tuple.
- Possible 4-digit PIN codes using digits 0-9 (): .
- Possible outcomes when rolling a die 3 times (): . (e.g., (1, 6, 1) is different from (6, 1, 1)).
2.0.2 Ordered Selection without Replacement - k-Permutations
Think of filling ordered slots.
- For the first slot, we have choices.
- Since we cannot replace the chosen item, we only have choices remaining for the second slot.
- For the third slot, we have choices, and so on, until the -th slot, for which we have choices.
Derivation: Using the multiplication principle with decreasing choices:
- Total ways = (Choices for slot 1) (Choices for slot 2) (Choices for slot k)
- Total ways =
Formula: This quantity is often denoted as (falling factorial) or . It can also be expressed using factorials:
- Recall that .
Result Type: An ordered list of distinct items, often called a k-permutation of .
- Ways to award Gold, Silver, Bronze medals in a race with 8 competitors (): .
- Ways to arrange 3 distinct books from a collection of 5 on a shelf (): .
2.0.3 Unordered Selection without Replacement - Combinations / Sets
Intuition: How is this related to the ordered case without replacement (Case 2)? In Case 2, we counted sequences like (A, B, C) and (C, B, A) as distinct outcomes. However, if the order doesn’t matter, these sequences correspond to the same selection: the set . We need to figure out how many ordered sequences correspond to each unordered set.
Derivation:
- Start with the ordered count: ordered ways to select distinct items.
- Identify overcounting: There are ways to order distinct items (k choices for the first position, k-1 for the second, etc.).
- Correct for overcounting: Divide the ordered count by the overcounting factor
Formula: Number of unordered sets =
This is the binomial coefficient, read as “n choose k”:
Symmetry of Combinations
Note that .
Choosing items to include is the same as choosing items to exclude.
Result Type: An unordered set of distinct items, often called a combination.
Examples:
- Ways to choose 3 winners from 10 lottery tickets (order doesn’t matter) (): .
- Ways to form a 5-card poker hand from a 52-card deck (): .
4. Unordered Selection with Replacement - Multisets / Stars and Bars
Intuition: bins, representing the distinct types of items we can choose from. Choose a total of items.
Since order doesn’t matter and we can repeat types, this is like deciding how many times we choose type 1, how many times type 2, …, up to type , such that the total number of choices is .
Derivation (Stars and Bars technique):
- Represent Choices: Let “stars” represent the items we need to choose. Our goal is to divide these stars into groups, where each group corresponds to one of the types of items.
- Represent Dividers: To divide the stars into groups, we need “bars” (|). For example, if we have types and want to choose items, the sequence
**|*||**could represent choosing 2 items of type 1, 1 item of type 2, 0 items of type 3, and 2 items of type 4. - Combine Stars and Bars: Every possible selection corresponds uniquely to an arrangement of stars and bars in a sequence.
- Counting Arrangements: We have a total of positions in the sequence. We need to determine where the stars (or equivalently, the bars) go.
- Apply Combination Formula: This is now a combination problem (Case 3)! We need to choose positions for the stars out of the total positions. The number of ways to do this is . Alternatively, we could choose positions for the bars out of the total positions, which gives . These two binomial coefficients are equal.
Formula: We get an unordered collection where repetitions are allowed, often called a multiset.
Examples:
- Ways to choose 3 scoops of ice cream from 5 available flavours (): .
- Number of non-negative integer solutions to ( types/variables, total value/items): .
2.1 Grundbegriffe & Notationen
2.1 Diskreter Wahrscheinlichkeitsraum
Ein diskreter Wahrscheinlichkeitsraum ist bestimmt durch eine Ergebnismenge von Elementarereignissen.
Jedem Elementarereignis ist eine (Elementar-)Wahrscheinlichkeit zugeordnet, wobei wir fordern, dass und
kann endlich oder unendlich (sogar überabzählbar unendlich) sein.
Ereignis
Eine Menge heisst Ereignis. Die Wahrscheinlichkeit eines Ereignisses ist definiert durch
Komplementärereignis
Ist ein Ereignis, so bezeichnen wir mit das Komplementärereignis.
2.2 Funamental Properties
- ,
- Wenn so folgt
Für paarweise disjunkte Ereignisse gilt der folgende Satz.
2.3 Additionssatz
Wenn für die Ereignisse paarweise disjunkt sind, so gilt
Im allgemeinen Fall können wir mit der Siebformel arbeiten.
2.5 Siebformel
Für Ereignisse () gilt
Der Union-Bound (Boolsche Ungleichung) wird öfters genutzt, da er einfacher anzuwenden ist. Er folgt direkt aus der Siebformel.
Boolsche Ungleichung
Für Ereignisse gilt
Beweis:
- Sei
- Dann gilt (weil )
- Alle sind disjunkt und
- Per Additionssatz (weil alle disjunkt) gilt
Laplace Raum
In einem Laplace-Raum sind alle Elementarereignisse gleich wahrscheinlich. Deswegen gilt .
wird dann uniform verteilt genannt.
Man sagt auch, dass für alle die größtmögliche Entropie hat.
2.2 Bedingte Wahrscheinlichkeiten
Durch das Bekanntwerden zusätzlicher Information verändern sich Wahrscheinlichkeiten.
Wir notieren die Wahrscheinlichkeit von , wenn wir wissen, dass eingetreten ist.
Es gilt dann:
- und
- da ” ist eingetreten” keine extra Information liefert.
- Wenn eingetreten ist, kann nur noch eintreten. Daher ist proportional zu
2.8 Bedingte Wahrscheinlichkeit
und seien Ereignisse mit . Die bedingte Wahrscheinlichkeit von gegeben ist definiert durch
Die bedingten Wahrscheinlichkeiten bilden einen neuen Wahrscheinlichkeitsraum. Es gilt .
Damit gelten alle Rechenregeln auch für bedingte Wahrscheinlichkeiten, z.B.
Die Wahrscheinlichkeiten für alle Ereignisse (außerhalb ) werden auf gesetzt. Der Rest wird dann skaliert, damit die Summe wieder ergibt (mit , welcher in der Formel auftaucht).

2.10 Multiplikationssatz
Seien die Ereignisse gegeben. Falls ist, gilt
Beweis
- Da sind alle W’keiten wohldefiniert
- Wir schreiben um zu
- man sieht leicht dass sich hier kreuzweise alles bis auf herauskürzt.
2.13 Satz von der totalen W'keit
Die Ereignisse seien paarweise disjunkt und es gelte . Dann folgt
Proof
- da ist.
- Da alle disjunkt sind, sind auch und disjunkt.
- Dann gilt
- Wir wenden den Additionssatz an
2.15 Satz von Bayes
Die Ereignisse seien paarweise disjunkt. Ferner sei ein Ereignis .
Dann gilt für ein beliebiges :
Wir können mit dem Satz von Bayes gewissermaßen die Reihenfolge der Bedingung umdrehen.
2.3 Unabhängigkeit
2.18 Unabhängigkeit (2 Ereignisse)
Die Ereignisse und heißen unabhängig, wenn gilt
Wenn so können wir Umformen zu .
Intuitiv, wenn wir wissen, dass eingetreten ist so ändert sich nichts an der Wahrscheinlichkeit mit der wir erwarten.
Für mehr als 2 Ereignisse wird die Definition etwas komplexer:
- Beispiel: Wir werfen zwei ideale Münzen und : , .
- $A$ und $B$ voneinander unabhängig, denn $\Pr[A \cap B] = 1/4 = \Pr[A]\Pr[B].$
- $B$ und $C$ voneinander unabhängig
- genauso $A$ und $C$
- Allerdings sind $A$, $B$, und $C$ *zusammen nicht voneinander unabhängig*, denn falls je zwei Ereignisse eintreten, *so tritt auf keinen Fall das Dritte ein*, also insbesondere $\Pr[A \cap B \cap C] = 0 \neq 1/8 = \Pr[A]\Pr[B]\Pr[C]$.
- Die *paarweise Unabhängigkeit der Ereignisse* genügt nicht -> $\Pr[A_1 \cap \cdots \cap A_n] = \Pr[A_1] \cdots \Pr[A_n]$ muss auch gelten
2. Beispiel: Wir wählen eine zufällige Zahl zwischen 1 und 8 und betrachten die Ereignisse und . Außerdem sei .
- Aber $\Pr[A \cap B] = 1/8 \neq \Pr[A]\Pr[B]$, das heißt, $A$ und $B$ sind nicht unabhängig.
Wir brauchen also beide Bedingungen gleichzeitig.
Definition 2.22 (Unabhängigkeit von Ereignissen)
Die Ereignisse heissen unabhängig, wenn für alle Teilmengen mit gilt, dass
Eine unendliche Familie von Ereignissen mit heißt unabhängig, wenn dies für jede endliche Teilmenge erfüllt ist.
Lemma 2.23
Die Ereignisse sind genau dann unabhängig, wenn für alle gilt, dass
wobei und .
Beobachtung: Aus Lemma 2.23 folgt, dass für und unabhängig auch , oder , und , unabhängig sind.
Lemma 2.24
Seien , und unabhängige Ereignisse. Dann sind auch und bzw. und unabhängig.
Beweis: Die Unabhängigkeit von und folgt aus . Mit der Inklusion-Exklusion-Formel gilt:
und daraus folgt die Unabhängigkeit von und .
2.4 Zufallsvariablen
Definition 2.25 (Zufallsvariable)
Eine Zufallsvariable ist ein Abbildung , wobei die Ergebnismenge eines Wahrscheinlichkeitsraumes ist.
Wertebereich einer Zufallsvariable
Bei diskreten Wahrscheinlichkeitsräumen ist der Wertebereich einer Zufallsvariablen
Sei bzw.
Für ein beliebiges sei das Ereignis (wir drehen hier quasi um).
Beachte, schreibt man häufig als .
Dichefunktion
Die Funktion
nennt man Dichte(funktion) von .
Verteilungsfunktion
Die Funktion
heisst Verteilung(sfunktion) von .
Beachte, Dichte/Verteilungsfunktion beschreiben eine Zufallsvariable eindeutig.

2.4.1 Erwartungswert
Definition 2.27 (Erwartungswert)
Zu einer Zufallsvariablen definieren wir den Erwartungswert durch
Beachte, bei unendlichen Wahrscheinlichkeitsräumen kann diese Serie divergieren. Dann sagen wir, dass der Erwartungswert undefiniert ist.
Beispiel: Der Erwartungswert für die Anzahl “Kopf” bei dreimaligen Werfen einer idealen Münze ist
Lemma 2.29
Ist eine Zufallsvariable, so gilt:
Beweis:
Wir gewichten die Wahrscheinlichkeit mit dem Wert.
Satz 2.30
Sei eine Zufallsvariable mit . Dann gilt
Beweis: Nach Definition gilt
Bedinge Zufallsvariablen
Sei Zufallsvariable und , . Es gilt dann:
: Wahrscheinlichkeiten, mit denen die Zufallsvariable bestimmte Werte annimmt bezüglich der auf bedingten Wahrscheinlichkeiten berechnen.
Satz 2.32
Sei eine Zufallsvariable. Für paarweise disjunkte Ereignisse mit und gilt
Der Satz gilt auch für unendlich viele Ereignisse.
Beweis. Mit Hilfe des Satzes von der totalen Wahrscheinlichkeit rechnen wir nach, dass
Seien Zufallsvariablen. Für erhalten wir daher reelle Zahlen .
Sei eine Funktion ( reellen Zahlen wieder eine einzige reelle Zahl) dann ist wiederum eine Zufallsvariable: .
Für beliebige Funktionen und insbesondere auch für affin lineare Funktionen:
Wir schreiben dann .
Beispiel: Recursive Definition
- Let = number of flips until first heads with . Define = “first flip is heads.”
- Apply total expectation conditioned on :
- (done immediately)
- (memoryless: after tails, the process restarts identically, plus the one spent flip)
- Plugging into and solving yields .
This avoids computing directly. Technique generalizes to any renewal-type problem where failure resets the process.
Satz 2.33 (Linearität des Erwartungswerts)
Für Zufallsvariablen und mit gilt
Der Erwartungswert einer Summe ist die Summe der Erwartungswerte.
Beweis Lemma 2.29 sag . Dann gilt:
Hier haben wir außerdem benutzt, dass (für ).
Beobachtung 2.35 (Indikatorvariable)
Für ein Ereignis ist die zugehörige Indikatorvariable definiert durch:
Für den Erwartungswert von gilt:
2.4.2 Varianz
Definition 2.39 (Varianz)
Für eine Zufallsvariable mit definieren wir die Varianz durch
Die Grösse heisst Standardabweichung von .
Satz 2.40
Für eine beliebige Zufallsvariable gilt
Beweis: Sei .
- Nach Definition gilt
- Aus der Linearität des Erwartungswertes (Satz 2.33) folgt
- Damit erhalten wir
Satz 2.41
Für eine beliebige Zufallsvariable und gilt
Beweis:
- Mit Hilfe von erhalten wir
Definition 2.42 (Momente)
Für eine Zufallsvariable nennen wir das -te Moment und das -te zentrale Moment.
Der Erwartungswert ist also das erste Moment.