0% found this document useful (0 votes)
8 views143 pages

(3 ) Chapter

The document is an introduction to statistics, focusing on measures of central tendency, including mean, median, and mode. It provides definitions, formulas, and examples for calculating these measures using both raw and grouped data. The content is structured to guide readers through understanding and applying statistical concepts effectively.

Uploaded by

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

(3 ) Chapter

The document is an introduction to statistics, focusing on measures of central tendency, including mean, median, and mode. It provides definitions, formulas, and examples for calculating these measures using both raw and grouped data. The content is structured to guide readers through understanding and applying statistical concepts effectively.

Uploaded by

nqsn5twnxk
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to statistics

Hazar Khogeer

School of Mathematical
Umm-Al-Qura University

December 2, 2022

1 / 129 Hazar Khogeer Introduction to statistics


Chapter 3
Data Description

2 / 129 Hazar Khogeer Introduction to statistics


3-1 Summarize Data, using Measures of Central Tendency

Introduction

3-1: Measures of Central Tendency


3-2: Measures of Variation
3-3: Measures of Position
3-4: Exploratory Data Analysis

3 / 129 Hazar Khogeer Introduction to statistics


3-1 Summarize Data, using Measures of Central
Tendency

Statistic: is a characteristic or measure obtained by using the data


values from a sample.

Parameter: is a characteristic or measure obtained by using all the


data values from a specific population.

Mean: is the sum of the values, divided by the total number of


values.

4 / 129 Hazar Khogeer Introduction to statistics


3-1 Summarize Data, using Measures of Central
Tendency
Measures of central tendency: mean, median, mode, and
midrange.

Sample Mean: most widely used descriptive statistic. It is the sum


of the observations divided by the total number of observation.
Denoted by X̄ (pronounced X bar).
Population Mean: found by using all the values of the population.
Denoted by µ.
Mean P
X1 + X2 + X3 + · · · + Xn X
Sample mean: X̄ = = ,
n n
P
X1 + X2 + X3 + · · · + Xn X
Population mean: µ = = ,
N N
where,
n is the sample size,
5 / 129
N is the population [Link] Khogeer Introduction to statistics
3-1 Measures of Central Tendency: Mean

EXAMPLE 3-1 Avian Flu Cases

The number of confirmed flu cases for a 9-year period is shown.


Find the mean : 4, 46, 98, 115, 88, 44, 73,48, 62.

Solution:
P
X 4 + 46 + 98 + 115 + 88 + 44 + 73 + 48 + 62
X̄ = = =
n 9
578
≈ 64.2
9
Hence, the mean number of flu cases over the 9-year period is
64.2.

6 / 129 Hazar Khogeer Introduction to statistics


3-1 Measures of Central Tendency: Mean

EXAMPLE 3-2 Store Sales

The data show the systemwide sales (in millions) for U.S.
franchises of a well-known donut store for a 5-year period. Find the
mean : $221,$239, $262, $281 ,$318.

Solution:
P
X 221 + 239 + 262 + 281 + 318 1321
X̄ = = = = 264.2
n 5 5
The mean amount of sales for the stores over the 5-year period is
$264.2 million.

7 / 129 Hazar Khogeer Introduction to statistics


3-1Measures of Central Tendency: Mean
What if we want to find the mean for the grouped frequency distribution.

weighted mean
n
P
f · Xm
m=1
X̄ =
n P
Note: The symbols f · Xm mean to find the sum of the product of
the frequency (f ) and the midpoint (Xm ) for each class.
How to find a mean for the group data
Step 1: make a table as shown:

A B C D
Class Frequency f Midpoint xm f · xm

Step 2: find the midpoints of each class and place them in column C.
Step 3: multiply the frequency by the midpoint for each class, and place the
product in column D.
Step 4: find the sum of column D and divide the sum obtained in column D by the
sum of frequencies obtained in column B.

8 / 129 Hazar Khogeer Introduction to statistics


3-1Measures of Central Tendency: Mean
EXAMPLE 3-3: Salaries of CEOs
The frequency distribution shows the salaries (in millions) for a
specific year of the top 25 CEOs in the United States.
Find the mean:
Class boundaries Frequency
15.5-20.5 13
20.5-25.5 6
25.5-30.5 4
30.5-35.5 1
35.5-40.5 1
Total 25
Solution:
Class bounderies Frequency Midpoint Xm f · Xm
15.5-20.5 13
20.5-25.5 6
25.5-30.5 4
30.5-35.5 1
35.5-40.5 1
Total 25
9 / 129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mean
15.5 + 20.5
Xm = = 18, f · Xm = 18 = 234.
2
20.5 + 25.5
Xm = = 23, f · Xm = 6 = 138, etc.
2

Class bounderies Frequency Midpoint Xm f · Xm


15.5-20.5 13 18 234
20.5-25.5 6 23 138
25.5-30.5 4 28 112
30.5-35.5 1 33 33
35.5-40.5 1 38 38
P
n= 25 f · Xm = 555
P
f · Xm 555
x̄ = = = $22.2 million.
n 25
The mean salary is $22.2 million.
10 /
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Mean

Example 3-4:
Mohammed year jogging data, he kept records of how many miles
he run each week. Find the mean of the miles that he run per
week?

miles run per week number of weeks f f ·x


0 5 0
1 4 4
2 10 20
3 9 27
4 10 40
5 7 35
6 3 18
7 4 28
P
n=52 weeks f · x= 172

172
Solution: x̄ = = 3.308.
52
11 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Median
Median: is the midpoint of the data after arranging the data in
ascending or descending order. The median is often denoted by
MD.

12 /
129 Hazar Khogeer Introduction to statistics
13 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Median

Example 3-4: Tablet Sales The data show the number of tablet
sales in millions of units for a 5-year period. Find the median of the
data: 108.2, 17.6, 159.8, 69.8, 222.6.

Solution:
Step 1: arrange the data in order:
17.6, 69.8, 108.2, 159.8, 222.6.

Step 2: there are an odd number of data values, namely, 5.

Step 3: select the middle data value.


17.6, 69.8, 108.2, 159.8, 222.6.

The median of the number of tablet sales for the 5-year period is
108.2 million

14 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Median

Example 3-4: Tablet Sales The data show the number of tablet
sales in millions of units for a 5-year period. Find the median of the
data: 108.2, 17.6, 159.8, 69.8, 222.6.

Solution:
Step 1: arrange the data in order:
17.6, 69.8, 108.2, 159.8, 222.6.

Step 2: there are an odd number of data values, namely, 5.

Step 3: select the middle data value.


17.6, 69.8, 108.2, 159.8, 222.6.

The median of the number of tablet sales for the 5-year period is
108.2 million

14 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Median
Example 3.6:
The number of tornadoes that have occurred in the United States
over an 8-year period follows. Find the median.
684, 764, 656, 702, 856, 1133, 1132, 1303

Solution:
Step 1: arrange the data in order:
656, 684, 702, 764, 856, 1132,1133,1303.

Step 2: there are an even number of data values, namely, 8.


Step 3: the middle two data values are 764 and 856.
656, 684, 702,764, 856, 1132, 1133, 1303.

Step 4: since the middle point falls halfway between 764 and 856,
find the median MD by adding the two values and dividing by 2.

764 + 856
15 /
MD= = 810.
129 2 Khogeer
Hazar Introduction to statistics
3-1: Measures of Central Tendency: Median
Example 3.6:
The number of tornadoes that have occurred in the United States
over an 8-year period follows. Find the median.
684, 764, 656, 702, 856, 1133, 1132, 1303

Solution:
Step 1: arrange the data in order:
656, 684, 702, 764, 856, 1132,1133,1303.

Step 2: there are an even number of data values, namely, 8.


Step 3: the middle two data values are 764 and 856.
656, 684, 702,764, 856, 1132, 1133, 1303.

Step 4: since the middle point falls halfway between 764 and 856,
find the median MD by adding the two values and dividing by 2.

