You are on page 1of 14

Engineering Statistic

Fuel & Energy Engineering


Second Stage
Prepared by
Lec. Ahmed K. Mashan
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Numerical Methods for


Describing Quantitative data

 Measures of Location:

 A. Measures of Central Tendency: Arithmetic mean, Geometric mean,


Harmonic mean, Median, and mode.
 B .Measures of Dispersion: Methods of detecting outliers (Range), Variance,
Standard deviation, and Measures of relative standing: percentiles and
quartiles.
 C. Shape: Skewness

1- Arithmetic mean
A. The Arithmetic Mean Computed from Ungrouped Data (Single Variables):
The sample mean (𝑋̅) is the sum of all the observations divided by the number of
observations:
∑𝑛𝑖=1 𝑥𝑖
𝑋̅ = (𝑥1 + 𝑥2 + 𝑥3 + ⋯ + 𝑥𝑛 ⁄𝑛) =
𝑛

Example 1. Compute the arithmetic mean for the numbers 7, 6, 2, 4, 5, 8, 9 and 10

7 + 6 + 2 + 4 + 5 + 8 + 9 + 10
𝑋̅ = = 𝑎𝑛𝑠
8

B. The Arithmetic Mean Computed from Grouped Data


When data are presented in a grouped frequency distribution, all values falling within a given
class interval are considered coincident with the class mark, or midpoint, of the interval.
Formula below is valid for such grouped data if we interpret 𝑋𝑖 as the class mark, 𝑓𝑖 as its
∑𝑓 𝑋
corresponding class frequency. 𝑋̅ = ∑ 𝑖 𝑖
𝑓𝑖

Page (1)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Example: For the following data, calculate the mean.

Classes Frequency
5-9 2
10-15 3
16-20 4
21-25 6

Classes Frequency (𝑓𝑖 ) Mid Classes (𝑋𝑖 ) 𝑓𝑖 𝑋𝑖


5-9 2 =(5+9)*0.5=7 14
10-15 3 12.5 37.5
16-20 4 18 72
21-25 6 23 138
𝛴𝑓𝑖= 15 ∑ 𝑓𝑖 𝑋𝑖 = 261.5

∑ 𝑓𝑖 𝑋𝑖 261.5
𝑋̅ = = = 17.433
∑ 𝑓𝑖 15

2-The Harmonic Mean 𝑯𝒎

A. The H.M. Computed from Ungrouped Data (Single Variables):


𝑁
𝐻𝑚 =
1
∑( )
𝑥𝑖

Example. Find the 𝐻𝑚 for the data: 3, 4, 6, 8 and 2.

Solution:

From above equation

5
𝐻𝑚 = = 𝑎𝑛𝑠
1 1 1 1 1
+ + + +
3 4 6 8 1

Page (2)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

B. The H.M. Computed from Grouped Data:

𝑁
𝐻𝑚 =
𝑓
∑( 𝑖 )
𝑥𝑖

Example 7. Compute the 𝐻𝑚 for the data given in the table below:
X 1 3 5 7 9 11
Y 2 4 6 8 10 12
Solution: The calculation for the harmonic mean is shown in the below table:
Samples (𝑋𝑖 ) Frequency (𝑓𝑖 ) 1/𝑋𝑖 𝑓𝑖 /𝑋𝑖
1 2 1 2
3 4 0.333 1.332
5 6 0.2 1.2
7 8 0.143 1.144
9 10 0.1111 1.111
11 12 0.091 1.092
N =42 𝛴 𝑓/𝑥 = 7.879
The formula for weighted harmonic mean is
𝐻𝑚 = 𝑛 / [ (𝑓1/𝑥1) + (𝑓2/𝑥2) + (𝑓3/𝑥3) + … . (𝑓𝑛/𝑥𝑛) ]
𝐻𝑚 = 42 / 7.879
𝐻𝑚 = 5.331
Example 7. Compute the 𝐻𝑚 for the data given in the table below:
Class Frequency Midpoint 𝑓𝑖 /𝑋𝑖
(𝑋𝑖 ) (𝑋𝑖)
10-15 2 12.5 0.16
15-20 13 17.5 0.7429
20-25 21 22.5 0.9333
25-30 14 27.5 0.5091
30-35 5 32.5 0.1538
total 55 2.4991

