Covariance
Covariance is a measure of the relationship between two random variables, designed to show the degree of comovement between them. Covariance is calculated based on the probabilityweighted average of the crossproducts of each random variable's deviation from its own expected value. A positive number indicates comovement (i.e. the variables tend to move in the same direction); a value of 0 indicates no relationship, and a negative covariance shows that the variables move in the opposite direction.
The process for actually computing covariance values is complicated and timeconsuming, and it is not likely to be covered on a CFA exam question. Although the detailed formulas and examples of computations are presented in the reference text, for most people, spending too much valuable study time absorbing such detail will have you bogged down with details that are unlikely to be tested.
Correlation
Correlation is a concept related to covariance, as it also gives an indication of the degree to which two random variables are related, and (like covariance) the sign shows the direction of this relationship (positive (+) means that the variables move together; negative () means they are inversely related). Correlation of 0 means that there is no linear relationship one way or the other, and the two variables are said to be unrelated.
A correlation number is much easier to interpret than covariance because a correlation value will always be between 1 and +1.
 1 indicates a perfectly inverse relationship (a unit change in one means that the other will have a unit change in the opposite direction)
 +1 means a perfectly positive linear relationship (unit changes in one always bring the same unit changes in the other).
Moreover, there is a uniform scale from 1 to +1 so that as correlation values move closer to 1, the two variables are more closely related. By contrast, a covariance value between two variables could be very large and indicate little actual relationship, or look very small when there is actually a strong linear correlation.
Correlation is defined as the ratio of the covariance between two random variables and the product of their two standard deviations, as presented in the following formula:
Formula 2.24 Correlation (A, B) = _____Covariance (A, B) Standard Deviation (A)* Standard Deviation (B) 
As a result: Covariance (A, B) = Correlation (A, B)*Standard Deviation (A)*Standard Deviation (B)
Both correlation and covariance with these formulas are likely to be required in a calculation in which the other terms are provided. Such an exercise simply requires remembering the relationship, and substituting the terms provided. For example, if a covariance between two numbers of 30 is given, and standard deviations are 5 and 15, the correlation would be 30/(5)*(15) = 0.40. If you are given a correlation of 0.40 and standard deviations of 5 and 15, the covariance would be (0.4)*(5)*(15), or 30.
Expected Return, Variance and Standard Deviation of a Portfolio
Expected return is calculated as the weighted average of the expected returns of the assets in the portfolio, weighted by the expected return of each asset class. For a simple portfolio of two mutual funds, one investing in stocks and the other in bonds, if we expect the stock fund to return 10% and the bond fund to return 6%, and our allocation is 50% to each asset class, we have:
Expected return (portfolio) = (0.1)*(0.5) + (0.06)*(0.5) = 0.08, or 8%
Variance (Ïƒ^{2}) is computed by finding the probabilityweighted average of squared deviations from the expected value.
Example: Variance
In our previous example on making a sales forecast, we found that the expected value was $14.2 million. Calculating variance starts by computing the deviations from $14.2 million, then squaring:
Scenario  Probability  Deviation from Expected Value  Squared 
1  0.1  (16.0  14.2) = 1.8  3.24 
2  0.30  (15.0  14.2) = 0.8  0.64 
3  0.30  (14.0  14.2) =  0.2  0.04 
4  0.30  (13.0  14.2) =  1.2  1.44 
Answer:
Variance weights each squared deviation by its probability: (0.1)*(3.24) + (0.3)*(0.64) + (0.3)*(0.04) + (0.3)*(1.44) = 0.96
The variance of return is a function of the variance of the component assets as well as the covariance between each of them. In modern portfolio theory, a low or negative correlation between asset classes will reduce overall portfolio variance. The formula for portfolio variance in the simple case of a twoasset portfolio is given by:
Formula 2.25 Portfolio Variance = w^{2}_{A}*Ïƒ^{2}(R_{A}) + w^{2}_{B}*Ïƒ^{2}(R_{B}) + 2*(w_{A})*(w_{B})*Cov(R_{A}, R_{B}) Where: w_{A} and w_{B }are portfolio weights, Ïƒ^{2}(R_{A}) and Ïƒ^{2}(R_{B}) are variances and Cov(R_{A}, R_{B}) is the covariance 
Example: Portfolio Variance
Data on both variance and covariance may be displayed in a covariance matrix. Assume the following covariance matrix for our twoasset case:
Stock  Bond  
Stock  350  80 
Bond  80 
From this matrix, we know that the variance on stocks is 350 (the covariance of any asset to itself equals its variance), the variance on bonds is 150 and the covariance between stocks and bonds is 80. Given our portfolio weights of 0.5 for both stocks and bonds, we have all the terms needed to solve for portfolio variance.
Answer:
Portfolio variance = w^{2}_{A}*Ïƒ^{2}(R_{A}) + w^{2}_{B}*Ïƒ^{2}(R_{B}) + 2*(w_{A})*(w_{B})*Cov(R_{A}, R_{B}) =(0.5)^{2}*(350) + (0.5)^{2}*(150) + 2*(0.5)*(0.5)*(80) = 87.5 + 37.5 + 40 = 165.
Standard Deviation (Ïƒ), as was defined earlier when we discuss statistics, is the positive square root of the variance. In our example, Ïƒ = (0.96)^{1/2}, or $0.978 million.
Standard deviation is found by taking the square root of variance:
(165)^{1/2 }= 12.85%.
A twoasset portfolio was used to illustrate this principle; most portfolios contain far more than two assets, and the formula for variance becomes more complicated for multiasset portfolios (all terms in a covariance matrix need to be added to the calculation).
Joint Probability Functions and Covariance
Let's now apply the joint probability function to calculating covariance:
Example: Covariance from a Joint Probability Function
To illustrate this calculation, let's take an example where we have estimated the yearoveryear sales growth for GM and Ford in three industry environments: strong (30% probability), average (40%) and weak (30%). Our estimates are indicated in the following jointprobability function:
Â  F Sales +6%  F Sales +3%  F Sales 1% 
GM Sales +10%  Strong (0.3)     
GM Sales + 4%    Avg. (0.4)   
GM Sales 4%      Weak (0.3) 
Answer:
To calculate covariance, we start by finding the probabilityweighted sales estimate (expected value):
GM = (0.3)*(10) + (0.4)*(4) + (.03)*( 4) = 3 + 1.6  1.2 = 3.4%
Ford = (0.3)*(6) + (0.4)*(3) + (0.3)*( 1) = 1.8 + 1.2  0.3 = 2.7%
In the following table, we compute covariance by taking the deviations from each expected value in each market environment, multiplying the deviations together (the cross products) and then weighting the cross products by the probability
Environment  GM deviation  F deviation  Crossproducts  Prob.  Probwtd. 
Strong  10  3.4 = 6.6  6  2.7 = 3.3  6.6*3.3 = 21.78  0.3  6.534 
Average  4  3.4 = 0.6  3  2.7 = 0.3  0.6*0.3 = 0.18  0.4  0.072 
Weak  4  3.4 = 7.4  1  2.7 = 3.7  7.4*3.7 = 27.38  0.3  8.214 
The last column (probwtd.) was found by multiplying the cross product (column 4) by the probability of that scenario (column 5).
The covariance is found by adding the values in the last column: 6.534+0.072+8.214 = 14.82.
Bayes' Formula
We all know intuitively of the principle that we learn from experience. For an analyst, learning from experience takes the form of adjusting expectations (and probability estimates) based on new information. Bayes' formula essentially takes this principle and applies it to the probability concepts we have already learned, by showing how to calculate an updated probability, the new probability given this new information. Bayes' formula is the updated probability, given new information:
Bayes' Formula:
Conditional probability of new info. given the event * (Prior probability of the event)
Unconditional Probability of New Info
Formula 2.26 P(E  I) = P(I  E) / P(I) * P(E) Where: E = event, I = new info 
The Multiplication Rule of Counting
The multiplication rule of counting states that if the specified number of tasks is given by k and n_{1}, n_{2}, n_{3, }... n_{k} are variables used for the number of ways each of these tasks can be done, then the total number of ways to perform k tasks is found by multiplying all of the n_{1}, n_{2}, n_{3, }... n_{k} variables together.
Take a process with four steps:
Step 
Number of ways this step can be done 
1  6 
2  3 
3  1 
4  5 
This process can be done a total of 90 ways. (6)*(3)*(1)*(5) = 90.
Factorial Notation
n! = n*(n  1)*(n  2) ... *1. In other words, 5!, or 5 factorial is equal to (5)*(4)*(3)*(2)*(1) = 120. In counting problems, it is used when there is a given group of size n, and the exercise is to assign the group to n slots; then the number of ways these assignments could be made is given by n!. If we were managing five employees and had five job functions, the number of possible combinations is 5! = 120.
Combination Notation
Combination notation refers to the number of ways that we can choose r objects from a total of n objects, when the order in which the r objects is listed does not matter.
In shorthand notation:
Formula 2.27
_{n}C_{r} = n = n! 
Thus if we had our five employees and we needed to choose three of them to team up on a new project, where they will be equal members (i.e. the order in which we choose them isn't important), formula tells us that there are 5!/(5  3)!3! = 120/(2)*(6) = 120/12, or 10 possible combinations.
Permutation notation
Permutation notation takes the same case (choosing r objects from a group of n) but assumes that the order that "r" is listed matters. It is given by this notation:
Formula 2.28 _{n}P_{r} = n!/(n  r)! 
Returning to our example, if we not only wanted to choose three employees for our project, but wanted to establish a hierarchy (leader, secondincommand, subordinate), by using the permutation formula, we would have 5!/(5  3)! = 120/2 = 60 possible ways.
Now, let's consider how to calculate problems asking the number of ways to choose robjects from a total of nobjects when the order in which the robjects are listed matters, and when the order does not matter.
 The combination formula is used if the order of r does not matter. For choosing three objects from a total of five objects, we found 5!/(5  3)!*3!, or 10 ways.
 The permutation formula is used if the order of r does matter. For choosing three objects from a total of five objects, we found 5!/(5  3)!, or 60 ways.
Method  When appropriate? 
Factorial  Assigning a group of size n to n slots 
Combination  Choosing r objects (in any order) from group of n 
Permutation  Choosing r objects (in particular order) from group of n 
Common Probability Distributions

Investing
What is Covariance?
Covariance is a concept used in statistics and probability theory to describe how two variables change when compared to one another. In business and investing, covariance is used to determine ... 
Investing
Calculating Covariance For Stocks
Learn how to figure out how two stocks might move together in the future by calculating covariance. 
Investing
Calculating Portfolio Variance
Portfolio variance is a measure of a portfolioâ€™s volatility, and is a function of two variables. 
Investing
Explaining Variance
Variance is a measurement of the spread between numbers in a data set. 
Investing
Regression Basics For Business Analysis
This tool is easy to use and can provide valuable information on financial analysis and forecasting. Find out how. 
Investing
Using Historical Volatility To Gauge Future Risk
Use these calculations to uncover the risk involved in your investments. 
Trading
Exploring The Exponentially Weighted Moving Average
Learn how to calculate a metric that improves on simple variance. 
Investing
Computing Historical Volatility in Excel
We examine how annualized historical volatility is computed from daily log returns, variance and standard deviation. 
Investing
The Uses And Limits Of Volatility
Check out how the assumptions of theoretical risk models compare to actual market performance.