764 + 856
15 /
MD= = 810.
129 2 Khogeer
Hazar Introduction to statistics
3-1: Measures of Central Tendency: Median for Grouped
Data
An approximate median can be found for grouped data.
First it is necessary to find the median class.
This is the class that contains the median value.
n/2 − cf
The formula is MD= × (w ) + Lm .
f
Where:
n sum of frequencies.

cf cumulative frequency of class immediately preceding the


median class.

w width of median class.

f frequency of median class.

Lm lower boundary of median class.


16 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Median for Grouped
Data
Estimate the median value for the following frequency distribution.
Length(cm) 1-10 11-20 21-30 31-40 41-50 Sum
Frequency (f ) 3 4 5 6 3 21

n/2 − cf
The formula is MD= × (w ) + Lm .
f

17 /
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Mode
Mode: is the value that occurs most often in a data set.

Note: It is helpful to arrange the data although it is not necessary

18 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode

EXAMPLE 3-6 Public Libraries

The data show the number of public libraries in a sample of eight


states. Find the mode: 114, 77, 21,101, 311,77, 159, 382.

Solution:
It is helpful to arrange the data in order, although it is not
necessary.
21,77,77,101, 159, 311, 382.

Since 77 occurs twice, a frequency larger than that of any other


number, the mode is 77.

19 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode

EXAMPLE 3-6 Public Libraries

The data show the number of public libraries in a sample of eight


states. Find the mode: 114, 77, 21,101, 311,77, 159, 382.

Solution:
It is helpful to arrange the data in order, although it is not
necessary.
21,77,77,101, 159, 311, 382.

Since 77 occurs twice, a frequency larger than that of any other


number, the mode is 77.

19 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode
EXAMPLE 3-7: Licensed Nuclear Reactors
The data show the number of licensed nuclear reactors in the
United States for a recent 15-year period.
Find the mode :
104 104 104 104 104
107 109 109 109 110
109 111 112 111 109
Solution:
Since the values 104 and 109 both occur 5 times, the modes are
104 and 109. The data set is said to be bimodal.

EXAMPLE 3-8: U.S. Patent Leaders


The data show the number of patents secured for the top 5
companies for a specific year. Find the mode :
6180, 4894, 2821, 2559, 2483.

20 / Solution: Since each value occurs only once, there is no mode.


129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode
EXAMPLE 3-7: Licensed Nuclear Reactors
The data show the number of licensed nuclear reactors in the
United States for a recent 15-year period.
Find the mode :
104 104 104 104 104
107 109 109 109 110
109 111 112 111 109
Solution:
Since the values 104 and 109 both occur 5 times, the modes are
104 and 109. The data set is said to be bimodal.

EXAMPLE 3-8: U.S. Patent Leaders


The data show the number of patents secured for the top 5
companies for a specific year. Find the mode :
6180, 4894, 2821, 2559, 2483.

20 / Solution: Since each value occurs only once, there is no mode.


129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode
EXAMPLE 3-7: Licensed Nuclear Reactors
The data show the number of licensed nuclear reactors in the
United States for a recent 15-year period.
Find the mode :
104 104 104 104 104
107 109 109 109 110
109 111 112 111 109
Solution:
Since the values 104 and 109 both occur 5 times, the modes are
104 and 109. The data set is said to be bimodal.

EXAMPLE 3-8: U.S. Patent Leaders


The data show the number of patents secured for the top 5
companies for a specific year. Find the mode :
6180, 4894, 2821, 2559, 2483.

20 / Solution: Since each value occurs only once, there is no mode.


129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode
Modal class : is the class with the largest frequency.

EXAMPLE 3-9 Salaries of CEOs


Find the modal class for the frequency distribution for the salaries
of the top CEOs in the United States, shown in (Example 3-3).

Solution:
Class Frequency
15.5-20.5 13
20.5-25.5 6
25.5-30.5 4
30.5-35.5 1
35.5-40.5 1

Since the class 15.5-20.5 has the largest frequency, 13, it is the
modal class. Sometimes the midpoint of the class is used. In this
case, it is 18.
21 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mode

EXAMPLE 3-10 Nonalcoholic Beverages


The data show the number of gallons of various nonalcoholic
drinks Americans consume in a year. Find the mode.

Solution:

Drinks Gallons
Soft drinks 52
Water 34
Milk 26
Coffee 21

Since the category of soft drinks has the largest frequency, 52, we
can say that the mode or most typical drink is a soft drink.

22 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Mean, Median,
Mode
EXAMPLE 3-11 Salaries of Personnel
A small company consists of the owner, the manager, the
salesperson, and two technicians, all of whose annual salaries are
listed here. (Assume that this is the entire population).
Staff Salary
Owner $100,0000
Manager 40,000
Salesperson 24,000
Technician 18,000
Technician 18,000
Find the mean, median, and mode?
Solution:
100, 000 + 40, 000 + 24, 000 + 18, 000 + 18, 000 $200, 000
P
X
µ= = = =
N 5 5
$40,000.
Hence, the mean is $40,000, the median is $24,000, and the mode
23 /
129 is $18,000. Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Midrange

Midrange is the average of the lowest and highest values in a data


set (denoted by MR).

Midrange
Low value + high value
MR=
2

24 /
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Midrange
EXAMPLE 3-12 Bank Failures

The number of bank failures for a recent five-year period is shown.


Find the midrange : 3, 30, 148, 157, 71.
Solution:
The lowest data value is 3, and the highest data value is 157.

3 + 157
MR= = 80.
2
The midrange for the number of bank failures is 80.

Example 3.8
The following data represent ages of a sample of 9 students:
18, 17, 19, 22, 20, 24, 19, 21, 20. Find the midrange ?

Solution:
17 + 24
MR= = 20.5.
25 /
2
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Midrange
EXAMPLE 3-12 Bank Failures

The number of bank failures for a recent five-year period is shown.


Find the midrange : 3, 30, 148, 157, 71.
Solution:
The lowest data value is 3, and the highest data value is 157.

3 + 157
MR= = 80.
2
The midrange for the number of bank failures is 80.

Example 3.8
The following data represent ages of a sample of 9 students:
18, 17, 19, 22, 20, 24, 19, 21, 20. Find the midrange ?

Solution:
17 + 24
MR= = 20.5.
25 /
2
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Midrange
EXAMPLE 3-12 Bank Failures

The number of bank failures for a recent five-year period is shown.


Find the midrange : 3, 30, 148, 157, 71.
Solution:
The lowest data value is 3, and the highest data value is 157.

3 + 157
MR= = 80.
2
The midrange for the number of bank failures is 80.

Example 3.8
The following data represent ages of a sample of 9 students:
18, 17, 19, 22, 20, 24, 19, 21, 20. Find the midrange ?

Solution:
17 + 24
MR= = 20.5.
25 /
2
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Weighted Mean

Weighted mean of a variable X by multiplying each value by its


corresponding weight and dividing the sum of the products by the
sum of the weights.

When to use?
Used when values are grouped by frequency or relative
importance.
Weighted Mean
P
w1 X1 + w2 X2 + w3 X3 + · · · + wn Xn w ·X
X¯w = = P
w1 + w2 + w3 + · · · + wn w

where w1 , w2 , ..., wn are the weights and X1 , X2 , ..., Xn are the


values.

26 /
129 Hazar Khogeer Introduction to statistics
3-1 Summarize data, Measures of Central Tendency: Weighted Mean
EXAMPLE 3-14 Grade Point Average
A student received the following grades. A in English Composition
(3 credits), a C in Introduction to Psychology (3 credits), a B in
Biology (4 credits), and a D in Physical Education (2 credits).
Assuming: A = 4 grade points , B = 3 grade points , C = 2 grade
points , D = 1 grade point, and F= 0 grade points.
Find the students grade point average?

Solution:
P
w i xi 3·4+3·2+4·3+2·1 32
X¯w = P = = ≈ 2.7 GPA
wi 3+3+4+2 12