Page (3)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

𝐻𝑚 = 𝑛 / [ (𝑓1/𝑥1) + (𝑓2/𝑥2) + (𝑓3/𝑥3) + … . (𝑓𝑛/𝑥𝑛) ]

𝐻𝑚 = 55/ 2.4991 = 22.0077

3. The Median (M)


For ungrouped: The median is the middle of the data (after data is arranged in ascending or
descending order). To get the median, we must first rearrange the data into an ordered array.
Generally, we order the data from the lowest value to the highest value.
If N is odd, the median is the middle observation of the ordered array.
Example: Find the median for this numbers (3 6 9 12 15)
𝒏+𝟏 𝟔
Solution: 𝑴 = = =𝟑 𝑴=9
𝟐 𝟐

If N is even, it is midway between the two central observations.


Example: Find the median for this numbers (3 13 9 10 12 15)
Solution: Must be arrangement it (3 9 10 12 13 15)
𝒏+𝟏 𝟕 𝟏𝟎+𝟏𝟐
𝑴= = = 𝟑. 𝟓 𝑴= = 𝟐𝟐 ∗ 𝟎. 𝟓 = 𝟏𝟏
𝟐 𝟐 𝟐

B. The Median Computed from Grouped Data:


𝑁
− 𝐹𝑠
𝑴𝒆𝒅𝒊𝒂𝒏 (𝑴) = 𝐿 + ( 2 ) × 𝐶
𝐹𝑚

Where:
L: lower class boundary of the median class (i.e., the class containing the median).
N: total frequency
Fs: sum of frequencies of all classes lower than the median class
Fm: frequency of the median class.
C: width of the median class.
Example 10. From the following data, compute the median.
Class 5-10 11-15 16-20 21-25 26-30 31-35
Frequency 4 8 2 10 4 5

Page (4)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Solution:
Upper Upper
Class
Class Frequency Class Class
boundaries
boundaries boundaries
Less than
5-10 4 4.5-10.5 0+4=4
10.5
Less
11-15 8 10.5-15.5 4+8=12
than15.5
Less
16-20 2 15.5-20.5 14
than20.5
Less
21-25 10 20.5-25.5 24
than25.5
Less
26-30 4 25.5-30.5 28
than30.5
Less
31-35 5 30.5-35.5 n=33
than35.5
We can find the median class: (𝑛⁄2) = (33⁄2) = 16.5
𝑁
− 𝐹𝑠
𝑴𝒆𝒅𝒊𝒂𝒏 (𝑴) = 𝐿 + ( 2 ) × 𝐶
𝐹𝑚

L=20.5 n = 33 C=4 Fs = 2 Fm =10


Solution
33
−2
2
M= 20.5 + (
10
) × 4 = ans

Page (5)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

4. The Mode
A. The Mode Computed from Ungrouped Data:
The mode is the value that appears most frequently in a data set. A set of data may have one
mode, more than one mode, or no mode at all.
Example: in the following list of numbers, 16 is the mode since it appears more times in the
set than any other number:
Data Frequency
3 2
6 1
9 1
16 3
27 1
37 1
48 1
A set of numbers can have more than one mode (this is known as bimodal if there are two
modes) if there are multiple numbers that occur with equal frequency, and more times than
the others in the set.

Data Frequency
3 3
6 1
16 3
27 1
37 1
48 1

In the above example, both the number 3 and the number 16 are modes as they each occur
three times and no other number occurs more often.

Page (6)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

If no number in a set of numbers occurs more than once, that set has no mode:
Data Frequency
3 1
6 1
16 1
27 1
37 1
48 1
A set of numbers with two modes is bimodal, a set of numbers with three modes is trimodal,
and any set of numbers with more than one mode is multimodal.
B. The Mode Computed from Grouped Data:
In the case of grouped data, it is not possible to identify the mode of the data, by looking at the
frequency of data. In this scenario, we can determine the mode value by locating the class with
the maximum frequency called modal class. Inside a modal class, we can locate the mode
value of the data by using the formula,

