How to Find Variance and Standard Deviation: A Complete Guide

6 min read

Understanding Variance and Standard Deviation in Probability Theory

When calculating expected value in games of chance or evaluating strategic decisions, knowing the average outcome tells only half the story. In probability theory and statistics, variance is the expected value of the squared deviation from the mean of a random variable, while the standard deviation is obtained as the square root of the variance. These measures reveal how spread out your potential outcomes are—critical information whether you're analyzing poker hands, evaluating investment strategies, or making any decision under uncertainty.

Think of it this way: two different games might both have an expected value of $10, but one might consistently pay between $8 and $12, while the other swings wildly between -$50 and +$70. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers are spread out from their average value. Understanding this spread is essential for making informed decisions in probability-based scenarios.

The Step-by-Step Process for Calculating Variance

Let's break down variance calculation into manageable steps. The variance of a random variable X, with mean EX=μ_X, is defined as Var(X)=E[(X-μ_X)²]. In plain English, you're finding the average of squared deviations from the mean.

Step 1: Calculate the Mean (Expected Value)

To find the expected value or long term average, μ, simply multiply each value of the random variable by its probability and add the products. For example, if you're rolling a fair six-sided die, each outcome (1, 2, 3, 4, 5, 6) has a probability of 1/6. The mean equals (1×1/6) + (2×1/6) + (3×1/6) + (4×1/6) + (5×1/6) + (6×1/6) = 3.5.

Step 2: Find Deviations from the Mean

Subtract the mean from each possible outcome. For our die example, you'd calculate: (1-3.5), (2-3.5), (3-3.5), (4-3.5), (5-3.5), and (6-3.5). These deviations show how far each value sits from the center.

Step 3: Square Each Deviation

Why square the differences? Simply subtracting the mean from each data point would result in negative values for numbers smaller than the mean. By squaring the differences, we will get all the values are positive. Additionally, squaring emphasizes larger deviations, which matters when assessing risk.

Step 4: Calculate the Weighted Average

Multiply each squared deviation by its probability, then sum these products. For our die: [(−2.5)²×1/6] + [(−1.5)²×1/6] + [(−0.5)²×1/6] + [(0.5)²×1/6] + [(1.5)²×1/6] + [(2.5)²×1/6] = 2.92.

There's also a convenient shortcut formula. Var(X) = E[X²] - μ_X². Equation 3.5 is usually easier to work with compared to Var(X)=E[(X-μ_X)²]. This alternative approach can save time in complex calculations.

From Variance to Standard Deviation

While variance provides valuable information, it has one quirky characteristic: Var(X) has a different unit than X. For example, if X is measured in meters then Var(X) is in meters². This makes variance somewhat unintuitive for practical interpretation.

Enter standard deviation. The standard deviation of a random variable X is defined as SD(X)= σ_X= √Var(X). The standard deviation of X has the same unit as X. Simply take the square root of your variance to get standard deviation. In our die example: √2.92 ≈ 1.71.

In statistics, the standard deviation is a measure of the amount of variation of the values of a variable about its mean. A low standard deviation indicates that the values tend to be close to the mean (also called the expected value) of the set, while a high standard deviation indicates that the values are spread out over a wider range.

Real-World Example: Analyzing a Casino Game

Let's apply these concepts to a practical scenario. Consider a simple coin-flip game: you pay $2 to play, and if the coin lands heads, you win $5 (net gain of $3). If tails, you lose your $2.

First, calculate expected value: E(X) = (0.5 × $3) + (0.5 × -$2) = $1.50 - $1.00 = $0.50. On average, you gain 50 cents per game.

Now find the variance: E(X²) = (0.5 × 3²) + (0.5 × (-2)²) = 4.5 + 2 = 6.5. Therefore, Var(X) = 6.5 - (0.5)² = 6.5 - 0.25 = 6.25. The standard deviation is √6.25 = 2.5.

This tells you that while the expected value is positive, individual outcomes vary significantly—by about $2.50 on average from the expected value.

Applications in Game Theory and Strategic Decision-Making

Expected value is important in game theory because it allows players to make informed decisions based on the likelihood of different outcomes and the potential gains or losses associated with each outcome. By calculating the expected value of each possible action, a player can choose the action that has the highest expected value.

However, variance adds another dimension to strategic thinking. Underdogs may be better off taking "risky" strategies - giving up some points in expected value to increase the standard deviation. This counterintuitive insight reveals why trailing teams in sports often employ high-variance strategies late in games.

Take a situation where Team A is a 6-point favorite over Team B, with a standard deviation for the game equal to 12 points. Team B needs a situation where they come out ahead by more than half of a standard deviation in order to win - in other words, a Z score > 0.5. Outcomes of Z>0.5 happen about 31% of the time.

Variance enters as a measure of risk and it is used as an additive adjustment to expectation. In financial contexts, Risk is an important factor in determining how to efficiently manage a portfolio of investments because it determines the variation in returns on the asset or portfolio and gives investors a mathematical basis for investment decisions (known as mean-variance optimization). The fundamental concept of risk is that as it increases, the expected return on an investment should increase as well.

Important Properties and Formulas

Understanding how variance behaves under transformations helps with complex calculations. For a random variable X and real numbers a and b, Var(aX+b)=a² Var(X). Notice that adding a constant doesn't change variance, but multiplying scales it by the square factor.

When we look at sum of independent random variables, if X₁, X₂,...,Xₙ are independent random variables and X=X₁+X₂+...+Xₙ, then Var(X)=Var(X₁)+Var(X₂)+...+Var(Xₙ). This additive property for independent variables proves invaluable when analyzing compound scenarios.

Practical Tips for Calculation

When working with samples rather than entire populations, use the sample variance formula with (n-1) in the denominator instead of n. The use of the term n − 1 is called Bessel's correction, and it is also used in sample covariance and the sample standard deviation. This correction provides an unbiased estimate of the population variance.

For quick reference, most statistical software and spreadsheets include built-in variance and standard deviation functions. In Excel, use VAR.S for sample variance and STDEV.S for sample standard deviation.

Why These Measures Matter

In areas like algorithm analysis, machine learning, and data analysis, expected value and variance are fundamental concepts. Machine learning: Evaluating model performance, optimizing algorithms (e.g., reinforcement learning to maximize expected rewards), making predictions using probabilistic models. Gaming & Gambling: Used to determine the probability of winning or losing in games of chance.

Understanding variance and standard deviation transforms how you approach uncertain situations. Instead of just asking "What's the average outcome?", you'll ask "How reliable is that average?" and "What's the range of likely results?" These questions separate novice probability thinkers from experts who make consistently better decisions under uncertainty.

For more foundational concepts, check out the Wikipedia article on variance and explore the comprehensive probability course materials available online. To dive deeper into game theory applications, the game theory overview on Wikipedia provides excellent context for strategic decision-making.