Sunteți pe pagina 1din 11

ECON10005 Quantitative Methods 1

Topic 2: What Do Skydiving & Stock Prices Have In Common? Lecture 3: Measures of Location & Variation
Reading: Chapters 4 (4.1, 4.2), 6 (249-50)

Today: Measures of Location & Variation


Measures of location, variation and association Lecture 3 Measures of Location Mean, Median & Mode Location & Skewness Measures of Variation Variance & Standard Deviation The Coefficient of Variation Lecture 4 Measures of Association Covariance Correlation

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 2

Mean, Median & Mode


Measures of location, variation and association Lecture 3 Measures of Location Mean, Median & Mode Location & Skewness Measures of Variation Variance & Standard Deviation The Coefficient of Variation Lecture 4 Measures of Association Covariance Correlation

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 3

Different Measures of Location


The term location refers to the centre of a data set. There are different ways of measuring this. If a sample of size n is taken from a population X, with the observed values x1, x2, , xn, the sample mean is the n average of those values: xi x1 + x 2 + ... + x n x= = i=1 n n The median is the middle observation in an ordered array (or the average of the two middle observations if there is no single middle observation). The mode is the most frequently occurring observation; there may more than one mode in a dataset.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 4

A Quick Example (from SSK)


7 research assistance have salaries (in $000s) of 42, 45, 40, 46, 44, 40 and 43. The mean is:
x=

x
n

42 + 45 + 40 + 46 + 44 + 40 + 43 = 42.857 7

To find the median, order the observations from lowest to highest: 40, 40, 42, 43, 44, 45, 46 The median is the middle observation: 43 The mode is the most frequent or common value: 40

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 5

The Population Mean


If we have a population of size N and we know all the population data x1, x2,, xN, the population mean is:

x
=
i=1

A sample mean x is an estimate of the population mean . Furthermore, x gives us the sampling error. We expect that as n increases, the sample becomes more representative of the population, and x converges on .
ECON10005 Measures of Location & Variation Lecture 3 - Slide 6

Comparing Measures of Location


The mean is easy to calculate and is often used for making inferences, but is sensitive to extreme observations. The median is not sensitive to extreme observations, and is sometimes used when the mean is an unhelpful measure of location. The mode is only really used when we are interested in knowing the most common outcome.

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 7

Location & Skewness


Measures of location, variation and association Lecture 3 Measures of Location Mean, Median & Mode Location & Skewness Measures of Variation Variance & Standard Deviation The Coefficient of Variation Lecture 4 Measures of Association Covariance Correlation

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 8

Symmetric Distributions A Quick Example


Consider the following relative frequency distribution:
Observations Frequencies 1 2 3 4 5 6 7 0.05 0.12 0.17 0.32 0.17 0.12 0.05

This distribution is symmetric about its mean: For this distribution, mean = median = mode = 4 The distribution is plotted on the next slide.

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 9

One Possible Symmetric Distribution


0.35 0.3 0.25 Frequency 0.2 0.15 0.1 0.05 0 1 2 3 4 Observation
ECON10005 Measures of Location & Variation Lecture 3 - Slide 10

Another Possible Symmetric Distribution


0.16 0.14

0.12

0.1 Frequency

0.08

0.06

0.04

0.02

0 1 2 3 4 Observation 5 6 7

This is a uniform distribution


ECON10005 Measures of Location & Variation Lecture 3 - Slide 11

Skewed Distributions - Summary


If a distribution is not symmetric then it is skewed. If the right tail of a distribution is longer than the left then it is skewed to the right (right-skewed or positively skewed). If the left tail is longer the distribution is skewed to the left (left-skewed or negatively skewed). If a distribution is uni-modal then we can show that it is:
Symmetrical if mean = median = mode Right-skewed if mean > median > mode Left-skewed if mode > median > mean

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 12

Skewness in Household Income


For the household income data, we had mean > median > mode, which implies the data was positively skewed. A histogram of the data generated using the steps from Lecture 2 supports this:
Household Income , 2005, in dollars
500 450 400 350 Frequency 300 250 200 150 100 50 0 10000 30000 50000 70000 90000 110000 130000 150000 170000 190000 More Bins (Upper Limits) ECON10005 Measures of Location & Variation Lecture 3 - Slide 13

Variance & Standard Deviation


Measures of location, variation and association Lecture 3 Measures of Location Mean, Median & Mode Location & Skewness Measures of Variation Variance & Standard Deviation The Coefficient of Variation Lecture 4 Measures of Association Covariance Correlation

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 14

Measures of Variation
Observations may be widely dispersed about the average value, or they may exhibit low variation and cluster tightly about the average value. Consider the following sample data on the percentage returns to different stocks in two portfolios, A and B:
A B 12 3 13 9 14 14 15 19 16 25

The mean return for A is 14. The mean return for B is also 14, but the returns are much more spread out around the mean value.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 15

Population Variance & Standard Deviation


Population variance measures an average of the squared deviations between each observation and the population mean. For a population of size N with population mean , the population variance, denoted 2, is: 1 N 2 2 = ( x i ) N i=1 The square root is known as the population standard deviation: 1 N 2 = 2 = ( xi ) N i=1
ECON10005 Measures of Location & Variation Lecture 3 - Slide 16

Sample Variance & Standard Deviation


If we do not have population data, we cannot determine the deviation of each observation from the population mean. We can take a sample of n observations (x1, x2,, xn) from the population and find the sample mean. We can then measure the deviation of an observation from the sample mean: (xi x). We can then construct a sample statistic for variance and standard deviation: estimates of the population parameters.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 17

Sample Variance & Standard Deviation


