Unit 5 - Notes

MTH265 7 min read

Unit 5: Discrete Probability -II

1. Bayes’ Theorem and Generalized Bayes’ Theorem

1.1 Introduction and Foundation

Before delving into Bayes' theorem, it is essential to recall the definition of conditional probability. The probability of event occurring given that event has already occurred is denoted as and is defined by:
assuming .

1.2 Bayes' Theorem (Standard Form)

Bayes’ theorem provides a way to revise existing predictions or theories (update probabilities) given new or additional evidence. It relates the conditional and marginal probabilities of two random events.

Formula:

Where:

  • : Posterior probability (probability of after observing ).
  • : Likelihood (probability of observing given that is true).
  • : Prior probability (initial probability of ).
  • : Marginal probability (total probability of observing ).

1.3 The Law of Total Probability

To calculate the denominator in Bayes' theorem, we often use the Law of Total Probability. If and (complement of ) partition the sample space, then:

1.4 Generalized Bayes’ Theorem

The generalized form expands upon the standard form by allowing the sample space to be partitioned into mutually exclusive and exhaustive events: .

Formula:

  • Application: This is widely used in machine learning (e.g., Naive Bayes classifiers), medical diagnostics, and spam filtering where multiple underlying conditions could result in the observed evidence.

2. Expected Values

2.1 Definition

The expected value (or expectation/mean) of a discrete random variable is a weighted average of all possible values that the random variable can take on. The weights are the probabilities of the respective values occurring. It represents the "center of mass" of a distribution or the long-run average of the random variable over many independent trials.

Formula:
If is a discrete random variable with a sample space and probability mass function , the expected value is:

2.2 Example

Consider rolling a fair six-sided die. Let be the outcome of the roll.

  • Values : 1, 2, 3, 4, 5, 6
  • Probabilities : for each .

  • Notice that the expected value (3.5) is not a possible outcome of a single roll, but rather the average over many rolls.

3. Linearity of Expectations

3.1 Concept

Linearity of expectations is a fundamental and powerful property of expected values. It states that the expected value of a sum of random variables is equal to the sum of their individual expected values.

Crucial Property: Linearity of expectations holds regardless of whether the random variables are independent or dependent.

3.2 Formulas

For any two random variables and and any real numbers and :

  1. Addition:
  2. Scalar Multiplication:
  3. General Linear Combination:

3.3 Application Example

If you roll two dice, what is the expected sum?
Let be the first die, be the second die. We want .
By linearity of expectation: .
Since and , .


4. The Geometric Distribution

4.1 Definition

The geometric distribution models the number of independent Bernoulli trials needed to get the first success.
A Bernoulli trial is an experiment with exactly two possible outcomes: "Success" (with probability ) and "Failure" (with probability ).

4.2 Probability Mass Function (PMF)

Let be the random variable representing the number of trials needed to achieve the first success.

Where:

  • (number of trials)
  • is the probability of success on a single trial.
  • represents consecutive failures.

4.3 Key Metrics

  • Expected Value:
    • (e.g., If the chance of flipping a heads is $0.5$, you expect to flip the coin times to get the first heads.)
  • Variance:

4.4 Memoryless Property

The geometric distribution is the only discrete probability distribution with the memoryless property. This means that the probability of success on the next trial is independent of how many failures have already occurred:


5. Independent Random Variables

5.1 Definition

Two random variables and are independent if the realization of one does not affect the probability distribution of the other. Mathematically, and are independent if and only if, for all possible values and :

5.2 Independence and Expectations

If and are independent random variables, then the expected value of their product is the product of their expected values:

(Note: The converse is not necessarily true. If , the variables are uncorrelated, but not guaranteed to be strictly independent).


6. Variance

6.1 Definition

While the expected value gives the center of a distribution, the variance measures the spread or dispersion of the random variable around its expected value. It is the expected value of the squared deviation from the mean.

6.2 Formulas

Let . The variance (often denoted as ) is defined as:

Alternative (Computational) Formula:
A more computationally convenient formula derived from the definition is:

6.3 Standard Deviation

The standard deviation is the square root of the variance. It is often preferred because it is in the same units as the random variable .

6.4 Properties of Variance

Unlike expectation, variance is not a linear operator.

  • (Adding a constant shifts the distribution but does not change the spread).
  • (Multiplying a random variable by a constant scales the variance by the square of that constant).

7. Bienaymé’s Formula

7.1 Concept

Bienaymé’s formula provides a rule for calculating the variance of the sum of mutually independent random variables. While the expectation of a sum is always the sum of the expectations, the variance of a sum is only the sum of the variances if the variables are uncorrelated (which is guaranteed if they are pairwise independent).

7.2 The Formula

If are pairwise independent random variables, then the variance of their sum equals the sum of their variances:

Alternatively written as:

7.3 Why Independence Matters

If the random variables are not independent, the variance of their sum must account for their covariance. For two variables and :

If and are independent, their covariance , which reduces the equation to Bienaymé’s formula for .