Calcium intake 2026-10-05
Calcium intake is the amount of calcium consumed, including food and supplements. It is an exposure that can be changed by an intervention, and should not be identified automatically with serum calcium in a causal inference analysis.
Conditional independence Created 2026-09-24 Updated 2026-10-14
Random variables and are conditionally independent given when, for every pair of Borel sets , the following identity holds almost surely:
Here conditional probabilities are conditional expectations of the corresponding indicator random variables given the sigma-algebra generated by . This defines the condition even when . In terms of regular conditional distributions, the conditional joint law is the product of the conditional marginal distributions for almost every conditioning value.
For discrete random variables, at every with , the condition becomes
Where , this is equivalent to . Once is known, observing provides no further information about .[ref]
For a worked example, suppose a latent variable chooses between two environments with . Given , take to be independent and identically distributed with a Bernoulli distribution of parameter , where and . Think of two separate trials run under the same quiet or active environment. Their conditional joint probability mass functions, with rows and columns , are
Each is exactly the product of its own conditional marginal distributions: for , and for . Thus are conditionally independent given .
If the environment is unobserved, the law of total probability averages the two tables:
Both unconditional marginal distributions are fair, but . The law of total expectation gives
Figure 1.
An unobserved shared environment creates statistical dependence between conditionally independent trials
. The first two tables show independent Bernoulli trials at conditional success probabilities and . Averaging them with equal weights gives the third table. The fourth table is the product of the resulting unconditional marginal distributions, which differs from the actual joint table. These are stipulated model probabilities, not observed frequencies. Details.
Observing makes the active environment more plausible, so it raises to . Knowing the actual environment removes this source of statistical dependence. The covariance induced by a shared latent variable lemma explains the calculation without listing all the outcomes.
This is why conditional independence is useful in statistical modelling: a model can multiply simple conditional laws and then average over a shared latent variable. The resulting observations can remain statistically dependent. Conditional independence graphs organize such information relations; their interpretation as causes requires additional assumptions from causal inference. Conditioning describes the information available to an observer. It does not, by itself, describe what would happen if an experimenter changed a variable.
Conditional probability Created 2026-09-24 Updated 2026-10-14
For events with , conditional probability is
Restrict attention to the outcomes in , then renormalize their probability measure so its total mass becomes one. The resulting rule is itself a probability measure. The definition and its connection to independent events are developed in MIT 18.05, Reading 3: Conditional Probability, Independence and Bayes' Theorem.
For the two-dice model, let mean the sum is at least nine and mean the first result is six. Of the six outcomes in , four belong to : the second die can be 3, 4, 5, or 6. Thus . Reversing the information gives a different answer: four of the ten outcomes in have first result six, so . Both ratios use the same overlap; their denominators describe different information.
Figure 1.
Conditioning selects a different denominator in the same dice outcome grid
. Details.
The definition requires positive conditioning mass. For a continuously distributed random variable , it cannot directly define when . A regular conditional distribution or conditional density supplies the appropriate extension, with the usual almost everywhere qualification. Nor does conditioning by itself justify causal inference: changing which outcomes are considered is different from physically changing how the experiment is generated.
The 1989 experiment used eight Drosophila pseudoobscura biological populations from one Bryce Canyon population: four maintained on starch medium, four on maltose, in cages at . Testing began about a year after establishment. [ref]
Before testing, flies spent one generation on cornmeal–molasses–agar. Virgins aged 3–6 days entered multiple-choice chambers: twelve females from each population, followed by males from both populations introduced nearly simultaneously without anesthesia. Observers scored matings for 60–90 minutes under bright indirect lighting. One group's right wing tips were clipped for identification, with clipping reversed between replicates. [ref]
All sixteen cross-diet comparisons had positive mating assortment contrasts; eleven departed significantly from random mating. Same-diet comparisons did not show significant departures. Common-medium rearing addressed immediate diet conditioning; same-diet controls addressed separation and establishment population bottlenecks. Mate choice was not the selection target; the biological populations were maintained separately. The result supports partial premating isolation accompanying dietary divergence, not completed speciation. [ref]
Figure 1. . Original design schematic. Arrows indicate procedure, not a measured reproductive isolation rate. The four mating categories are possible outcomes; no invented counts are shown. Details.
The causal inference remains limited. A negative same-diet hypothesis test does not prove zero reproductive isolation. One generation under common conditions does not exclude every persistent environmental influence. The chamber readout alone cannot identify a particular gene, establish offspring fertility, or predict gene flow after sustained contact in nature. Further experiments would need to target those questions separately.
Kullback-Leibler divergence Created 2026-09-24 Updated 2026-10-14
The Kullback-Leibler divergence, also called relative entropy, compares two probability distributions in a specified order. In , observations follow and the comparison probability distribution is : the first argument supplies the averaging weights. For probability mass functions on a finite alphabet,
Here is a random variable with probability distribution . For probability density functions relative to the same measure , replace the sum by . These formulas use natural logarithms unless stated otherwise. The expected value is under , even though appears in the denominator. [ref]
Take and on two outcomes. Direct calculation gives
The second outcome contributes negatively to the first sum: assigning it more probability than does makes its individual contribution negative. Nevertheless, relative entropy nonnegativity guarantees a nonnegative total. Reversing the arguments changes both the likelihood ratio and the averaging probabilities; taking an absolute value inside the logarithm would define a different quantity.
Figure 1.
Direction changes the averaging weights; a missing outcome can make relative entropy infinite
. Details.
The units depend on the logarithm: natural logarithms give nats, whereas base-two logarithms give bits. Divide a value in nats by to obtain bits; the forward example is approximately bits. Changing the base rescales every Kullback-Leibler divergence by the same positive factor. Since the two calculated directions differ, Kullback-Leibler divergence is asymmetric and cannot be a metric. It also need not satisfy the triangle inequality. [ref]
The operational meaning is an expected penalty for using the wrong probability distribution. A prediction incurs log-loss when outcome occurs, the negative of the logarithmic scoring rule. Under , its expected value is the cross-entropy . Predicting with itself incurs information entropy , so
Thus Kullback-Leibler divergence is exactly excess expected log-loss, whenever these separate quantities are finite. [ref]
For lossless source coding, ideal codeword lengths similarly give excess expected length in bits per symbol. Actual prefix codes require integer codeword lengths; Shannon's source coding theorem explains how long blocks approach ideal per-symbol lengths. The interpretation concerns an average, not a fractional physical bit attached to every outcome. In our example, ideal coding with costs one bit per symbol, while bits; the difference is exactly the computed bits. [ref]
Zeros require explicit conventions. An outcome with contributes zero, including when ; the convention agrees with the relevant limit. If but , the Kullback-Leibler divergence is infinite: the predictor has declared impossible an outcome that can occur. On a finite alphabet, the probability support of must therefore be contained in the probability support of for a finite answer. For example, and give , but . For general probability measures, failure of absolute continuity of measures likewise gives infinity. Even does not guarantee a finite integral. [ref]
To see how confidently wrong predictions are punished, hold the true Bernoulli distribution parameter at and vary the predicted parameter . Its binary relative entropy is
It vanishes at , equals approximately nats at , and equals nats at . Both endpoints give infinity because both outcomes remain possible under . Predicting almost no successes is especially costly because successes actually occur three quarters of the time. The reversed binary relative entropy stays finite at the endpoints: its averaging probability distribution concentrates on just one outcome, and assigns positive probability to both.
Figure 2.
Bernoulli relative entropy with true success probability 0.75 and varying predicted probability
. Details.
For model selection, minimizing expected log-loss ranks candidate statistical models by , since is common to them. The true probability distribution is usually unknown, so one estimates predictive performance using fresh observations or cross-validation. Fitting and assessing on the same data can reward overfitting; a small fitted Kullback-Leibler divergence alone does not establish useful prediction.
In variational inference, a tractable trial probability distribution commonly minimizes against a target posterior distribution . Maximizing the evidence lower bound accomplishes this without evaluating the target's normalization constant. The averaging now follows : placing trial probability where the posterior distribution assigns almost none is strongly penalized. The chosen direction and trial family therefore matter. [ref]
These comparisons do not by themselves establish causal inference. Two statistical models can reproduce the same observed probability distribution while predicting different responses to an intervention. Choosing the smaller Kullback-Leibler divergence therefore needs additional assumptions or experimental evidence before supporting a causal claim. [ref]
The original reference is S. Kullback and R. A. Leibler's 1951 paper [ref], published in The Annals of Mathematical Statistics 22(1), pages 79–86. Its title connects this comparison with sufficient statistics: the historical setting was statistical information, before today's widespread applications in prediction and variational inference.
Law of total variance Created 2026-09-24 Updated 2026-10-14
The law of total variance separates the spread of a population into spread inside groups and spread between their means. For a real square-integrable random variable , so that , and another random variable on the same probability space,
The first term averages the conditional variance over the possible information ; the second measures how much the conditional mean changes with that information. There is no independence assumption, and need not be numerical or have finite variance. Conditioning is useful precisely when knowing tells us something about . See MIT tutorial on using conditional expectation and variance.
More generally, the available information can be a sub-sigma-algebra of the ambient probability space. With , the existing conditional expectation definition gives
Taking recovers the displayed formula. The conditional mean and conditional variance are themselves random variables: before learning the group, we do not yet know which group average or group spread will apply. Their outer expectation and variance turn these varying quantities into numbers.
For a fully explicit mixture distribution, choose a group or with equal probabilities. In group , choose or with equal conditional probabilities; in group , choose or with equal conditional probabilities. Thus the complete joint probability distribution consists of , each with probability , and no other outcomes. The conditional means are and . Squaring the deviations and gives conditional variances and , respectively. The law of total expectation gives the overall mean .
The within-group contribution to variance is
For the between-group contribution, the conditional mean takes values and , each three units from the overall mean. Consequently,
We can check this without any conditioning: the discrete random variable takes values with equal probabilities, so
Equivalently, its second moment is , and subtracting the squared mean gives . These are population variances, with the stated probabilities as weights, rather than estimates using the corrected denominator of a sample variance.
Figure 1.
Four equally likely outcomes split total variance into within-group 5 and between-group 9
. Details.
The figure makes the two sources of spread visible. The outcomes in group cluster tightly around , while those in group sit farther apart around . Replacing every outcome by its conditional mean removes the internal spread but leaves the separation between groups. Conversely, subtracting each group's conditional mean aligns the two groups around zero. Averaging only the conditional variances would miss nine units of variance; retaining only the conditional means would miss five. Neither summary alone describes the whole population.
Two modifications clarify what each contribution measures. Shift group to outcomes and group to outcomes , keeping all four probabilities equal. Both conditional means are now , while the conditional variances remain . The between-group contribution vanishes, and total variance is just . Group membership still tells us how uncertain an outcome is, even though the best point prediction stays the same. Alternatively, let every outcome in group equal and every outcome in group equal . Now both conditional variances vanish, and all nine units of total variance come from group separation. Knowing the group predicts the outcome perfectly. These limiting cases distinguish differences in average outcome from differences in internal spread; the original mixture distribution contains both.
The same calculation answers a prediction question. If the group is hidden, the best constant prediction is the overall mean , with mean squared error , by variance as the minimum mean squared error of a constant. If the group is revealed, predict for and for . The errors become , and their mean squared error is . Knowing the group therefore improves the best achievable mean squared error by , exactly the between-group contribution. This is an interpretation relative to the information available: the remaining uncertainty could shrink further if additional information were revealed.
For any square-integrable measurable function used as a predictor, write . The prediction identity is
Thus predicting with the regression function gives the conditional expectation and minimizes mean squared error over every permitted predictor, including nonlinear ones. This minimizes average squared error, not the error for each individual outcome. See Berkeley Statistics 201A notes, sections 36–37.
Why do the two pieces add cleanly? Put . Its conditional expectation given is zero, so and for every square-integrable measurable function . In particular, and are uncorrelated random variables. Splitting and squaring therefore leaves no cross term after taking expectation. Geometrically, the conditional expectation is an orthogonal projection in the L2 space, and the law of total variance is its Pythagorean theorem for centered random variables.
Figure 2.
Conditional prediction leaves zero group means but different residual spreads
. Details.
In our example, the four products are , which average to zero. Yet and are not independent: observing identifies group , while observing identifies group . This is a concrete instance of heteroscedasticity, with different conditional variances despite zero conditional means of the errors. A group can predict uncertainty even when it cannot predict the error's sign.
The law of total variance is useful whenever aggregated data conceal distinct groups. Changing mixture weights changes both contributions, so the weighting must match the population being described. For example, giving group weight changes the overall mean to , the within-group variance contribution to , and the between-group contribution to , making the total . Group differences account for spread and prediction gains; assigning them a causal explanation requires a separate causal inference argument.
Linear regression Created 2026-09-24 Updated 2026-10-14
Linear regression models a response's conditional expectation as a linear combination of specified predictors. In matrix form,
where the design matrix describes the observations, contains the regression coefficients, and contains the errors. The fitted values estimate the response means. The model is linear in its regression coefficients; its columns may include powers, interactions, or other transformed predictors, so polynomial regression can fit curved relationships using the same machinery.
For a concrete example, take five constructed observations
An ordinary least squares fit with an intercept gives the line . Its regression residuals are and its residual sum of squares is . A one-unit increase in the predictor corresponds to a one-unit increase in the fitted response. This is a description of this fitted association; interpreting a change as a causal effect requires the assumptions of a causal inference problem.
Figure 1.
A five-point least-squares fit separates the fitted trend from residual deviations
. Details.
The geometric reason for the fit is simple. The possible mean vectors form the column space of . Ordinary least squares chooses the orthogonal projection of the data vector onto that vector subspace, so the remaining regression residual is orthogonal to every permitted fitted direction. The least-squares normal equations express this orthogonality as . The data's explained component and unexplained component are therefore separated by the same geometry used in a Hilbert space.
The optimization definition makes sense for any observed data. Quantifying the uncertainty of the regression coefficients needs additional assumptions about the sampling and errors. With fixed of full column rank and mean-zero errors with covariance matrix , ordinary least squares is unbiased and has covariance ; the Gauss-Markov theorem compares it with other linear unbiased estimators. A normal linear model additionally makes Student t-distribution intervals and tests exact in finite samples. Model adequacy and predictive assessment remain relevant even when these calculations are available.
Two historical settings help explain the subject's appeal. Adrien-Marie Legendre's Nouvelles méthodes pour la détermination des orbites des comètes (1805) includes an appendix on the method of least squares: observations give more equations than unknowns, and squared errors provide a criterion for reconciling them. Its astronomical setting shows the motivation for combining imperfect measurements. [ref] Francis Galton's Regression Towards Mediocrity in Hereditary Stature (1886) examines the association between parental and offspring heights and the tendency of group averages toward the population average. This is a historical use of the regression name; the modern linear model is a general statistical formulation. [ref]
Mephedrone 2026-10-13
Mephedrone is 4-methylmethcathinone, a synthetic stimulant psychoactive drug. The chemical identity is described in the EUDA synthetic-cathinone profile. In causal inference, an association between increased use and fewer deaths involving another drug does not itself establish substitution: changes in use, population composition and ascertainment must be distinguished.
Model organism 2026-10-13
A model organism is an organism used to investigate biological processes through accessible, repeatable experiments. Its value combines experimental tractability with a carefully delimited relationship to other organisms. For example, a gene deletion in Saccharomyces cerevisiae can test whether a gene is required for growth under specified conditions; adding another gene can test functional complementation. Such interventions support causal inference more directly than merely noticing that a gene and a phenotype occur together. [ref]
The striking opportunity is to ask two experimentally separate questions: what does this component do here, and which part of that function survives a change of species or conditions? The yeast cross-species complementation experiment makes both questions concrete. Model organism evidence transfer requires specifying the function being compared; a useful model organism need not reproduce every feature of another organism.
A reversal this large calls for an audit, but the aggregate table cannot identify a particular error. Check the outcome and exposure coding, the reference category, the subset used in each analysis, missing-data exclusions, denominators, weights, and whether the reported coefficient actually corresponds to the intended comparison. Reversing an exposure contrast or exponentiating the wrong fitted coefficient would change the reported odds ratio. Conditioning on variables affected by delivery, or including inappropriate interactions, could also change the causal inference rather than merely improve precision.
Start by reproducing the crude odds ratio from an independent two-by-two calculation. Then fit progressively adjusted logistic regressions, recording how the coefficient and analysis population change; inspect within-clinic comparisons, sparse cells and separation. For an ordinary likelihood fit, check the fitted expected event count against the observed count and verify that changing only to cluster-robust standard errors leaves the fitted coefficients unchanged. A sandwich covariance matrix corrects uncertainty for clustered data; it does not by itself turn a crude odds ratio below one into an adjusted odds ratio above one. Adding clinic effects, using weights or changing the model can change the point estimate and must be distinguished from that variance correction.
Programming or reporting error is a possibility to check, not a conclusion proved by the reversal. Strong legitimate confounding remains another explanation.
Under the more plausible Quasi-Poisson regression, the year Wald statistic is , with reported p-value . An approximate 95% confidence interval is
Thus the estimated fall is about 9.35%, but the data do not establish a reduction at the 5% level after allowing for overdispersion. The interval allows both a sizeable reduction and a small increase. The before–after comparison also lacks a contemporaneous randomized control, so causal inference about the campaign would require addressing other changes between years. The small Poisson regression p-value is not sufficient evidence of a campaign effect when its variance assumption is unsuitable.
An instrumental variable supplies variation in an exposure that can be used for causal inference about its effect on . Its three core requirements are:
Relevance, independence, and exclusion are the core instrumental-variable assumptions. They do not by themselves identify an arbitrary population-average effect. For a binary instrument and treatment, instrumental-variable monotonicity and the usual consistency in causal inference assumptions can identify a local average treatment effect; stronger effect-homogeneity or structural-model assumptions are needed for other effect interpretations.
Two useful ways to strengthen the causal inference are:
These are complementary: the first changes the proposed exposure experimentally, and the second probes the validity and reproducibility of its genetic evidence.
The Pearson correlation coefficient is the covariance divided by the product of the standard deviations. For real random variables with finite, strictly positive variances,
It is the expected value of the product of the two centered variables after dividing each by its standard deviation. The Cauchy-Schwarz inequality gives . This removes measurement units, while retaining the direction and strength of the linear relationship. Constant random variables have zero standard deviation, so their Pearson correlation coefficient is undefined.
For the covariance model , with independently uniform on , the calculation gives
The positive correlation is less than one because the independent term introduces extra variation. For the correlation is . Both examples appear in the covariance diagram.
For nonzero real , the correlation of and is . Positive rescaling and added offsets therefore leave the correlation unchanged; reversing one scale reverses its sign. Equality means that one random variable is an affine function of the other almost surely, with a nonzero slope of the corresponding sign. This is the equality condition in the Cauchy-Schwarz inequality, and includes perfect positive correlation.
Zero correlation says that the centered variables are orthogonal in their square-integrable inner product. It permits nonlinear statistical dependence, as the example in uncorrelated random variables demonstrates. More generally, a correlation is a statement about a joint probability distribution; identifying effects of interventions is the separate task of causal inference. This distinction keeps an observed association from being mistaken for a demonstrated mechanism.
An early source for standardized association is Francis Galton's 1888 paper “Co-relations and their Measurement, chiefly from Anthropometric Data”. He compared stature and forearm measurements and changed each measurement to units of its own variability so the two regression directions could be compared. His scale used probable error, so it should not be identified word for word with the modern standard deviation formula above. [ref].
Psychoactive drug 2026-10-13
A psychoactive drug is a substance that changes mental activity, mood or perception. In population causal inference, its per-user adverse-event risk and its total population harm are distinct: the latter also depends on how many people use it, for how long, and on substitution between substances.
For causal inference, a before-and-after change among units selected by an extreme baseline reading combines any causal effect with the change expected from selection. In the synthetic model the selected-group mean falls by about with no intervention at all. Calling that entire fall an intervention effect would attribute a predictable measurement error contribution to a change in the signal.
One comparison design selects all eligible units by the same rule, then uses randomization to assign an intervention or a comparison condition, with the same measurement times and instrument in both groups. To see the principle algebraically, let assignment be independent of within the selected population, and let the intervention add a constant to the second reading: . Then
Subtracting the two expected changes isolates under these assumptions. Both groups experience the same selection tendency in expectation. A finite experiment still has sampling uncertainty; randomization does not guarantee identical realized groups. Without randomization, the same threshold alone does not establish comparable latent signals or error processes. Different selection rules, selective follow-up, changing instruments, or common temporal changes also require explicit assumptions. This is a statistical inference principle about comparisons, not evidence that any particular intervention works.