27 / The grade point average is 2.7.


129 Hazar Khogeer Introduction to statistics
28 /
129 Hazar Khogeer Introduction to statistics
Properties and Uses of Central Tendency
The Mean
1 The mean is found by using all the values of the data.
2 The mean varies less than the median or mode when
samples are taken from the same population and all three
measures are computed for these samples.
3 The mean is used in computing other statistics, such as the
variance.
4 The mean for the data set is unique and not necessarily one
of the data values.
5 The mean cannot be computed for the data in a frequency
distribution that has an open-ended class.
6 The mean is affected by extremely high or low values, called
outliers, and may not be the appropriate average to use in
these situations.

29 /
129 Hazar Khogeer Introduction to statistics
The Median:
1 The median is used to find the center or middle value of a
data set.
2 The median is used when it is necessary to find out whether
the data values fall into the upper half or lower half of the
distribution.
3 The median is used for an open-ended distribution.
4 The median is affected less than the mean by extremely high
or extremely low values.
The Mode:
1 The mode is used when the most typical case is desired.
2 The mode is the easiest average to compute.
3 The mode can be used when the data are nominal or
categorical, such as religious preference, gender, or political
affiliation.
4 The mode is not always unique. A data set can have more
than one mode, or the mode may not exist for a data set.
30 /
129 Hazar Khogeer Introduction to statistics
The Midrange:
1 The midrange is easy to compute.
2 The midrange gives the midpoint.
3 The midrange is affected by extremely high or low values in a
data set.

31 /
129 Hazar Khogeer Introduction to statistics
3-1: Measures of Central Tendency: Distributions

Types of Distributions:

Mean>Median>Mode Mean=Median=Mode Mean<Median<Mode

32 /
129 Hazar Khogeer Introduction to statistics
3-2 Measures of Variability: Range

Measures of Variation:

Range,
Variance,
Standard Deviation.

33 /
129 Hazar Khogeer Introduction to statistics
3-2: Measures of Variation
EXAMPLE 3-15 Comparison of Outdoor Paint
A testing lab wishes to test two experimental brands of outdoor
paint to see how long each will last before fading. The testing lab
makes 6 gallons of each paint to test. Since different chemical
agents are added to each group and only six cans are involved,
these two groups constitute two small populations. The results (in
months) are shown. Find the mean of each group:

Solution: P
X 210
The mean for brand A is µ= = = 35 months
N 6
P
X 210
34 / The mean for brand B is µ= = = 35 months
129 Hazar Khogeer Introduction to6
N statistics
3-2 Measures of Variation

A measure along the horizontal axis of the data distribution that


describes the spread of the distribution from the center.
35 /
129 Hazar Khogeer Introduction to statistics
3-2 Measures of Variability: Range

Range: The difference between the largest observation and the


smallest observation in the data set.

Range
R= xmax − xmin

36 /
129 Hazar Khogeer Introduction to statistics
Example 3.16: Comparison of Outdoor Paint
Find the ranges for the paints in Example 3-15.

Solution:
Rang of Brand A: Rang of Brand B:
R = 60 − 10 = 50 months, R = 45 − 25 = 20 months.
Make sure the range is given as a single number. The range for
brand A shows that 50 months separate the largest data value
from the smallest data value. For brand B , 20 months separate
the largest data value from the smallest data value, which is less
than one-half of brand A’s range.
37 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability
Variance: Measures of variation gives information on the speed of
variability of the data values. It measures the average deviation of
the measurements about their mean.

The variance: is the average of the squares of the distances of the


values from the mean.
38 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation
Population variance : is the average of the squares of the distance
each value is from the mean. The symbol for the population
variance is σ2 (σ is the Greek lowercase letter sigma).
Population Variance
(xi − µ)2
P
σ2 =
N
where: X = individual value
µ = population mean
N = population size

The population standard deviation: is the square root of the


variance. The symbol for the population standard deviation is σ.
population standard deviation
rP
√ (xi − µ)2
σ = σ2 =
39 /
N
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation
To find the variance and standard deviation for a data set, the following Procedure
Table can be used.

40 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation

EXAMPLE 3-18 Comparison of Outdoor Paint


Find the variance and standard deviation for the data set for brand A paint in
Example 3-15. The number of months brand A lasted before fading was :
20 40 30 50 60 10

Solution:
Step 1: Find the mean for the data
P
X 10 + 60 + 50 + 30 + 40 + 20
µ= = = 35
N 6
Step 2: Subtract the mean from each data value (xi − µ)
Step 3: Square each result (xi − µ)2
Step 4: Find the sum of the squares (xi − µ)2
P
(xi − µ)2
P
Step 5: Divide the sum by N to get the variance : σ2 =
N rP
(xi − µ)2
Step 6: Take the square root to get the standard deviation σ =
N

41 /
129 Hazar Khogeer Introduction to statistics
EXAMPLE 3-18 (continued)
Solution:
A B C D
i xi µ xi − µ (xi − µ)2
1 20 35 -15 225
2 40 35 5 25
3 30 35 -5 25
4 50 35 15 225
5 60 35 25 625
6 10 35 -25 625
(xi − µ) = 0 (xi − µ)2 =1750
P P P
Total xi = 210
N = 6P
(xi − µ)2 1750
σ2 = = ≈ 291.7
rP N 6
(xi − µ)2 √
σ= = 291.7 = 17.1
N
Column A contains the raw data X. Column B contains the mean of X . Column C
differences X − µ obtained in step 2. Column D contains the squares of the
differences obtained in step 3.
42 /
129 Hazar Khogeer Introduction to statistics
EXAMPLE 3-19 Comparison of Outdoor Paint
Find the variance and standard deviation for brand B paint data in
Example 3-15. The months brand B lasted before fading was :
35 45 30 35 40 25
Solution:
A B C D
i Xi µ Xi − µ (Xi − µ)2
1 35 35 0 0
2 45 35 10 100
3 30 35 -5 25
4 35 35 0 0
5 40 35 5 25
6 25 35 -10 100
(xi − µ) = 0 (xi − µ)2 =250
P P P
Total xi = 210
(xi − µ)2
P P
xi 1210 250
µ= = = 35, σ =
2
= = 41.7,
N 6 rP N 6
(xi − µ)2 √
σ= = 41.7 ≈ 6.5.
43 /
N
129 Hence, the standard deviation is 6.5.
Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation

Sample Variance: is the average square distance of individual


measurement from mean. Denoted by s 2 .

Sample variance
(xi − x̄ )2
P
2
s = .
n−1

(xi − x̄ )2 is denoted as the sum of square deviation, n − 1 is the


P
degree of freedom.

44 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation
Stander deviation: is the square root of the variance.

Stander deviation

s= s2
Comparing Standard Deviations

45 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation
EXAMPLE 3-20 Teacher Strikes
The number of public school teacher strikes in Pennsylvania for a
random sample of school years is shown. Find the sample
variance and the sample standard deviation:
9 10 14 7 8 3
Solution:
Step 1: Find the mean of the data values :
P
X 9 + 10 + 14 + 7 + 8 + 3 51
X̄ = = = = 8.5,
n 6 6
Step 2: Find the deviation for each data value(xi − x̄ ),
Step 3: Square each of the deviations (xi − x̄ )2 ,
Step 4: Find the sum of the squares (xi − x̄ )2 ,
P
Step 5: Divide by n − 1 to get the variance,
Step 6: Take the square root of the variance to get the standard
deviation.
46 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation
EXAMPLE 3-20 (continued)
Solution:
i xi x̄ xi − x̄ (xi − x̄ )2
1 9 8.5 0.5 0.25
2 10 8.5 1.5 2.25
3 14 8.5 5.5 30.25
4 7 8.5 -1.5 2.25
5 8 8.5 -0.5 0.25
6 3 8.5 -5.5 30.25
(xi − x̄ )2 = 65.5
P P P
Total xi = 51 (xi − x̄ ) = 0

