Probability and Distributions
One distribution; different views for cases, thresholds and sums.
On this page
Probability calculations often fail before the arithmetic starts. A conditional probability uses a different reference population from a marginal probability. A density is not a point probability. Equal means and variances do not imply equal distributions.
Start with the question, then choose a representation. Cases help with conditioning. A joint table shows dependence. A CDF accumulates mass. A characteristic function turns random values into rotating vectors and makes sums easier to analyze.
A distribution answers several questions
| Object | Input and output | Useful question |
|---|---|---|
| Probability mass function (PMF) | Value → nonnegative mass | How likely is this discrete outcome? |
| Probability density function (PDF) | Value → nonnegative density | How much probability is near this value? |
| Cumulative distribution function (CDF) | Threshold → probability | How much lies at or below x? |
| Joint distribution | Tuple → mass/density | How do outcomes occur together? |
| Characteristic function | Frequency → complex average | How do sums or distributional shapes behave? |
A random variable maps outcomes to numbers. Its distribution describes the probabilities of those numbers, not one realized sample. The same distribution can have several equivalent descriptions, but not every distribution has a density.
Conditioning changes the reference population
P(A|B) and P(B|A) usually differ because their denominators differ. Independence means P(A∩B)=P(A)P(B). For positive P(B), it then gives P(A|B)=P(A). Mutually exclusive positive-probability events are not independent: observing one rules out the other.
A zero-probability condition cannot be handled by this elementary ratio. Conditioning on an exact continuous value needs the appropriate conditional-distribution construction.
Combine disjoint cases before reversing them
The first identity follows by writing A as the disjoint union of A∩Bᵢ. The second is Bayes' rule with that total as its normalizer. Conditional rates are weighted by case frequencies; an unweighted average is valid only for equal case probabilities.
Consider a hypothetical diagnostic test: prevalence 1%, sensitivity 99%, false-positive rate 2%. These are specified toy rates, not medical advice or a claim about a real test. Among 10,000 expected cases, 100 have the condition and 9,900 do not.
| Branch | Population | Positive rate | Expected positives |
|---|---|---|---|
| Condition | 100 | .99 | 99 |
| No condition | 9,900 | .02 | 198 |
| Total | 10,000 | weighted total | 297 |
Expected counts need not be integer realized counts in other examples. They are a convenient scale for the same probability calculation, not a guarantee about one sampled population.
Read a joint table in two directions
Check nonnegative entries and a total of one before using a table. Each marginal must also sum to one. The same law of total probability appears here: weighted conditional rows reconstruct the marginal of Y.
For binary X and Y, take and . Both means are .5, , and . The following family changes this association while keeping both marginals fixed.
Same marginals, different joint distributions
X and Y are each Bernoulli(½). Moving c changes only how their outcomes pair. Table rows are X; columns are Y.
| Y=0 | Y=1 | P(X) | |
|---|---|---|---|
| X=0 | 0.50 | ||
| X=1 | 0.50 | ||
| P(Y) | 0.50 | 0.50 | 1.00 |
More mass is on equal outcomes: positive covariance.
Exact four-cell family. At c=0 it is independent; this special binary family does not establish the reverse implication for all distributions.
Zero covariance is not independence
Positive covariance indicates a positive signed linear association; negative covariance indicates the reverse. Zero covariance means the centered product has zero expectation, not that every form of dependence has vanished. Correlation divides covariance by the two standard deviations and is undefined if either is zero.
Take X uniform on {−1,0,1} and . Then and . Covariance is zero, yet Y is determined by X. The dependence is nonlinear.
Independence implies zero covariance when second moments are finite. The reverse is true under additional assumptions, such as jointly Gaussian variables. It is false in general.
A covariance matrix records pairwise second-order structure. Identity covariance means unit variances and zero cross-covariances, not necessarily independent or Gaussian coordinates. Sketched Isotropic Gaussian Regularization (SIGReg) compares projected distributions with a Gaussian target. Matching covariance alone cannot establish that target; we return to this distinction after introducing characteristic functions.
Accumulate probability across a threshold
For example, F(3)=0.8 means that 80% of the mass lies at or below 3.
A CDF is nondecreasing, right-continuous, takes values in [0,1], and tends to zero/one at the two infinities. Right-continuity fixes how jumps include their own value. It fully determines the distribution, including discrete, continuous and mixed cases.
| Threshold | F(x) |
|---|---|
| x<1 | 0 |
| 1≤x<2 | 1/6 |
| 2≤x<3 | 2/6 |
| 3≤x<4 | 3/6 |
| 4≤x<5 | 4/6 |
| 5≤x<6 | 5/6 |
| x≥6 | 1 |
For Uniform(0,1), F(x)=0 below zero, x between zero and one, and 1 above one. Thus P(.2<X≤.7)=.7−.2=.5.
A PDF can exceed one; interval area, not height alone, is probability. For a distribution with a density, exact points have zero probability. An atom is different: its CDF jumps. A general continuous CDF can also be singular, so “continuous” is not automatically “has a PDF.”
Quantiles and inverse-transform sampling
A fair die has . Intervals of u with width 1/6 select each face. The cumulative mass at a discrete quantile can exceed the requested level because the CDF jumps there.
The 95th percentile is the lower threshold whose cumulative mass reaches .95 under this convention. It need not have exactly 95% below it. Sample-percentile libraries may interpolate using different conventions; record the chosen one.
Uniform endpoints have probability zero in the continuous idealization, but software can produce boundary values. For the finite-support helper used here, zero selects the first positive-mass value and one selects the last. Zero-mass entries are never returned. Tiny cumulative rounding errors use the last positive-mass value, not an unused trailing category.
Observed frequencies are an estimate
For [1,2,2,5], . The repeated value creates a jump of 2/4 at 2. Ties should be counted, not silently deduplicated.
Empirical CDFs support percentile lookup, interval counts and distribution comparisons. The Kolmogorov–Smirnov statistic uses the largest CDF discrepancy. Its usual calibration assumes particular sampling and null conditions; fitted parameters or ties can require different calibration.
Data dependence, selection bias and a small sample can make an empirical view misleading. A smooth plot is not evidence that the sample represents the population.
The same distribution in frequency space
A CDF answers threshold questions directly. For a sum of random variables, combining many thresholds becomes cumbersome. Frequency space offers another complete representation: rotate each value into a unit vector, then average.
The characteristic function always exists because the complex exponential has magnitude one. In particular φ(0)=1, |φ(t)|≤1 and φ(−t)=conjugate(φ(t)). Negative real parts or imaginary components are not negative probabilities; they are averages of oscillating coordinates.
| Distribution | Characteristic function |
|---|---|
| Constant X=c | |
| Bernoulli(p) | |
| Standard normal | |
| Normal(μ,σ²) |
The full function uniquely determines the distribution. Matching a few frequencies does not. Small t emphasizes slower oscillation and, when moments exist, its local derivatives encode them. Larger |t| can reveal fine structure, but “global versus local” is an intuition, not a universal recovery guarantee.
Two views of one Bernoulli distribution
Dashed burgundy vectors represent outcomes 0 and 1 on the unit circle. Solid blue is their probability-weighted mean φ(t), not another sample.
The mean stays inside the unit disk. Unequal phases can cancel even though probabilities are nonnegative.
F(x)=P(X≤x): . Only outcome 0 is included.
Playback sweeps frequency only. Threshold and frequency are independent views. This integer-support CF is periodic; one selected frequency cannot identify an arbitrary distribution.
Independent sums become products
Convolution in value space becomes multiplication in frequency space. For independent normals, multiplying the two exponential forms adds their means and variances. For n independent Bernoulli(p) trials, describes their binomial sum.
An affine transformation also has a simple form: . Here a and b are fixed real constants. Shifting adds phase; scaling changes the frequency argument. This makes the representation convenient for algebra, not only for plots.
Moments require existence conditions
Variance is E[X²]−E[X]² when these moments exist. A characteristic function can exist even when the mean or variance does not. Moment-generating functions E[eᵗˣ] lack the bounded complex-exponential argument and may fail to exist around zero.
For a vector X, uses a vector frequency of the same dimension. The dot product gives the scalar phase. Individual projected distributions examine directions, while a covariance matrix captures only second-order structure.
Compare distributions, not only their covariance
The full characteristic function contains more than means and covariance. We can therefore compare distributional shape, including departures that those summaries miss.
For a normality comparison, standardize observations with positive scale S. Recompute the empirical function from Y rather than X: replace Xⱼ with Yⱼ in the displayed average. Compare this standardized function with the standard-normal target. A constant sample has S=0 and requires a separate policy.
The integrand is the squared complex distance at one frequency. Weighting and integrating combines these mismatches. Gaussian weights emphasize a frequency range and make the integral reducible to finite sums through Gaussian Fourier identities. Weight bandwidth affects sensitivity; high-frequency empirical oscillations should not be interpreted as pure population structure.
Mean/scale estimation, sample size, standardization convention and the null model affect test calibration. Do not attach a p-value without the corresponding procedure. Failure to reject is not proof of normality.
Distributional regularizers can borrow this comparison idea without being a classical hypothesis test. Projected Gaussian regularization → applies frequency-space comparisons to projected embeddings. An optimization penalty and a calibrated statistical test have different uses.
Choose the representation for the question
| Question | First operation | Check |
|---|---|---|
| Different scenarios | Partition and weight conditional rates | Disjoint and exhaustive cases |
| Reverse a condition | Bayes numerator / total denominator | Base rates and positive denominator |
| Joint variability | Marginals, E[XY], centered product | Finite moments; units; not independence |
| Intervals or percentiles | CDF difference or generalized inverse | Open/closed endpoints and quantile convention |
| Sums or affine changes | Characteristic multiplication / argument transform | Independence and moment conditions |
| Distributional mismatch | CDF or frequency comparison | Sampling and statistical calibration |
Expectation, counting, stopping rules and Poisson arrival models are grouped in the Mathematical Problem Solving →. Linearity of expectation does not require independence; a Poisson arrival model does require its process assumptions. Those distinctions belong with the problem-solving workflow, not another isolated probability page.
Information Theory → then asks how much coding or predictive uncertainty a distribution contains. Probability defines the distribution first; entropy is a functional of it, not a replacement for the full distribution.
Sources and connected owners
Characteristic functions: definition and conditions ↗ · Epps and Pulley (1983) ↗