Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Chapter 3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

1/15/2024

ECONOMICS AND DATA ANALYSIS


(ECON 2550)

CHAPTER 3
NUMERICAL DESCRIPTIVE MEASURES

OBJECTIVES
In this chapter, you learn to:
• Describe the properties of central tendency, variation, and shape in
numerical variables.
• Construct and interpret a boxplot.
• Compute descriptive summary measures for a population.
• Calculate the covariance and the coefficient of correlation.

1
1/15/2024

SUMMARY DEFINITIONS
• The central tendency is the extent to which the values of a numerical
variable group around a typical or central value.

• The variation is the amount of dispersion or scattering away from a


central value that the values of a numerical variable show.

• The shape is the pattern of the distribution of values from the lowest
value to the highest value.

MEASURES OF CENTRAL TENDENCY:THE MEAN


• The arithmetic mean (often just called the “mean”)
is the most common measure of central tendency.
• For a sample of size n:

Pronounced X-bar The ith value

X i
X1  X 2    Xn
X i 1

n n
Sample size Observed values

2
1/15/2024

MEASURES OF CENTRAL TENDENCY: THE MEAN (CON’T)


• The most common measure of central tendency.
• Mean = sum of values divided by the number of values.
• Affected by extreme values (outliers).

11 12 13 14 15 16 17 18 19 20 11 12 13 14 15 16 17 18 19 20

Mean = 13 Mean = 14
11  12  13  14  15 65 11  12  13  14  20 70
  13   14
5 5 5 5

MEASURES OF CENTRAL TENDENCY: THE MEDIAN

• In an ordered array, the median is the “middle” number (50% above, 50%
below).

11 12 13 14 15 16 17 18 19 20 11 12 13 14 15 16 17 18 19 20

Median = 13 Median = 13
• Less sensitive than the mean to extreme values.

3
1/15/2024

MEASURES OF CENTRAL TENDENCY: LOCATING THE


MEDIAN
• The location of the median when the values are in numerical order (smallest to largest):
n 1
Median position  position in the ordered data
2

• If the number of values is odd, the median is the middle number.


• If the number of values is even, the median is the average of the two middle numbers.
𝑛 1
• Note that is not the value of the median, only the position of the median in the
2
ranked data.

MEASURES OF CENTRAL TENDENCY:THE MODE


• Value that occurs most often.
• Not affected by extreme values.
• Used for either numerical or categorical data.
• There may be no mode.
• There may be several modes.

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6

Mode = 9 No Mode

4
1/15/2024

MEASURES OF CENTRAL TENDENCY: REVIEW EXAMPLE

House Prices: • Mean: ($3,000,000/5) = $600,000


$2,000,000 • Median: middle value of ranked data
$ 500,000
$ 300,000
= $300,000
$ 100,000
• Mode: most frequent value = $100,000
$ 100,000
Sum $ 3,000,000

MEASURES OF CENTRAL TENDENCY: WHICH MEASURE


TO CHOOSE?
• The mean is generally used, unless extreme values (outliers) exist.
• The median is often used, since the median is not sensitive to extreme
values. For example, median home prices may be reported for a region; it
is less sensitive to outliers.
• In many situations it makes sense to report both the mean and the
median.

5
1/15/2024

MEASURING CENTRAL TENDENCY FOR THE RATE OF


CHANGE OF A VARIABLE OVER TIME: GEOMETRIC MEAN
& GEOMETRIC MEAN RATE OF RETURN
• Geometric mean
• Used to measure the rate of change of a variable over time.

X G  (X1  X 2   X n )1 / n
• Geometric mean rate of return
• Measures the status of an investment over time.

R G  [(1  R1 )  (1  R 2 )    (1  Rn )]1/ n  1
• Where Ri is the rate of return in time period i.

THE GEOMETRIC MEAN & THE GEOMETRIC MEAN RATE


OF RETURN: EXAMPLE
An investment of $100,000 declined to $50,000 at the end of year one and rebounded to $100,000
at end of year two:

X1  $ 100 ,000 X 2  $ 50,000 X 3  $ 100 ,000

50% decrease 100% increase


The overall two-year return is zero, since it started and ended at the same level.

6
1/15/2024

THE GEOMETRIC MEAN & GEOMETRIC MEAN RATE OF


RETURN: EXAMPLE (CON’T)
• Use the 1-year returns to compute the arithmetic mean and the geometric
mean:

