Sets and Events

Set – a collection of elements which hold certain values. Sets are denoted in UPPER CASE text.

Element – Elements are denoted in lower case txt. They make up sets.

Null Set – an empty set or null set. Denoted with a ‘Ø’ symbol.

Non-empty Sets – can be finite or infinite.

Part of a Set

If ‘x’ is an element of the set ‘A’, we notate it like this:

\[ x \in A \]

If set ‘A’ contains element ‘x’, we notate it like this:

\[ A \ni x \]

Element ‘x’ is not in set ‘A’.

\[ x \notin A \]

Set ‘A’ does not contain ‘x’.

\[ A \: \nexists \: x \]

To denote all elements in a set we use the symbol ‘‘.

‘∀ x in A’ means ‘all elements of A’ .

Adding a colon (:) means ‘such that’. This is useful when we want to make statements about a specific group of elements within a set.

Example: to select all even elements in an set:

∀ x in A : x is even

subset – A set that is fully contained in another set. Every element in A is also in B. This is written as:

\[ A \subseteq B \]

Note that every set A has two subsets: Itself (A), and the null set (Ø).

\[ A \subseteq A \]
\[ \varnothing \subseteq A \]

Ways Sets can Interact

Events can interact in three ways:

  1. Not Touch
    • These events can never happen simultaneously.
    • Event A occurring guarantees that event B is not occurring, and vice versa.
  2. Intersect
    • These events can occur at the same time.
  3. Overlap
    • One event can only occur if the other one does as well.

Intersection of Sets

The Intersection of two or more events expresses the set of outcomes that satisfy all the events simultaneously. We use intersections only when we want to denote instances where both events A and B happen simultaneously. Graphically, this is the area where the sets intersect. The intersection is expressed mathematically like this:

\[ A \cap B \]

When one event is inside another event like this:

We write the intersection equation like this:

\[ A \cap B = B \]

Union of Sets

The union of two or more events expresses the set of outcomes that satisfy at least one of the events. Graphically, this is the area that includes both sets. It is expressed mathematically like this:

\[ A \cup B \]

Three Types of Unions

Sets Do not Touch at All

\[ A \cap B = \varnothing \]
\[ A \cup B = A + B \]

Sets Intersect

\[ A \cup B = A + B – A \cap B \]

Sets Overlap

\[ A \cap B = B \]

Mutually Exclusive Sets

Mutually Exclusive Sets – Sets which are not allowed to have any overlapping elements.

Mutually Exclusive sets have the empty set as their intersection.

If the intersection of any number of sets is the empty set, then they must be mutually exclusive.

\[ A \cap B = \varnothing \]
\[ A \cup B = A + B \]

Complements of a Set

Sets have complements too.

Complement Set – all values that are part of the sample space, but not part of the set. Note that all complements are always mutually exclusive.

Independent and Dependent Events

Independent Events – Events whose theoretical probability remains unaffected by other events.

Dependent Events – Events whose probabilities vary as conditions change.

Conditional Probability of A Given B

The probability of getting A given that B has occurred is written like this:

\[ P(A | B) \]

Conditional Probability is used to distinguish dependent from independent events.

The Conditional Probability Formula

Conditional Probability – the likelihood of an event occurring, assuming a different one has already happened.

\[ P(A|B) = \frac{P(A \cap B)}{P(B)} \]

Independent Variables

Two events are independent if:

\[ P(A) = P(A|B) \]

If any two events are independent, then:

\[ P(A \cap B) = P(A) \times P(B) \]

The Law of Total Probability

\[ A = B_1 \cup B_2 \: \cup \: … \: B_n \]
\[ P(A) = P(A|B_1) \times P(B_1) + P(A|B_2) \times P(B_2) \: + … P(A|B_n) \times P(B_n) \]

The Additive Law

\[ P(A \cup B) = P(A) + P(B) – P(A \cap B) \]

The Multiplication Law

\[ P(A|B) \times P(B) = P(A \cap B) \]

Bayes’ Law

Bayes’ Law allows us to find a relationship between the different conditional probabilities of two events.

\[ P(A|B) = \frac{P(B|A) \times P(A)}{P(B)} \]

Bayesian Inference Cheat Sheet