Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_155_библиотеки_им_акад_М_И_Перельмана

.pdf
Скачиваний:
0
Добавлен:
10.10.2026
Размер:
7 Мб
Скачать
☆
52 3 Summarizing Data
and lower outlier boundaries. Any value falling outside these boundaries (below the
lower boundary or above the upper boundary) should be classified as an outlier.
IQR = Q
3
− Q
1
.
Lower outlier boundary = Q
1
− 1.5 × IQR.
Upper outlier boundary = Q
3
+ 1.5 × IQR.
Any value outside these boundaries (less than the lower boundary or greater than
the upper boundary) should be considered to be an outlier.
Example 12 The data in Table 3.7 shows floating particles in micrograms per cubic
meter (air pollution) in 51 cities. Find outlier observations.
Solution: First, we sort the data and obtain the first and third quartiles and
interquartile range as in previous examples.
9, 12, 12, 16, 19, 21, 22, 22, 23, 23, 23, 24, 24, 25, 25, 25, 27, 27, 27, 27, 28, 28, 30, 30, 31, 32,
32, 33, 36, 38, 38, 42, 42, 42, 43, 44, 45, 46, 47, 49, 49, 50, 51, 51, 57, 63, 65, 74, 79, 83, 85
Q
3
= 47, Q
1
= 24
IQR = Q
3
− Q
1
= 47 − 24 = 23.
The outliers lower limit and upper limit are:
Q
1
− 1.5 × IQR = 24 − 1.5 × 23 =−10.5
Q
3
+ 1.5 × IQR = 47 + 1.5 × 23 = 82.5.
Thus, values 83 and 85, which fall outside the limits of outliers, are considered
as outliers.
Mean absolute deviation
When quantifying the dispersion of a dataset, it is logical to start by considering the
individual differences between each value and the mean. Then mean deviations may
be the first idea for measuring dispersion and spread of a dataset. That is, subtract
each value from the mean (
x
i
− x) and then obtain the average of residuals. But it
proves mathematically that the sum of these deviations in any dataset equals always
zero (
(x
i
−x) = 0). Because the negative and positive numbers cancel each other
Table 3.7 Floating particles in the air in 51 cities in kilograms per cubic meter
27, 22, 23, 24, 25, 44, 63, 57, 27, 30, 9, 83, 27, 23, 74, 25, 32, 79, 51, 31, 22, 85, 42, 43, 49, 50,
28, 42, 28, 30, 45, 49, 46, 12, 42, 21, 32, 27, 16, 33, 23, 19, 12, 38, 38, 24, 65, 51, 47, 25, 36
https://t.me/med1917
3.3 Measures of Dispersion 53
out. To avoid this problem, we can take the average value of the absolute value of
residuals (
|
x
i
− x
|
) or the square of the residuals (
(x
i
− x)
2
). If the absolute
value of these residuals (deviations) is used and we divide it by the number of data,
“mean deviations” are obtained and are denoted by MD. In some books, it is also
represented by mean absolute deviation (MAD). The following two formulas are
used for raw data and for tables and classified data:
MD =
N
i=0
|
x
i
− x
|
N
or MD =
N
i=0
f
i
|
x
i
− x
|
N
Example 13 The birth weight of 5 newborns was 4.10, 3.90, 3.50, 2.90 and 2.70 kg.
Find the mean deviation for these observations.
x = 3.42
Solution: The mean of this dataset is equal to x = 3.42, and the mean deviation is
calculated as follows:
MD =
|
2.70 − 3.42
|
+
|
2.90 − 3.42
|
+ ··· +
|
4.10 − 3.42
|
+
5
= 0.496.
In the above formula, when the median is replaced to the mean, the “median
deviations” is obtained and denoted by MdD.
MdD =
N
i=0
|
x
i
− med
|
N
or MdD =
N
i=0
f
i
|
x
i
− med
|
N
.
It is proved that MdD is always minimal in any dataset and less than any other
average deviation. This feature is one of the most important and prominent features
of the median, and it is used in planning the establishment of public benefit centers
with which the public is involved, such as locating clinics, health centers, hospitals,
gas stations, bus stations, trains, and subways.
Variance and standard deviation
As mentioned in the preceding section, when we use the square of residuals (deviation
of the mean) and divide the sum of the squares by the number of data, what is obtained
is called variance and is denoted by
σ
2
orVar(x). The variance is influenced by all
the data, and if only the value of one of the observations changes, the value of the
variance changes. The following two formulas are used to calculate the variance for
raw data and for tables and classified data:
Var
(
x
)
= σ
2
=
(
x
i
− x
)
2
N
and σ
2
=
f
i
(
x
i
− x
)
2
N
.
The square of deviations is used to calculate the variance. In the squaring process,
the residuals greater than one become larger and the numbers less than one become
smaller. Therefore, the farther the data is from the mean, the greater the effect on
variance. Conversely, smaller deviations that are closer to mean have less of an effect
on variance.
https://t.me/med1917
54 3 Summarizing Data
The primary issue with variance as a measure of dispersion lies in its computation
using squared deviations, resulting in units that are the squared units of the data.
Consequently, the interpretation of the dataset becomes unrealistic as the units differ
from the original data units. In many cases, it is preferable to utilize a measure
of dispersion that shares the same units as the data. This can be achieved by simply
taking the square root of the variance. The resulting measure is known as the standard
deviation, denoted by Sd or σ for a population.
σ =
√
σ
2
=
(
x
i
− x
)
2
N
and σ =
f
i
(
x
i
− x
)
2
N
.
Example 14 Obtain the variance and standard deviation of data in Example 13.
Solution: The mean of this dataset is equal to x = 3.42, and the variance and standard
deviation are calculated as follows:
σ
2
=
(
2.70 − 3.42
)
2
+
(
2.90 − 3.42
)
2
+ ··· +
(
4.10 − 3.42
)
2
+
5
= 0.298
σ =
√
0.298 = 0.546.
The above formulas are theoretical and conceptual formulas of variance and
standard deviation and do not have a practical aspect for manual calculations.
When the distance between the numbers and the mean is large, or the mean is
decimal, especially the alternating decimal that never reaches zero (e.g.,
16
3
=5.3),
the calculation of variance in addition to being difficult is not accurate. For this
reason, the more practical formulas for variance and standard deviation, which
make calculations easier, are as follows.
Var
(
x
)
= σ
2
=
1
N
f
i
x
2
i
−
f
i
x
i
2
N
=
f
i
x
2
i
N
−
(
μ
)
2
.
To calculate variance and standard deviation in tables and classified data, it is
recommended to assign columns
x
2
i
, f
i
x
i
and f
i
x
2
i
to and and replace the sum of the
two columns (
f
i
x
i
and
f
i
x
2
i
) directly from the table in the above formula. This
method is the most practical, simplest, and most accurate method of calculating
variance and standard deviation.
Tip
When the data includes the whole population, the standard deviation is denoted
by the symbol
σ and N is used in the denominator of its fraction. But when the
data is taken from the sample, the standard deviation is shown with Sd and (n −
1) is used instead of N for the denominator of its fraction (also for variance).
https://t.me/med1917
3.3 Measures of Dispersion 55
Example 15 Calculate the variance and standard deviation of hemoglobin level in
Table
3.1.
Solution: We denote the midpoint class by x
i
and add two more columns
(
f
i
x
i
and f
i
x
2
i
) to the table for ease of calculating variance. Then we substitute the
sum of these two columns in the variance formula (Table
3.8).
We now replace the values N = 70,
f
i
x
i
= 842 and
f
i
x
2
i
= 10342 in the
variance formula:
var
(
x
)
= σ
2
x
=
1
N
f
i
x
2
i
−
f
i
x
i
2
N
=
1
70
10342 −
(
842
)
2
70
= 3.056
σ =
σ
2
x
=
√
3.056 = 1.75.
When we have two sets of data with size of N
1
and N
2
from two different
populations (e.g., sick and healthy) with means
μ
1
and μ
2
and variances
σ
2
1
and σ
2
2
and combine them, the total variance of the pooled data is equal to:
σ
2
=
N
1
σ
2
1
+ d
2
1
+ N
2
σ
2
2
+ d
2
2
N
1
+ N
2
,
where d
1
and d
2
are the difference between the mean of the first population from
the pooled mean (
d
1
= μ
1
− μ) and the difference between the mean of the second
population and the pooled mean (
d
2
= μ
2
−μ). But if the mean of these two datasets
are the same (
μ
1
= μ
2
= μ), then d
1
and d
2
are omitted and we have:
σ
2
=
N
1
× σ
2
1
+ N
2
× σ
2
2
N
1
+ N
2
.
Table 3.8 Calculation for variance of hemoglobin levels
Hemoglobin level x
i
f
i
f
i
x
i
f
i
x
2
i
8.5–9.4 9.0 3 27.0 243.0
9.5–10.4 10.0 6 66.0 660.0
10.5–11.4 11.0 19 209.0 2299.0
11.5–12.4 12.0 16 192.0 2304.0
12.5–13.4 13.0 15 195.0 2535.0
13.5–14.4 14.0 6 84.0 1176.0
14.5–15.4 15.0 5 75.0 1125.0
Total – 70 842.0 10342.0
https://t.me/med1917
56 3 Summarizing Data
If the number of these two datasets is also equal (N
1
= N
2
), N
1
and N
2
also
omitted and we have:
σ
2
=
σ
2
1
+ σ
2
2
2
.
Example 16 Assuming that the mean and variance of albumin levels in a sample
of 94 subjects were 40.17 and 12.13 and in another sample of 91 were 42.19 and
14.81, respectively, get the mean and variance of the sum of these two samples (185
people).
Solution: First, we get the mean of two merged samples:
μ =
N
1
μ
1
+ N
2
μ
2
N
1
+ N
2
=
94 × 40.17 + 91 × 42.19
94 + 91
= 41.16.
The difference between the mean of each sample and the grand mean is equal to:
d
1
= 40.17 − 41.16 =−0.99
d
2
= 42.19 − 41.15 = 1.03.
Then, by replacing the above values, the total variance is obtained:
σ
2
=
N
1
σ
2
1
+ d
2
1
+ N
2
σ
2
2
+ d
2
2
N
1
+ N
2
=
94
12.13
2
± 0.99
2
+ 91
14.81
2
+ 1.03
2
94 + 91
= 14.47.
NOTE: When the data is obtained from the sample, the variance and standard
deviation of the sample (
S
2
, S or Sd) is an estimate of the variance and standard
deviation of the population. Because the variance and standard deviation of the
population is a given and specified value, so n − 1 subjects of n sample subjects can
take any value, but the last value (for the nth subject) will then be resulted from the
rest. The n − 1 is called the degree of freedom (df ). Therefore, n − 1 should be
substituted for n in the denominator of variance and standard deviation.
S
2
= ˆσ
2
=
f
i
(
x
i
− x
)
2
n − 1
=
1
n − 1
f
i
x
2
i
−
f
i
x
i
2
n
https://t.me/med1917
3.3 Measures of Dispersion 57
Sd =
f
i
(
x
i
− x
)
2
n − 1
,
where x is the sample mean:
x =
f
i
x
i
n
.
Dividing the standard deviation by the square root of the sample size, “standard
error” is obtained and denoted by Se and is one of the essential components for
estimating the confidence interval.
Se
(
x
)
=
Sd
√
n
.
The standard error of estimated proportion for the population (p
r
n
)is:
Se
(
p
)
=
p
(
1 − p
)
n
.
To comprehend the conceptual meaning of standard deviation and interpret it
effectively, we can utilize two approaches: the “empirical rule” and “Chebyshev’s
theorem”.
The empirical rule posits that for datasets exhibiting an approximately bell-shaped
distribution, the following characteristics hold true:
•
Approximately 68% of all values fall within 1 standard deviation of the mean.
•
Roughly 95% of all values fall within 2 standard deviations of the mean.
•
About 99.7% of all values fall within 3 standard deviations of the mean.
Chebyshev proved that the proportion of any set of data (not only bell-shaped
distributions) lying within K standard deviations of the mean is always at least 1−
1
K
2
(K is a positive number greater than 1). This is the advantage of Chebyshev’s theorem
to the empirical rule. But, results from Chebyshev’s theorem are only approximate.
For example, consider k = 2, then At least
1 −
1
2
2
= 0.75 (or 75%) of all values lie
within 2 standard deviations of the mean.
For example, if in a study height was measured for a large sample of adults. The
mean was
x = 178 and Sd = 7.6. From Chebyshev’s inequality, we can conclude
that at least 75% (
1 −
1
2
2
) of adults are between 162.8 to 193.2 cm (178 − 2 ×
7.6 to 178 + 2 × 7.6
) and at least 88.9% of adults are between 155.2 to 200.8 cm
(
178 − 3 × 7.6 to 178 + 3 × 7.6).
https://t.me/med1917
58 3 Summarizing Data
Coefficient of Variation
Standard deviation is not useful when comparing dispersion in two different
population or at two different times or two different variables in a population,
because standard deviation is affected by the mean value of those variables.
Therefore, by dividing the standard deviation of each variable or population by its
mean, the “coefficient of variation” index is obtained, and it is represented by CV.
For ease of expression of the cv, it is sometimes multiplied by 100 and displayed as
a percentage.
cv =
σ
μ
× 100 or cv =
Sd
x
× 100
cv =
σ
μ
× 100 or cv =
Sd
x
× 100.
Example 17 The mean and standard deviation of height in a population are 155.5
and 17, respectively, and the mean and standard deviation of weight in the same
population are 56 and 12, respectively. Compare the height and weight dispersion in
this population.
Solution: Weight and height measurement scales are different and cannot be
compared. In order to be comparable to each other, their unit of measurement must
be removed. For this purpose, we obtain the coefficient of variation in height and
weight in this population.
CV
Weight
=
σ
w
μ
w
× 100 =
17
155.5
× 100 = 10.93
CV
Height
=
σ
H
μ
H
× 100 =
12
56
× 100 = 21.43.
Now, despite the different measurement units of height and weight, the dispersion
of these two traits can be compared in the population. In this population, weight
dispersion around the mean is more than height dispersion around its mean.
Example 18
Estimation of mean and standard deviation of weight of infants with
smoking mothers at birth is 3.200 and 0.493, respectively, and infants of non-smoking
https://t.me/med1917
3.3 Measures of Dispersion 59
mothers are 3.590 and 0.371, respectively. Compare the weight dispersion of these
two groups.
Solution: Although the measurement unit is the same in both groups, but because
they are from two different populations with different means, their dispersion cannot
be easily compared. It is recommended to calculate the coefficient of variation in
these two groups first and then compare.
CV
Smoker
=
σ
S
μ
S
× 100 =
0.493
3.200
× 100 = 15.41
CV
Nonsm
=
σ
Non
μ
Non
× 100 =
0.371
3.590
× 100 = 10.33.
Thus, the weight dispersion of newborns whose mothers smoke is more than the
weight dispersion of infants with non-smoker mothers.
To calculate measures of dispersion by SPSS, select the path of
analyze\descriptive statistics\frequencies until a window like the one below
opens. In this window, select the desired quantitative variables from the left box
and enter to the box in the right. Then select the “statistics” option at the top right
corner to open another window. At the top right of this window are the std.
deviation, variance, range, minimum, maximum, and SE mean.
You can also use the path of analyze\descriptive statistics\descriptive to calculate
measure of dispersion and be to open the following window. Then select the “options”
button to open another window. In this window, choose the requested options.
https://t.me/med1917
60 3 Summarizing Data
Descriptive statistics
N Range Minimum Maximum Mean
Statistic Statistic Statistic Statistic Statistic Std. Error
Hemoglobin 70 6.3 8.8 15.1 11.984 0.1693
Valid N (listwise) 70
Descriptive statistics
Std. deviation Variance
Statistic Statistic
Hemoglobin 1.4161 2.005
Val i d N (listwise)
Different type of scales and descriptive index
In this section, we summarize the application of different types of descriptive indexes
in Table
3.8 according to the type of data.
Scales statistics Nominal Ordinal Interval Ratio
Mode ✓ ✓ ✓ ✓
Median – ✓ ✓ ✓
Mean – – ✓ ✓
Quartiles – ✓ ✓ ✓
IQR – – ✓ ✓
Range – – ✓ ✓
Standard deviation – – ✓ ✓
Coefficient of variation – – – ✓
https://t.me/med1917
3.4 The Effect of Constant Changes on Measures of Central Tendency … 61
This table shows that:
For nominal data, only the mode is defined and used.
For ordinal data, the mode, median, and quartiles are defined and applicable.
For interval data, all statistics are defined and conceptual except the coefficient
of variations, which shows the variations around the mean. Because in this scale,
starting point of zero is contractual and the mean is also a function of it.
For ratio data, all statistics are defined and conceptual.
3.4 The Effect of Constant Changes on Measures
of Central Tendency and Dispersion
Sometimes statistical calculations are heavy and difficult. To simplify the
calculations, you can first transform them to new data by performing some simple
mathematical operations (addition, subtraction, multiplication, and division) on the
original data. It then calculated the statistical indices on the newly transformed data
and then retransformed the original changes. For example, in the study of people’s
height, subtract the constant value of 150 from all observations. The calculation of
the mean and variance for the newly transformed data will then be very short and
simple and then applied the effect of the reduced value of 150 on the mean and
variance.
Effect of addition and subtraction
If the constant value is subtracted from all observations and the mean and standard
deviation for the new variable
(x
i
− C) are calculated, the variance and standard
deviation of the original data and the transformed data do not change, but the new
mean
x
New
decreases as much as the constant value of C, which C value should be
added to it, namely:
x = C + x
New
.
The effect of addition is inverse of the effect of subtraction.
x = C + x
New
.
Example 19 The height of 11 people is equal to 189–180–177–153–154–156–148–
168–174–171–167, by subtracting the fixed number 160 from all observations, find
the relevant indicators.
Solution: Mean, mean, variance, and standard deviation of the initial data are:
Med = 168,μ = 167,σ
2
= 151.45,σ = 12.307
https://t.me/med1917