Arithmetic
mean rate ( .5)  (1) Misleading result
X  .25  25%
of return: 2

Geometric RG  [(1  R1 )  (1  R2 )   (1  Rn )]  1
1/ n
More
mean rate of  [(1  ( .5))  (1  (1))]1 / 2  1 representative
return:  [(.50)  ( 2)]1 / 2  1  11 / 2  1  0% result

MEASURES OF CENTRAL TENDENCY: SUMMARY

Central Tendency

Arithmetic Median Mode Geometric Mean


Mean
n

X i
XG  ( X1  X2    Xn )1/ n

X i1
Rate of change
n Middle value Most
of a variable
in the ordered frequently
over time
array observed
value

7
1/15/2024

MEASURES OF VARIATION

Variation

Range Variance Standard Coefficient


Deviation of Variation

 Measures of variation give


information on the spread or
variability or dispersion of
the data values.

Same center,
different variation

MEASURES OF VARIATION: THE RANGE


• Simplest measure of variation.
• Difference between the largest and the smallest values:

Range = Xlargest – Xsmallest

Example:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14

Range = 13 - 1 = 12

8
1/15/2024

MEASURES OF VARIATION: WHY THE RANGE CAN BE


MISLEADING

• Does not account for how the data are distributed.

7 8 9 10 11 12 7 8 9 10 11 12
Range = 12 - 7 = 5 Range = 12 - 7 = 5

• Sensitive to outliers 1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,4,5


Range = 5 - 1 = 4

1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,4,120
Range = 120 - 1 = 119

MEASURES OF VARIATION: THE SAMPLE VARIANCE


• Average (approximately) of squared deviations of values from the mean.

• Sample variance: n

 (X i  X) 2
S2  i 1
n -1

Where X = arithmetic mean


n = sample size
Xi = ith value of the variable X

9
1/15/2024

MEASURES OF VARIATION: THE SAMPLE STANDARD


DEVIATION
• Most commonly used measure of variation.
• Shows variation about the mean.
• Is the square root of the variance.
• Has the same units as the original data.

 (X  X)
i
2

• Sample standard deviation: S i 1


n -1

MEASURES OF VARIATION: THE SAMPLE STANDARD


DEVIATION

Steps for Computing Standard Deviation:

1. Compute the difference between each value and the mean.


2. Square each difference.
3. Add the squared differences.
4. Divide this total by n-1 to get the sample variance.
5. Take the square root of the sample variance to get the sample standard deviation.

10
1/15/2024

MEASURES OF VARIATION: SAMPLE STANDARD


DEVIATION CALCULATION EXAMPLE

Sample
Data (Xi) : 10 12 14 15 17 18 18 24 n=8 Mean = X = 16

(10  X)2  (12  X)2  (14  X)2    (24  X)2


S
n 1

(10  16)2  (12  16)2  (14  16)2    (24  16)2



8 1

130
  4.3095 A measure of the “average”.
7

MEASURES OF VARIATION: COMPARING STANDARD


DEVIATIONS

Data A
Mean = 15.5
11 12 13 14 15 16 17 18 19 20 21 S = 3.338

Data B Mean = 15.5


11 12 13 14 15 16 17 18 19 20
S = 0.926
21

Data C Mean = 15.5


S = 4.567
11 12 13 14 15 16 17 18 19 20 21

11
1/15/2024

MEASURES OF VARIATION: COMPARING STANDARD


DEVIATIONS

Smaller standard deviation

Larger standard deviation

MEASURES OF VARIATION: SUMMARY


CHARACTERISTICS

• The more the data are spread out, the greater the range, variance, and standard
deviation.
• The more the data are concentrated, the smaller the range, variance, and
standard deviation.
• If the values are all the same (no variation), all these measures will be zero.
• None of these measures are ever negative.

12
1/15/2024

MEASURES OF VARIATION: THE COEFFICIENT OF


VARIATION
• Measures relative variation.
• Always in percentage (%).
• Shows variation relative to mean.
• Can be used to compare the variability of two or more sets of data measured in
different units.

 S
CV     100%

X 

MEASURES OF VARIATION:
COMPARING COEFFICIENTS OF VARIATION
• Stock A:
• Mean price last year = $50.
• Standard deviation = $5.
S $5
CVA     100%   100%  10% Both stocks have
X $50 the same
standard
deviation, but
• Stock B: stock B is less
variable relative
• Mean price last year = $100. to its mean price.
• Standard deviation = $5. S $5
CVB     100%   100%  5%
X $100

