# Statistical Analysis in Finance

## Measures of Spread

By the end of this section, you will be able to:
1. Define and calculate standard deviation for a data set.
2. Define and calculate variance for a data set.
3. Explain the relationship between standard deviation and variance.

### Standard Deviation

An important characteristic of any set of data is the variation in the data. In some data sets, the data values are concentrated close to the mean; in other data sets, the data values are more widely spread out. For example, an investor might examine the yearly returns for Stock A, which are 1%, 2%, -1%, 0%, and 3%, and compare them to the yearly returns for Stock B, which are -9%, 2%, 15%, -5%, and 0%.
Notice that Stock B exhibits more volatility in yearly returns than Stock A. The investor may want to quantify this variation in order to make the best investment decisions for a particular investment objective.
The most common measure of variation, or spread, is standard deviation. The standard deviation of a data set is a measure of how far the data values are from their mean. A standard deviation
1. provides a numerical measure of the overall amount of variation in a data set; and
2. can be used to determine whether a particular data value is close to or far from the mean.
The standard deviation provides a measure of the overall variation in a data set. The standard deviation is always positive or zero. It is small when the data values are all concentrated close to the mean, exhibiting little variation or spread. It is larger when the data values are more spread out from the mean, exhibiting more variation.
Suppose that we are studying the variability of two different stocks, Stock A and Stock B. The average stock price for both stocks is $5. For Stock A, the standard deviation of the stock price is 2, whereas the standard deviation for Stock B is 4. Because Stock B has a higher standard deviation, we know that there is more variation in the stock price for Stock B than in the price for Stock A.
There are two different formulas for calculating standard deviation. Which formula to use depends on whether the data represents a sample or a population. The notation s is used to represent the sample standard deviation, and the notation  is used to represent the population standard deviation. In the formulas shown below, x̄ is the sample mean,  is the population mean, n is the sample size, and N is the population size.
Formula for the sample standard deviation:
Formula for the population standard deviation:

### Variance

Variance also provides a measure of the spread of data values. The variance of a data set measures the extent to which each data value differs from the mean. The more the individual data values differ from the mean, the larger the variance. Both the standard deviation and the variance provide similar information.
In a finance application, variance can be used to determine the volatility of an investment and therefore to help guide financial decisions. For example, a more cautious investor might opt for investments with low volatility.
Similar to standard deviation, the formula used to calculate variance also depends on whether the data is collected from a sample or a population. The notation  is used to represent the sample variance, and the notation σ2 is used to represent the population variance.
Formula for the sample variance:
Formula for the population variance:
This is the method to calculate standard deviation and variance for a sample:
1. First, find the mean  of the data set by adding the data values and dividing the sum by the number of data values.
2. Set up a table with three columns, and in the first column, list the data values in the data set.
3. For each row, subtract the mean from the data value , and enter the difference in the second column. Note that the values in this column may be positive or negative. The sum of the values in this column will be zero.
4. In the third column, for each row, square the value in the second column. So this third column will contain the quantity (Data Value – Mean)2 for each row. We can write this quantity as .  Note that the values in this third column will always be positive because they represent a squared quantity.
5. Add up all the values in the third column. This sum can be written as .
6. Divide this sum by the quantity (n – 1), where n is the number of data points. We can write this as .
7. This result is called the sample variance, denoted by s2. Thus, the formula for the sample variance is .
8. Now take the square root of the sample variance. This value is the sample standard deviation, called s. Thus, the formula for the sample standard deviation is .
9. Round-off rule: The sample variance and sample standard deviation are typically rounded to one more decimal place than the data values themselves.
As the above example illustrates, calculating the variance and standard deviation is a tedious process. A financial calculator can calculate statistical measurements such as mean and standard deviation quickly and efficiently.
There are two steps needed to perform statistical calculations on the calculator:
1. Enter the data in the calculator using the [DATA] function, which is located above the 7 key.
2. Access the statistical results provided by the calculator using the [STAT] function, which is located above the 8 key.
Follow the steps in  to calculate mean and standard deviation using the financial calculator. The ages data set from the Think It Through example above is used again here: 40, 36, 44, 51, 54, 55, 39, 47, 44, 50.
From the statistical results, the mean is shown as 46, and the sample standard deviation is shown as 6.50.
Excel provides a similar analysis using the built-in functions =AVERAGE (for the mean) and =STDEV.S (for the sample standard deviation). To calculate these statistical results in Excel, enter the data values in a column. Let’s assume the data values are placed in cells A2 through A11. In any cell, type the Excel command =AVERAGE(A2:A11) and press enter. Excel will calculate the arithmetic mean in this cell. Then, in any other cell, type the Excel command =STDEV.S(A2:A11) and press enter. Excel will calculate the sample standard deviation in this cell.  shows the mean and standard deviation for the 10 ages.

### Relationship between Standard Deviation and Variance

In the formulas shown above for variance and standard deviation, notice that the variance is the square of the standard deviation, and the standard deviation is the square root of the variance.
Once you have calculated one of these values, you can directly calculate the other value. For example, if you know the standard deviation of a data set is 12.5, you can calculate the variance by squaring this standard deviation. The variance is then 12.52, which is 156.25.
In the same way, if you know the value of the variance, you can determine the standard deviation by calculating the square root of the variance. For example, if the variance of a data set is known to be 31.36, then the standard deviation can be calculated as the square root of 31.36, which is 5.6.
One disadvantage of using the variance is that the variance is measured in square units, which are different from the units in the data set. For example, if the data set consists of ages measured in years, then the variance would be measured in years squared, which can be confusing. The standard deviation is measured in the same units as the original data set, and thus the standard deviation is used more commonly than the variance to measure the spread of a data set.

### 

The standard deviation and variance are measures of the spread of a data set. The standard deviation is small when the data values are all concentrated close to the mean, exhibiting little variation or spread. The standard deviation is larger when the data values are more spread out from the mean, exhibiting more variation. The formula used to calculate the standard deviation depends on whether the data represents a sample or a population, as the formulas for the sample standard deviation and the population standard deviation are slightly different.

### 


### 
