0% found this document useful (0 votes)
36 views47 pages

Week 02 Descriptive Statistics

The document discusses various measures of central tendency, variation, and shape used in descriptive statistics. It defines the mean, median, and mode as common measures of central tendency, and explains how to calculate each one. For measures of variation, it introduces the range, variance, standard deviation, and coefficient of variation. It also discusses how to identify outliers and choose the appropriate measure of central tendency for different situations.

Uploaded by

Rakesh Chitra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views47 pages

Week 02 Descriptive Statistics

The document discusses various measures of central tendency, variation, and shape used in descriptive statistics. It defines the mean, median, and mode as common measures of central tendency, and explains how to calculate each one. For measures of variation, it introduces the range, variance, standard deviation, and coefficient of variation. It also discusses how to identify outliers and choose the appropriate measure of central tendency for different situations.

Uploaded by

Rakesh Chitra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 47

Descriptive Statistics (3.1-3.

5)

 The central tendency is the extent to which all the


data values group around a typical or central value.

 The variation is the amount of dispersion or


scattering of values

 The shape is the pattern of the distribution of values


from the lowest value to the highest value.

Chap 3-1
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
n

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

n n
Sample size Observed values

Chap 3-2
Measures of Central Tendency:
The Mean
(continued)

 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

Chap 3-3
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

 Not affected by extreme values

Chap 3-4
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

n 1
Note that is not the value of the median, only the position of
2
the median in the ranked data

Chap 3-5
Measures of Central Tendency:
The Mode
 Value that occurs most often
 Not affected by extreme values
 Used for either numerical or categorical (nominal)
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

No Mode
Mode = 9
Chap 3-6
Measures of Central Tendency:
Review Example

House Prices:  Mean: ($3,000,000/5)


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

Chap 3-7
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 some situations it makes sense to report both the
mean and the median.

Chap 3-8
Measures of Central Tendency:
Summary

Central Tendency

Arithmetic Median Mode


Mean
n

X i
X i 1
n Middle value Most
in the ordered frequently
array observed
value

Chap 3-9
Measures of Variation
Variation

Range Variance Standard Coefficient of


Variation
Deviation

 Measures of variation give


information on the spread
or variability or
dispersion of the data
values.
Same center,
different variation
Chap 3-10
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

Chap 3-11
Measures of Variation:
Why The Range Can Be Misleading

 Ignores the way in which 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

Chap 3-12
Measures of Variation:
The Sample Variance

Low variation: more points close to the mean


High variation: more points far from the mean

So, measure the distance to the mean


Chap 1-13
Measures of Variation:
The Sample Variance
 Average (approximately) of squared deviations
of values from the mean
n
 Sample variance:
 (X  X) i
2

S 2 i1
n -1
Where X = arithmetic mean
n = sample size
Xi = ith value of the variable X
Chap 3-14
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

n
 Sample standard deviation:  (X  X)
i
2

S i1
n -1

Chap 3-15
Measures of Variation:
Comparing Standard Deviations

Smaller standard deviation

Larger standard deviation

Chap 3-16
Locating Extreme Outliers:
Z-Score

XX
Z
S

For a bell-shape (Normal) distribution,


|Z| < 1 for 68% of data
|Z| < 2 for 95% of data
|Z| < 3 for 99.7% of data

So, values X with large |Z| can be outliers.


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.

Chap 3-18
General Descriptive Stats Using
Microsoft Excel Functions

House Prices Descriptive Statistics


$ 2,000,000 Mean $ 600,000 =AVERAGE(A2:A6)
$ 500,000 Standard Error $ 357,770.88 =D6/SQRT(D14)
$ 300,000 Median $ 300,000 =MEDIAN(A2:A6)
$ 100,000 Mode $ 100,000.00 =MODE(A2:A6)
$ 100,000 Standard Deviation $ 800,000 =STDEV(A2:A6)
Sample Variance 640,000,000,000 =VAR(A2:A6)
Kurtosis 4.1301 =KURT(A2:A6)
Skewness 2.0068 =SKEW(A2:A6)
Range $ 1,900,000 =D12 - D11
Minimum $ 100,000 =MIN(A2:A6)
Maximum $ 2,000,000 =MAX(A2:A6)
Sum $ 3,000,000 =SUM(A2:A6)
Count 5 =COUNT(A2:A6)

Chap 3-19
General Descriptive Stats Using
Microsoft Excel Data Analysis Tool

1. Select Data.

2. Select Data Analysis.

3. Select Descriptive
Statistics and click OK.

Chap 3-20
General Descriptive Stats Using
Microsoft Excel

4. Enter the cell


range.
5. Check the
Summary
Statistics box.
6. Click OK

Chap 3-21
Excel output
Microsoft Excel House Prices
descriptive statistics output,
Mean 600000
using the house price data: Standard Error 357770.8764
House Prices: Median 300000
Mode 100000
$2,000,000 Standard Deviation 800000
500,000 Sample Variance 640,000,000,000
300,000 Kurtosis 4.1301
100,000 Skewness 2.0068
100,000 Range 1900000
Minimum 100000
Maximum 2000000
Sum 3000000
Count 5

Chap 3-22
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.

Chap 3-23
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
Chap 3-24
Numerical Descriptive Measures
For A Population: The Variance σ2

 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
Chap 3-25
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

N
Population standard deviation:
 i 
 2
(X μ)
σ i1
N

Chap 3-26
Sample statistics versus
population parameters

Measure Population Sample


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

Chap 3-27
Quartiles
 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
observations are smaller and 75% are larger
 Q2 is the same as the median (50% of the observations
are smaller and 50% are larger)
 Only 25% of the observations are greater than the third
quartile

Chap 3-28
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

Chap 3-29
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.

Chap 3-30
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
Chap 3-31
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

Chap 3-32
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

Chap 3-33
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

Chap 3-34
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

Chap 3-35
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

Chap 3-36
Distribution Shape and
The Boxplot

Left-Skewed Symmetric Right-Skewed

Q1 Q2 Q3 Q1 Q2 Q3 Q1 Q2 Q3

Chap 3-37
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

Chap 3-38
The Covariance
 The covariance measures the strength of the linear
relationship between two numerical variables (X & Y)

 The sample covariance:


n

 ( 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
Chap 3-39
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

Chap 3-40
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
 i
(Y  Y ) 2

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

Chap 3-41
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
 Ranges 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

Chap 3-42
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
Chap 3-43
The Coefficient of Correlation Using
Microsoft Excel Function

Test #1 Score Test #2 Score Correlation Coefficient


78 82 0.7332 =CORREL(A2:A11,B2:B11)
92 88
86 91
83 90
95 92
85 85
91 89
76 81
88 96
79 77

Chap 3-44
The Coefficient of Correlation Using
Microsoft Excel Data Analysis Tool
1. Select Data
2. Choose Data Analysis
3. Choose Correlation &
Click OK

Chap 3-45
The Coefficient of Correlation
Using Microsoft Excel

4. Input data range and select


appropriate options
5. Click OK to get output

Chap 3-46
Excel

Excel function: =correl

Or use the Data Analysis Tool, “covariance” and


“correlation”.

Chap 1-47

You might also like