13
1/15/2024

MEASURES OF VARIATION: COMPARING COEFFICIENTS


OF VARIATION (CON’T)
• Stock A:
• Mean price last year = $50.
• Standard deviation = $5.
S $5
CVA     100%   100%  10% Stock C has a
X
  $50 much smaller
standard
deviation but a
• Stock C: much higher
coefficient of
• Mean price last year = $8. variation
• Standard deviation = $2.  S  $2
CVC     100%   100%  25%

X  $8

LOCATING EXTREME OUTLIERS: Z-SCORE


• To compute the Z-score of a data value, subtract the mean and divide by the
standard deviation.
• The Z-score is the number of standard deviations a data value is from the mean.
• A data value is considered an extreme outlier if its Z-score is less than -3.0 or
greater than +3.0.
• The larger the absolute value of the Z-score, the farther the data value is from
the mean.

14
1/15/2024

LOCATING EXTREME OUTLIERS: Z-SCORE

XX
Z
S
where X represents the data value
X is the sample mean
S is the sample standard deviation

LOCATING EXTREME OUTLIERS: Z-SCORE


• Suppose the mean math SAT score is 490, with a standard deviation of 100.
• Compute the Z-score for a test score of 620.

X  X 620  490 130


Z    1.3
S 100 100

A score of 620 is 1.3 standard deviations above the


mean and would not be considered an outlier.

15
1/15/2024

SHAPE OF A DISTRIBUTION
• Describes how data are distributed.

• Two useful shape related statistics are:


• Skewness:
• Measures the extent to which data values are not symmetrical.

• Kurtosis:
• Kurtosis measures the peakedness of the curve of the distribution—that is, how sharply
the curve rises approaching the center of the distribution.

SHAPE OF A DISTRIBUTION (SKEWNESS)


• Measures the extent to which data is not symmetrical.

Left-Skewed Symmetric Right-Skewed


Mean < Median Mean = Median Median < Mean

Skewness <0 0 >0


Statistic

16
1/15/2024

SHAPE OF A DISTRIBUTION -- KURTOSIS MEASURES


HOW SHARPLY THE CURVE RISES APPROACHING THE
CENTER OF THE DISTRIBUTION

Sharper Peak
Than Bell-Shaped
(Kurtosis > 0)

Bell-Shaped
(Kurtosis = 0)
Flatter Than
Bell-Shaped
(Kurtosis < 0)

EXPLORING NUMERICAL DATA USING QUARTILES

• Can visualize the distribution of the values for a numerical variable by


computing:

• The quartiles.

• The five-number summary.

• Constructing a boxplot.

17
1/15/2024

QUARTILE MEASURES
• Quartiles split the ranked data into 4 segments with an equal number of values per
segment.

25% 25% 25% 25%

Q1 Q2 Q3

 The first quartile, Q1, is the value for which 25% of the
values are smaller and 75% are larger.
 Q2 is the same as the median (50% of the values are
smaller and 50% are larger).
 Only 25% of the values are greater than the third quartile.

QUARTILE MEASURES: LOCATING QUARTILES


Find a quartile by determining the value in the appropriate position in the
ranked data, where:

First quartile position: Q1 = (n+1)/4 ranked value.

Second quartile position: Q2 = (n+1)/2 ranked value.

Third quartile position: Q3 = 3(n+1)/4 ranked value.

where n is the number of observed values.

18
1/15/2024

QUARTILE MEASURES: CALCULATION RULES


• When calculating the ranked position use the following rules:
• If the result is a whole number then it is the ranked position to use.
• If the result is a fractional half (e.g. 2.5, 7.5, 8.5, etc.) then average the two corresponding
data values.
• If the result is not a whole number or a fractional half then round the result to the nearest
integer to find the ranked position.

QUARTILE MEASURES CALCULATING THE QUARTILES:


EXAMPLE
Sample Data in Ordered Array: 11 12 13 16 16 17 18 21 22

(n = 9)
Q1 is in the (9+1)/4 = 2.5 position of the ranked data,
so Q1 = (12+13)/2 = 12.5.

Q2 is in the (9+1)/2 = 5th position of the ranked data,


so Q2 = median = 16.

Q3 is in the 3(9+1)/4 = 7.5 position of the ranked data,