(xi − x̄ )2 65.5
P
2
s = = = 13.1 and
n − 1r 5
√ (xi − x̄ )2 √
P
s = s2 = = 13.1 ≈ 3.6(rounded ). Here the
n−1
sample variance is 13.1, and the sample standard deviation is 3.6.
47 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation

The sample variance is given by

The sample standard deviation is given by

48 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability: Variance, and Standard Deviation
(xi − x̄ )2 n (xi )2 − ( xi )2
P P P
2
Prove: s = =
n−1 n(n − 1)

49 /
129 Hazar Khogeer Introduction to statistics
EXAMPLE 3-21 Teacher Strikes
The number of public school teacher strikes in Pennsylvania for a
random sample of school years is shown. Find the sample
variance and the sample standard deviation:
9 10 14 7 8 3
Solution:
Solution : Step 1: Find the sum of the values :
X = 9 + 10 + 14 + 7 + 8 + 3 = 51.
P
Step 2: Square each value and find the sum :
X = 92 + 102 + 142 + 72 + 82 + 32 = 499.
P 2

50 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

Step 3: Substitute in the formula and solve :

xi2 − ( xi )2
P P
2
n
s =
n(n − 1)
6(499) − 512
=
6(6 − 1)
2994 − 2601
=
6(5)
393
= = 13.1
30
The variance is 13.1.

s= 13.1 ≈ 3.6 (rounded)

Hence, the sample variance is 13.1, and the sample standard deviation is 3.6.
Notice that these are the same results as the results in Example 3-20.

51 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability
Example 3.9:
The following are weights of 5 persons: 60 90 80 70 50. Find the
variance and standard deviation?
Solution:
i xi xi2
1 60 3600
2 90 8100
3 80 6400
4 70 4900
5 50 2500
P P 2
Total xi = 350 xi = 25500

xi2 − ( xi )2 5(25500) − (350)2


P P
n 5000
2
Var(s ) = = = = 250.
n (n − 1 ) 5(5 − 1) 20
√ √
SD (s)= s 2 = 250 = 15.81.
52 /
129 Hazar Khogeer Introduction to statistics
3-2 Variance and Standard Deviation for Grouped Data

53 /
129 Hazar Khogeer Introduction to statistics
3-2 Variance and Standard Deviation for Grouped Data

EXAMPLE 3-22 Miles Run per Week

Find the sample variance and the sample standard deviation for
the frequency distribution of the data shown. The data represent
the number of miles that 20 runners ran during one week:

Class bounderies Frequency Midpoint Xm


5.5-10.5 1 8
10.5-15.5 2 13
15.5-20.5 3 18
20.5-25.5 5 23
25.5-30.5 4 28
30.5-35.5 3 33
35.5-40.5 2 38

54 /
129 Hazar Khogeer Introduction to statistics
3-2 Variance and Standard Deviation for Grouped Data
EXAMPLE 3-22 (continued)
Solution :
Step 1: Make a table as shown, and find the midpoint of each class

A B C D E
2
Class bounderies Frequency Midpoint Xm f · xm f · xm
5.5-10.5 1 8
10.5-15.5 2 13
15.5-20.5 3 18
20.5-25.5 5 23
25.5-30.5 4 28
30.5-35.5 3 33
35.5-40.5 2 38

Step 2: Multiply the frequency by the midpoint for each class, and
place the Products in column D :
1·8=8 2 · 13 = 26 ··· 2 · 38 = 76
55 /
129 Hazar Khogeer Introduction to statistics
3-2 Variance and Standard Deviation for Grouped Data

Step 3: Multiply the frequency by the square of the midpoint, and


place the products in column E :
1 · 82 = 64 2 · 132 = 338 ··· 2 · 382 = 2888

Step 4: Find the sums of columns B, D, and E. The sum of column


B is n , the sum of column D is f xm , and the sum of column E is
P 2
f · xm . The completed table is shown

56 /
129 Hazar Khogeer Introduction to statistics
A B C D E
Class bounderies Frequency Midpoint Xm f · xm f · xm2
5.5-10.5 1 8 8 64
10.5-15.5 2 13 26 338
15.5-20.5 3 18 54 972
20.5-25.5 5 23 115 2,645
25.5-30.5 4 28 112 3,136
30.5-35.5 3 33 99 3,267
35.5-40.5 2 38 76 2,888
f · xm2 = 13, 310
P P
n = 20 f · xm = 490
2
Step 5: SubstitutePin the formula
P and 2solve for s to get the
2
n f · xm − ( f · xm )
variance : s 2 =
n(n − 1)
20(13, 310) − 4902
=
20(20 − 1)
266, 200 − 240, 100 26, 100
= = ≈ 68.7
20(19) 380
Step 6: Take the √
square root to get the standard deviation :
57 / s ≈ 68.7 ≈ 8.3
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

Measures of variation are used to examine the variability of


variables.

Measures of variation are always non-negative (i.e.,≥ 0).

Large values of measures of variation indicate high variability,


while values closed to 0 indicate low variability (or
homogenous).

58 /
129 Hazar Khogeer Introduction to statistics
59 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

A statistic that allows you to compare variation of at least two


variables when the measuring units are different, is called the
coefficient of variation where it is expressed in percentage.

Coefficient of Variation : is the standard deviation divided by the


mean, denoted by (CVar).

Coefficient of Variation Sample


s 
CVar = · 100%

Coefficient of Variation Population


σ
CVar = · 100%
µ

60 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

Example 3.11: Use the below statistics to compare the variations


of the two variables weight and height. What do you conclude?

mean(x̄ ) Standard deviation (s)


Height 75 5.59
Weight 70 15.81

Solution:
s  5.59cm
Height: CVar = · 100% = · 100% = 7.5%
x̄ 75cm
s  15.81kg
Weight: CVar = · 100% = · 100% = 22.6%
x̄ 70kg
The weight distribution has a higher variability than the height.

61 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

EXAMPLE 3-23 Sales of Automobiles


The mean of the number of sales of cars over a 3-month period is
87, and the standard deviation is 5. The mean of the commissions
is $5225, and the standard deviation is $773. Compare the
variations of the two.
Solution:
The coefficients of variation are
s  5
Sales: CVar = · 100% =· 100% ≈ 5.7% sales
x̄ 87
s  773
Commissions: CVar = · 100% = · 100% ≈ 14.8%
x̄ 5225
commission

Since the coefficient of variation is larger for commissions, the


commissions are more variable than the sales.
62 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

63 /
129 Hazar Khogeer Introduction to statistics
3-2 Measure of Variability

Range Rule of Thumb


The range can be used to approximate the standard deviation. The
approximation is called the range rule of thumb.

64 /
129 Hazar Khogeer Introduction to statistics
3-2 Chebyshevs Theorem

65 /
129 Hazar Khogeer Introduction to statistics
3-2 Chebyshevs Theorem
EXAMPLE 3-26 Travel Allowances
A survey of local companies found that the mean amount of travel
allowance for couriers was $0.25 per mile. The standard deviation
was $0.02. Using Chebyshevs theorem, find the minimum
percentage of the data values that will fall between $0.20 and
$0.30.
Solution :
Step 1: Subtract the mean from the larger value :
$0.30-$0.25=$0.05.
Step 2 Divide the difference by the standard deviation to get k.
0.05
k= = 2.5.
0.02
Step 3: Use Chebyshevs theorem to find the percentage :
1 1 1
1− 2 =1− =1− = 1 − 0.16 = 0.84
k 2.52 6.25
Hence, at least 84% of the data values will fall between $0.20 and
66 /
129 $0.30. Hazar Khogeer Introduction to statistics
3-3 Measures of Position

Measures of position are used to determine the locations of data


values and outliers, we will consider:

Standard scores (or z-score).


Percentiles.
Quartiles.

67 /
129 Hazar Khogeer Introduction to statistics
3-3 Measures of Position

