Probability is a numerical measure of the likelihood that an event will occur.
A probability function (or probability measure) is a function that assigns a number between 0 and 1 to each event in the sample space, where:
Interpretation:
Examples with a fair six-sided die:
Non-negativity: For any event
Total Probability: The probability of the sample space is 1,
Additivity: For mutually exclusive events
Definition: A random variable is a function that assigns a value (numeric or categorical) to each outcome in the sample space
Examples:
Die roll - Parity: If
Die roll - Numerical: Same sample space, but random variable
Range and Events:
A Probability Mass Function (PMF) assigns probabilities to the values of a discrete random variable.
Definition: For a discrete random variable
Requirements: A valid PMF must satisfy:
Example: For our die parity random variable
Verification:
Numerical random variables only (not the parity RV).
Expectation (discrete): one term per value in the range of
Expectation (continuous): same idea, with a density
The expected value is where the distribution balances.
Variance (and
You pay $2 to play. You roll a four-sided die and win the number of dollars
showing on the face that comes up. The die is weighted:
Questions:
Expectation and variance are properties of distributions.
We can also calculate the sample mean and the sample variance for a dataset:
Sample mean:
Sample variance:
Consolidates the probability foundations needed downstream (trimmed from prob.md) with the expectation material (formerly normal.md), in one deck. Covers: random variables and PMFs, then conditional probability, P(y|x) notation and independence (for logistic regression and maximum likelihood), then expectation and variance (for the bias/variance decomposition, which the sprinkles lab picks up immediately after). Expectation sits last so it is freshest going into that lab. Dropped from prob.md, since Naive Bayes is no longer in the sequence: learning a joint distribution from counts, the table-explosion problem, marginalization as a named operation, conditional independence, Bayes rule, the Bayes classifier, and the naive Bayes classifier. Those are still in prob.md. Supersedes prob_brief.md and normal.md.