so Q3 = (18+21)/2 = 19.5.
Q1 and Q3 are measures of non-central location.
Q2 = median, is a measure of central tendency.

19
1/15/2024

QUARTILE MEASURES: THE INTERQUARTILE RANGE


(IQR)
• The IQR is Q3 – Q1 and measures the spread in the middle 50% of the data.
• The IQR is also called the midspread because it covers the middle 50% of the
data.
• The IQR is a measure of variability that is not influenced by outliers or extreme
values.
• Measures like Q1, Q3, and IQR that are not influenced by outliers are called
resistant measures.

CALCULATING THE INTERQUARTILE RANGE

Example:
X Median X
minimum Q1 (Q2) Q3 maximum

25% 25% 25% 25%

12 30 45 57 70

Interquartile range
= 57 – 30 = 27

20
1/15/2024

THE FIVE NUMBER SUMMARY

• The five numbers that help describe the center, spread and shape
of data are:
• Xsmallest.
• First Quartile (Q1).
• Median (Q2).
• Third Quartile (Q3).
• Xlargest.

RELATIONSHIPS AMONG THE FIVE-NUMBER SUMMARY


AND DISTRIBUTION SHAPE
Left-Skewed Symmetric Right-Skewed
Median – Xsmallest Median – Xsmallest Median – Xsmallest
> ≈ <
Xlargest – Median Xlargest – Median Xlargest – Median
Q1 – Xsmallest Q1 – Xsmallest Q1 – Xsmallest

> ≈ <

Xlargest – Q3 Xlargest – Q3 Xlargest – Q3


Median – Q1 Median – Q1 Median – Q1

> ≈ <

Q3 – Median Q3 – Median Q3 – Median

21
1/15/2024

FIVE NUMBER SUMMARY AND THE BOXPLOT


• The Boxplot: A Graphical display of the data based on the five-number
summary:
Xsmallest -- Q1 -- Median -- Q3 -- Xlargest

Example:

25% of data 25% 25% 25% of data


of data of data

Xsmallest Q1 Median Q3 Xlargest

FIVE NUMBER SUMMARY: SHAPE OF BOXPLOTS

• If data are symmetric around the median then the box and central line are
centered between the endpoints.

Xsmallest Q1 Median Q3 Xlargest

• A Boxplot can be shown in either a vertical or horizontal orientation.

22
1/15/2024

DISTRIBUTION SHAPE AND THE BOXPLOT

Left-Skewed Symmetric Right-Skewed

Q1 Q2 Q3 Q1 Q2 Q3 Q1 Q2 Q3

BOXPLOT EXAMPLE

• Below is a Boxplot for the following data:

Xsmallest Q1 Q2 / Median Q3 Xlargest


0 2 2 2 3 3 4 5 5 9 27

0 2 3 5 27
• The data are right skewed, as the plot depicts.

23
1/15/2024

NUMERICAL DESCRIPTIVE MEASURES FOR A


POPULATION
• Descriptive statistics discussed previously described a sample, not the
population.
• Summary measures describing a population, called parameters, are
denoted with Greek letters.
• Important population parameters are the population mean, variance, and
standard deviation.

NUMERICAL DESCRIPTIVE MEASURES FOR A


POPULATION: THE MEAN
• The population mean is the sum of the values in the population divided by
the population size, N.

X i
X1  X 2    XN
 i 1

N N
Where μ = population mean
N = population size
Xi = ith value of the variable X

24
1/15/2024

NUMERICAL DESCRIPTIVE MEASURES FOR A


POPULATION: THE VARIANCE
• Average of squared deviations of values from the mean.

N
• Population variance:
 (X  μ)
i
2

σ2  i1
N

Where μ = population mean


N = population size
Xi = ith value of the variable X

NUMERICAL DESCRIPTIVE MEASURES FOR A POPULATION:


THE STANDARD DEVIATION
• Most commonly used measure of variation.
• Shows variation about the mean.
• Is the square root of the population variance.
• Has the same units as the original data.

• Population standard deviation:


 (X  μ)
i
2

σ i1
N

25
1/15/2024

SAMPLE STATISTICS VERSUS POPULATION


PARAMETERS

Measure Population Sample


Parameter Statistic
Mean
 X
Variance
2 S2
Standard
 S
Deviation

THE EMPIRICAL RULE