z score or standard score : for a value is obtained by subtracting


the mean from the value and dividing the result by the standard
deviation. The symbol for a standard score is z. The formula is:

value − mean
z=
standard deviation
X − X̄
For Samples, the formula is: z= .
s
X −µ
For Population, the formula is: z= .
σ

The z score represents the number of standard deviations that a


data value falls above or below the mean.

68 /
129 Hazar Khogeer Introduction to statistics
3-3 Measures of Position
EXAMPLE 3-27 Test Scores
A student scored 85 on an English test while the mean score of all
the students was 76 and the standard deviation was 4. She also
scored 42 on a French test where the class mean was 36 and the
standard deviation was 3. Compare the relative positions on the
two tests.
Solution :
First find the z scores.
For the English test :
X − X̄ 85 − 76
z= = = 2.25.
s 4
For the French test
X − X̄ 42 − 36
z= = = 2.00.
s 3
Since the z score for the English test is higher than the z score for
the French test, her relative position in the English class is higher
than her relative position in the French class.
69 /
129 Hazar Khogeer Introduction to statistics
3-3 Measures of Position
Percentiles: divide the data set into 100 equal groups.

Note that Pi < Pi +1 for all i.

Let n denotes the sample size, X denotes a data value, and P


denotes a percentile. Usually we deal with two types of problems.

70 /
129 Hazar Khogeer Introduction to statistics
3-3 Measures of Position
EXAMPLE 3-29 Systolic Blood Pressure
The frequency distribution for the systolic blood pressure readings
(in millimeters of mercury, mm Hg) of 200 randomly selected
college students is shown here. Construct a percentile graph :

71 /
129 Hazar Khogeer Introduction to statistics
Solution :
Step 1: Find the cumulative frequencies and place them in column
C.
Step 2: Find the cumulative percentages and place them in
column D. To do this step, use the formula :
cumulative frequency
Cumulative % = · 100
n
24
For the first class, Cumulative % = · 100 = 12%
200

72 /
129 Hazar Khogeer Introduction to statistics
Step 3: Graph the data, using class boundaries for the x axis and
the percentages for the y axis, as shown in Figure.

73 /
129 Hazar Khogeer Introduction to statistics
74 /
129 Hazar Khogeer Introduction to statistics
We used the following rule after ascending order the data:
# of values less than X + 0.5
P= × 100
n
EXAMPLE 3-30 Traffic Violations
The number of traffic violations recorded by a police department
for a 10-day period is shown. Find the percentile rank of 16.
22 19 25 24 18 15 9 12 16 20
Solution :
Arrange the data in order from lowest to highest.
9 12 15 16 18 19 20 22 24 25
Then substitute into the formula.

(number of value below X) + 0.5


Percentile = · 100.
total number of values
Since there are 3 numbers below the value of 16, the solution is
3 + 0.5
Percentile = · 100 = 35 th percentile.
10
75 /
129 Hence, the value of 16 is higher
Hazar Khogeer than 35% toofstatistics
Introduction the data values.
76 /
129 Hazar Khogeer Introduction to statistics
EXAMPLE 3-32 Traffic Violations
Using the data in Example 3-30, find the value corresponding to
the 65th percentile.
Solution :
Step 1: Arrange the data in order from lowest to highest :
9 12 15 16 18 19 20 22 24 25

Step 2: Compute :
n·p
c=
100
where n = total number of values, p = percentile
Thus,
10 · 65
c= = 6.5
100
Since c is not a whole number, round it up to the next whole
number; in this case, it is c = 7. Start at the lowest value and
count over to the 7th value, which is 20. Hence, the value of 20
corresponds to the 65 th percentile.
77 /
129 Hazar Khogeer Introduction to statistics
EXAMPLE 3-33 Traffic Violations
Using the data in Example 3-30, find the data value corresponding
to the 30th percentile.
Solution :
Step 1: Arrange the data in order from lowest to highest.
9 12 15 16 18 19 20 22 24 25
Step 2: Substitute in the formula.
n·p 10 · 30
c= , c= =3
100 100
In this case, it is the 3rd and 4th values.
Step 3: Since c is a whole number, use the value halfway between
the c and c + 1 values when counting up from the lowest. In this
case, it is the third and fourth values.

The halfway value is between 15 and 16. It is 15.5.


78 / Hence, 15.5 corresponds to the 30th percentile.
129 Hazar Khogeer Introduction to statistics
3-3: Measures of position
Quartiles: divide the distribution into four equal groups, denoted by
Q1 , Q2 , Q3 . Note that Q1 is the same as the 25th percentile; Q2 is
the same as the 50 th percentile, or the median; Q3 corresponds to
the 75th percentile, as shown :
Q1 < Q2 < Q3

79 /
129 Hazar Khogeer Introduction to statistics
3-3: Measures of position
Other Location Measures
Quantiles: divides the data set into 4 equal parts
Q1 = P25 , Q2 = P50 = MD , Q3 = P75 .

First quantiles: is a median of the data values in the lower half


of the data set and denoted by Q1 .

Third quantiles: is a median of the data values in the upper half


of the data set and denoted by Q3 .

Five-Number Summary: is composed of the following numbers:


80 /
129 Low,
Hazar Q1, MD,
Khogeer Q3, toHigh
Introduction statistics
3-3: Measures of position
EXAMPLE 3-34 Traffic Violations
Using the data in Exercise 3-30, find Q1 , Q2 , Q3 .
Solution:
First arrange the data in order: 9, 12, 15, 16, 18, 19, 20, 22, 24, 25.
↑ ↑ ↑ ↑ ↑
Min Q1 MD Q3 Max

Find the median Q2 :


18 + 19
Q2 = = 18.5.
2
Find the median of the data values below 18.5 :
9, 12, 15, 16, 18

Q1 = 15
Find the median of the data values greater 18.5 :
19, 20, 22, 24, 25

Q3 = 22
The five number summery are: min, Q1 , Q2 , Q3 , max:
81 /
129 Hazar Khogeer
9, 15, 18.5, 22, 25.
Introduction to statistics
3-3: Measures of position
The interquartile range (IQR): is defined as the difference between
Q1 and Q3 and is the range of the middle 50% of the data.

Interquartile range (IQR): is the difference between the third and


first quartiles :
IQR = Q3 − Q1

EXAMPLE 3-35 Traffic Violations


Find the interquartile range of the data set in Example 3-30.

Solution :
FindQ1 and Q3 . This was done in Example 3-34.
Now Q1 = 15 and Q3 = 22.

Next subtract Q1 from Q3 :


IQR = Q3 − Q1 = 22 − 15 = 7
The interquartile range is equal to 7.
82 /
129 Hazar Khogeer Introduction to statistics
3-3: Measures of position
Deciles: divide the distribution into 10 groups, as shown. They are
denoted by D1 , D2 , etc.
Note: that D1 corresponds to P10 ; D2 corresponds to P20 ; etc.
These are the relationships among percentiles, deciles, and
quartiles.

Deciles are denoted by D1 , D2 , D3 , ..., D9 , and they correspond


to P10 , P20 , P30 , ..., P90 .
Quartiles are denoted by Q1 , Q2 , Q3 and they correspond to
P25 , P50 , P75 .
The median is the same as P50 or Q2 or D5 .
83 /
129 Hazar Khogeer Introduction to statistics
3-3: Measures of position

84 /
129 Hazar Khogeer Introduction to statistics
3-3 Measures of position

Outlier :
An outlier is an extremely high or low data value when compared
with the rest of the data value.

To detect an outlier:
Obtain Q1 , Q3 and IQR.

Outlier
a data that is smaller than: Q1 − 1.5 × (IQR ), or

a data that is larger than than: Q3 + 1.5 × (IQR )

can be considered an outlier.

85 /
129 Hazar Khogeer Introduction to statistics
3-3 Measures of position
EXAMPLE 3-36 Outliers

Check the following data set for outliers.