𝑓 𝑚 − 𝑓𝑏
𝑴𝒐𝒅𝒆 = 𝐿 + ( ) × 𝐶
( 𝑓𝑚 − 𝑓𝑏 ) + ( 𝑓𝑚 − 𝑓𝑎 )

Find the mode for the given data.

Size of Family 1-3 3-5 5-7 7-9 9-11


No. of Families 7 8 2 2 1
Where:
L: lower class boundary of the modal class (i.e., the class containing the mode).
fm: frequency of modal class.
fb: frequency proceeding the modal class
fa: frequency following the modal class
C: width of the modal class interval
8−7
The 𝐌𝐨𝐝𝐞 = 3 + (( ) × 2 = 3.28
8−7)+(8−2)

Page (7)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

 Dispersion or Variation:

The degree to which numerical data tend to spread about an average value is called the
dispersion, or variation, of the data.

1. Range
Range: the difference between the highest and lowest values.
Example 1. Find the range of the set 4 5 6 7 8 2 9 12 14 15
𝑅 = 15 − 2 = 13
The Range for Grouped Data
Range = class mark of highest class - class mark of lowest class

Example : Calculate the range for the given frequency distribution.

Class Interval 10 – 20 20 – 30 30 – 40 40 – 50 50 – 60 60 – 70 70 – 80
Frequency 2 3 14 8 3 8 2

Range = Upper-class boundary of the highest interval – Lower class boundary of the lowest
interval
Here, the Upper-class boundary of the highest interval = 80
Lower class boundary of the lowest interval = 10
Range = 80 – 10 = 70
2. Average Deviation or Mean Deviation
The average deviation formula is used to characterize the dispersion among the given set of
data. The average deviation is the average deviation of each observation from the mean value
of the observation.
̅|
∑|𝑿𝒊 − 𝑿
𝑨𝒗𝒆𝒓𝒂𝒈𝒆 𝑫𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏 (𝑴. 𝑫) =
𝑵
Xi : Data values in the given set.
̅
X : The mean.
N: The total number of data values.

Page (8)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Example: Find the average deviation of the given data using the average deviation formula:
12, 14, 16, 18, 20, and 22.

x̅ = (12 +14 + 16 + 18 + 20 + 22)/6 = 17

Average deviation = (|12 - 17| + |14 - 17| + |16 - 17| + |18 - 17| + |20 - 17| + |22 - 17|)/6

= (5 + 3 + 1 + 1 + 3 + 5)/6 = 18/6 = 3

Example 1: Find the mean deviation (average deviation) for the following data.
50, 100, 150, 200, 250, 300

1050
Step1: mean (M) = = 175
6

𝑋𝑖 |𝑋𝑖 − 𝑋̅|
50 125
100 75
150 25
200 25
250 75
300 125
Σ Σ = 450

∑|𝑋𝑖 − 𝑋̅| 450


𝑀. 𝐷 = = = 75
𝑁 6

If X1, X2, . . . , XN occur with frequencies f1, f2, . . . ; fi, respectively, the mean
deviation can be written as:
̅|
∑ fi |Xi −X
𝑀𝑒𝑎𝑛 𝐷𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 (𝑀𝐷) = ∑ fi

Page (9)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Example : Find the mean deviation about the mean for the given data

𝑋 12 9 6 18 10
𝑓 7 3 8 1 2

Solution:
𝑋 𝑓i 𝑋. 𝑓 |x − 𝑥̅ | 𝑓. |x − 𝑥̅ |
12 7 84 2.619 18.33
9 3 27 0.381 1.143
6 8 48 3.381 27.048
18 1 18 8.619 8.619
10 2 20 0.619 1.238
Total 21 197 56.378

