Concepts / Probability Distributions

Probability Distributions

D is the distribution; z ∼ D describes sampling from it.

  • Programming

From Distribution to Sample

Probability notation becomes easier to read when you begin with D. The symbol D names a distribution over a set. It describes how values are selected from that set. The expression z ∼ D then connects a particular variable, z, with that distribution: z is sampled according to D.

The symbol z does not identify one permanently fixed value. It represents a value obtained through the sampling process described by D. Once this relationship is established, later expressions can use z to evaluate a function, an event, or an expected value.

assigns probabilityassigns probabilityassigns probabilityDdistribution over Zz₁probability assigned by Dz₂probability assigned by Dz₃probability assigned by D
How does D describe the possible values from which z may be sampled?

Reading the Sampling Statement

Read z ∼ D as: z is sampled according to D. Start at D, which identifies the distribution. Then read z as the variable receiving a value from that distribution. The statement describes a sampling relationship, not a permanent assignment to one fixed value.

Generated example: Suppose D describes how a value is selected from a set of colors. Writing z ∼ D means that z is treated as the color produced by a draw governed by D. The notation does not say that z must always be one particular color; it establishes how z is obtained.

governsproducesDsampling rulesampleaccording to Dzsampled value
How does a distribution produce a sampled value z?

Functions and Events

After z ∼ D has established the sampling context, the notation inside brackets determines what is being summarized. Expected-value notation summarizes a real-valued function of the sampled variable. The expression E with subscript z ∼ D followed by f(z) denotes the expected value of f(z) when z is sampled according to D.

Probability notation instead asks how often a condition is true. If f maps Z to true or false, then P with subscript z ∼ D followed by f(z) denotes the probability that f(z) is true when z is sampled according to D. In set language, this is the probability assigned by D to the values for which the condition is true.

Notation typeWhat it summarizesQuestion it answers
Expected valueA real-valued function of a sampled variableWhat expected quantity is associated with f(z) under D?
Probability of an eventWhether a Boolean condition is trueHow likely is f(z) to be true under D?

Separating a Quantity from a Condition

Let z be sampled according to D. Compare an expression that uses f(z) as a real-valued quantity with one that uses f(z) as a true-or-false condition.

Identify the sampled variable: The phrase z ∼ D says that z is sampled according to D.

Read the expected-value expression: An expected value summarizes the real-valued function f(z) over samples governed by D.

Read the probability expression: A probability expression summarizes whether the condition f(z) is true over samples governed by D.

Expected-value notation summarizes a value produced by a function, while probability notation summarizes the truth of an event.

summarizessummarizesExpected valuesummarizes f(z)real-valued functionof sampled zEvent probabilitysummarizes f(z) trueBoolean conditiontrue or false
What is the difference between averaging a quantity and measuring how often a condition is true?

Independent Tuples

D describes individual samples from Z. When m points are sampled from D, the result is an m-component tuple written as (z₁, …, zₘ). The notation D^m refers to the probability over Z^m induced by this process, where each zᵢ is sampled from D independently of the other points.

The superscript m does not describe one individual sample raised to a numerical power. It signals a distribution over a larger space: the space of m-component sample tuples. The important change is the object being described. D governs individual values, while D^m governs complete tuples produced by repeated independent sampling.

independent drawindependent drawindependent drawcomponentcomponentcomponentDdistribution over Zz₁sample from D(z₁, …, zₘ)one outcome in Z^mz₂sample from Dzₘsample from D
What does D^m contain when m points are sampled independently from D?

Generated example: If m points are sampled from D, one outcome is a tuple such as (z₁, …, zₘ). D^m describes the probability over all such m-component tuples, rather than describing only z₁ or only another single component.

Notation Mistakes

  • Treating z ∼ D as if it assigned one permanently fixed value to z.

    The notation describes z as a value obtained by sampling from D.

    Fix: Read it as: z is sampled according to D.

  • Confusing an expected value with an event probability.

    Expected-value notation summarizes a real-valued function, while probability notation summarizes whether a Boolean condition is true.

    Fix: First ask whether the expression summarizes a quantity or the truth of an event.

  • Reading D^m as one individual sample raised to a power.

    D^m is the induced probability over m-component tuples in Z^m.

    Fix: Read the superscript as indicating repeated independent sampling and a tuple-valued outcome.

  • Ignoring the distribution subscript when reading an expectation or probability.

    The subscript identifies the distribution governing the variable inside the brackets.

    Fix: Use the subscript to identify which sampling process the expression summarizes.

Check Your Reading

MEDIUM

For each statement, identify what is being described: an individual sampled value, an expected quantity, an event probability, or a distribution over tuples. Then explain the role of D or D^m.

Hints
  • Begin with D: it names the distribution over the underlying set.
  • For z ∼ D, focus on how z is obtained.
  • For an expected value, look for a real-valued function.
  • For an event probability, look for a Boolean condition.
  • For D^m, look for m independently sampled components forming a tuple.

Key Takeaways

  1. D names a probability distribution over a set.
  2. z ∼ D means that z is sampled according to D.
  3. Expected-value notation summarizes a real-valued function of a sampled variable.
  4. Probability notation summarizes when a Boolean condition is true.
  5. D^m describes the induced probability over m-component tuples formed by independent samples from D.

Key Takeaways

  • D is the distribution governing individual samples from a set.
  • The statement z ∼ D establishes that z is sampled according to D.
  • Expected values summarize real-valued quantities, whereas event probabilities summarize true-or-false conditions.
  • D^m is a distribution over m-component tuples in Z^m created by independent sampling from D.