50 22 18 15 13 6 12 5

Solution :
The data value 50 is extremely suspect. These are the steps in
checking for an outlier.

Step 1: Find Q1 and Q3 5 6 12 13 15 18 22 50:

6 + 12 18 + 22
Q1 = =9 Q3 = = 20.
2 2
Step 2: Find the interquartile range IQR = Q3 − Q1 :

86 /
IQR = Q3 − Q1 = 20 − 9 = 11
129 Hazar Khogeer Introduction to statistics
3-3 Measures of position
EXAMPLE 3-36 Outliers

Check the following data set for outliers.

50 22 18 15 13 6 12 5

Solution :
The data value 50 is extremely suspect. These are the steps in
checking for an outlier.

Step 1: Find Q1 and Q3 5 6 12 13 15 18 22 50:

6 + 12 18 + 22
Q1 = =9 Q3 = = 20.
2 2
Step 2: Find the interquartile range IQR = Q3 − Q1 :

86 /
IQR = Q3 − Q1 = 20 − 9 = 11
129 Hazar Khogeer Introduction to statistics
Step 3: Multiply this value by 1.5 :

1.5(11)=16.5.

Step 4: Subtract the value obtained in step 3 from Q1 , and add the
value obtained in step 3 to Q3 .

9 − 16.5 = −7.5 and 20 + 16.5 = 36.5

Step 5: Check the data set for any data values that fall outside the
interval from -7.5 to 36.5. The value 50 is outside this interval;
hence, it can be considered an outlier.

87 /
129 Hazar Khogeer Introduction to statistics
3-4: Exploratory data analysis

Boxplot : is a graph of a data set obtained by drawing a horizontal


line from the minimum data value to Q1 , drawing a horizontal line
from Q3 to the maximum data value, and drawing a box whose
vertical sides pass through Q1 and Q3 with a vertical line inside the
box passing through the median or Q2 .

The five-number summary:


Minimum
Q1
Median (Q2 )
Q3
Maximum

88 /
129 Hazar Khogeer Introduction to statistics
89 /
129 Hazar Khogeer Introduction to statistics
3-4: Exploratory data analysis
EXAMPLE 3-37 Number of Meteorites Found
The number of meteorites found in 10 states of the United States
is:
89,47,164,296,30,215,138,78,48,39

Construct a boxplot for the data.


Solution:
Step 1: Find the five-number summary for the data. Arrange the
data in order :
30,39,47,48,78,89,138,164,215,296
Find the median :

30,39,47,48,78,89,138,164,215,296

Median
78 + 89
median = = 83.5
2
90 /
129 Hazar Khogeer Introduction to statistics
3-4: Exploratory data analysis
EXAMPLE 3-37 Number of Meteorites Found
The number of meteorites found in 10 states of the United States
is:
89,47,164,296,30,215,138,78,48,39

Construct a boxplot for the data.


Solution:
Step 1: Find the five-number summary for the data. Arrange the
data in order :
30,39,47,48,78,89,138,164,215,296
Find the median :

30,39,47,48,78,89,138,164,215,296

Median
78 + 89
median = = 83.5
2
90 /
129 Hazar Khogeer Introduction to statistics
Find Q1 :
30,39,47,48,78

Q1
Find Q3 :
89,138,164,215,296

Q3
The minimum data value is 30, and the maximum data value is
296.

Step 2: Draw a horizontal axis and the scale :

91 /
129 Hazar Khogeer Introduction to statistics
Step 3: Draw the box above the scale using Q1 and Q3 . Draw a
vertical line through the median, and draw lines from the lowest
data value to the box and from the highest data value to the box.
See Figure 3-7.

92 /
129 Hazar Khogeer Introduction to statistics
Distribution Shape and Box Plot

93 /
129 Hazar Khogeer Introduction to statistics
3-4: Exploratory data analysis
EXAMPLE 3-38 Speeds of Roller Coasters
The data shown are the speeds in miles per hour of a sample of
wooden roller coasters and a sample of steel roller coasters.
Compare the distributions by using boxplots :

Solution:
Step 1: For the wooden coasters :
35 48 50 56 60 67 68 72
↑ ↑ ↑
Q1 MD Q3

48 + 50 56 + 60 67 + 68
Q1 = = 49, MD = = 58, Q3 = = 67.5.
2 2 2
94 /
129 Hazar Khogeer Introduction to statistics
3-4: Exploratory data analysis
EXAMPLE 3-38 Speeds of Roller Coasters
The data shown are the speeds in miles per hour of a sample of
wooden roller coasters and a sample of steel roller coasters.
Compare the distributions by using boxplots :

Solution:
Step 1: For the wooden coasters :
35 48 50 56 60 67 68 72
↑ ↑ ↑
Q1 MD Q3

48 + 50 56 + 60 67 + 68
Q1 = = 49, MD = = 58, Q3 = = 67.5.
2 2 2
94 /
129 Hazar Khogeer Introduction to statistics
Step 2 For the steel coasters : 28 48 55 70 100 102 106 120
↑ ↑ ↑
Q1 MD Q3

48 + 55
Q1 = = 51.5,
2
70 + 100
MD = = 85,
2
102 + 106
Q3 = = 104.
2

95 /
129 Hazar Khogeer Introduction to statistics
Step 2 For the steel coasters : 28 48 55 70 100 102 106 120
↑ ↑ ↑
Q1 MD Q3

48 + 55
Q1 = = 51.5,
2
70 + 100
MD = = 85,
2
102 + 106
Q3 = = 104.
2

95 /
129 Hazar Khogeer Introduction to statistics
Step 3: Draw the boxplots. See Figure 3-8.

The boxplots show that the median of the speeds of the steel
coasters is much higher than the median speeds of the wooden
coasters. The interquartile range (spread) of the steel coasters is
much larger than that of the wooden coasters. Finally, the range of
the speeds of the steel coasters is larger than that of the wooden
coasters.
96 /
129 Hazar Khogeer Introduction to statistics
3-4 Statistical Modeling, Scientific Inspection, and Graphical Diagnostics
Example 3.13:Drew the box-plot for patient stay in the hospital ?

Patient 1 2 3 4 5 6 7 8 9

Number of days in the hospital 4 12 18 9 12 6 7 3 55

Solution:
First arrange the data in order: 3,4,6,7,9,12,12,18,55

ForQ2 find the location of the median. Thus, Q2 = 9


For Q1 find the location of the median in the lower half of the data . Which
means we take the2nd and the 3rd positions.
The 2nd positions is 4 and The 3rd positions is 6. Take the mean
4+6
Q1 = = 5.
2
For Q3 find the location of the median in the upper half of the data. Which
means we take the 7th and the 8th positions. The 7th positions is 12 and
The 8th positions is 18.
12 + 18
Take the mean Q3 = = 15.
2
97 /
129 Hazar Khogeer Introduction to statistics
3-4 Statistical Modeling, Scientific Inspection, and Graphical Diagnostics
Example 3.13:Drew the box-plot for patient stay in the hospital ?

Patient 1 2 3 4 5 6 7 8 9

Number of days in the hospital 4 12 18 9 12 6 7 3 55

Solution:
First arrange the data in order: 3,4,6,7,9,12,12,18,55

ForQ2 find the location of the median. Thus, Q2 = 9


For Q1 find the location of the median in the lower half of the data . Which
means we take the2nd and the 3rd positions.
The 2nd positions is 4 and The 3rd positions is 6. Take the mean
4+6
Q1 = = 5.
2
For Q3 find the location of the median in the upper half of the data. Which
means we take the 7th and the 8th positions. The 7th positions is 12 and
The 8th positions is 18.
12 + 18
Take the mean Q3 = = 15.
2
97 /
129 Hazar Khogeer Introduction to statistics
3-4 Statistical Modeling, Scientific Inspection, and Graphical Diagnostics

The five number summery are: min,Q1 , Q2 , Q3 , max:


3, 5, 9, 15, 55.

