L03 ECO220 Print
L03 ECO220 Print
L03 ECO220 Print
Lecture 3
Notes: The management score is unweighted average of the score for each of the 16 questions,
where each question is first normalized to be on a 0-1 scale. The sample is all 2016 CEES surveyors
with at least 11 non-missing responses to management questions and [select firms].
(50th percentile)?
.350
.4
Fraction
2.30th percentile?
.3
85.64th percentile?
.2
7
.074
5
5
.034
7
7
7
7
.1
.023
.011
.005
.005
.005
.005
0
0 20 40 60
Inflation Rate, 2011
World bank data, again What if a country had exactly 5% inflation? 4
inflation_2011
-------------------------------------------------------------
Percentiles Smallest
1% -2.517798 -4.895247
5% .9223603 -2.517798
10% 2.075173 -.3644478 Obs 174
25% 3.329906 -.2833333 Sum of Wgt. 174
Median? Range?
Trips Freq. Percent Cum. Trips Freq. Percent Cum. What is this
0 294 35.85 35.85 19 1 0.12 95.85
1 76 9.27 45.12 20 3 0.37 96.22
table called?
2 66 8.05 53.17 21 2 0.24 96.46 What’s the 25th
3 58 7.07 60.24 22 4 0.49 96.95
4 47 5.73 65.98 23 1 0.12 97.07
percentile?
5 47 5.73 71.71 24 4 0.49 97.56 What’s the
6 36 4.39 76.10 25 2 0.24 97.80
median?
7 30 3.66 79.76 26 4 0.49 98.29
8 28 3.41 83.17 27 2 0.24 98.54 What’s the 75th
9 15 1.83 85.00 28 3 0.37 98.90 percentile?
10 9 1.10 86.10 30 1 0.12 99.02
11 16 1.95 88.05 34 1 0.12 99.15
12 25 3.05 91.10 35 1 0.12 99.27
13 9 1.10 92.20 36 1 0.12 99.39
14 5 0.61 92.80 41 1 0.12 99.51
15 9 1.10 93.90 43 1 0.12 99.63
16 5 0.61 94.51 44 1 0.12 99.76
17 6 0.73 95.24 45 1 0.12 99.88
18 4 0.49 95.73 50 1 0.12 100.00
cont’d Total 820 100.00
6
.3
Density
.2
.1
0
0 5 10 20 30 40 50
Number Fishing Trips
Number_of_Trips
-------------------------------------------------------------
Percentiles Smallest
1% 0 0
5% 0 0
10% 0 0 Obs 820
25% 0 0 Sum of Wgt. 820
How can the 10th percentile and the 25th percentile both be zero?
8
10
11
Outside Values
whiskers
25th Percentile
0 20 40 60
3.3299 Inflation Rate, 2011
12
0 .1 .2 .3 .4
Density
x2
x3
-4 -2 0 2 4 -2 0 2 4
0 .2 .4 .6 .8 1
Density
Density
-4 -2 0 2 4 -2 -1 0 1 2
13
x2
x3
0
4 6 8 10 12 4 6 8 10 12
Density
4 6 8 10 12 4 6 8 10 12
14
.3
Density
.1 .2
x2
x3
0
6 8 10 12 14 6 8 10 12 14
.1 .2 .3 .4
.05 .1 .15
Density
Density
0
6 8 10 12 14 0 6 8 10 12 14
15
Outliers
• Outliers: extremely large or small values
different from the bulk of the data
• Robust: not sensitive to outliers
– Is the sample mean a robust measure of central
tendency?
• Is the sample median robust?
• However, the mean retains more information from
sample & has useful statistical properties
– Is the IQR robust? variance?
16
Note: Unit of observation is a year-month for each of the 36 contiguous [U.S.] states that
have complete flu and sunlight data.
Jan is 1, Feb is 2, ... Each month has 108 obs (36 states*3yrs) except Oct, Nov,
and Dec have 144 obs (36 states*4yrs). N = 1,404 (=9*108 + 3*144) 18
∑ 𝑥 −𝑋
𝑠= = 0.70 but = 0.736842
𝑛−1
∑ 𝑥 −𝑋
𝑠=
𝑛−1
= 0.89 And, if you ignore 40/39, you get 0.88 (very close to right answer) 23
24
Density
.06
• Standardize: 𝑧 = .04
.02
– z: how many s.d.’s a 0
0 20 40 60
value is from the mean Inflation Rate, 2011
(+ if above; - if below)
Inflation Rate, 2011
– Z has a mean of 0 and n = 174 countries
s.d. of 1 and no units .6
Density
– Eg: mean inflation 6.64, .4
s.d. 6.78; 2.91 in Canada: .2
z=-0.55=(2.91-6.64)/6.78
0
– What does -0.55 mean? -2 0 2 4 6
standardized (z-scores)
25
Linear Transformations
• Linear transformation can be written as
Y = a + bX where a and b are constants
– Linear transformation of X?
• V = 200 – X
• W = X2 – 1 = (X – 1)(X + 1)
• Y = (X - 10)/2
– Linear transformations change scale of a variable
but not the shape of the distribution
• Conditional on the numeric values of the mean and
s.d., standardization is a linear transformation
26
Fraction
.3 .1
.2 .05
.1
0 0
0 40000 80000 6 7 8 9 10 11
GDP per capita ln(GDP per capita)
.3 be more symmetric.
.2
.1 Linear transformations (such as
0 changing units) do not affect the
0 20 40 60 80 100
GDP per capita ($1000s) shape at all.
Fraction
.3 .3
.2 .2
.1 .1
0 0
0 50 100 150 0 50 100 150 200
Gov’t debt (% GDP), 2010 Gov’t debt (% GDP), 2005
.4
.2 Change = Debt10 – Debt05
5.23 = 58.47 – 53.24
0
-100 -50 0 50
Change: 2005 to 2010 Linear combinations have simple
effect on mean, but not median
World Bank data again, Central gov’t
debt, n = 48 countries or std. dev. 28