Conditional Variance Calculator
An average tells you where a distribution sits. It says nothing about how tightly it sits there once you learn something. This conditional variance calculator finds Var(X|A): enter a discrete distribution as values with their probabilities, name the conditioning event as a list of outcomes, and the tool renormalizes the probabilities and computes the conditional spread step by step.
It returns P(A), the conditional mean E[X|A] and the conditional second moment alongside the variance, because Var(X|A) is built from those pieces and you should be able to audit each one. If you need the mean on its own, the conditional expected value tool linked below is its sibling; this page is about what remains around the mean.
The probabilities describe the distribution before conditioning and must sum to 1. The conditioning event is a set of outcome values, not a description: write 3, 4, not “high rolls”.
Quick Answer
Key takeaways
- Conditioning renormalizes: throw away the outcomes outside A, divide each surviving probability by P(A), then apply the ordinary variance formula to what is left.
- Var(X|A) = E[X squared|A] minus (E[X|A]) squared. The tool prints both moments and P(A), so every step can be checked.
- Conditional variance usually shrinks when the event narrows the range, but not always: conditioning on the two extreme values {1, 4} of the die raises the variance to 2.25.
- The law of total variance ties it together: total variance equals average within-event variance plus the variance of the conditional means. The worked example below verifies to 1.25 exactly.
- Quick Answer
- How to use the conditional variance calculator
- The renormalization idea, in one line of formula
- Worked example: the die, conditioned on rolling above 2
- Verifying the answer with the law of total variance
- Three conditional tools, three different questions
- What competing calculators miss
- Frequently Asked Questions
- Add This Calculator to Your Website
- References
How to use the conditional variance calculator
Three comma-separated lists do all the work. The values and probabilities describe the full distribution before anything is known; the third list defines the event you are conditioning on.
Enter the values in any order, with the probabilities in the matching order, and check that the probabilities sum to 1, since the tool validates the distribution before conditioning. Then list the conditioning outcomes exactly as they appear in the values list: 3, 4 selects those two outcomes and nothing else. Press Calculate and read from the top: P(A) is the probability of the event itself, E[X|A] is the conditional mean the variance is measured around, E[X squared|A] is the second moment, and Var(X|A) is the difference the formula produces.
Two entry habits save trouble. First, condition on values, not descriptions: the tool matches numbers, so “3, 4” works and “high” does not. Second, if your probabilities are already conditional (they describe the distribution given A and sum to 1 over A’s outcomes only), this is the wrong input shape: either expand them back to the full distribution, or note that with A’s outcomes alone and their conditional probabilities, the same arithmetic runs with P(A) effectively set aside. The renormalization framing follows the standard textbook construction, stated formally in the Technion probability and statistics survival guide: the conditional variance is E[(Y – E[Y|X]) squared, given X], equivalently E[Y squared|X] minus (E[Y|X]) squared.
The renormalization idea, in one line of formula
Everything on this page is the ordinary variance formula applied to a rescaled distribution. The rescaling is the only new idea.
Given A = {3, 4} on the die, each survivor’s conditional probability is 0.25 / 0.5 = 0.5: the conditioned distribution is a fair coin between 3 and 4. Every conditional statistic is then unremarkable arithmetic on that small distribution. The mean is 3.5, the mean of squares is (9 + 16) / 2 = 12.5, and the variance is 12.5 – 12.25 = 0.25. Conditioning feels abstract until you see it as this: a new, smaller distribution, built by dividing through by P(A).
Worked example: the die, conditioned on rolling above 2
The calculator is pre-filled with this case, and the table shows the renormalization the tool performs.
| x | P(X = x) | In A? | P(x | A) | Contribution to E[X|A] |
|---|---|---|---|---|
| 1 | 0.25 | No | 0 | 0 |
| 2 | 0.25 | No | 0 | 0 |
| 3 | 0.25 | Yes | 0.5 | 1.5 |
| 4 | 0.25 | Yes | 0.5 | 2.0 |
The mean moved up, from 2.5 to 3.5, which surprises nobody: conditioned on a high roll, the average is high. The variance is the interesting output. It fell from 1.25 to 0.25 because the event discarded the entire low half of the distribution, leaving two adjacent values. That is the typical use of this tool in risk work: a regime, a segment or a test result arrives, and the question is not just where the center moved but how much uncertainty the information actually removed. The center alone is the job of the conditional expected value calculator, which computes E[X|A] from joint probabilities.
Verifying the answer with the law of total variance
Conditional variances are not isolated numbers. Split the die by the same event and its complement, A = {3, 4} with mean 3.5 and variance 0.25, and not-A = {1, 2} with mean 1.5 and variance 0.25. The law of total variance says the pieces must rebuild the whole.
The average within-event variance is 0.25 (both events have variance 0.25, weighted 0.5 each). The variance of the conditional means is 1.00: the means 3.5 and 1.5 sit one unit either side of the overall mean 2.5. Sum: 1.25, which matches the unconditional variance of the die computed directly. When your conditional variance work does not reconcile like this in a two-event split, an input is wrong. The identity, Var(X) = E[Var(X|A)] + Var(E[X|A]), is also the backbone of ANOVA: variation within groups plus variation between group means.
Three conditional tools, three different questions
Conditioning answers three questions that are easy to blur. Each has its own calculator, and using the wrong one returns a correct answer to a question you did not ask.
The conditional probability calculator computes P(A|B): how likely a single event becomes once another event is known. The conditional expected value calculator computes E[X|C]: the average outcome over the conditioned cases. This page computes Var(X|C): the spread around that average. Probability, then center, then spread, in that order. For chained independent events rather than conditioning, the compound probability calculator covers the combinations.
What competing calculators miss
The conditional variance tools and textbook pages ranking for this term were reviewed before this rewrite.
Miss 1: conditional probabilities only, no event to condition on. The CalculatorsHub conditional variance tool takes Y values with P(Y|X) figures that must already sum to 1. That assumes the renormalization, the actual conceptual step, has been done for you elsewhere. Here you enter the unconditional distribution and name the event, and the division by P(A) happens in front of you, with P(A) printed.
Miss 2: unconditional variance wearing a conditional label. General distribution calculators compute variance from a probability table and stop. None of them condition, so none of them can answer the question this page exists for: how much spread is left after the information arrives.
Miss 3: formula without working. Textbook and course pages state Var(Y|X) = E[Y squared|X] – (E[Y|X]) squared and move on. The result block here prints P(A), both conditional moments, and the full substitution line, so a student can locate the exact step where their hand calculation diverged.
One honest limit: this tool conditions a single discrete variable on a subset of its own outcomes. Conditioning one variable on a second variable’s value, the E[Y|X = x] regression setup, needs a joint distribution table as input, which is a different tool.
Frequently Asked Questions
It is the variance of X computed on the distribution conditioned on an event A: Var(X|A) = E[X squared|A] – (E[X|A]) squared. Conditioning discards the outcomes outside A and rescales the rest by dividing by P(A), and the variance of that rescaled distribution is the conditional variance.
Three steps. Add the probabilities of the outcomes in A to get P(A). Divide each in-event joint contribution by P(A) to get E[X|A] and E[X squared|A]. Then subtract: Var(X|A) = E[X squared|A] – (E[X|A]) squared. The calculator prints each of these numbers so you can follow your own working against it.
Yes. Condition the four-sided die on its two extreme values, A = {1, 4}: the renormalized distribution is a fair coin between 1 and 4, with mean 2.5 and E[X squared|A] = 8.5, so Var(X|A) = 8.5 – 6.25 = 2.25, well above the unconditional 1.25. Conditioning on a spread-out subset concentrates probability on distant values.
P(A) is the total probability of the conditioning event: the sum of the probabilities of the outcomes you listed. It is the divisor in every renormalization step, and it doubles as a sanity check: a very small P(A) means you are conditioning on rare cases, so the conditional statistics rest on little probability mass.
Then the conditional distribution is undefined, because every conditional probability divides by P(A). The tool rejects it with an error. The same happens if none of your conditioning outcomes appear in the values list: there is nothing to renormalize.
Yes. They describe the full distribution of X before conditioning, so they must form a valid distribution (the tool allows a small rounding tolerance of 0.001). Probabilities that already describe only the conditioned cases belong in a plain variance calculation, not this one.
Var(X) = E[Var(X|A)] + Var(E[X|A]): the total spread equals the average within-event spread plus the spread between the conditional means. It is the formal version of “some variation lives inside groups and some lives between them”, it underlies ANOVA, and it gives you a way to verify conditional variance work, as the die example on this page shows.
Only when the conditioned outcomes are equally likely, as with the fair die, where {3, 4} averages to 3.5 either way. In general E[X|A] is the probability-weighted average after renormalization: an outcome with three times the probability of another pulls the conditional mean three times as hard.
Add This Calculator to Your Website
References
- Technion, “Probability and Statistics: A Survival Guide” – conditional mean and conditional variance defined as E[Y squared|X] minus (E[Y|X]) squared, with the law of total variance. Technion: Probability and Statistics Survival Guide. Accessed October 2026.
- LibreTexts, “Applied Probability: Conditional Expectation and Regression” – conditional distributions built from joint probabilities by renormalization, the operation this calculator performs. LibreTexts: Conditional Expectation, Regression. Accessed October 2026.
- University of Puerto Rico, “Conditional Expectation” course notes – worked examples of conditional distributions and their moments from joint tables. UPRM: Conditional Expectation Notes. Accessed October 2026.
- LibreTexts, “Statistical Analysis of Data for Engineers, Chapter 2” – variance as the second central moment and the conditional probability definition the renormalization depends on. LibreTexts: Histograms, Statistical Measures and Probability. Accessed October 2026.
- StatTrek, “Bayes Theorem” – conditioning as sample-space restriction, the single-event version of the idea this page applies to a full distribution. StatTrek: Bayes Theorem. Accessed October 2026.