• The empirical rule approximates the variation of data in a symmetric
mound-shaped distribution.
• Approximately 68% of the data in a symmetric mound shaped distribution
is within 1 standard deviation of the mean or µ ± 1σ.

68%

µ
µ ± 1σ

26
1/15/2024

THE EMPIRICAL RULE

• Approximately 95% of the data in a symmetric mound-shaped distribution


lies within two standard deviations of the mean, or µ ± 2σ.
• Approximately 99.7% of the data in a symmetric mound-shaped
distribution lies within three standard deviations of the mean, or µ ± 3σ.

95% 99.7%

μ  2σ μ  3σ

USING THE EMPIRICAL RULE

• Suppose that the variable Math SAT scores is bell-shaped with a mean of 500
and a standard deviation of 90. Then:
• Approximately 68% of all test takers scored between 410 and 590, (500 ± 90).
• Approximately 95% of all test takers scored between 320 and 680, (500 ± 180).
• Approximately 99.7% of all test takers scored between 230 and 770, (500 ± 270).

27
1/15/2024

CHEBYSHEV’S RULE
• Regardless of how the data are distributed, at least (1 - 1/k2) x 100% of the
values will fall within k standard deviations of the mean (for k > 1).
• Examples:

At least Within
(1 - 1/22) x 100% = 75% ….............. k=2 (μ ± 2σ)
(1 - 1/32) x 100% = 88.89% ……….. k=3 (μ ± 3σ)

WE DISCUSS TWO MEASURES OF THE RELATIONSHIP


BETWEEN TWO NUMERICAL VARIABLES
Scatter plots allow you to visually examine the relationship between two
numerical variables and now we will discuss two quantitative measures of such
relationships.
• The Covariance.
• The Coefficient of Correlation.

28
1/15/2024

THE COVARIANCE MEASURES STRENGTH OF THE LINEAR


RELATIONSHIP BETWEEN TWO NUMERICAL VARIABLES (X &
Y)

• The sample covariance:

 ( X  X)( Y  Y )
i i
cov ( X , Y )  i1
n 1

• Only concerned with the strength of the relationship.


• No causal effect is implied.

INTERPRETING COVARIANCE

• Covariance between two variables:


cov(X,Y) > 0 X and Y tend to move in the same direction.

cov(X,Y) < 0 X and Y tend to move in opposite directions.

cov(X,Y) = 0 X and Y are independent.

• The covariance has a major flaw:


• It is not possible to determine the relative strength of the relationship from the
size of the covariance.

29
1/15/2024

MEASURING THE RELATIVE STRENGTH RELATIONSHIPS:


COEFFICIENT OF CORRELATION
• Measures the relative strength of the linear relationship between
two numerical variables.

• Sample coefficient of correlation:


cov (X , Y)
r
SX SY

• Where,
n n n
 (X  X)(Y  Y)
i i  (X  X)
i
2
 (Y  Y )
i
2

cov (X , Y)  i1
SX  i1
SY  i1
n 1 n 1 n 1

FEATURES OF THE COEFFICIENT OF CORRELATION

• The population coefficient of correlation is referred as . 

• The sample coefficient of correlation is referred to as r.


• Either ρ or r have the following features:
• Unit free.
• Range between –1 and 1.
• The closer to –1, the stronger the negative linear relationship.
• The closer to 1, the stronger the positive linear relationship.
• The closer to 0, the weaker the linear relationship.

30
1/15/2024

SCATTER PLOTS OF SAMPLE DATA WITH VARIOUS


COEFFICIENTS OF CORRELATION
Y Y

X X
r = -1 r = -.6
Y
Y Y

X X X
r = +1 r = +.3 r=0

PITFALLS IN NUMERICAL DESCRIPTIVE MEASURES

• Data analysis is objective:


• Should report the summary measures that best describe
and communicate the important aspects of the data set.

• Data interpretation is subjective:


• Should be done in fair, neutral and clear manner.

31
1/15/2024

ETHICAL CONSIDERATIONS

Numerical descriptive measures:


• Should document both good and bad results.
• Should be presented in a fair, objective and neutral manner.
• Should not use inappropriate summary measures to distort facts.

CHAPTER SUMMARY
In this chapter we have discussed:
• Describing the properties of central tendency, variation, and
shape in numerical variables.
• Constructing and interpreting a boxplot.
• Computing descriptive summary measures for a population.
• Calculating the covariance and the coefficient of correlation.

32

You might also like