Download Lecture 2 - faculty.arts.ubc.ca

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Statistics for
Business and Economics
Chapter 2
Describing Data: Numerical
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-1
2.1
Measures of Central Tendency
Overview
Central Tendency
Mean
Median
Mode
Midpoint of
ranked values
Most frequently
observed value
n
x=
∑x
i
i=1
n
Arithmetic
average
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-2
Arithmetic Mean
n 
The arithmetic mean (mean) is the most
common measure of central tendency
n 
For a population of N values:
N
∑x
i
x1 + x 2 + ! + x N
µ=
=
N
N
i=1
Population
values
Population size
n 
For a sample of size n:
n
x=
∑x
i=1
n
i
x1 + x 2 + ! + x n
=
n
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Observed
values
Sample size
Ch. 2-3
Arithmetic Mean
(continued)
n 
n 
n 
The most common measure of central tendency
Mean = sum of values divided by the number of values
Affected by extreme values (outliers)
0 1 2 3 4 5 6 7 8 9 10
Mean = 3
1 + 2 + 3 + 4 + 5 15
=
=3
5
5
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
0 1 2 3 4 5 6 7 8 9 10
Mean = 4
1 + 2 + 3 + 4 + 10 20
=
=4
5
5
Ch. 2-4
Median
n 
In an ordered list, the median is the “middle”
number (50% above, 50% below)
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
Median = 3
Median = 3
n 
Not affected by extreme values
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-5
Finding the Median
n 
The location of the median:
n +1
Median position =
position in the ordered data
2
n 
n 
n 
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
n +1
Note that
is not the value of the median, only the
2
position of the median in the ranked data
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-6
Mode
n 
n 
n 
n 
n 
n 
A measure of central tendency
Value that occurs most often
Not affected by extreme values
Used for either numerical or categorical data
There may may be no mode
There may be several modes
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Mode = 9
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
0 1 2 3 4 5 6
No Mode
Ch. 2-7
Review Example
n 
Five houses on a hill by the beach
$2,000 K
House Prices:
$2,000,000
500,000
300,000
100,000
100,000
$500 K
$300 K
$100 K
$100 K
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-8
Review Example:
Summary Statistics
House Prices:
$2,000,000
500,000
300,000
100,000
100,000
n 
n 
Sum 3,000,000
n 
Mean:
($3,000,000/5)
= $600,000
Median: middle value of ranked data
= $300,000
Mode: most frequent value
= $100,000
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-9
Which measure of location
is the “best”?
n 
n 
Mean is generally used, unless extreme values
(outliers) exist . . .
Then median is often used, since the median
is not sensitive to extreme values.
n 
Example: Median home prices may be reported for
a region – less sensitive to outliers
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-10
Shape of a Distribution
n 
Describes how data are distributed
n 
Measures of shape
n 
Symmetric or skewed
Left-Skewed
Symmetric
Right-Skewed
Mean < Median
Mean = Median
Median < Mean
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-11
Geometric Mean
n 
Geometric mean
1/n
x g = (x1 × x 2 × !× x n ) = (x1 × x 2 × !× x n )
n
n 
Geometric mean rate of return
1/n
rg = (x1 × x 2 × ... × xn ) − 1
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-12
Example
Initial Investment: $100
After 5 years: $125
Question: the average annual rate of returns?
• 
• 
• 
25 % divided by 5 years = 5%? This is Wrong!
``Compound Interest’’ over 5 years
$100 x (1+0.05)^5 = $127.63 > $125 after 5 years
Answer:
$100 x (1+r)^5 = $125 è
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-13
2.2
Measures of Variability
Variation
Range
n 
Interquartile
Range
Variance
Standard
Deviation
Coefficient of
Variation
Measures of variation give
information on the spread
or variability of the data
values.
Same center,
different variation
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-14
Range
n 
n 
Simplest measure of variation
Difference between the largest and the smallest
observations:
Range = Xlargest – Xsmallest
Example:
0 1 2 3 4 5 6 7 8 9 10 11 12
13 14
Range = 14 - 1 = 13
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-15
Disadvantages of the Range
n 
Ignores the way in which data are distributed
7
8
9
10
11
12
Range = 12 - 7 = 5
n 
7
8
9
10
11
12
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
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-16
Interquartile Range
Example:
X
minimum
Q1
25%
12
Median
(Q2)
25%
30
25%
45
X
Q3
maximum
25%
57
70
Interquartile range
= 57 – 30 = 27
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-17
STATA Example
Interquartile Rage by Low vs. High HW Group
Low HW Group
60
20
40
Final Grade
80
100
High HW Group
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-18
Population Variance
n 
Average of squared deviations of values from
the mean
n 
N
Population variance:
2
σ =
Where
2
∑ (x − µ)
i
i=1
N
µ = population mean
N = population size
xi = ith value of the variable x
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-19
Sample Variance
n 
Average (approximately) of squared deviations
of values from the mean
n 
n
Sample variance:
2
s =
Where
∑ (x − x)
2
i
i=1
n -1
X = arithmetic mean
n = sample size
Xi = ith value of the variable X
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-20
Population Standard Deviation
n 
n 
n 
Most commonly used measure of variation
Shows variation about the mean
Has the same units as the original data
n 
Population standard deviation:
N
2
∑ (x − µ)
i
σ=
i=1
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
N
Ch. 2-21
Sample Standard Deviation
n 
n 
n 
Most commonly used measure of variation
Shows variation about the mean
Has the same units as the original data
n 
n
Sample standard deviation:
∑ (x − x)
2
i
S=
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
i=1
n -1
Ch. 2-22
Calculation Example:
Sample Standard Deviation
Sample
Data (xi) :
10
12
14
15
n=8
2
s =
=
18
18
24
Mean = x = 16
2
2
(10 − X ) + (12 − x) + (14 − x) + ! + (24 − x)
2
n −1
2
=
17
2
2
(10 − 16) + (12 − 16) + (14 − 16) + ! + (24 − 16)
2
8 −1
126
7
=
4.2426
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
A measure of the “average”
scatter around the mean
Ch. 2-23
Measuring variation
Small standard deviation
Large standard deviation
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-24
Comparing Standard Deviations
Data A
11
12
13
14
15
16
17
18
19
20 21
Mean = 15.5
s = 3.338
20 21
Mean = 15.5
s = 0.926
20 21
Mean = 15.5
s = 4.570
Data B
11
12
13
14
15
16
17
18
19
Data C
11
12
13
14
15
16
17
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
18
19
Ch. 2-25
Advantages of Variance and
Standard Deviation
n 
n 
Each value in the data set is used in the
calculation
Values far from the mean are given extra
weight
(because deviations from the mean are squared)
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-26
Coefficient of Variation
n 
Measures relative variation
n 
Always in percentage (%)
n 
Shows variation relative to mean
n 
Can be used to compare two or more sets of
data measured in different units
⎛ s ⎞
⎟
CV = ⎜
⎜ x ⎟ ⋅ 100%
⎝
⎠
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-27
Comparing Coefficient
of Variation
n 
n 
Stock A:
n  Average price last year = $50
n  Standard deviation = $5
⎛ s ⎞
$5
CVA = ⎜⎜ ⎟⎟ ⋅ 100% =
⋅ 100% = 10%
$50
⎝ x ⎠
Stock B:
n 
n 
Average price last year = $100
Standard deviation = $5
⎛ s ⎞
$5
CVB = ⎜⎜ ⎟⎟ ⋅ 100% =
⋅ 100% = 5%
$100
⎝ x ⎠
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Both stocks
have the same
standard
deviation, but
stock B is less
variable relative
to its price
Ch. 2-28
The Empirical Rule
n 
n 
If the data distribution is approximated by
normal distribution, then the interval:
µ ± 1σ contains about 68% of the values in
the population or the sample
68%
µ
µ ± 1σ
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-29
The Empirical Rule
n 
n 
µ ± 2σ contains about 95% of the values in
the population or the sample
µ ± 3σ contains almost all (about 99.7%) of
the values in the population or the sample
95%
99.7%
µ ± 2σ
µ ± 3σ
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-30
2.3
n 
Weighted Mean
The weighted mean of a set of data is
n
x = ∑ wi x i = w1x1 + w2 x 2 +!+ wn x n
i=1
n 
Where wi is the weight of the ith observation
and
n 
∑w
i
=1
Use when data is already grouped into n classes, with
wi values in the ith class
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-31
2.3
Example
n 
Consider a student with the scores of assignment (x1),
midterm (x2), and final exam (x3) given by
x1 = 90, x2 = 90, and x3 = 46.
The weights:
w1 = 0.1, w2 =0.3, and w3 = 0.6.
n 
The final grade for this student is
n 
n 
3
∑w x
i
i
= 0.1× 90+0.3× 90+0.6 × 46=63.6
i=1
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-32
2.4
The Sample Covariance
n 
n 
The covariance measures the strength of the linear relationship
between two variables
The population covariance:
N
∑ (x − µ
i
Cov (x , y) = σ xy =
n 
x
)(yi − µ y )
i=1
N
The sample covariance:
n
∑ (x − x)(y − y)
i
Cov (x , y) = s xy =
n 
n 
n 
i
i=1
n −1
Only concerned with the strength of the relationship
No causal effect is implied
Depends on the unit of measurement
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-33
Interpreting Covariance
n 
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
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-34
Coefficient of Correlation
n 
n 
Measures the relative strength of the linear relationship
between two variables
Population correlation coefficient:
Cov (x , y)
ρ=
σXσY
n 
Sample correlation coefficient:
Cov (x , y)
r=
sX sY
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-35
Features of
Correlation Coefficient, r
n 
Unit free
n 
Ranges between –1 and 1
n 
n 
n 
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 any positive linear
relationship
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-36
Scatter Plots of Data with Various
Correlation Coefficients
Y
Y
r = -1
X
Y
Y
r = -.6
X
Y
Y
r = +1
X
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
r=0
X
r = +.3
X
r=0
X
Ch. 2-37
Example: HW and Final Grade
HW and Final Grade
r = .0.499
n 
40
There is a relatively
strong positive linear
relationship between
HW scores and
Final Grades
20
n 
Final Grade
60
80
n 
100
Correlation = 0.499
0
2
4
6
8
10
Homework
Grade
Fitted values
Students who scored high on HW assignment
tended to have high final grades
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 2-38
Related documents