98 /
129 Hazar Khogeer Introduction to statistics
3-4 Data Description: Box Plot

Example 3.14:Check the values of data set for any outliers for
patient stay in the hospital in(Example 3-13)?

3,4,6,7,9,12,12,18,55
↑ ↑ ↑ ↑ ↑
Min Q1 MD Q3 Max
Q1 = 5
Q2 = 9
Q3 15

Solution:
IQR = Q3 − Q1 = 15 − 5 = 10
Lower bound=Q1 − 1.5 × (IQR ) = 5 − 1.5 × 10 = −10,
Upper bound= Q3 + 1.5 × (IQR ) = 15 + 1.5 × 10 = 30.

The value 55 is outside this interval; hence, it can be considered an outlier.

99 /
129 Hazar Khogeer Introduction to statistics
3-4 Data Description: Box Plot

Example 3.14:Check the values of data set for any outliers for
patient stay in the hospital in(Example 3-13)?

3,4,6,7,9,12,12,18,55
↑ ↑ ↑ ↑ ↑
Min Q1 MD Q3 Max
Q1 = 5
Q2 = 9
Q3 15

Solution:
IQR = Q3 − Q1 = 15 − 5 = 10
Lower bound=Q1 − 1.5 × (IQR ) = 5 − 1.5 × 10 = −10,
Upper bound= Q3 + 1.5 × (IQR ) = 15 + 1.5 × 10 = 30.

The value 55 is outside this interval; hence, it can be considered an outlier.

99 /
129 Hazar Khogeer Introduction to statistics
3-4 Data Description: Box Plot

Example 3.14:Check the values of data set for any outliers for
patient stay in the hospital in(Example 3-13)?

3,4,6,7,9,12,12,18,55
↑ ↑ ↑ ↑ ↑
Min Q1 MD Q3 Max
Q1 = 5
Q2 = 9
Q3 15

Solution:
IQR = Q3 − Q1 = 15 − 5 = 10
Lower bound=Q1 − 1.5 × (IQR ) = 5 − 1.5 × 10 = −10,
Upper bound= Q3 + 1.5 × (IQR ) = 15 + 1.5 × 10 = 30.

The value 55 is outside this interval; hence, it can be considered an outlier.

99 /
129 Hazar Khogeer Introduction to statistics
3-4: Exploratory data analysis

100 /
129 Hazar Khogeer Introduction to statistics
Further Moments of the Distribution

There are further statistics that describe the shape of the


distribution, using formulae that are similar to those of the
mean and variance.

1st moment - Mean (describes central value)

2nd moment - Variance ( describes dispersion)

3rd moment - Skewness ( describes asymmetry)

4th moment - Kurtosis ( describes peakedness)

101 /
129 Hazar Khogeer Introduction to statistics
Moments

A moment is a quantitative measure of the shape of a set of


points.

The first moment is called the mean which describes the


center of the distribution.

Other moments describe other aspects of a distribution such


as how the distribution is skewed from its mean or peaked.

A moment designates the power to which deviations are


raised before averaging them.

102 /
129 Hazar Khogeer Introduction to statistics
Central (or Mean) Moments
In mean moments: the deviations are taken from the mean.
For Ungrouped Data:

Formula Grouped Data:

103 /
129 Hazar Khogeer Introduction to statistics
Moments

Assignment

Example: Calculate first four moments about the mean the


following two set of data.

104 /
129 Hazar Khogeer Introduction to statistics
Moments(Assigment)

xi x̄ (xi − x̄ ) (xi − x̄ )2 (xi − x̄ )3 (xi − x̄ )4


45 40.5 4.5 20.25 91.125 410.0625
32 40.5 -8.5
37 40.5 -3.5
46 40.5 5.5
39 40.5 -1.5
41 40.5 0.5
48 40.5 7.5
36 40.5 -4.5
Total 324 0 214 -72 10274.5
P
xi
x̄ = = 40.5
nP
(xi − x̄ )2
P
(xi − x̄ )
m1 = = 0, m2 = = 26.75,
P n Pn
(xi − x̄ )3 (xi − x̄ )4
m3 = = −9, m4 = = 1284.3125.
n n
105 /
129 Hazar Khogeer Introduction to statistics
X Frequency(f) Midpoint Xm X̄ (Xm − X̄ ) (Xm − X̄ )2 (Xm − X̄ )3 (Xm − X̄ )4
65-84 9 74.5 122.5 -48
85-104 10 94.5 122.5 -28
105-124 17 114.5 122.5 -8
125-144 10 134.5 122.5 12
145-164 5 154.5 122.5 32
165-184 4 174.5 122.5 52
185-204 5 194.5 122.5 72
P
Total 60 f · Xm

X Frequency(f) f · (Xm − X̄ ) f · (Xm − X̄ )2 f · (Xm − X̄ )3 f · (Xm − X̄ )4


65-84 9
85-104 10
105-124 17
125-144 10
145-164 5
165-184 4
185-204 5
P
Total f · Xm = 60 0 72960 1386240 223057920

P
f · Xm
x̄ = P = 122.5
P f
f (xm − x̄ )2
P
f (xm − x̄ )
m1 = P = 0, m2 = P = 1216,
f f
f (xm − x̄ )3 f (xm − x̄ )4
P P
m3 = P = 23104, m4 = P = 3717632.
f f
106 /
129 Hazar Khogeer Introduction to statistics
Moments about (arbitrary) Origin

If the deviations are taken from some arbitrary number (’a’ called
origin), then moments are called moments about arbitrary origin ’a’.
For Ungrouped Data:

Formula Grouped Data:

107 /
129 Hazar Khogeer Introduction to statistics
Moments about zero

If origin is taken as zero. i.e. a=0, moments are called moments


about zero.
For Ungrouped Data:

Formula Grouped Data:

108 /
129 Hazar Khogeer Introduction to statistics
Moments

Assignment

Example: Calculate first four moments about zero (origin) for the
following two set of sets of data.

109 /
129 Hazar Khogeer Introduction to statistics
Moments(Assignment)(Continued)
Example: Calculate first four moments about zero (origin) for the
following set of data.

X (X )2 (X )3 (X )4
45 2025 91125 4100625
32 1024 32768 1048576
37 1369 50653 1874161
46 2116 97336 4477456
39 1521 59319 2313441
36 1296 46656 1679616
41 1681 68921 2825761
48 2304 110592 5308416
36 1296 46656 16796
Total 14632 604026 25307668

(xi )2
P P
xi
m1 = = 40, m2 = = 1625.778, n=9
Pn 3 n P
4
(xi ) ( xi )
m3 = = 67114, m4 = = 2811963.1111.
n n
110 /
129 Hazar Khogeer Introduction to statistics
Moments(Assignment)(Continued)
Example: Calculate first four moments about zero (origin) for the
following set of data.
X f xm 2
Xm 3
Xm 4
Xm f · Xm f · (Xm )2 f · (X m )3 f · (X m )4
65-84 9 74.5 5550.25
85-104 10 94.5 8930.25
105-124 17 114.5 13110.24
125-144 10 134.5 18090.25
145-164 5 154.5 23870.25
165-184 4 174.5 30450.25
185-204 5 194.5 37830.25
Total 60 941.5 137831.75 21551170.37 3837824815 7350

2 3
= 138494977.5,
P P
f · Xm = 973335, f · Xm
f · Xm = 20982703863.5,
4
f = 60.
P P

f (xi )2
P P
0 f ( xi ) 0
m1 = P = 122.5, m2 = P = 16222.25,
P f 3 f
0 f ( xi )
m3 = P = 2308249.625,
P f 4
0 f ( xi )
m4 = P = 349711731.0583.
111 /
f
129 Hazar Khogeer Introduction to statistics
Moments

The first central moment with respect to zero is the mean.


The second central moment of the probability distribution with
respect to the mean is the variance.
The third and fourth central moments with respect to the
mean are called ”skewness” and ”kurtosis”.
112 /
129 Hazar Khogeer Introduction to statistics
Measures of Skewness and Kurtosis