Sample variance measures the average of the squared deviations between each observation and the sample mean. For a sample of size n with sample mean x, the sample variance, denoted s2, is:

s2 =

1 n 2 ( xi x ) n 1 i=1

The square root is known as the sample standard deviation: 1 n 2 s = s2 = ( xi x ) n 1 i=1


ECON10005 Measures of Location & Variation Lecture 3 - Slide 18

Calculating Measures of Dispersion


Consider the data for portfolio B.
Observation 3 9 14 19 25

The mean is 14, so the deviations from the mean are:


Deviation -11 -5 0 5 11

These sum to zero. This is why we use squared deviations.


Squared Deviation 121 25 0 25 121

And so, s2 =

1 n 121 + 25 + 0 + 25 + 121 2 = 73 ( xi x ) = n 1 i=1 4

And so, s = 73 = 8.54


ECON10005 Measures of Location & Variation Lecture 3 - Slide 19

The Coefficient of Variation


Measures of location, variation and association Lecture 3 Measures of Location Mean, Median & Mode Location & Skewness Measures of Variation Variance & Standard Deviation The Coefficient of Variation Lecture 4 Measures of Association Covariance Correlation

ECON10005

Measures of Location & Variation

Coefficient of Variation
The coefficient of variation measures the variation in a sample (given by its standard deviation) relative to that samples mean. Denoted CV, it is expressed as a percentage, providing a unit-free measure: s CV = 100 % x This lets us compare the relative variation in different samples without having to worry about differences in units or scale.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 21

Using Measures of Variation


Consider again the data on returns on two portfolios:
A B 12 3 13 9 14 14 15 19 16 25

How might knowing the sample variance, standard deviation and coefficients of variation for each portfolio help you decide which portfolio you would want to invest in?

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 22

Comparing Coefficients of Variation


With a mean of 14 and a standard deviation of 8.54, for portfolio B, the coefficient of variation is:
8.54 CV = 100 % = 100(0.61)% = 61% 14

You should be able to show that portfolio A has a mean of 14, a variance of 2.5, a standard deviation of 1.58 and a coefficient of variation of around 11%. How might this information help you decide which portfolio you would want to invest in?

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 23

Objectives for This Lecture


After attending this lecture and completing all the related readings and questions you should be able to:
Distinguish between, calculate and interpret the population and sample mean Explain the relative merits of the mean and the median. Use the relative position of the mean, median and mode to determine whether a distribution is symmetrical, positively skewed or negatively skewed Distinguish between, calculate and interpret population and sample variance and standard deviation Explain the relative merits of the sample standard deviation and the coefficient of variation Calculate any of these measures using Excel
Quantitative Methods for Business Measures of Location & Variation Lecture 3 - Slide 24

Next Time...
Measures of location, variation and association Lecture 3 Measures of Location Mean, Median & Mode Location & Skewness Measures of Variation Variance & Standard Deviation The Coefficient of Variation Lecture 4 Measures of Association Covariance Correlation

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 25

Appendix: Some Tips on Using Excel


The lecture notes will often include some tips on using the Analysis Tools in Excel. They are provided to help you get started with the computing and so will typically not be discussed in lectures. They are best read when at a computer so that you can try things yourself. Because the Analysis Toolbox is not available in the Mac version of Excel, Microsoft recommend using the freely available StatPlus. A primer for StatPlus is available on the subjects LMS page. Both programs produce similar output but users of StatPlus should ensure that they know how to interpret the output of Excel as seen in both the Lecture Notes and the textbook.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 26

Measures of Location for Household Income


Recall the dataset from the last lecture for Australian households.

Suppose we want to calculate the mean, median and mode for household income (in column D).
ECON10005 Measures of Location & Variation Lecture 3 - Slide 27

Excel Commands for Measures of Location


To obtain the mean, pick an empty cell and type the following command:
=AVERAGE(D2:D2001)

Press enter, and Excel will return the value 71,927.77 To obtain the median, pick an empty cell and type the following command:
=MEDIAN(D2:D2001)

Press enter, and Excel will return the value 58,852 To obtain the mode in Excel, pick an empty cell and type the following command:
=MODE(D2:D2001)

Press enter, and Excel will return the value 12,220


ECON10005 Measures of Location & Variation Lecture 3 - Slide 28

Measures of Location in Excels Toolpak


In the Data Analysis Toolpak, select Descriptive Statistics.

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 29

Input Range and Summary Statistics


Give Excel the input range and check the box marked summary statistics.

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 30

10

Excel Output
Excel generates a range of descriptive statistics. These include the mean, median and mode, which are identical to the values returned from entering direct commands. Note this output also contains measures of variation such as the sample variance and standard deviation.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 31

Excel and Measures of Variation


For the data on household income: To obtain the sample variance, pick an empty cell and type the following command:
=VAR(D2:D2001)

Press enter, and Excel will 3,851,046,073.33 (or 3.85E+09)

return

the

value

To obtain the sample standard deviation, pick an empty cell and type the following command:
=STDEV(D2:D2001)

Press enter, and Excel will return the value 62,056.80 If you have population data and want the population values, use the commands VARP or STDEVP instead.
ECON10005 Measures of Location & Variation Lecture 3 - Slide 32

Excel and the Coefficient of Variation


Excel doesnt generate the coefficient of variation as part of its standard set of summary statistics. However, as it gives both the mean and sample standard deviation, it is still easy to calculate. For the data on household income, the mean was 71,927.77, and the standard deviation was 62,056.797. This gives a coefficient of variation of approximately 86.28%.

ECON10005

Measures of Location & Variation

Lecture 3 - Slide 33

11

S-ar putea să vă placă și