https://www.johndcook.com/blog/2025/11/12/minimum-variance/ John D. Cook Skip to content * MATH + PROBABILITY + SIGNAL PROCESSING + NUMERICAL COMPUTING + SEE ALL ... * STATS + EXPERT TESTIMONY + WEB ANALYTICS + FORECASTING + RNG TESTING + SEE ALL ... * PRIVACY + HIPAA + SAFE HARBOR + CRYPTOGRAPHY + DIFFERENTIAL PRIVACY + PRIVACY FAQ * WRITING + BLOG + RSS FEED + TWITTER + SUBSTACK + ARTICLES + TECH NOTES * ABOUT + CLIENTS + ENDORSEMENTS + TEAM + SERVICES (832) 422-8646 Contact Weighting an average to minimize variance Posted on 12 November 2025 by John Suppose you have $100 to invest in two independent assets, A and B, and you want to minimize volatility. Suppose A is more volatile than B. Then putting all your money on A would be the worst thing to do, but putting all your money on B would not be the best thing to do. The optimal allocation would be some mix of A and B, with more (but not all) going to B. We will formalize this problem and determine the optimal allocation, then generalize the problem to more assets. Two variables Let X and Y be two independent random variables with finite variance and assume at least one of X and Y is not constant. We want to find t that minimizes \text{Var}[tX + (1-t)Y] subject to the constraint 0 <= t <= 1. Because X and Y are independent, \text{Var}[tX + (1-t)Y] = t^2 \text{Var}[X] + (1-t)^2 \text{Var}[Y] Taking the derivative with respect to t and setting it to zero shows that t = \frac{\text{Var}[Y]}{\text{Var}[X] + \text{Var}[Y]} So the smaller the variance on Y, the less we allocate to X. If Y is constant, we allocate nothing to X and go all in on Y. If X and Y have equal variance, we allocate an equal amount to each. If X has twice the variance of Y, we allocate 1/3 to X and 2/3 to Y. Multiple variables Now suppose we have n independent random variables X[i] for i running from 1 to n, and at least one of the variables is not constant. Then we want to minimize \text{Var}\left[ \sum_{i=1}^n t_i X_i \right] = \sum_{i=1}^n t_i^2 \ text{Var}[X_i] subject to the constraint \sum_{i=1}^n t_i = 1 and all t[i] non-negative. We can solve this optimization problem with Lagrange multipliers and find that t_i \text{Var}[X_i] = t_j \text{Var}[X_j] for all 1 <= i, j <= n. These (n - 1) equations along with the constraint that all the t[i] sum to 1 give us a system of equations whose solution is t_i = \frac{\prod_{j \ne i} \text{Var}[X_j]}{\sum_{i = 1}^n \prod_{j \ne i} \text{Var}[X_j]} Incidentally, the denominator has a name: the (n - 1)st elementary symmetric polynomial in n variables. More on this in the next post. Related posts * Symmetric funcions and U-statistics * Regular solids and Monte Carlo integration * Lagrange multiplier set up. Now what? Categories : Statistics Uncategorized Tags : Probability and Statistics Bookmark the permalink Post navigation Previous PostBrownian motion and Riemann zeta Next PostElementary symmetric polynomials and optimization Leave a Reply Your email address will not be published. Required fields are marked * [ ] [ ] [ ] [ ] [ ] [ ] [ ] Comment * [ ] Name * [ ] Email * [ ] Website [ ] [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] D[ ] Search for: [ ] [Search] John D. Cook John D. Cook, PhD My colleagues and I have decades of consulting experience helping companies solve complex problems involving data privacy, applied math , and statistics. Let's talk. We look forward to exploring the opportunity to help your company too. John D. Cook (c) All rights reserved. Search for: [ ] [Search] (832) 422-8646 EMAIL