A fundamental task in many statistical analysis is to


characterize the location and variability of a data set
(measures of central tendency vs. measure of dispersion)

Both measures tell us nothing about the shape of the


distribution

A further characterization of the date includes skewness and


kurtosis

The histogram is an effective graphical technique for showing


both the skewness and kurtosis of a date set

113 /
129 Hazar Khogeer Introduction to statistics
Skewness

The term skewness refers to the lack of symmetry. The lack


of symmetry in a distribution is always determined with
reference to a normal or Gaussian distribution. Note that a
normal distribution is always symmetrical.

The skewness may be either positive or negative. When the


skewness of a distribution is positive (negatively) skewed
distribution. Absence of skewness makes a distribution
symmetrical.

It is important to emphasize that skewness of a distribution


cannot be determined simply by inspection.

114 /
129 Hazar Khogeer Introduction to statistics
Measures of Symmetry (1)

Skewness
Symmetric distribution.
Negatively skewed (Left) distribution.
Positively skewed (Right) distribution.
If Mean = Mode, the skewness is zero.
If Mean < Mode, the skewness is negative.
If Mean > Mode, the skewness is positive.

115 /
129 Hazar Khogeer Introduction to statistics
Measures of Symmetry (2)

Many distribution are not symmetrical.

They may be tail off to right or to the left and as such said to
be skewed.

One measure of absolute skewness is difference between


mean and mode. A measure of such would not be true
meaningful because it depends of the units of measurements.

The simplest measure of skewness is the Pearson’s


coefficient of skewness.

116 /
129 Hazar Khogeer Introduction to statistics
Measures of Skewness

(Mean − Mode )
Person’s coefficient of skewness =
Standard deviation

3(Mean − Median)
Person’s coefficient of skewness =
Standard deviation

D9 + D1 − 2Me
Kelley’s coefficient of skewness =
D9 − D1

(Q3 + Q1 ) − 2Me
Bowler’s coefficient of skewness =
Q3 − Q1

µ23
Pn
i =1 (xi − x̄ )3
Moment based coefficient of skewness =
117 /
µ32 ns 3
129 Hazar Khogeer Introduction to statistics
Symmetric Distribution
Symmetric Distribution

118 /
129 Hazar Khogeer Introduction to statistics
Right Skewed Distributions

Skewness > 0 (Positively Skewed)

1. There are more observation below the mean than above it .


119 / 2. When the mean is greater then the median.
129 Hazar Khogeer Introduction to statistics
Left Skewed Distributions

Skewness < 0 (Negatively Skewed)

1. There are a small number of low observations and a large


number of hight ones.

120 /
2. When the median is greater the the mean.
129 Hazar Khogeer Introduction to statistics
Example(1)

n = 26 mean= 4.23 median= 3.5 mode= 3

121 /
129 Hazar Khogeer Introduction to statistics
3-4 Measures of Skewness

Example 3.15:Number of Meteorites Found


Next to determine if the data is skewed using Person’s coefficient
for( EXAMPLE 3-37).
Solution:
Recall the Five-Number Summary are:
30, Q1 = 47, Q2 = 83.5, Q3 =164, 296.

x̄ = 114.4, s 2 = 7760.7, and s = 88.095,

Calculating the measures of skewness using the Person’s


Coefficient of Skewness

3(mean − median) 3(x̄ − median) 3(114.4 − 83.5)


PC = = = =1.052,
standard deviation s 88.095
Conclusion:
The data is significantly skewed. Thus, the histogram is right-skewed.

122 /
129 Hazar Khogeer Introduction to statistics
Example: Skewness using Moment Based Coefficient

Xi f Xi · f (Xi − X̄ ) (X − X̄ )2 f · (X − X̄ )2 (X − X̄ )3 f · (X − X̄ )3
1 1 1 -3.23 10.43 10.44 -33.70 -33.70
2 4 8 -2.23 4.97 19.91 -11.09 -44.36
3 8 24 -1.23 1.51 12.12 -1.86 -14.89
4 4 16 -0.23 0.05 0.21 -0.01 -0.05
5 3 15 0.77 0.59 1.78 0.46 1.37
6 2 12 1.77 3.13 6.26 5.54 11.09
7 1 7 2.77 7.67 7.67 21.25 21.25
8 1 8 3.77 14.21 14.21 53.58 53.58
9 1 9 4.77 22.75 22.75 108.53 108.53
10 1 10 5.77 33.28 33.28 192.10 192.10
sum 26 110 128.62 294.94
Pn
i =1 f × Xi 110
Mean X̄ = Pn = = 4.23
i =1 f s P26
128.62
n 2
r
i =1 f × (Xi − X̄ )
Standard Deviations = Pn = = 2.27
( i =1 f ) − 1 25
294.94
Pn
f × (Xi − X̄ )3
Skewness = i =1 = = 0.97
123 /
ns 3 (26)(2.27)3
129 Hazar Khogeer Introduction to statistics
Assignment

Find coefficient of Skewness using Pearson’s, Kelly’s and Bowley’s


formula.

124 /
129 Hazar Khogeer Introduction to statistics
3 Data Description: Kurtosis
Kurtosis is a measure of whether the data are heavy-tailed or light-tailed relative
to a normal distribution.

Leptokurtic
higher peak than the normal curve.
Platykurtic
the curve is more flat-topped than the normal curve.
Mesokurtic
neither too peaked nor too flat-topped.
Kurtosis is based on the size of a distribution’s tails.
Positive kurtosis (leptokurtic)- distributions with relatively long tails.
Negative kurtosis (platykurtic)- distributions with short tails.
125 /
129 Hazar Khogeer Introduction to statistics
3 Data Description: Kurtosis

A curve having relatively higher peak than the normal curve, is


known as Leptokurtic.
On the other hand, if the curve is more flat-topped than the
normal curve, it is called Platykurtic
A normal curve itself is called Mesokurtic, which is neither too
peaked nor too flat-topped.

126 /
129 Hazar Khogeer Introduction to statistics
3 Data Description: Kurtosis

The formula of the Measures of Kurtosis


Pn
µ4 i =1 (xi − x̄ )
4
β2 = = ,
(µ2 )2 ( ni=1 (xi − x̄ )2 )2
P

A summitry (Normal) distribution has kurtosis exactly 3.

Thus,
If the index
β2 − 3 > 0, the distribution is leptokurtic. (positive kurtosis)
β2 − 3 < 0, the distribution is platykurtic. (negative kurtosis)
β2 − 3 = 0, the distribution is mesokurtic.

Note: The measure of kurtosis based on the second and fourth


moments.

127 /
129 Hazar Khogeer Introduction to statistics
3-2 Data Description: Kurtosis

Example 3.16: Suppose we have the following observations:{12 13 54 56 25}.


Determine the skewness of the data.
Solution:

i xi x̄ (xi − x̄ )2 (xi − x̄ )4
1 12 32 400 (−20)4
2 13 32 361 (−19)4
3 54 32 484 (22)4
4 56 32 576 (24)4
5 25 32 49 (−7)4
(xi − x̄ )2 = 1870 (xi − x̄ )4 = 858754
P P P
Total xi = 160

P5
(xi − x̄ )4 858754
β2 − 3 = Pni =1 − 3= − 3 = −2.75.
( i =1 (xi − x̄ )2 )2 (1870)2
The excess kurtosis is negative.

128 /
129 Hazar Khogeer Introduction to statistics
Homework: Chapter 3
Exercises 3-1: page 122-125 (1,8,16).

Exercises 3-2: page 143-146 (8, 11, 20)

Exercises 3-3: page 159-161 (9,10 17)

Exercises 3-4: page 172-173 (1,2, 7,9)

Chapter Quiz: page 181-183(1-14,16-27,29,30)

129 /
129 Hazar Khogeer Introduction to statistics

You might also like