A Noob’s perspective — Learning Data Science, ML and AI from scratch. Pt 2
Statistics fundamentals
Before even getting into statistics and probability, i’ll make some refresher notes of different essential topics like, set theory and calculus
Set theory
Definition
- a set is a collection or group of items. those items are usually called elements
Notation
- Upper case letters usually for sets, A, B, C, …
- Lower case letters for elements a, b, c, …
- ∈ to denote membership and ∉ to denote the opposite
- U is the universal set
- ∅ is a null set
- Some examples
- A = {1,2,3, …, 10}, 2 ∈ A; 33 ∉ A
- B = {x| 0 <= x <= 1} “|” means such that so b is the set that contains all the numbers greater or equal to 0 and less or equal to 1.
more definitions
- If every element of A is contained within B, then A is a subset of B, it’s denoted as A ⊆ B
- A is equal to B if and only if A ⊆ B and B ⊆ A
Properties
- ∅ ⊆ of any set, the null set is a subset of any set
- Any set is ⊆ U, any set is a subset of the universal set
- A ⊆ A, any set is a subset of itself
- If A ⊆ B and B ⊆ C then A is also ⊆ of C
Even more definitions
- The complement of A or A is = {z| x ∈ U and x ∉ A} or any element of the universe that is not contained in A.
- The intersection of A and B is A ∩ B {x| x ∈ A and x ∉ B}
- The union is A U B {x| x ∈ A or x ∉ B}
- Minus is B — A = B ∩ A
Symmetric difference or XOR
- A Δ B = (A — B) U (B — A) = (A U B) — ( A ∩ B)
- or simply put everything in the interception except what’s left of A and B
Cardinality of a set is denoted, for example as: is A is a set the cardinality is |A|, and refers to the amount of elements that a set has.
Example
- A = {3,4} is finite, since |A| = 2.
- B = {1,2,3, ….} is countably infinite. i.e |B| = No
- C = {x| x ∈ [0,1]} is uncountably infinite. i.e |C| = N1
Laws of Operations
- Complement Law: A U Ā = U, A ∩ Ā = Ø, Ā = A
- Commutative: A U B = B U A , A ∩ B = B ∩ A
- Associative: A U (B U C) = (A U B) U C, A ∩ (B ∩ C) = (A ∩ B) ∩ C
- Distributive: A U (B ∩ C) = (A U B) ∩ (A U C) , A ∩ (B U C) = (A ∩ B) U (A ∩ C)
- DeMorgan’s:
next topic is calculus.