A Noob’s perspective — Learning Data Science, ML and AI from scratch. Pt 4
Definition: A Sample Space is associated with an experiment, E is the set off all the combinations of possibilities.
Examples:
- A coin toss has two out comes Heads or Tails
- Tossing a coin 3 times changes the set of possibilities. {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
- Ask 10 people if the play Apex Legends {0,1,2,3,…,10}
Definition: An event is a set of possible outcomes.
Example:
In a given week {Mon, Tue, Wed, Thu, Fry, Sat, Sun} how many days did you like your mother’s cooking.
Notes from set theory:
- Remember that the null set is part of every set. In plain language that means that a null set is when none of the possibilities happen. However that never happens
- The complement of an event is just the opposite thing happening. Imagine you flip a coin and get heads twice A = {HH} the compliment would a subset in which that simply does not happen A = {HT, TH, TT}
Probability
formal definition of probability
The probability of a generic event A ⊆ S (the whole set of possibilities) is a functions that follows these axioms.
- 0 ≤ P(A ) ≤ 1 probabilities are always between 0 and 1
- the P(S) = 1 or the probability of something happening is one. Nothing can not happen i.e When you roll dice the probability that you get any number from 1 to 6 is 1. or P(S) = P(1,2,3,4,5,6) = 1
- if A and B are disjoint events. Meaning the union of A B is null, then the probability of the union P(A U B) = P(A) + P(B). Example The probability of having a 1 or 5 in a dice is = P(1) + P(5) = ⅙ + ⅙ = ⅓
- The fourth one is a generalization of the third. Meaning a sequence of disjoint events.
Example:
Toss a coin until the first heads appears. The disjoint sets would look like:
S = {H,TH,TTH,TTTH}
From this example we can use the formula from before and deduce its final form. So says this book I’m reading. I’ll try to search for a more complete derivation of this formula in a following story