∑51 Xi 𝑓i
̅) =
Mean is given (X = 9.38
∑51 𝑓i

∑ 𝑓𝑖 |𝑋𝑖 −𝑋̅|
Substituting values in the equation, M.D = ∑ 𝑓𝑖
= 2.68

3. The Standard Deviation(S)


The standard deviation is a measure of the amount of variation or dispersion of a set of values,
is denoted by s and is defined by:
∑(𝑋𝑖 −𝑋̅)2
stander devation(s) = √
𝑁

Example . Calculate the standard deviation from the following data 7 3 9 5 2 10 12 8


X 7 3 9 5 2 10 12 8 Σ=56
(Xi − ̅
X) 2 0 16 4 4 25 9 25 1 Σ=84

∑ 𝑋𝑖
𝑋̅ = =7
𝑁

84
𝑆 = √ = 1.5
56

Page (10)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

If X1, X2, . . . , XN occur with frequencies f1, f2, . . . ; fi, respectively, the standard Deviation
can be written as:
̅ )2
∑ 𝑓i (Xi −X
Stander devotion(s) = √ ∑ 𝑓i

𝑋𝑖 3 6 9 12 15 18 21 24
𝑓i 4 6 2 3 8 10 2 1
Solution:
Deviations from assumed mean
𝑋𝑖 𝑓i (𝑋𝑖 − 𝑋̅) (𝑋𝑖 − 𝑋̅)2 𝑓i (𝑋𝑖 − 𝑋̅)2
3 4 -10.5 110.25 441
6 6 -7.5 56.25 337.5
9 2 -4.5 20.25 40.5
12 3 -1.5 2.25 6.75
15 8 1.5 2.25 18
18 10 4.5 20.25 202.5
21 2 7.5 56.25 112.5
24 1 10.5 110.25 110.25
Σ=108 Σ=36 Σ=1269
108
̅
X= = 13.5
8
1269
𝑆 =√ = 𝑎𝑛𝑠
36

4. The Variance (𝑺𝟐 )


The term variance refers to a statistical measurement of the spread between numbers in a data
set. More specifically, variance measures how far each number in the set is from
the mean (average), and thus from every other number in the set. Variance is often depicted
by this symbol: S2. It is used by both analysts and traders to determine volatility and market
security.

𝑇ℎ𝑒 𝑣𝑎𝑟𝑖𝑎𝑛𝑐𝑒 = (𝑠𝑡𝑎𝑛𝑑𝑒𝑟 𝑑𝑒𝑣𝑜𝑡𝑖𝑜𝑛)2

Page (11)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Types of Random Variables

 A discrete and continuous random variable

It mean:
Discrete Variable Continuous Variable
It is a variable whose value is obtained by It is a variable whose value is obtained by measuring.
counting.
Examples: Examples:
Number of planets around the Sun Number of stars in the space
Number of students in a class Height or weight of the students in a particular class
Range of specified numbers is complete. Range of specified numbers is incomplete, i.e. infinite.
It assumes a distinct or a separate value. It assumes any value between two value

Example: What is the mean of a discrete random variable on rolling a dice?


Solution: The discrete random variable, X, on rolling dice can take on values from 1 to 6. The
probability of occurrence of each value is 1 / 6.
𝑈𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 𝑜𝑓 𝑚𝑒𝑎𝑛 𝑤𝑒 ℎ𝑎𝑣𝑒, 𝐸[𝑋] = ∑𝑥𝑃(𝑋 = 𝑥).

𝑀𝑒𝑎𝑛 𝑜𝑓 𝐷𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑅𝑎𝑑𝑜𝑚 𝑉𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝐸[𝑋]

= 1 · (1 / 6) + 2 · (1 / 6) + 3 · (1 / 6) + 4 · (1 / 6) + 5 · (1 / 6) + 6 · (1 / 6)
= 21 / 6 = 7/2 = 3.5

Answer: Therefore, the mean of discrete random variable on rolling a dice is 3.5
Example:
Suppose a variable X can take the values 1, 2, 3, or 4.
The following table describes the probabilities associated with each outcome:
Outcome 1 2 3 4
Probability 0.1 0.3 0.4 0.2

The probability that X is equal to 2 or 3 is the sum of the two probabilities: P(X = 2 or X = 3)
= P(X = 2) + P(X = 3) = 0.3 + 0.4 = 0.7. Similarly, the probability that X is greater than 1 is
equal to 1 - P(X = 1) = 1 - 0.1 = 0.9, by the complement rule.

Page (12)
Lec. Ahmed K. Mashan Fuel & Energy Engineering

Page (13)

You might also like