Sunteți pe pagina 1din 433

AUTOMOTIVE ENGINEERING

Mario Vianello
vianello.clm@tin.it

PRODUCT
QUALITY DESIGN

01OFHLO

These slides can not be reproduced or distributed without permission in writing from the author. 1
COURSE CONTENTS

1. Design for Quality considering customer needs and pro-


duct targets
2. Freshen up of Applied Statistics Fundamentals
3. Fundamentals of Reliability and of Robust Design
4. Measure and prevention methodological instruments for
Reliability
5. Criteria and methods to plan reliability experimental verifi-
cations
6. Managerial considerations: mention about Problem solving,
Lessons learned, Experience accumulation, Technical memory,
Global approaches like Six Sigma

These slides can not be reproduced or distributed without permission in writing from the author. 2
PRODUCT QUALITY DESIGN

2
FUNDAMENTALS
OF APPLIED STATISTICS

These slides can not be reproduced or distributed without permission in writing from the author. 3
2. Fundamentals of Applied Statistics

Presentation

The sequence of the subjects is classical. But the


“approach” is characterized by the following choices:
 to avoid mathematical demonstrations, in order to
be very easy and short (even by introducing some
“dogma” );
 to be always very clear: through observations, com-
parisons and examples;
 to be always focused on practical applications.

These slides can not be reproduced or distributed without permission in writing from the author. 4
CONTENTS OF THIS CHAPTER
 INTRODUCTION
- Population, elements, characters, characteristics
- The three main Chapters of Statistics
 DESCRIPTIVE STATISTICS
- Histogram
- Cumulative curves and frequency density curves
- Bar graph (differences with the histogram)
- Prediction of defective percentage
- Pareto’s principle of “factor sparsity”
- Measures of Central Location and Measures of Dispersion
- Measures of Central Location: mean, median, mode
- Measures of Dispersion: range, average deviation, standard deviation
- Gauss Normal distribution and examples of applications
- Normal Probability Plot (NPP)
- Limits of Descriptive Statistics estimations
 PROBABILITY THEORY
- Sampling
- Basic definitions and relationships about probability
- Examples of probability calculations
These slides can not be reproduced or distributed without permission in writing from the author. 5
CONTENTS OF THIS CHAPTER

- A brief mention of the statistical distributions of current use: Binomial, Pois-


son, Rectangular, Log-normal, Weibull, Exponential (followed by summary
Tables of main statistical distributions)
- A brief mention of interpolating problems
- Possible deductions when we can not use a theoretical distribution: Tchéby-
chev’s inequality
 STATISTICAL INFERENCE
• Estimate of a mean, a standard deviation and a proportion
- Punctual estimates
- Distribution of sample means
- Confidence interval for the estimation of a mean (and Student’s t distribution)
- Confidence interval for a standard deviation (and mention of Chi-square distri-
bution)
- Confidence interval for a proportion
- Confidence interval bilateral and unilateral (one-sided)
- Determination of sample size as a function of confidence interval
• Test of a Statistical Hypothesis
- Type I and Type II errors
- Chi-square test for the goodness of fit
These slides can not be reproduced or distributed without permission in writing from the author. 6
2. Fundamentals of Applied Statistics

2.1
I N T R O D U C T I O N

These slides can not be reproduced or distributed without permission in writing from the author. 7
2.1. Introduction

The word “Statistics” comes from “State”,


because it was introduced to collect
demographic and economic data.

Today Statistics is used as a rational method


to collect, classify, analyze, summarize and present
some data
and also to get reliable conclusions from them,
in order to take right decisions
in situations of uncertainty.

These slides can not be reproduced or distributed without permission in writing from the author. 8
2.1. Introduction
NEED OF A STATISTICAL APPROACH
Let’s suppose we want to know the mean life
of a lot of 10,000 bulbs.

We can test all 10,000 bulbs until they burn,


record their lifetimes and calculate the mean value:
in this way we would get the goal of a true result, but …
… it would be very difficult
to sell 10,000 burned bulbs !
These slides can not be reproduced or distributed without permission in writing from the author. 9
2.1. Introduction

In most cases, it is necessary to test only a little part of a lot


 a sample
(e.g.: 100 bulbs from a lot of 10,000).

Of course the 100 bulbs must be chosen in order to be represen-


tative of the whole lot (of 10,000 bulbs) and consequently:
 they must be taken from all boxes (and not only from the easiest to reach
ones)
 and from all layers (and not only from the upper one).
It is easy to understand that the mean life of 100 tested bulbs :
 will be “near”, but not equal to the mean life of all 10,000 bulbs;
 the “true” mean life will never be known, unless we interview all
buyers (of 10,000 bulbs): which is very hard to do.

In this kind of problems, STATISTICS can help us …

These slides can not be reproduced or distributed without permission in writing from the author. 10
2.1. Introduction

STATISTICS helps us quantifying the likely error,


i.e. that we reasonably do,
by using the mean life of 100 bulbs
as an “estimation” of the “true” (and unknown) mean life
of all 10,000 bulbs of the whole lot.

It is easy to understand that the error on the estimate of the “true”


mean life of bulbs:
 increases with the variability among the values of bulb lifes;
 decreases with the number of tested bulbs (sample size).

The aim of this Course is to go over an intuitive level,


giving the fundamentals of STATISTICS in a simple way.

These slides can not be reproduced or distributed without permission in writing from the author. 11
2.1. Introduction

2.1.1
Population, elements,
characters, characteristics

These slides can not be reproduced or distributed without permission in writing from the author. 12
2.1.1. Population, elements, characters, characteristics
Some words of current language
have a special meaning in STATISTICS:
• a statistical population (e.g. the lot of 10,000 bulbs) is done
by a set of elements (e.g. each of the 10,000 bulbs),
• these elements have one or more common characters,
which are the features by which we can determine whether
or not each element belongs to that population (e.g. the pro-
duction and packaging conditions that make the bulbs belonging
to the above lot).
Every element of a population has also some peculiar characteristics,
measurable or not and usually different from each other,
which are the object of inquiry (e.g. bulb lifetime).

• The measurements of investigated characteristics of the e-


lements of a population (e.g. measured lifetimes of tested bulbs)
are commonly called observations.

These slides can not be reproduced or distributed without permission in writing from the author. 13
2.1.1. Population, elements, characters, characteristics

EXAMPLE 1 EXAMPLE 2 EXAMPLE 3

Rolls produced by the Car insurance policies with


Married women living
Population in Turin.
lathe No. 2 on March 21 frontal crash in Italy during
2014. 2014.

Kind of People Mechanical items Documents


Elements

• Kind of item: rolls • Car insurance policy


• Residence: Turin
• Machine: lathe No. 2 • Kind of crash: frontal crash
Character(s) • Gender: female
• Prod. date.: 03/21/2014 • Country: Italy
• Married
• Year: 2014

Investigated Size of clothes Diameter Number of deaths


Characteristic

These slides can not be reproduced or distributed without permission in writing from the author. 14
2.1. Introduction

2.1.2
The three main Chapters
of Statistics

These slides can not be reproduced or distributed without permission in writing from the author. 15
2.1.2. The three main Chapters of Statistics
STATISTICS is divided into 3 big CHAPTERS

1. DESCRIPTIVE It concerns classification, synthe-


STATISTICS sis and presentation of data.

2. PROBABILITY It fixes the principles to quantify


THEORY how much it is “reasonable” to
expect that an event will happen
or not.

3. STATISTICAL Applying Probability Theory to


INFERENCES Descriptive Statistics, this Chapter
quantifies the risks when we take
a decision on the base of the data
of a sample (instead of the whole
population).
These slides can not be reproduced or distributed without permission in writing from the author. 16
2. Fundamentals of Applied Statistics

2.2
D E S C R I P T I V E
S T A T I S T I C S

These slides can not be reproduced or distributed without permission in writing from the author. 17
2.2. Descriptive Statistics

Too much information


can disperse.
As in a map,
DESCRIPTIVE STATISTICS
loses the details of information
to highlight
operational aspects.
These slides can not be reproduced or distributed without permission in writing from the author. 18
2.2. Descriptive Statistics

Most common activities to analyze a set of data are:

• building a histogram;
• calculating the mean and/or other position measurements;
• calculating standard deviation and/or other dispersion
measurements.

These slides can not be reproduced or distributed without permission in writing from the author. 19
2.2. Descriptive Statistics

2.2.1
Histogram

These slides can not be reproduced or distributed without permission in writing from the author. 20
2.2.1. Histogram

Histogram - Definitions

Frequency

Class
Width

Frequency

Characteristic
Limits of the class

The histogram shows the spread of a data set


These slides can not be reproduced or distributed without permission in writing from the author. 21
2.2.1. Histogram
B A S I C E X A M P L E
DIAMETERS MEASURED ON 80 ROLLS MADE BY A LATHE

±0,10

[ mm ]
Ø 5
1 2 3 4 5
5.06 5.00 4.95 5.00 5.05
DIAMETERS MEASURED ON 80 ROLLS MADE BY A LATHE

1 5,06 5,00 4,95 5,00 5,05


DIAMETERS MEASURED ON 80 ROLLS MADE BY A LATHE

5.05 2 5.02
5,05 4.94
5,02 4,945.01 5,01 4.95 4,95 minimum = 4,87
4.94 3 4.99
4,94 5.03
4,99 5,035.04 5,04 4.95 4,95 minimum = 4.87
5.03 4 5.00
5,03 4.88
5,00 4,885.04 5,04 5.02 5,02 maximum = 5,15
4.99 5 4,99
5.04 5,04
5.01 5,015.06 5,06 5.02 5,02 maximum = 5.15
4.98 6 4,98
4.95 4,95
5.07 5,075.03 5,03 4.95 4,95 range = 0,28
5.05 7 5,05
5.01 5,01
5.04 5,045.15 5,15 4.98 4,98 range = 0.28
4.94 8 4,94
4.97 4,97
4.97 4,975.02 5,02 5.02 5,02
9 4,99 5,02 4,99 4,94 5,03
4.99 5.02 4.99 4.94 5.03
10 5,07 5,03 5,03 4,97 5,09
5.07 5.03 5.03 4.97 5.09
11 5,02 4,95 5,06 4,90 4,96 mean = 4,99988
5.02 4.95 5.06 4.90 4.96
12 4,99 4,99 5,03 4,87 5,05
4.9913 4.99
4,97 5.03
5,02 5,014.87 5,08 5.05 4,91 mean= =
st.dev
4.99988 
0,049 5.000
4.9714 5.02
4,97 5.01
5,02 5,015.08 4,97 4.91 5,01
4.9715 5.02
4,94 5.01
5,00 5,004.97 5,03 5.01 4,93 st. dev. ==
median 
0.04887 5,01 0.049
4.9416 5,03
5.00 4,93
5.00 5,015.03 4,96 4.93 5,01
5.03 4.93 5.01 4.96 5.01

These slides can not be reproduced or distributed without permission in writing from the author. 22
2.2.1. Histogram

Building a Histogram
1. Collect data
2. Calculate the data Range: R = (Xmax-Xmin)
3. Define the number of classes Nc
4. Calculate the classes width (rounding the value, if
necessary): h = R/Nc

5. Build frequency tables for each class


6. Draw the histogram (data in correspondence of the limits of
the classes are recorded conventionally, for example, in the
upper class)

These slides can not be reproduced or distributed without permission in writing from the author. 23
2.2.1. Histogram The number of
Numero di classi INSUFFICIENTE, per es. 3 classi
TOO FEW classes (3 classes)
classes must be
chosen in a very
smart way
The ideal number of classes is
Frequency
Frequenza

Poor and inef-


fectual information
given by the formula of Sturges:
10
Nc = 1 + ------ Log10 n
3
Caratteristica
Characteristic

Numero di classi ECCESSIVO, per es. 15 classi


TOO MANY classes (15 classes) Numero
PROPER classiof
number CORRETTO = 7classes)
classes (7 classi

Good information
(showing a clearly
symmetrical distribution)
Frequency

Frequency
Frequenza

Frequenza

Real blanks
or few data ?

Caratteristica
Characteristic Caratteristica
Characteristic

These slides can not be reproduced or distributed without permission in writing from the author. 24
2.2.1. Histogram

To build
To a histogram
construct it’s always
a histogram recommended
it is always to follow
advisable to use the
thefollowing
followingrules:
rules.

 The number of classes Nc must be linked to the number n of data, in order to avoid n Nc
too many blank classes because of fewer data. The following Sturges semiempirical 5 3
relationship is often used: 10 4

Nc
10
= 1 + -------
3
.
Log10 n
(*) In the Table on the right, the minimum
values of n to increase Nc are showed.  12
23
5
6

A class more or less is not a problem; it is better to choose an odd number of 45 7


classes, because a high central column make easier the decision on the symmetry 90 8
of the distribution (which, as a consequence, is very close to the Gauss normal 178 9
distribution). 355 10
 Every datum
datum must
must belong
belong only
onlyto toone
oneclass:
class:e.g.e.g.establishing
establishingthat
thatevery
everyclass
class 708 11
includes its right (upper)
(upper) limit,but
limit, butnot
notthe
theleft
left(lower)
(lower)one:
one,ororviceversa.
viceversa.AAfirst
firstclass
class 1,413 12
(on an abscissa value ofof zero)
zero) can
can also
also be
be considered
consideredseparately.
separately. 2,819 13
 Defined classes must include all data. 5,624 14
11,221 15
Of course, if it is possible, it is helpful 22,388 16
to define classes of the same width. 44,669 17

(*) Instead of Sturges relationship, it is possible to use the simpler (but not so good) expression: Nc = n

These slides can not be reproduced or distributed without permission in writing from the author. 25
2.2.1. Histogram

Number of classes = 1 + (10 / 3) . Log10 80 = 7.34  7

classes frequency
%
# from to centre check off absolute % cumulative

1 4.83 4.87 4.85 / 1 1.25% 1.25%


2 4.88 4.92 4.90 /// 3 3.75% 5.00%
3 4.93 4.97 4.95 //// //// //// //// / 21 26.25% 31.25%
4 4.98 5.02 5.00 //// //// //// //// //// //// 30 37.50% 68.75%
5 5.03 5.07 5.05 //// //// //// //// // 22 27.50% 96.25%
6 5.08 5.12 5.10 // 2 2.50% 98.75%
7 5.13 5.17 5.15 / 1 1.25% 100.00%
Total 80 100.00%

These slides can not be reproduced or distributed without permission in writing from the author. 26
2.2.1. Histogram

Range of Variability

Expected value
These slides can not be reproduced or distributed without permission in writing from the author. 27
2.2.1. Histogram

Shape and Interpretation of the Distribution

• Is there a center value? (Which one?)


• Do the frequencies of the classes reduce regularly starting from
the classes with higher frequency?
• Is there any symmetry ? If not, how big is the asymmetry?
• Do we have any irregular shape?
• Do we need to stratify data ?

These slides can not be reproduced or distributed without permission in writing from the author. 28
2.2.1. Histogram

Irregular Shapes

"island“ shape
F
Look for causes of the few
isolated data using stratification

Island

X
“tooth comb“ shape
F There is something strange in
the classes intervals:
 Too many classes
compared with the
number of data
 Wrong rounding of
measures
 Errors
X

These slides can not be reproduced or distributed without permission in writing from the author. 29
2.2.1. Histogram

Irregular Shapes
“precipice“ shape
F
Measurement errors or distortes
values (e.g. due to the tool
used or to missing/rejected
data)

F X
"asymmetric“ shape

 Sampling or measuring errors


 Merging of non homogenous
data (it is necessary to
stratify)

X
These slides can not be reproduced or distributed without permission in writing from the author. 30
2.2.1. Histogram

Irregular Shapes - Not Stratified Data

F
"Bimodal"
Merging of non
homogenous data

F A Data set F B Data set

+
X X

These slides can not be reproduced or distributed without permission in writing from the author. 31
2.2.1. Histogram

Skewness
Histogram of Skewed to the left Histogram of Skewed to the right
140 250

120
200
100

150
Frequency

Frequency
80

60
100

40
50
20

0 0
70 80 90 100 110 120 130 0 12 24 36 48 60 72
Skewed to the left Skewed to the right

Skewed distribution (to the left) are Skewed distribution (to the right) may
typically found when measuring e.g. occur because the process has a physical
times. This because there is usually a upper limit or only has an upper spec limit.
natural limit to how fast a process can be
completed.

These slides can not be reproduced or distributed without permission in writing from the author. 32
2.2. Descriptive Statistics

2.2.2
Cumulative curves and
frequency density curves

These slides can not be reproduced or distributed without permission in writing from the author. 33
2.2.2. Cumulative curves and frequency density curves

• Each class (bar) of a histogram is like a "closed con-


tainer" and therefore a direct interpolation between two
adjacent classes is not possible. For instance, if tolerance
limits of rolls are in the middle of two consecutive classes
(because of the choice of the classes) we can not say anything
about the percentage of rolls out of tolerance (defectives); we
can say something only if the tolerance limits coincide
respectively with the minimum of a class (on the left) and with
the maximum of another class (on the right).

• Nevertheless the trend of the columns, as a whole,


suggests that it is possible to interpolate.

These slides can not be reproduced or distributed without permission in writing from the author. 34
2.2.2. Cumulative curves and frequency density curves

Cumulative frequency

These slides can not be reproduced or distributed without permission in writing from the author. 35
2.2.2. Cumulative curves and frequency density curves

These slides can not be reproduced or distributed without permission in writing from the author. 36
2.2.2. Cumulative curves and frequency density curves

FREQUENCY DENSITY FUNCTION concept


100%
To elaborate graphically the
interpolating distribution:
90%
 join the centers of upper bases of
every bar (column) except the basis histogram
central one; cumulative distribution
80%
 raise the center of the central bar, interpolating distribution
70% remembering that subtracted and
added areas (by the interpolating
FREQUENCY [% cases]

60%
line respect to the histogram) have
to be equivalent.
50%

40% 37,50%

30% 26,25%
27,50%

20%

10%
3,75%
2,50%
1,25% 1,25%
0%
4,750 4,775 4,800 4,850 4,900 4,950 5,000 5,050 5,100 5,150 5,200 5,225 5,250

DIAMETERS [mm]

These slides can not be reproduced or distributed without permission in writing from the author. 37
2.2.2. Cumulative curves and frequency density curves

PERCENTAGES HISTOGRAM AND FREQUENCY DENSITY


OF 80 ROLLS PRODUCED
50% 10%

45% CORRESPONDING SCALES 9%

50% 50%
40% 37,50% 8%
= = 10%
% OF ROLLS IN EACH CLASS

[% of rolls per hundredth of mm]


class width 5
35% 7%

FREQUENCY DENSITY
30% 27,50% 6%
26,25%
25% 5%

20% 4%

15% 3%

10% 2%

5% 3,75% 1%
2,50%
1,25% 1,25%
0% 0%
485 490 495 500 505 510 515
ROLL DIAMETER [hundredths of a millimeter]

These slides can not be reproduced or distributed without permission in writing from the author. 39
2.2.2. Cumulative curves and frequency density curves

FREQUENCY DENSITY FUNCTION concept


To use the interpolating distri-
100%
bution, called “density of % fre- 2000%

quency”, we must refer to the


90% scale on the right. 1800%
basis histogram
As the cumulative distribution, al-

FREQUENCY DENSITY FUNCTION [% cases / mm]


80% so the interpolating distribution al- cumulative distribution 1600%
lows to overstep the boundary of interpolating distribution
70% the classes, but in a different way. 1400%
The area under this line,
FREQUENCY [% cases]

corresponding to an interval
60% 1200%
between two preset limits, can be
almost always approximated by a
50% trapezoid (or 2 if useful) and 1000%
means the probability to find a
40% diameter of a value inside the 37,50% 800%
considered interval.
30% 26,25%
27,50% 600%

20% 400%

10% 200%
3,75%
2,50%
1,25% 1,25%
0% 0%
4,750 4,775 4,800 4,850 4,900 4,950 5,000 5,050 5,100 5,150 5,200 5,225 5,250

DIAMETERS [mm]

These slides can not be reproduced or distributed without permission in writing from the author. 40
2.2.2. Cumulative curves and frequency density curves

By the frequency density distribution,


we can understand data properties
in a “punctual” way, that means in a continuous way,
starting from the “discrete” approach
of the histogram.

These slides can not be reproduced or distributed without permission in writing from the author. 41
2.2.2. Cumulative curves and frequency density curves

As all calculations (carried out analytically or graphically),


are always developed on the base
of cumulative distribution
(this also applies to the values shown in the TABLES),
it is proper to wonder
why, in addition to illustrate the TABLES,
it is always showed the density distribution
and not the cumulative distribution
(e.g. see Normal Tables given later).

These slides can not be reproduced or distributed without permission in writing from the author. 42
2.2.2. Cumulative curves and frequency density curves
Frequency density distribution
The distribution of the heights of a population
(including children) can never have a value less Adult males
0,045
than zero, while it can be “open” on the right, for (only)
possible “giants”. As a consequence it will be Maschi adulti
mean = 171 cm
0,040 dissimmetric and so not normal. (soltanto)
approximately
media = 171 cm
Of course, if we limit ourselves to consider a mo- normal
distribuzione
0,035
DI PROBABILITÀ

re homogeneous subpopulation, as, for instan- distribution


normale
ce, adult males, normal distribution can offer
DENSITY

0,030 an interpolation more than acceptable.

0,025
FREQUENCY

WholePopolazione
population
0,020
completa
(children included)
DENSITÀ

(inclusi
mean bambini)
= 147 cm
0,015
non-normalcm
media = 147
distribuzione
0,010 distribution
non-normale

0,005

0,000
0 20 40 60 80 100 120 140 160 180 200 220 240

HEIGHTs [cm]
ALTEZZE [cm]
These slides can not be reproduced or distributed without permission in writing from the author. 43
2.2.2. Cumulative curves and frequency density curves

Cumulative distribution

1,0

0,9
maschi adulti
adult males
0,8 whole population
popolazione completa
CUMULATA
FREQUENCY

0,7
These two (cumulative) distributions
0,6
clearly represent two very different
populations, but both have the same
PROBABILITÀ

0,5
s-shape, which does not highlight
CUMATIVE

0,4
the differences in meaning as well as
the frequency density distributions of
0,3 the previous slide.

0,2

0,1

0,0
0 20 40 60 80 100 120 140 160 180 200 220 240
ALTEZZE
HEIGHTs [cm]
These slides can not be reproduced or distributed without permission in writing from the author. 44
2.2.2. Cumulative curves and frequency density curves

Therefore:
 cumulative distributions represent the trend of calcula-
tions, but they are all S-shaped curves, very similar to
each other, and therefore unable to give an immediate
idea of the distribution of the population’s characteristic;
 on the opposite, frequency density distributions (which
are the derivatives of the previous ones) have a shape
similar to the histogram and give an immediate graphical
perception of how the investigated characteristic is di-
stributed in the population;
 the frequency density distributions can be not symme-
trical and have very different shapes.

These slides can not be reproduced or distributed without permission in writing from the author. 45
2.2.2. Cumulative curves and frequency density curves
Examples of frequency density distribution
Red curves have shapes obtainable by Weibull distribution

DECREASING

SYMMETRICAL
(e.g.: Normal )
RIGHT-SKEWED

RECTANGULAR
or UNIFORM

With a constant
failure rate
costante

These slides can not be reproduced or distributed without permission in writing from the author. 46
2.2. Descriptive Statistics

2.2.3
Bar graph
(differences with the histogram)

These slides can not be reproduced or distributed without permission in writing from the author. 47
2.2.3. Bar graph (differences with the histogram)

The histogram is the first step to get an interpolation by frequen-


cy density function (as we saw before). Clearly this is possible
only if the following 3 requirements are satisfied:
1. The abscissa scale must be a continuous data and not a
qualitative definition (“labels”);
2. Each class width must be proportional to the difference
between the upper limit (maximum) and the lower limit
(minimum) of the class;
3. Continuity between classes is required: this means that
the lower limit of every class (except for the first one) must
correspond to the upper limit of the previous class.

Only under such conditions, the histogram can be a graphical approximation


of the frequency density distribution (otherwise it can not exist).

These slides can not be reproduced or distributed without permission in writing from the author. 48
2.2.3. Bar graph (differences with the histogram)
But a class distribution can be also used in some other application,
not seen before and which do not respect the 3 basic conditions.
In these cases, the columns become simply bars, and they are repre-
sented one far from the other, to remember that a following interpolation
by a frequency density curve would not have any meaning and the dia-
gram loses the name of histogram to assume that of bar graph.

50%

45%
40% For instance, a bar graph
40%
like that on the left indicates
35%
30% only the different volumes
Percentages
Percentuali

30%

25%
25% of supply in 2004: an inter-
20%
polation by a frequency
15%
density curve does not
10%
have any meaning.
5%
5%

0%

Forn. A A
Supplier Forn. B
Supplier B Forn. C
Supplier C Altri
Others
Forniture 2004
SUPPLIES 2004

These slides can not be reproduced or distributed without permission in writing from the author. 49
2.2. Descriptive Statistics

2.2.4
Evaluation of
defectives percentage

These slides can not be reproduced or distributed without permission in writing from the author. 50
2.2.4. Evaluation of defectives percentage

EVALUATION OF “DEFECTIVES” PERCENTAGE


by the frequency density function

 All industrial processes produce a certain percentage, usually little, of


out of tolerance items, called defectives.
 A small sample (e.g. 80÷100 items) may not have any defective, or,
as in the case of the rolls, it may have so few defectives that the
estimation of their percentage is very uncertain.

 The interpolation of the histogram by a frequency distribution


curve allows to overcome this problem.

 Recognized the symmetry of the rolls diameter histogram, we can


interpolate it by a normal distribution (see later) with a mean and a
standard deviation equal to those of the collected data (respectively
5.00 mm and 0.49 mm).

These slides can not be reproduced or distributed without permission in writing from the author. 51
2.2.4. Evaluation of defectives percentage
 If we can accept the hypothesis that
 the histogram closely represents the population and
 that the situation remains unchanged over time,
then, with the help of one of the many software available on the market,
we can estimate the percentage of defectives as the sum of the areas
of the 2 tails outside the tolerance range (4.90 and 5.10) corresponding
to 4.10%. 40 6

Prescribedprescritte
Tolleranze tolerance
(histogram)

FREQUENCY DENSITY (normal distribution)


35
(istogramma)

DENSITÀ DI PROBABILITÀ (gaussiana)


30
CLASS

4
CLASSI

25
IN EACH
PEZZI NELLE

20 3
OFDIITEMS

15
2

Predicted Predicted
NUMERO

10 Previsione Previsione
defectives
frazione half defectives
frazionehalf
NUMBER

dipercentage
non conformi percentage
di non conformi
1
5

0 0
4,70 4,75 4,80 4,85 4,90 4,95 5,00 5,05 5,10 5,15 5,20 5,25 5,30
QUOTE MISURATE [ [mm]
MEASUREMENTS mm ]
These slides can not be reproduced or distributed without permission in writing from the author. 52
2.2.4. Evaluation of defectives percentage

EVALUATION OF “DEFECTIVES” PERCENTAGE


by the frequency density function

 Instead, by dividing the number of defective rollers (3) by the total


number of the rolls (80), according to the “proportion formulas” (see
later), we would obtain a percentage of 3.75%, significantly
underestimated.

 If we do not detect any defective in the sample, this is the only


approach to make an estimation.

Also if all the items of the sample are inside the tolerance range,
by the Statistics, it is possible to estimate the percent of defectives
which will be present in the whole production in the field.

This is a very big benefit, mostly when we have a very little percentage of defectives, in
which case, to find defectives, it would require to sample an unacceptable amounts of items.

These slides can not be reproduced or distributed without permission in writing from the author. 53
2.2. Descriptive Statistics

2.2.5
The Pareto principle
of “factor sparsity”

These slides can not be reproduced or distributed without permission in writing from the author. 54
2.2.5. The Pareto principle of “factor sparsity”

“Vital few”
really important things are very few

A relatively small number of causes


is responsible of a very high part
of a certain effect.

This principle has been defined as the method to identify


“the few important elements among the many not important”.

It was also defined “the discovery of the gold in the mine”,


indicating the location of the zones
where digging will give a big economical return.

The principle itself does not solve the problems,


but it has a great practical importance,
as it reminds us to focus on the 20 percent that matters !
These slides can not be reproduced or distributed without permission in writing from the author. 55
2.2.5. The Pareto principle of “factor sparsity”
OPERATIVENESS & GRAPHICAL ASPECT
100%

I M P A C T
F A I L U R E S specific cumulative

CUMULATIVE % IMPACT
I M P A C T ( number of failures )

20 50% # description absolute % absolute %


1 Lateral doors 20 13,33% 20 13,33%
2 Headlamps 15 10,00% 35 23,33%
3 Windscreen wiper 10 6,67% 45 30,00%
40% 4 External rear wiew mirror 9 6,00% 54 36,00%
15 5 Seat rails 9 6,00% 63 42,00%
6 Pipes/sleeve fastening 7 4,67% 70 46,67%
7 Electrical wires 6 4,00% 76 50,67%
30% 8 Internal rear wiew mirror 5 3,33% 81 54,00%
9 :::::::::::::::::::::::::::::::::::: ::
10
0,03% :: ::::%
20% :: Other not shown 69 46,00% :: ::::%
783 :::::::::::::::::::::::::::::::::::: 0,04 0,03%

5 :: 99,99%
10% 1029 :::::::::::::::::::::::::::::::::::: 0,02 0,01% 150 100,00%
Total 150 100,00%

0 0
External rear wiew mirror

Internal rear wiew mirror


Electrical wires
Lateral doors

Pipes/sleeve fastening
Headlamps

Seat rails
Windscreen wiper

Others

These slides can not be reproduced or distributed without permission in writing from the author. 56
2.2.5. The Pareto principle of “factor sparsity”

RULES usually followed

 Consider a sufficient number of items to get 80% of


the investigated phenomenon.
 A common reference is 20/80, to remember that often
(but not always!) it is sufficient a 20% of the items to
catch the 80% of the phenomenon.
 We can neglect the first 2÷3 voices, if they are very
demanding from an economical point of view, but no
more !

These slides can not be reproduced or distributed without permission in writing from the author. 57
2.2. Descriptive Statistics

2.2.6
Position and spread
measurements

These slides can not be reproduced or distributed without permission in writing from the author. 58
2.2.6. Position and spread measurements

As the histogram summarizes a population,


loosing the detail of every single element,

in the same way

• a position measurement (e.g. the mean)


• and a spread measurement (e.g. the standard deviation)
summarize the histogram, loosing the detail of the distribution
shape. This must be given separately (also as hypothesis) if
we want to reach effective conclusions about the data.

These slides can not be reproduced or distributed without permission in writing from the author. 59
2.2. Descriptive Statistics

2.2.7
Position measurements:
mean, median, mode

These slides can not be reproduced or distributed without permission in writing from the author. 60
2.2.7. Position measurements: mean, median, mode

In a value distribution:

 The mean is the most known and widely used among position
measurements. It is the value obtained by the ratio between the sum
of data values and total number of data (arithmetic average). Its value
represents the center of gravity of all values.
 The mode is the value (or values: if the distribution has more than
one mode) where frequency (or probability) density has its maximum:
in other words, it corresponds to the maximum(s) of the frequency (or
probability) density distribution.

These slides can not be reproduced or distributed without permission in writing from the author. 61
2.2.7. Position measurements: mean, median, mode

 The median is the value which separates all elements of a


population (once ranked in increasing or decreasing order), in two
equal parts, leaving half of them on the right and half of them on
the left: that means that the 50% of the elements have, regarding
the investigated characteristic, values less than the median, while
the remaining 50% have values greater.
 If we have n ordered values with n odd, the median is the central value
(of order [(n+1)/2]); if n is even, the median is the mean of two central
values of order (n/2) e (n/2 + 1) respectively.
 An extension of the median concept are the quantiles or percentiles.
They represent the abscissa values which leave to their left a pre-
assigned percentage of elements: for instance, the female 80 percentile
of the weight is the weight value exceeded only by 20% of women.

These slides can not be reproduced or distributed without permission in writing from the author. 62
2.2.7. Position measurements: mean, median, mode
The classic “position measure” is the MEAN
DESCRIPTIVE Statistics

TRUE S xi
when we examine all
elements of a
m = ---------
population n

MEAN
INFERENCIAL Statistics

ESTIMATED S xi
when we examine
only a sample taken
m
^ = x = --------
from the population n

These slides can not be reproduced or distributed without permission in writing from the author. 63
2.2.7. Position measurements: mean, median, mode

EXAMPLES OF CALCULATIONS WITH NUMERICAL DATA


(as an alternative to continuous distribution)

MEAN MEDIAN MODE


ASCENDING Sum of values divided Separator value (odd number of data) or mean of The value repeated
E X E M P L E S
ORDER by the total number the two central values (even number of data) more times(1)
of data which divides into 2 equal quantities the data after
they have been sorted.
41 17 17
1 17 17
420
17
89 41 41
with 7 data 92 72 ------- = 60 72 = 72 17and
17 e 92
92
(odd number) 17 89 7 89
72 92 92 (1)
92 92 92
50 15 15
2 27 27 216 27 27 + 39
15 27 27
------- = 36 ----------- = 33 27
with 6 data 39 39 39
6 2
(even number) 58 50 50
27 58 58

(1) If all the values appear the same number of times (i.e. with the same frequency), the mode does not exist,
but if there are more different values with the maximum frequency, then there are more than one mode.

These slides can not be reproduced or distributed without permission in writing from the author. 64
2.2.7. Position measurements: mean, median, mode

It is worth observing that, of all the data values, the median


uses:
• only the central value (odd number of data)
• or the two central values (even number of data),
while other data are taken into account only to establish the
position.

On the opposite, the mean uses all the true values of data.
We can illustrate this concept saying that the mean has a
greater density of information than the median.

These slides can not be reproduced or distributed without permission in writing from the author. 65
2.2.7. Position measurements: mean, median, mode

These slides can not be reproduced or distributed without permission in writing from the author. 66
2.2.7. Position measurements: mean, median, mode
Positioning with continuous distributions
With symmetric
distributions
(e.g. normal distribution)
mean, median and mode

mean = median = mode


are coincident.

These slides can not be reproduced or distributed without permission in writing from the author. 67
2.2.7. Position measurements: mean, median, mode
Positioning with continuous distributions
With asymmetric distributions,

median
mean, median and mode
mode are always arranged

mean
in the order shown in the left
(respect to the skewed portion
which causes asymmetry).
If the distribution would be skewed in the right
(and not in the left as in Figure),
mean, median and mode
would be arranged in the reverse order.

50% 50%

These slides can not be reproduced or distributed without permission in writing from the author. 68
2.2.7. Position measurements: mean, median, mode

On the next slide,


you will learn the operational differences
between mean, median and mode,
on an example inspired to the steelyard.

These slides can not be reproduced or distributed without permission in writing from the author. 69
MEAN
Left Right
1x4= 4 1x5= 5
2x3= 6 1x4= 4
3x2= 6 2x3= 6
5x1= 5 2x2= 4
2x1= 2
21 21

to the

These slides can not be reproduced or distributed without permission in writing from the author. 70
2.2.7. Position measurements: mean, median, mode

Being unaffected by the distance of the data from their


ideal center of gravity,
the median is more stable (i.e. less “swinging”)
than the mean,
thus it may be preferred to the average
in all situations where stability is important
(e.g.: control chart managed with small samples
systematically extracted
from a population with high variability).

These slides can not be reproduced or distributed without permission in writing from the author. 71
EXAMPLES OF APPLICATION OF MEDIAN AND PERCENTILES
Selection CLOTHES SIZE CRASH test impact against barrier

Guide to the Sizes


Notice that the dresses change with the brand. This Table iso only indicative.

Table sizes: Menswear


Size Chest Waistline Height

Table sizes: Womenswear


Size Chest Waistline Height

Example of use of LIFE-SIZE DUMMIES:


The purpose is to satisfy 90 percentile males
the maximum number of customers
with a reasonable number of sizes 50 percentile females
(not too many). 10 percentile children
These slides can not be reproduced or distributed without permission in writing from the author. 72
2.2.7. Position measurements: mean, median, mode
Box Plot is a graphical representation of the median and of percentiles.
The 1st and 3rd quartiles, are represen-
ted by the sides of a rectangle, contai-
taining the bulk of data. Inside it is
highlighted the position of the median.
The lower and the higher 25% of data
are represented by segments ending in
the minimum and the maximum, re-
spectively.
Boxplots of forn.1 - forn.5
(means are indicated by solid circles)

70

thus quantitative comparisons


become intuitive 65

60
forn.1

forn.2

forn.3

forn.4

forn.5
These slides can not be reproduced or distributed without permission in writing from the author. 73
2.2. Descriptive Statistics

2.2.8
Spread measurements:
Range, average deviation
and standard deviation

These slides can not be reproduced or distributed without permission in writing from the author. 74
2.2.8. Spread measurements: Range, average deviation and standard deviation

But a position measure, like the mean,


is not enough to characterize a “population”
from a statistical point of view.

We need a spread indicator too !

Examples :
 if the depth of a river is on average less than 1 meter, this
does not exclude the presence of points with dangerous
depth !
 two towns with the same average annual temperature of
18°C can have ranges winter-summer very different, e.g.
one from -10°C to +35°C and the other from +14°C to
+24°C: two climates completely different !

These slides can not be reproduced or distributed without permission in writing from the author. 75
2.2.8. Spread measurements: Range, average deviation and standard deviation

A simple and intuitive spread indicator


is the range,
that is the difference
between the maximum and the minimum
values (of the investigated characteristic)
present into the examined population.

But the largely more used spread indicator


is the standard deviation.

These slides can not be reproduced or distributed without permission in writing from the author. 76
DESCRIPTIVE Statistics 2.2.8. Spread measurements: Range, average deviation and standard deviation

TRUE (1)

when we have S (xi - m)2


examined all the
elements of a s = -------------
population n

Standard
deviation
Statistical INFERENCE

ESTIMATED (2)

When we have S (xi - x)2


examined only a
sample taken from s
^ = s = -------------
the population n-1

These slides can not be reproduced or distributed without permission in writing from the author. 77
2.2.8. Spread measurements: Range, average deviation and standard deviation

FIRST OBSERVATIONS ABOUT THE JUST SEEN EXPRESSIONS

I. In both cases, standard deviation is linked only to the differences of every


value respect to the mean and therefore it does not change if we make a
translation of axes: s(X+b) = s(X).
II. Expression (1), with the denominator equal to n, is the definition of the stan-
dard deviation for a whole population. This standard deviation may be con-
sidered the target of expression (2). Expression (1) is valid also for a whole
population of only one element, because, in this case, standard deviation
is equal to 0.
III. Expression (1) could also be used to estimate the standard deviation of a
whole population on the basis of sample data, but only if the true mean m of
whole population is known: however this happens very rarely !
IV. Commonly, we must estimate m by the mean x of the sample data. In this
case we must use expression (2). Note that expression (2) tends to the
expression (1) for large values of n.

These slides can not be reproduced or distributed without permission in writing from the author. 78
2.2.8. Spread measurements: Range, average deviation and standard deviation
V. To use n - 1 as denominator means to recognize that, to estimate the popu-
lation variability, we need a sample of at least 2 elements (which is the mini-
mum to make a comparison), otherwise the denominator is zero.
VI. If we want to describe expression (2) using the concept of degrees of free-
dom (abbreviated as dof: see Par. 4.3.5.2, introduction to ANOVA), we can consi-
der standard deviation as the square root of the ratio between the sum of
the squares of deviations and the degrees of freedom. Thus we can say
that the degrees of freedom are n - 1 , because one degrees of freedom was
spent in calculating the mean x. In other words, as we have before evaluated
the mean, we have reduced the possibility of variation of the observations as
they was n-1 and not n.
VII. If we apply expression (1) to the data of a sample to calculate its standard de-
viation, s, to be used as an estimate of the true standard deviation of the whole
population, st, we would use a biased estimator, which, with the increase of
the number of tested samples (all of size n), converges (see next slide) towards
a value sb smaller than the true value st, according to the following relationship:
sb = √ (n-1) / n . st
Of course the problem is reduced if the size n of the sample is large, because
the ratio indicated above becomes more and more close to 1 when n grows.
The mathematical justification of this will be provided few slides later (under the title DEMONSTRA-
TION OF THE CORRECTION FOR AN “UNBIASED” ESTIMATOR), immediately after the presenta-
tion of two new expressions as an alternative to the previous expressions (1) and (2). For the mo-
ment, we limit to the graphical illustration shown in the following slide.
These slides can not be reproduced or distributed without permission in writing from the author. 79
2.2.8. Spread measurements: Range, average deviation and standard deviation
Graphical illustration of the previous Point VII
Let’s consider small samples of assigned size n (e.g.: n = 5) and let's start by extracting a sample
from the population and then by calculating its standard deviation s1 with the expression (1), i.e.
dividing by n (instead of by n-1). Let’s extract a second sample and calculate, for it too, the stan-
dard deviation s2, with the expression (1) as before, and then calculate the mean of s1 and s2.
We can continue in this way, extracting many other samples, always calculating the standard de-
viation of the last sample and then averaging it with those of all previous samples. As the number
of samples increases, the average value of the standard deviations of all samples converges to-
wards its limit, which can be either:
 the true value, st, if standard deviations were calculated using the expression (2);
 a biased value, sb, with a bias related to the ratio (n-1)/n of the previous slide, if standard de-
viations were calculated with the expression (1): this latter aspect is shown below.

s biased s true

Means of successive samples with n = 5

bias
These slides can not be reproduced or distributed without permission in writing from the author. 80
2.2.8. Spread measurements: Range, average deviation and standard deviation
The numerator S(xi - m)2 of previous expression (1) can also be
rewritten in the following way:
n n n n n
S(xi - m)2 = S(xi2 - 2 m xi + m2) = Sxi2 - 2 m Sxi + n m2 = Sxi2 - 2 m n m + n m2 =
i=1 i=1 i=1 i=1 i=1

remembering the
definition of mean

Sxi (Sxi)2 n Sxi2 - (Sxi)2


= Sxi2 - n m2 = Sxi2 - n ( ------ )2 = Sxi2 - -------- = ------------------- .
n n n

replacing m with
his expression

With the same steps, we can write in a similar way also the expres-
sion (2), where, instead of m, there is x.

These slides can not be reproduced or distributed without permission in writing from the author. 81
2.2.8. Spread measurements: Range, average deviation and standard deviation

Replacing into (1) and (2) the numerators in the form just elaborated,
we obtain the following formulas equivalent to the preceding:

n . S (xi2) - (S xi)2
s = ------------------------ (1 bis)

n2

n . S(xi2) - (S xi)2
s
^ = s = ----------------------- (2 bis)

n . (n - 1)
These slides can not be reproduced or distributed without permission in writing from the author. 82
2.2.8. Spread measurements: Range, average deviation and standard deviation

Formulas (1 bis) and (2 bis) are commonly applied in the pocked


calculators and generally whenever it can be useful to run the calcula-
tions by a Table, because we do not need the end of the input to calcu-
late the mean and therefore is not necessary to have in memory all data.

The formulas need only 3 memory registers (in addi-


tion to that of input): n, Sxi, Sxi2.

• As the numerator is done by the difference between two squares (of


individual data, then added and multiplied by n, and of the sum of all
data),
• and as the calculator uses a limit number of digit (e.g. 11, in simple
precision),
 if the values xi are large, this expression may give inaccurate results.
Therefore it is appropriate to apply to some artifice to operate with small numbers,
for example, placing the origin (i.e. the zero value) of the coordinates on the provi-
sional mean, evaluated after acquiring a small number of input data. Of course we
have to standardize bot these data and the new data: and this increases the
amount of required memory registers.
These slides can not be reproduced or distributed without permission in writing from the author. 83
2.2.8. Spread measurements: Range, average deviation and standard deviation

To obtain small values (and moreover integers) which make


easier the calculations and reduces the error for a bad rounding, it
is common to use coded values, indicated below by ui.
We translate the zero value of the scale in a central value A, com-
monly the mean or the nominal value, and then we indicate by h
the minimal appreciable variation.
We can transform a generic ordinate-value yi (in physical units) in
the corresponding coded value ui by the following expression:
ui = (yi - A) / h
while the reverse formula can be written as:
yi = A + ui . h .

These slides can not be reproduced or distributed without permission in writing from the author. 84
2.2.8. Spread measurements: Range, average deviation and standard deviation

DEMONSTRATION OF THE CORRECTION


FOR AN “UNBIASED” ESTIMATOR

The previous expression (1 bis) allows to explain that if we


apply expression (1) to the sample data, we would use a
biased estimator.
As we have observed at the previous Point (I), standard
deviation does not change if we translate the x axis. Let us
place the origin of coordinates on the value m of the mean.

These slides can not be reproduced or distributed without permission in writing from the author. 85
2.2.8. Spread measurements: Range, average deviation and standard deviation
Regardless of the square root sign, we can rewrite (1 bis) in terms of statistical inference:
n n n n
S xi 2 S xi S xi 2 S xi 2 S x i xj
i=1 i=1 i=1 i=1 i<j
s2 = --------- - (-------)2 = --------- - -------- - 2 ------------ =
n n n n2 n2
n n
n -1 S xi xj n-1 n - 1 S xi 2 n-1
n i<j n i=1
= -------- . S xi2 - 2 (-----------)2 = -------- . S xi2 = ------- . ------- = -------- . s2
i=1 i=1
n 2 n 2 n 2 n n n
a b
a) As we suppose that the n observations are independent (i.e. not influencing each other),
n
we can demonstrate that S xi xj = 0. Indeed, given two discrete random variable X e Y
i< j
with means respectively mx e my, we can define la covariance Kxy as:
Kxy = S S (xi - mx) . (yj - my) . pxi pyj = S (xi - mx) pxi . S (yj - my) pyj
i j i j
where pxi and pyj are the probabilities related to the values xi and yj and the sums are
extended to all values where random variables are defined. In this situation, if random
variables are independent (what means that the pyj are not influenced by the pxi and vice
versa), the sum S (yj - my) pyj is null by definition.
b) As we assumed that the origin of the values of observations is placed at the true value of
the mean, m, it is by definition: s2 = (S xi2)/n.
These slides can not be reproduced or distributed without permission in writing from the author. 86
2.2.8. Spread measurements: Range, average deviation and standard deviation

As the median, also the range, of all the data values uses:
• only the extreme values (minimum and maximum observed);
• of the other values, it takes only the position in order to
establish the extreme values.

On the opposite, standard deviation uses (mathematical-


ly) all the data values. As in the case of the comparison be-
tween median and mean, we can say that standard deviation
has a greater information density than the range.

These slides can not be reproduced or distributed without permission in writing from the author. 87
2.2.8. Spread measurements: Range, average deviation and standard deviation
We wonder why we do not consider the average
deviation, defined as the mean of differences between
every value and their mean:
d = ( S |xi - x| ) / n
Of course we have to consider absolute values, other-
wise (by definition of mean) this sum would be always
equal to zero.
We can realize the
reason for this, for
example considering
the linear interpola-
tion of 3 not aligned
points.

These slides can not be reproduced or distributed without permission in writing from the author. 88
2.2.8. Spread measurements: Range, average deviation and standard deviation
Which of the following two alternatives is preferable to consider as the best
interpolating line ?
 the line which minimizes the sum of distances in absolute value (average
deviation)
 or the line which minimizes the sum of squares of distances (standard
deviation) ?

Will be better this … … or this ?

S |yi - ^yi| = 3 S |yi - ^yi| = 2+1+1 = 4


Average Standard deviation
deviation indicates this +2
indicates this +3 as better -1
as better
-1

S (yi - ^yi)2 = 9 S (yi - ^yi)2 = 4+1+1 = 6


These slides can not be reproduced or distributed without permission in writing from the author. 89
2.2.8. Spread measurements: Range, average deviation and standard deviation

By squaring the values


(as in calculating moment of inertia)
we emphasize the farest points,
with a more homogeneous distribution
of deviations.
That’s why
standard deviation
is the dispersion measure most used.

On this base, the old rule to remove the extreme (minimum &
maximum) values of a sample data must be reversed.
“Variability” acquires primary importance and therefore extre-
me values, just as representative of relatively infrequent events,
can not be eliminated because they provide valuable information
about variability.

These slides can not be reproduced or distributed without permission in writing from the author. 90
2.2. Descriptive Statistics

2.2.9
Gauss Normal Distribution

These slides can not be reproduced or distributed without permission in writing from the author. 91
2.2.9. Gauss Normal Distribution

2.2.9.1
Meaning

These slides can not be reproduced or distributed without permission in writing from the author. 92
2.2.9.1. Gauss Normal Distribution: MEANING

GAUSS NORMAL DISTRIBUTION


origin

In the frequent cases in which a phenomenon depends:


 on a limited number of key parameters, which are “con-
trolled”,
 but also on many imponderable factors (called also
NOISE FACTORS), each of them with little influence on
the final result (factors difficult or expensive to be
evaluated and thus not taken into ac-count if not globally),
we see that, in nominally equal conditions, test results are all
around the value predicted on the basis of “controllable” pa-
rameters and they become very rare as far as we go from
the predicted result.

These slides can not be reproduced or distributed without permission in writing from the author. 93
2.2.9.1. Gauss Normal Distribution: MEANING

For example, in setting the pitches of a cannon, it is usual to take


into account:
• barrel elevation which are
• wind speed controllable factors
Actually, during the shooting, there are many other factors (usually
ignored in the setting), whose effects do vary, even if slightly, the
result between a shot and another:
• air humidity, influencing both the air density (and so the air resistance)
and the gunpowder combustion;
• cleaning of the barrel (friction);
• quantity of gunpowder in the cartridge , which can be different in
each bullet.

These slides can not be reproduced or distributed without permission in writing from the author. 94
2.2.9.1. Gauss Normal Distribution: MEANING

These situations are well represented by a particular frequen-


cy density distribution, symmetrical and bell-shaped, called
Gauss “normal” distribution. As we go far from the vertical
axis (mean), the wings of the bell go always nearer to the hori-
zontal axis without touching it: the area under this distribution
is 1, i.e. 100% (as for every distribution).

These slides can not be reproduced or distributed without permission in writing from the author. 95
2.2.9.1. Gauss Normal Distribution: MEANING

A minimum set of typical applications in which we can apply


normal distribution is the following:

• measurements (many and precise) of a physical characteristic of


a piece;

• distances (with marks  long or short shots) from the target of


bullets fired by a gun;

• sums of 5 numbers drawn in different weeks in every lottery drum


(with a little straining for lack of continuity).

• values obtained with the launch of two dices (with a little straining
for lack of continuity).

These slides can not be reproduced or distributed without permission in writing from the author. 96
2.2.9.1. Gauss Normal Distribution: MEANING

The Gauss normal distribution is the basic tool to interpret


experimental results of a large number of phenomena.

Its characteristic symmetrical bell shape indicates that:


• The probability to find values less than the mean is
the same as to find values greater than the mean.
That means the same risk to fail by defect or by
excess.
• The probability to find a value is clearly decreasing
as we go far from the mean: both for increasing and
for decreasing values.

These slides can not be reproduced or distributed without permission in writing from the author. 97
2.2.9.1. Gauss Normal Distribution: MEANING
The meaning and the importance of normal distribution
can be better understood considering
the sum of the values obtained by the launch of 2 dice
POSSIBILI
sommasum

6
POSSIBLE
with the same

 
5  



5
       
con la medesima

4      4
ESITI

       
             
DI OF

3 
     

  



 
 



3
NUMBER

                   
OUTCOMES

2          2
NUMERO

                   
                         
1 
   

    

  

 



   

 

 






1
                         
                        
                         

2 3 4 5 6 7 8 9 10 11 12
SUM OF THE
SOMMA VALUES
DELLE OF DI
FACCE 2 dice: possible
2 DADI: esitioutcomes
possibili

Interpolating distribution, in this case,


is linear with a triangular shape …..

These slides can not be reproduced or distributed without permission in writing from the author. 98
2.2.9.1. Gauss Normal Distribution: MEANING

….. but it is enough to use 3 dice (instead of 2),


To obtain a distribution very closed to the normal one:
30 0,14

27 27

25 25 0,12
25
of combinations

21 21
0,10

frequenza
Densitydifrequency
20
N° combinazioni

0,08
15 15
15

Densità
0,06
Number

10 10
10
0,04

6 6

5
3 3 0,02

1 1

0 0,00
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
SumSomma
of the outcomes of 3the
punteggi dei 3 dice
dadi

These slides can not be reproduced or distributed without permission in writing from the author. 99
2.2.9.1. Gauss Normal Distribution: MEANING

A complex phenomenon,
as the behaviour of a machinery,
can be thought as the result
of the combination of a very large number
of elementary random phenomena,
similar to the sum of the outcomes
of the launch of several dice.

The reality is more varied and complex,


because elementary phenomena are neither equal
nor limited into a definite interval
and mostly non symmetric,
(in this case, the use of normal distribution is not correct).

These slides can not be reproduced or distributed without permission in writing from the author. 100
2.2.9.1. Gauss Normal Distribution: MEANING

Mathematical expression of
CUMULATIVE NORMAL DISTRIBUTION
x
 (x - m)2
 - ------------
1  2 . s2

F(x) = ----------------- .
e dx
s. 2. -

These slides can not be reproduced or distributed without permission in writing from the author. 101
2.2.9.1. Gauss Normal Distribution: MEANING

2 parameters distribution:
 mean, m, which places the (mean of) distribution along the abscissa
axis, without changing its shape;
 standard deviation, s, which gives to the bell (always symmetrical),
a shape large and flat (if it has high values) or high and narrow (if it has
low values).

These slides can not be reproduced or distributed without permission in writing from the author. 102
2.2.9.1. Gauss Normal Distribution: MEANING

Mathematical expression of
DENSITY NORMAL DISTRIBUTION
The density frequency distribution is the derivatives of the previous
cumulative distribution and is obtained from it simply removing the in-
tegral sign:

(x - m)2
- -------------
1 2 . s2
f(x) = ------------------ . e
s. 2.

These slides can not be reproduced or distributed without permission in writing from the author. 103
2.2.9. Gauss Normal Distribution

2.2.9.2
Standard
normal distribution

These slides can not be reproduced or distributed without permission in writing from the author. 104
2.2.9.2. STANDARD normal distribution

It’s the simplest case of a normal distribution,


 having mean equal to zero
 and standard deviation equal to 1
It is called Standard normal distribution, because, as we are
going to see, its Table is the reference to solve all the other
cases too.

Mathematical expression of CUMULATIVE STANDARD DISTRIBU-


TION is:
x
1  2

F(x) = ------------ .
e -(x /2)
dx
 2. -

Of course it is obtained from the previous general expression,


by setting: m = 0 e s = 1 .

These slides can not be reproduced or distributed without permission in writing from the author. 105
2.2.9.2. STANDARD normal distribution

Also the expression for the frequency density can be obtained


from the corresponding general when:
m=0 e s=1:

x2
- -----
1 2
f(x) = ------------ . e
 2.

These slides can not be reproduced or distributed without permission in writing from the author. 106
2.2.9.2. STANDARD normal distribution

STANDARD NORMAL DISTRIBUTION 0,50

0,45 95% of data are within ± 1.960 s.

0,40 99% of data are within ± 2.576 s.

0,35

0,30

0,25

0,20

0,15

0,10

0,05

0,00
-4 -3 -2 -1 0 1 2 3 4

± 1 s  68.26% of data

± 2 s  95.45% of data

± 3 s  99.73% of data

These slides can not be reproduced or distributed without permission in writing from the author. 107
2.2.9.2. STANDARD normal distribution
It seems particularly meaningful to remember that
Measurement Theory provides the following definitions.
• Likely errors: errors in the range mean ± 1 s.
These errors are generally done and accep-
ted. The range includes 68.26% of data. Just to
get a visual idea, in weighing by means of a Chemist’s
balance, the “likely error" in the reading is mainly due to
a parallax error and it is usually assumed equal to half
the interval between two successive nicks on the scale.

• Impossible errors: errors outside the range mean ± 3 s.


These are considered errors quite impossible to be done and
their probability to happen is 2.7‰ (rounding, it is lower than
3 times out of a thousand). Thus, the capability of a produc-
tion process (when it is influenced only by common causes
and not by special causes) is empirically defined within ± 3s.

These slides can not be reproduced or distributed without permission in writing from the author. 108
2.2.9.2. STANDARD normal distribution

Because the expressions of normal distribution are


quite complex, we use :
• a specific Software (e.g. EXCEL),
• or Tables (as those of the two following slides).

A simple transformation allows to perform calculations


for any normal distribution,
using only the Table of standard normal distribution.

These slides can not be reproduced or distributed without permission in writing from the author. 109
2.2.9.2. STANDARD normal distribution
Table of standard
normal distribution z
1-F(z)

z 0,00 0,01 0,02 0,03 0,04 0,05 0,06 0,07 0,08 0,09
0,0 0,500000 0,496011 0,492022 0,488033 0,484047 0,480061 0,476078 0,472097 0,468119 0,464144
0,1 0,460172 0,456205 0,452242 0,448283 0,444330 0,440382 0,436441 0,432505 0,428576 0,424655
0,2 0,420740 0,416834 0,412936 0,409046 0,405165 0,401294 0,397432 0,393580 0,389739 0,385908
0,3 0,382089 0,378281 0,374484 0,370700 0,366928 0,363169 0,359424 0,355691 0,351973 0,348268
0,4 0,344578 0,340903 0,337243 0,333598 0,329969 0,326355 0,322758 0,319178 0,315614 0,312067
0,5 0,308538 0,305026 0,301532 0,298056 0,294598 0,291160 0,287740 0,284339 0,280957 0,277595
0,6 0,274253 0,270931 0,267629 0,264347 0,261086 0,257846 0,254627 0,251429 0,248252 0,245097
0,7 0,241964 0,238852 0,235762 0,232695 0,229650 0,226627 0,223627 0,220650 0,217695 0,214764
0,8 0,211855 0,208970 0,206108 0,203269 0,200454 0,197662 0,194894 0,192150 0,189430 0,186733
0,9 0,184060 0,181411 0,178786 0,176186 0,173609 0,171056 0,168528 0,166023 0,163543 0,161087
1,0 0,158655 0,156248 0,153864 0,151505 0,149170 0,146859 0,144572 0,142310 0,140071 0,137857
1,1 0,135666 0,133500 0,131357 0,129238 0,127143 0,125072 0,123024 0,121001 0,119000 0,117023
1,2 0,115070 0,113140 0,111233 0,109349 0,107488 0,105650 0,103835 0,102042 0,100273 0,098525
1,3 0,096801 0,095098 0,093418 0,091759 0,090123 0,088508 0,086915 0,085344 0,083793 0,082264
1,4 0,080757 0,079270 0,077804 0,076359 0,074934 0,073529 0,072145 0,070781 0,069437 0,068112
1,5 0,066807 0,065522 0,064256 0,063008 0,061780 0,060571 0,059380 0,058208 0,057053 0,055917
1,6 0,054799 0,053699 0,052616 0,051551 0,050503 0,049471 0,048457 0,047460 0,046479 0,045514
1,7 0,044565 0,043633 0,042716 0,041815 0,040929 0,040059 0,039204 0,038364 0,037538 0,036727
1,8 0,035930 0,035148 0,034379 0,033625 0,032884 0,032157 0,031443 0,030742 0,030054 0,029379
1,9 0,028716 0,028067 0,027429 0,026803 0,026190 0,025588 0,024998 0,024419 0,023852 0,023295
2,0 0,022750 0,022216 0,021692 0,021178 0,020675 0,020182 0,019699 0,019226 0,018763 0,018309
2,1 0,017864 0,017429 0,017003 0,016586 0,016177 0,015778 0,015386 0,015003 0,014629 0,014262
2,2 0,013903 0,013553 0,013209 0,012874 0,012545 0,012224 0,011911 0,011604 0,011304 0,011011
2,3 0,010724 0,010444 0,010170 0,009903 0,009642 0,009387 0,009137 0,008894 0,008656 0,008424
2,4 0,008198 0,007976 0,007760 0,007549 0,007344 0,007143 0,006947 0,006756 0,006569 0,006387
2,5 0,006210 0,006037 0,005868 0,005703 0,005543 0,005386 0,005234 0,005085 0,004940 0,004799
2,6 0,004661 0,004527 0,004397 0,004269 0,004145 0,004025 0,003907 0,003793 0,003681 0,003573
2,7 0,003467 0,003364 0,003264 0,003167 0,003072 0,002980 0,002890 0,002803 0,002718 0,002635
2,8 0,002555 0,002477 0,002401 0,002327 0,002256 0,002186 0,002118 0,002052 0,001988 0,001926
2,9 0,001866 0,001807 0,001750 0,001695 0,001641 0,001589 0,001538 0,001489 0,001441 0,001395
3,0not be 1,350E-03
These slides can reproduced or distributed without permission in writing from the author. 110
Other Table of
standard
normal distribution

Other Tables, in addition


to that of the previous
slide, can be used for the
tabulation of the standard
normal distribution.
The format shown on the
left is very common, too.

We must pay attention


to the kind of Table used:
we have only
to think for a moment !

These slides can not be reproduced or distributed without permission in writing from the author. 111
2.2.9.2. STANDARD normal distribution

Let see how to use the


Standard normal distribution
( with mean m = 0 and standard deviation s = 1 )

for a specific normal distribution

with mean m = 30

and standard deviation s = 5

These slides can not be reproduced or distributed without permission in writing from the author. 112
x - mx - 30
z = ---------- = -----------
s 5

m=0
z
-4 -3 -2 -1 0 1 2 3 4

m = 30 s=5
x
15 20 25 30 35 40 45
These slides can not be reproduced or distributed without permission in writing from the author. 113
2.2.9.2. STANDARD normal distribution

Now, let us suppose to have an


Upper Tolerance Limit = 42

These slides can not be reproduced or distributed without permission in writing from the author. 114
In a specific normal distribu-
tion, the distance between the
mean and a set limit, expressed in
standard deviation units z, in
order to refer to standard normal

Upper Tolerance Limit


distribution, is given by: 42 - 30
x-m z = ------------ = 2.4
z = ----------- 5
s

m=0
z
-4 -3 -2 -1 0 1 2 3 4

m = 30 s=5
15 20 25 30 35 40 45
42
These slides can not be reproduced or distributed without permission in writing from the author. 115
2.2.9.2. STANDARD normal distribution
Table of standard
normal distribution z
1-F(z)

z 0,00 0,01 0,02 0,03 0,04 0,05 0,06 0,07 0,08 0,09
0,0 0,500000 0,496011 0,492022 0,488033 0,484047 0,480061 0,476078 0,472097 0,468119 0,464144
0,1 0,460172 0,456205 0,452242 0,448283 0,444330 0,440382 0,436441 0,432505 0,428576 0,424655
0,2 0,420740 0,416834 0,412936 0,409046 0,405165 0,401294 0,397432 0,393580 0,389739 0,385908
0,3 0,382089 0,378281 0,374484 0,370700 0,366928 0,363169 0,359424 0,355691 0,351973 0,348268
0,4 0,344578 0,340903 0,337243 0,333598 0,329969 0,326355 0,322758 0,319178 0,315614 0,312067
0,5 0,308538 0,305026 0,301532 0,298056 0,294598 0,291160 0,287740 0,284339 0,280957 0,277595
0,6 0,274253 0,270931 0,267629 0,264347 0,261086 0,257846 0,254627 0,251429 0,248252 0,245097
0,7 0,241964 0,238852 0,235762 0,232695 0,229650 0,226627 0,223627 0,220650 0,217695 0,214764
0,8 0,211855 0,208970 0,206108 0,203269 0,200454 0,197662 0,194894 0,192150 0,189430 0,186733
0,9 0,184060 0,181411 0,178786 0,176186 0,173609 0,171056 0,168528 0,166023 0,163543 0,161087
1,0 0,158655 0,156248 0,153864 0,151505 0,149170 0,146859 0,144572 0,142310 0,140071 0,137857
1,1 0,135666 0,133500 0,131357 0,129238 0,127143 0,125072 0,123024 0,121001 0,119000 0,117023
1,2 0,115070 0,113140 0,111233 0,109349 0,107488 0,105650 0,103835 0,102042 0,100273 0,098525
1,3 0,096801 0,095098 0,093418 0,091759 0,090123 0,088508 0,086915 0,085344 0,083793 0,082264
1,4 0,080757 0,079270 0,077804 0,076359 0,074934 0,073529 0,072145 0,070781 0,069437 0,068112
1,5 0,066807 0,065522 0,064256 0,063008 0,061780 0,060571 0,059380 0,058208 0,057053 0,055917
1,6 0,054799 0,053699 0,052616 0,051551 0,050503 0,049471 0,048457 0,047460 0,046479 0,045514
1,7
1,8
0,044565
0,035930
0,043633
0,035148
2,4
0,042716
0,034379
0,041815
0,033625
0,008198
0,040929
0,032884
0,040059
0,032157
0,039204
0,031443
0,038364
0,030742
0,037538
0,030054
0,036727
0,029379
1,9 0,028716 0,028067 0,027429 0,026803 0,026190 0,025588 0,024998 0,024419 0,023852 0,023295
2,0 0,022750 0,022216 0,021692 0,021178 0,020675 0,020182 0,019699 0,019226 0,018763 0,018309
2,1 0,017864 0,017429 0,017003 0,016586 0,016177 0,015778 0,015386 0,015003 0,014629 0,014262
2,2 0,013903 0,013553 0,013209 0,012874 0,012545 0,012224 0,011911 0,011604 0,011304 0,011011
2,3 0,010724 0,010444 0,010170 0,009903 0,009642 0,009387 0,009137 0,008894 0,008656 0,008424
2,4 0,008198 0,007976 0,007760 0,007549 0,007344 0,007143 0,006947 0,006756 0,006569 0,006387
2,5 0,006210 0,006037 0,005868 0,005703 0,005543 0,005386 0,005234 0,005085 0,004940 0,004799
2,6 0,004661 0,004527 0,004397 0,004269 0,004145 0,004025 0,003907 0,003793 0,003681 0,003573
2,7 0,003467 0,003364 0,003264 0,003167 0,003072 0,002980 0,002890 0,002803 0,002718 0,002635
2,8 0,002555 0,002477 0,002401 0,002327 0,002256 0,002186 0,002118 0,002052 0,001988 0,001926
2,9 0,001866 0,001807 0,001750 0,001695 0,001641 0,001589 0,001538 0,001489 0,001441 0,001395
3,0not be 1,350E-03
These slides can reproduced or distributed without permission in writing from the author. 116
2.2.9. Gauss Normal Distribution

2.2.9.3
Classical applications

These slides can not be reproduced or distributed without permission in writing from the author. 117
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS

Classical applications of normal distribution are


essentially of two kinds:

 to find the percentage of population’s elements with


a value of the investigated characteristic greater (or
lower) than a set limit zlim, i.e. the “tail” of the distri-
bution beyond zlim: this is called direct approach;

 to determine the limit value zlim, which leaves on its


right (or on its left) a set percentage of popula-
tion’s elements: this is called inverse approach.

These slides can not be reproduced or distributed without permission in writing from the author. 118
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS
The steps listed below are usually followed:
 calculation of data mean and standard deviation;
 constructing the histogram and superimposing a
normal distribution with the data mean and standard
deviation: if we see that a normal distribution can not
reasonably interpolate the data, we must:
• apply another interpolating function, e.g. a Weibull function
(see next Chapter);
• if there is not a satisfactory interpolating function, we can
interpolate manually on the histogram (graphical interpolation).
 calculation of the percentage corresponding to the
distribution tail or to the zlim value, according to the
request; we can do that in two ways:
• by using TABLES;
• by using EXCEL functions.
These slides can not be reproduced or distributed without permission in writing from the author. 119
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS

EXERCISE
typical problem of risk assessment

A machine is programmed to fill cans "8 hectograms net"


of coffee with a mean of 8.1 hg.
We know from experience that the weight distribution is
roughly normal with a standard deviation s of 8 grams.
What percentage of cans can be expected to contain less
than 8 hg net, as required ?

These slides can not be reproduced or distributed without permission in writing from the author. 120
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS
First of all, let us calculate the distance z,
measured by units of standard deviations s(= 8 gr = 0.08 hg),
of the limit value (8.00 hg) from the mean (8.10 hg).
8.00 - 8.10
z = ---------------- = - 1.25
0.08

-4 -3 -2 -1 0 1 2 3 4
8,1 hg
8,0 hg

Now we have to find the tail area on the left of the 8.0 hg limit, e.g. by
using the standard normal distribution Table.
These slides can not be reproduced or distributed without permission in writing from the author. 121
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS
Table of standard
normal distribution z
1-F(z)

z 0,00 0,01 0,02 0,03 0,04 0,05 0,06 0,07 0,08 0,09
0,0 0,500000 0,496011 0,492022 0,488033 0,484047 0,480061 0,476078 0,472097 0,468119 0,464144
0,1 0,460172 0,456205 0,452242 0,448283 0,444330 0,440382 0,436441 0,432505 0,428576 0,424655
0,2 0,420740 0,416834 0,412936 0,409046 0,405165 0,401294 0,397432 0,393580 0,389739 0,385908
0,3 0,382089 0,378281 0,374484 0,370700 0,366928 0,363169 0,359424 0,355691 0,351973 0,348268
0,4 0,344578 0,340903 0,337243 0,333598 0,329969 0,326355 0,322758 0,319178 0,315614 0,312067
0,5 0,308538 0,305026 0,301532 0,298056 0,294598 0,291160 0,287740 0,284339 0,280957 0,277595
0,6 0,274253 0,270931 0,267629 0,264347 0,261086 0,257846 0,254627 0,251429 0,248252 0,245097
0,7 0,241964 0,238852 0,235762 0,232695 0,229650 0,226627 0,223627 0,220650 0,217695 0,214764
0,8 0,211855 0,208970 0,206108 0,203269 0,200454 0,197662 0,194894 0,192150 0,189430 0,186733
0,9 0,184060 0,181411 0,178786 0,176186 0,173609 0,171056 0,168528 0,166023 0,163543 0,161087
1,0 0,158655 0,156248 0,153864 0,151505 0,149170 0,146859 0,144572 0,142310 0,140071 0,137857
1,1 0,135666 0,133500 0,131357 0,129238 0,127143 0,125072 0,123024 0,121001 0,119000 0,117023
1,2 0,115070 0,113140 0,111233 0,109349 0,107488 0,105650 0,103835 0,102042 0,100273 0,098525
1,3 0,096801 0,095098 0,093418 0,091759 0,090123 0,088508 0,086915 0,085344 0,083793 0,082264
1,4 0,080757 0,079270 0,077804 0,076359 0,074934 0,073529 0,072145 0,070781 0,069437 0,068112
1,5 0,066807 0,065522 0,064256 0,063008 0,061780 0,060571 0,059380 0,058208 0,057053 0,055917
1,6 0,054799 0,053699 0,052616 0,051551 0,050503 0,049471 0,048457 0,047460 0,046479 0,045514
1,7 0,044565 0,043633 0,042716 0,041815 0,040929 0,040059 0,039204 0,038364 0,037538 0,036727
1,8 0,035930 0,035148 0,034379 0,033625 0,032884 0,032157 0,031443 0,030742 0,030054 0,029379
1,9 0,028716 0,028067 0,027429 0,026803 0,026190 0,025588 0,024998 0,024419 0,023852 0,023295
2,0 0,022750 0,022216 0,021692 0,021178 0,020675 0,020182 0,019699 0,019226 0,018763 0,018309
2,1 0,017864 0,017429 0,017003 0,016586 0,016177 0,015778 0,015386 0,015003 0,014629 0,014262
2,2 0,013903 0,013553 0,013209 0,012874 0,012545 0,012224 0,011911 0,011604 0,011304 0,011011
2,3 0,010724 0,010444 0,010170 0,009903 0,009642 0,009387 0,009137 0,008894 0,008656 0,008424
2,4 0,008198 0,007976 0,007760 0,007549 0,007344 0,007143 0,006947 0,006756 0,006569 0,006387
2,5 0,006210 0,006037 0,005868 0,005703 0,005543 0,005386 0,005234 0,005085 0,004940 0,004799
2,6 0,004661 0,004527 0,004397 0,004269 0,004145 0,004025 0,003907 0,003793 0,003681 0,003573
2,7 0,003467 0,003364 0,003264 0,003167 0,003072 0,002980 0,002890 0,002803 0,002718 0,002635
2,8 0,002555 0,002477 0,002401 0,002327 0,002256 0,002186 0,002118 0,002052 0,001988 0,001926
2,9 0,001866 0,001807 0,001750 0,001695 0,001641 0,001589 0,001538 0,001489 0,001441 0,001395
3,0not be 1,350E-03
These slides can reproduced or distributed without permission in writing from the author. 122
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS

As standard normal distribution is symmetrical


the tail before z = - 1.25 is equal to the tail after z = 1.25.

The tail area is 0.10565:


this means that more than 10.5% of cans
is under the nominal weight.

We could get the same result,


without using the transformation into the variable z,
by using EXCEL.

These slides can not be reproduced or distributed without permission in writing from the author. 123
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS

It remains the problem that most likely


it can not be accepted that
more than 10.5% of cans are underweight.

But this result is not so surprising,


because standard deviation (0.08 hg) is too large
as of the same order
of the interval (0.10 hg) between the mean and the limit.
So, what to do ?
1. either we increase the mean,
2. or we reduce the standard deviation (i.e. the pro-
cess capability).

The choice depends on the involved costs.


These slides can not be reproduced or distributed without permission in writing from the author. 124
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS

If we suppose to accept
no more than 2% of underweight cans,
we can ask:
• which value must have the mean, m, if we do not
change the current standard deviation (i.e. if we
keep the existing production process as it is) ?
• which value must have the standard deviation, s,
if we do not change the current mean (i.e. if we
keep the current margin from the limit) ?

Let us use the


standard normal distribution Table
in a reverse way respect what we did before
and let’s extract the value of z
corresponding to (the nearest to) a tail of 2% (= 0.02).
These slides can not be reproduced or distributed without permission in writing from the author. 125
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS
Table of standard
normal distribution z
1-F(z)

z 0,00 0,01 0,02 0,03 0,04 0,05 0,06 0,07 0,08 0,09
0,0 0,500000 0,496011 0,492022 0,488033 0,484047 0,480061 0,476078 0,472097 0,468119 0,464144
0,1 0,460172 0,456205 0,452242 0,448283 0,444330 0,440382 0,436441 0,432505 0,428576 0,424655
0,2 0,420740 0,416834 0,412936 0,409046 0,405165 0,401294 0,397432 0,393580 0,389739 0,385908
0,3 0,382089 0,378281 0,374484 0,370700 0,366928 0,363169 0,359424 0,355691 0,351973 0,348268
0,4 0,344578 0,340903 0,337243 0,333598 0,329969 0,326355 0,322758 0,319178 0,315614 0,312067
0,5 0,308538 0,305026 0,301532 0,298056 0,294598 0,291160 0,287740 0,284339 0,280957 0,277595
0,6 0,274253 0,270931 0,267629 0,264347 0,261086 0,257846 0,254627 0,251429 0,248252 0,245097
0,7 0,241964 0,238852 0,235762 0,232695 0,229650 0,226627 0,223627 0,220650 0,217695 0,214764
0,8 0,211855 0,208970 0,206108 0,203269 0,200454 0,197662 0,194894 0,192150 0,189430 0,186733
0,9 0,184060 0,181411 0,178786 0,176186 0,173609 0,171056 0,168528 0,166023 0,163543 0,161087
1,0 0,158655 0,156248 0,153864 0,151505 0,149170 0,146859 0,144572 0,142310 0,140071 0,137857
1,1 0,135666 0,133500 0,131357 0,129238 0,127143 0,125072 0,123024 0,121001 0,119000 0,117023
1,2 0,115070 0,113140 0,111233 0,109349 0,107488 0,105650 0,103835 0,102042 0,100273 0,098525
1,3 0,096801 0,095098 0,093418 0,091759 0,090123 0,088508 0,086915 0,085344 0,083793 0,082264
1,4 0,080757 0,079270 0,077804 0,076359 0,074934 0,073529 0,072145 0,070781 0,069437 0,068112
1,5 0,066807 0,065522 0,064256 0,063008 0,061780 0,060571 0,059380 0,058208 0,057053 0,055917
1,6 0,054799 0,053699 0,052616 0,051551 0,050503 0,049471 0,048457 0,047460 0,046479 0,045514
1,7 0,044565 0,043633 0,042716 0,041815 0,040929 0,040059 0,039204 0,038364 0,037538 0,036727
1,8 0,035930 0,035148 0,034379 0,033625 0,032884 0,032157 0,031443 0,030742 0,030054 0,029379
1,9 0,028716 0,028067 0,027429 0,026803 0,026190 0,025588 0,024998 0,024419 0,023852 0,023295
2,0 0,022750 0,022216 0,021692 0,021178 0,020675 0,020182 0,019699 0,019226 0,018763 0,018309
2,1 0,017864 0,017429 0,017003 0,016586 0,016177 0,015778 0,015386 0,015003 0,014629 0,014262
2,2 0,013903 0,013553 0,013209 0,012874 0,012545 0,012224 0,011911 0,011604 0,011304 0,011011
2,3 0,010724 0,010444 0,010170 0,009903 0,009642 0,009387 0,009137 0,008894 0,008656 0,008424
2,4 0,008198 0,007976 0,007760 0,007549 0,007344 0,007143 0,006947 0,006756 0,006569 0,006387
2,5 0,006210 0,006037 0,005868 0,005703 0,005543 0,005386 0,005234 0,005085 0,004940 0,004799
2,6 0,004661 0,004527 0,004397 0,004269 0,004145 0,004025 0,003907 0,003793 0,003681 0,003573
2,7 0,003467 0,003364 0,003264 0,003167 0,003072 0,002980 0,002890 0,002803 0,002718 0,002635
2,8 0,002555 0,002477 0,002401 0,002327 0,002256 0,002186 0,002118 0,002052 0,001988 0,001926
2,9 0,001866 0,001807 0,001750 0,001695 0,001641 0,001589 0,001538 0,001489 0,001441 0,001395
3,0not be 1,350E-03
These slides can reproduced or distributed without permission in writing from the author. 126
2.2.9.3. Gauss Normal Distribution: CLASSICAL APPLICATIONS
Accepting
(to avoid interpolation, even if we could use EXCEL)
a percentage of underweight cans equal to 2.018%
(instead of the target equal to 2.00%),
we obtain: z = 2.05, which becomes z = - 2.05 to take into
account that the limit is lower than the mean
(and therefore on its left).
zlim - m
From: z = --------------- = - 2.05
s
Applying the formula in the reverse way, we get:
1) m = 8.00 + (2.05 . 0.08) = 8.164 hg
2) s = (8.00 - 8.10) / (-2.05) = 0.04878 hg = 4.88 gr
These slides can not be reproduced or distributed without permission in writing from the author. 127
2.2.9. Gauss Normal Distribution

2.2.9.4
Normal Probability Plot
(NPP)

These slides can not be reproduced or distributed without permission in writing from the author. 128
2.2.9.4. Gauss Normal Distribution: NPP

At this point, a question which could arise is:

 Measured data can be reasonably interpolated by a nor-


mal distribution?
 Or, from a more general point of view: when can we say that
experimental data follow, at least roughly, a normal distri-
bution ?
 Or simply: if we have some good reasons to think that the
elements of a certain population follow a specific distribu-
tion, is it possible to determine if this hypothesis is sub-
stantially confirmed or repudiated by examining a sample
of the population ?

These slides can not be reproduced or distributed without permission in writing from the author. 129
2.2.9.4. Gauss Normal Distribution: NPP

Besides the histogram symmetry visual-check,


a quick way,
to determine whether the data are distributed
symmetrically (normal distribution)
or not (non-normal distribution)
is
to compare the values of mean and median:
if the difference (in % of the mean)
is greater than 5%(÷10%),
it is better to refuse the idea
that they follow a normal distribution.
These slides can not be reproduced or distributed without permission in writing from the author. 130
2.2.9.4. Gauss Normal Distribution: NPP
To answer to the question in a more precise way, we can think to compare, on
a histogram with side by side bars (Paired Column Histogram), the distribution
of experimental data with a theoretical distribution. For example:
DIAMETER MEASUREMENTS OF 80 ROLLS PRODUCED BY A LATHE
EXPECTED NUMBER OF ELEMENTS
ACCORDING TO A NORMAL DISTRIBUTION
Expected frequencies
C l a s s e s SAMPLE ELEMENTS C a l c u l a t i o n s
(difference between the two previous column)
from -∞ to from -∞ to
Low limit Upper limit Center n° (histogram) % cum. % (NPP) n° (histogram) % cum. % (NPP)
lower limit upper limit
4,775 4,825 4,80 0 0,00% 0,00% 0,000146 0,012702 0,01 0,02% 0,02%
4,825 4,875 4,85 1 1,25% 1,25% 0,012702 0,405509 0,39 0,49% 0,51%
4,875 4,925 4,90 3 3,75% 5,00% 0,405509 4,926950 4,52 5,65% 6,16%
4,925 4,975 4,95 21 26,25% 31,25% 4,926950 24,343850 19,42 24,27% 30,43%
4,975 5,025 5,00 30 37,50% 68,75% 24,343850 55,805807 31,46 39,33% 69,76%
5,025 5,075 5,05 22 27,50% 96,25% 55,805807 75,124905 19,32 24,15% 93,91%
5,075 5,125 5,10 2 2,50% 98,75% 75,124905 79,600717 4,48 5,59% 99,50%
5,125 5,175 5,15 1 1,25% 100,00% 79,600717 79,987557 0,39 0,48% 99,98%
5,175 5,225 5,20 0 0,00% 100,00% 79,987557 79,999857 0,01 0,02% 100,00%
Total 80 100,00% 80,00 100,00%
Mean 4,99987
Standard Deviation 0,0485668

Near to the columns with experimental frequencies,


we add other columns with “expected” frequencies,
(assuming a normal distribution).

The height of the histogram columns can be evaluated


by a standard normal distribution Table or by using EXCEL.

These slides can not be reproduced or distributed without permission in writing from the author. 131
2.2.9.4. Gauss Normal Distribution: NPP
DIAMETER MEASUREMENTS OF 80 ROLLS PRODUCED BY A LATHE
comparison with expected values from a normal distribution
35

31,5
Paired columns 30 Measured values
30 graph Expected values
Number of rolls in each class

25
22
21
20
19,4 19,3

15

10

4,5 4,5
5
3
2
1 0,4 1
0 0,0 0,4 0 0,0
0
4,80 4,85 4,90 4,95 5,00 5,05 5,10 5,15 5,20

Diameter [mm]

We can immediately perceive that the patterns of the two series of columns are similar,
So we can reasonably think that rolls diameters are producing according to a normal distribution
(with some uncertainty about the tails) .
These slides can not be reproduced or distributed without permission in writing from the author. 132
2.2.9.4. Gauss Normal Distribution: NPP
In order to answer to
these questions, we
can also use another
graphical method,
but more refined
than just observing
the columns of a
histogram. This is
the Normal
Probability Plot
(NPP).
The NPP construction
consists of transfor-
ming the cumulative
normal distribution
function into a straight We can choose the straight line as
line, as shown on the we prefer (better if around 45°)
right.
These slides can not be reproduced or distributed without permission in writing from the author. 133
2.2.9.4. Gauss Normal Distribution: NPP

How to build a Normal Probability Plot:

 Start from the normal cumulative distribution curve


 Then apply the same linear abscissa scale,
 then establish a suitable ordinates scale, deformed so that the cu-
mulative curve of the normal distribution becomes a straight line (of
whatever slope) in this graph.
 On the same graph, we put the points of the actual cumulative distri-
bution (corresponding to the upper limit of each class).
 To decide if the experimental data distribution corresponds to the normal
distribution, it is enough to verify (subjective advice) that the points of the
actual cumulative distribution are aligned with the straight line which re-
presents the (best fitting) normal distribution.
 Note that the same procedure can be also applied to theoretical distribu-
tions other than normal.
These slides can not be reproduced or distributed without permission in writing from the author. 134
In our example, we see that
experimental points deviate
little from the straight line
which represents the nor-
mal distribution.
All in all, the visual exami-
nation could be considered
successful.
As happens in most cases,
the greatest differences
concern the starting and
ending points, but these are
the most important (for the
estimation of defectives per-
4.825 4.875 4.925 4.975 5.025 5.075 5.125 5.175 5.225
centage).
These slides can not be reproduced or distributed without permission in writing from the author. 135
136

Sheet of Normal Probability Paper (NPP)


2.2.9.4. Gauss Normal Distribution: NPP

These slides can not be reproduced or distributed without permission in writing from the author.
The word probit (“probability unit”) indicates the random variable:
Z-m
Y = ---------- + 5
s
where Z is a random variable normally distributed with mean m and standard
deviation s. Values transformed as probit are interesting because it is im-
possible that Y variable get negative values. Besides they are a helpful
reference in the graphical construction of the NPP chart.
2.2.9. Gauss Normal Distribution

2.2.9.5
Limits
of Gauss normal distribution

These slides can not be reproduced or distributed without permission in writing from the author. 137
2.2.9.4. Gauss Normal Distribution: LIMITS

Because of its symmetrical bell shape, normal distribution is unfit to re-


present not symmetrical phenomena.

For example, as noted above, the distribution of the heights of a population,


including children too, is not symmetrical, because it is limited on the left
by the zero value (a child can not have a negative height), while theoreti-
cally it does not have a limit on the right (is not inconceivable that we can
find, maybe in a circus, a man even taller than 2.30 meters).

On the opposite, if we limit to consider a sample of male adult people,


their height distribution can be well approximated by a normal
distribution, because it is a more homogeneous population. This is
evidenced by having a standard deviation much smaller than the
distance of its mean from the zero value.

These slides can not be reproduced or distributed without permission in writing from the author. 138
2.2.9.4. Gauss Normal Distribution: LIMITS

Adult males
0,045
(only)
Maschi adulti
mean = 171 cm
0,040 (soltanto)
approximately
media = 171 cm
normal
distribuzione
0,035
DI PROBABILITÀ

distribution
normale
DENSITY

0,030

0,025
FREQUENCY

WholePopolazione
population
0,020
completa
(children included)
DENSITÀ

(inclusi
mean bambini)
= 147 cm
0,015
media = 147 cm
non-normal
distribuzione
distribution
0,010 non-normale

0,005

0,000
0 20 40 60 80 100 120 140 160 180 200 220 240
HEIGHTs [cm]
ALTEZZE [cm]

These slides can not be reproduced or distributed without permission in writing from the author. 139
2.2.9.4. Gauss Normal Distribution: LIMITS

ADDITIONAL COMMENTS

 Surely the best interpolating distribution among those available from


Statistics is not always the normal distribution, which, in some cases,
can lead to unacceptable results.
 Moreover, not always the best interpolating curve among all normal di-
stributions is the one having the same mean and the same standard
deviation of data (we shall see later that, as an alternative to this me-
thod called Parametric Method, there is also the Maximum Likelihood
Estimation Method).

For example, the dotted normal distribution of the next slide has
been obtained:
 requiring that the mean is equal to the mode of the actual distribution
 and roughly optimizing standard deviation (assumed equal to 1.58
times the standard deviation of only males, which is equal to 9 cm).

These slides can not be reproduced or distributed without permission in writing from the author. 140
2.2.9.4. Gauss Normal Distribution: LIMITS

LIMITI DELLA DISTRIBUZIONE NORMALE


0,030

Normale with:
Normal distribution con : Popolazione
mean =media
mode =ofmoda popolazione
the whole completa
population
Non-normal
0,025 . completa
distribution
scarto
and standard tipo ==1,58
deviation 1.58quello deistd.
(males "maschi"
dev.)
DI PROBABILITÀ

(inclusi
on bambini)
the heights of
DENSITY

mediawomen
men, = 147 cm
and
0,020
children (already
distribuzione
discussed)
non-normale
FREQUENCY

0,015 Normale con


Normal distribution :
with
media e scarto tipo
mean and standard deviation
uguali a quelli della
DENSITÀ

of the whole population


popolazione completa
0,010

0,005

0,000
0 20 40 60 80 100 120 140 160 180 200 220 240

ALTEZZE [cm]
HEIGHT [cm]

These slides can not be reproduced or distributed without permission in writing from the author. 141
2.2. Descriptive Statistics

2.2.10
Limits
of Descriptive Statistics
“estimations”

These slides can not be reproduced or distributed without permission in writing from the author. 142
2.2.10. Limits of Descriptive Statistics “estimations”

Deductions developed in the above applications, used as


“estimations”, have two big limitations: a micro one and
macro one:
 MICRO-LIMITATION. Results have been obtained by interpolating
(by a continuous distribution) a histogram built on measured data.
• We do not have any problem if these data concern a whole po-
pulation (which does not change with time).
• But, in most cases, we tend to attribute these results, although
approximatively, to different populations (e.g., we measure data of
current month production and we want to predict next month
production). In these situations, we must remember that collected
data are a sample of the ideal population to be investigated. So that,
by extracting another sample, even in "nominally equal” conditions,
we would have some differences in the histogram, in the
interpolating distribution and in the final results (this kind of problem
will be addressed in the Chapter about INFERENTIAL STATISTICS).

These slides can not be reproduced or distributed without permission in writing from the author. 143
2.2.10. Limits of Descriptive Statistics “estimations”

 MACRO-LIMITATION. These “estimations” can be correct


only if operative conditions do not change.
Note that we can say the same thing about the estimates in the Chapter
on Inferential Statistics (to be discussed later).

For example, a restaurant specializing in "T-bone steaks” can


collect for a year, the number of steak requested on Sunday
night and build a histogram to evaluate the optimal amount of
steaks to be purchased on the day before. If a new "pizzeria" or
another restaurant opens in the surroundings, this may modify
the market scenario and so the customer behaviors, so the
results obtained from that histogram would loose their meaning.

This is the affliction of the futurologists.

These slides can not be reproduced or distributed without permission in writing from the author. 144
2. Fundamentals of Applied Statistics

2.3
P R O B A B I L I T Y
T H E O R Y

These slides can not be reproduced or distributed without permission in writing from the author. 145
2.3. Probability Theory

2.3.1
Sampling

These slides can not be reproduced or distributed without permission in writing from the author. 146
2.3.1. Sampling

We’ve seen that is rarely possible measure all elements of a


population, for example because:

 population is infinite, or it includes also a future production,


 measurements require destructive tests,
 measurements involve high cost and/or time.

In these situations, it is required to examine only a “sample”


of the population and to deduce from it an “estimation” of the
true parameters of the population, whose true values will be
always unknown.
Statistics helps to assess the imprecision or “error” of such
estimation.

These slides can not be reproduced or distributed without permission in writing from the author. 147
2.3.1. Sampling
MAIN CATEGORIES OF SAMPLING
 Random: every population element has an equal chance of being part of
the sample.
 Systematic: it is selected an item every n (it is practical in the production
processes, but we must pay great attention to any phenomenon which
may occur at regular intervals).
 Stratified: having identified a stratification criterion, the elements of the
sample will be drawn randomly from the different “strata”, in the same pro-
portion in which they appear in the whole population. For example, if we want
to determine the mean weight of an adult population composed 55% of women and
45% of men, as we know that women are lighter than men, we will obtain a better
efficiency if we choose a random sample (but) with the bond to have 55% of women
and 45% of men.
 In bunches: we divide the population in many sub-populations (without in-
tersections), according to a determined criterion (e.g.: different geographic
zones). These sub-populations can be regarded as similar to the berries of a
bunch of grapes (which represents the full set); we will choose randomly
only some berries in which to carry our investigation (the others will be ex-
cluded from sampling).
These slides can not be reproduced or distributed without permission in writing from the author. 148
2.3.1. Sampling

Random sampling

Population Sample Rule

x x x x Each population
element has an equal
x x x xxxx
x x chance of being
x selected as part of
x x x
x the sample.
x

 Random: The casual choice avoids that the sample would be


chosen to form a pre-determined group.

These slides can not be reproduced or distributed without permission in writing from the author. 149
2.3.1. Sampling

Random sampling

In practice it is not so easy to obtain that “every element of


the population has the same probability of the others to
became part of the sample”.

We can resort to :
 cards in a hat well shuffled before the drawing;
 random numbers Tables: see next slide;
 generation of random numbers by a software (e.g.
EXCEL);
 others …..

These slides can not be reproduced or distributed without permission in writing from the author. 150
2.3.1. Sampling
Extract of RANDOM NUMBERS TABLES A random numbers Table is
composed of many pages, in
which digits from 0 to 9 are
printed in a random way (as if
every digit has the same pro-
bability to be drawn).
Example of use - We want to
randomly extract 20 engineers
of 600 members of the Engi-
neering Association of a coun-
try. At every Engineer we can
associate a number of 3 digit
from 001 to 600. On the ran-
dom numbers Table, we arbi-
trarily choose a page, a row
and three columns from which
we start to read and select the
numbers (of 3 digits), going
from the top to the bottom (or
vice versa). Of course we ex-
clude numbers greater than
600 and repeated values.
These slides can not be reproduced or distributed without permission in writing from the author. 151
2.3.1. Sampling

Stratified (Random) sampling


Population Sample Rule

A B B
A B B B The sample is
A A B B B random and
AABBBBCDDD
C D D proportional to each
C D group
D D
D

 Stratified: having identified a stratification criterion, the elements of the


sample will be drawn randomly from the different “groups”, in the same pro-
portion in which they appear in the whole population. For example, if we want
to determine the mean weight of an adult population composed 55% of women and
45% of men, as we know that women are lighter than men, we will obtain a better
efficiency if we choose a random sample (but) with the bond to have 55% of women
and 45% of men.

These slides can not be reproduced or distributed without permission in writing from the author. 152
2.3.1. Sampling

Systematic sampling

Population
or process Sample Rule

Select 1 item every n


x x x x xx
(e.g. 3) elements

 Systematic: select units according to rules defined on the basis of


process knowledge and the sample size. Such a system ensures the
sample is representative of the process (e.g. production process) which
can vary during time.
 Great attention is required to any phenomenon which may occur at
regular intervals.

These slides can not be reproduced or distributed without permission in writing from the author. 153
2.3.1. Sampling

Systematic sampling

If the sampling period


is equal to this one,
Diameters of rolls
as they are lathed

we risk to find
always equal value items

Period (n° of items)


of machine reset/retooling

Systematic sampling must be performed with a sampling frequency


different from the period of machine reset/retooling.

These slides can not be reproduced or distributed without permission in writing from the author. 154
2.3.1. Sampling

Sampling by subgroups
Process Sample Rule

9.00 9.30 10.00 10.30 Select k units


xxxxx xxxxx xxxxx xxxxx x x every time
interval; calculate
the mean per
Keep the each subgroup
time
sequence

 By subgroups: applied for high-volume processes:


 To define the proper subgroup size (k), select a time period
during which you think variability is due only to common
causes

These slides can not be reproduced or distributed without permission in writing from the author. 155
2.3.1. Sampling

In bunches sampling

 In bunches: we divide the population in


many sub-populations (without intersec-
tions), according to a determined crite-
rion (e.g.: different geographic zones).
These sub-populations can be regarded
as similar to the berries of a bunch of
grapes (which represents the full set);
we will choose randomly only some
berries in which to carry our investiga-
tion (the others will be excluded from
sampling).
 For its cheapness, this is the most fre-
quently used method in market surveys,
exit polls, etc ..

These slides can not be reproduced or distributed without permission in writing from the author. 156
2.3.1. Sampling

“Representativeness” of the sample


The sample is representative if it describes adequately
the population from which it was extracted:

Are such samples


“representative” ?

NO NO YES

We can not exclude the possibility of drawing


an unrepresentative sample.
These slides can not be reproduced or distributed without permission in writing from the author. 157
2.3. Probability Theory

2.3.2
Basic
definitions and relationships
about probability

These slides can not be reproduced or distributed without permission in writing from the author. 158
2.3.2. Basic definitions and relationships about probability

2.3.2.1
Probability definitions

These slides can not be reproduced or distributed without permission in writing from the author. 159
2.3.2.1. Probability definitions

There are essentially 4 different ways


to define the probability:

1. Classical
2. Frequentist
3. Axiomatic
4. Bayesian

These slides can not be reproduced or distributed without permission in writing from the author. 160
2.3.2.1. Probability definitions

1. CLASSICAL probability definition


(from “Game theory”)
number of events considered as “success”
Probability = total number of possible events

EXAMPLES
Possible
Game Description Values
events
Probability that in a throw tails 1/2  0,5  50%
COIN 2: head or tail. comes out.
DIE 6: each of the Probability that in a throw:
panes num-  pane 5 comes out 1/6  0,167  17%
bered from 1  an even pane comes out 3/6  0,5  50%
to 6.
Probhability to draw from the deck:
DECK OF 54 54: each of the  a JOKER 2/54  0,037  4%
54 cards.  a King
CARDS 4/54  0,074  7%
 a card of value from 7 to 10 16/54  0,296  30%
(with 2 Jokers)
These slides can not be reproduced or distributed without permission in writing from the author. 161
2.3.2.1. Probability definitions
CLASSICAL probability definition
The classical definition needs a clarification: all results
(or alternatives) must be “equally possible”: that means
having equal probability of occurring. We fall into a vicious
circle because equi-probability is a particular case of the sa-
me probability that we want to define.

Classical definition fails when:


 we can not count all possible events (e.g. be-
cause they are infinite); or
 when it is difficult to properly assess the propor-
portion of “successes”: for example, unbalanced
coin or unbalanced die in order to cheat, etc..

These slides can not be reproduced or distributed without permission in writing from the author. 162
2.3.2.1. Probability definitions
2. FREQUENTIST probability definition
“Frequentists” define the probability as the
Ratio between the number of “successes” and the
number of experiments, when the number of
experiments tends to the infinity.

Obviously this is a theoretical definition: “true” probability will re-


main always unknown and can be only “estimated”.
• Classical definition assumes that every possible event has the
same probability to happen.
• But this is no longer true if, for example, the die is unbalanced
so that some panes come out more often than others.
• In these cases, the only way to estimate the (different) probabili-
ties of every pane is to make many throws and to record results.
• Of course: the more the throws, the more accurate the estimate.

These slides can not be reproduced or distributed without permission in writing from the author. 163
2.3.2.1. Probability definitions
FREQUENTIST probability definition
What we said can be written in a mathematical expression as:

nS
P(S) = lim -------
n n

In fact, an experiment can be repeated a large number n of times


as long as you like, but always finite.
So the event’s relative frequency is an experimental quantity, and
we can not apply to it the strictly mathematical concept of limit,
but we must refer to the concept of “statistical regularity”, for
which, increasing the number of experiments, the event’s relative
frequency tends to stabilize around a constant value which is
called event’s probability.

These slides can not be reproduced or distributed without permission in writing from the author. 164
2.3.2.1. Probability definitions
3. AXIOMATIC probability definition
Mathematics states that to apply the probability concept to
calculations, it is enough to accept the following 3 postulates or
axioms (with some simplification):
1) the probability of an event E is a real number, positive or null:
P(E) 0;
2) if S is the “sample space” (or “universal sample space” or
“universe”) of all possible outcomes of an experiment, the
associated probability is 1: P(S) = 1;
3) if A and B are mutually exclusive events, then the probability
that can happen A or B (AB) is equal to the sum of the
individual probabilities of the events A and B:
P(AB) = P(A) + P(B) ;
the above expression can be extended to an infinite set of events
E1, E2, E3, … mutually exclusive.
The definition of mutually exclusive events will be given in the following. Here we
want only to state the few postulates necessary to the Mathematics in order to elabo-
rate the theory.
These slides can not be reproduced or distributed without permission in writing from the author. 165
2.3.2.1. Probability definitions

4. BAYESIAN probability definition

This is a more advanced topic than previous ones, to whom we


want to make a mention, both for its intrinsic importance and
because it can be applied in the reliability prediction of a new
product (see what will be illustrated later on, after the conclusion
of the methods of prediction/prevention, about RELIABILITY
PLANS).

These slides can not be reproduced or distributed without permission in writing from the author. 166
2.3.2.1. Probability definitions
BAYESIAN probability definition

After what we have said about axiomatic definition of probability, it


is clear that, strictly speaking, Probability Theory can be
developed in terms solely mathematics, without the need to give
to the “probability” concept a meaning linked to the physical
phenomena to be investigated with its help.

Consequently, Probability Theory can be associated to different


concepts of probability, provided that these concepts respect the
3 axioms (of the just seen “axiomatic” definition).

(*) The following slides about Bayesian Statistics are taken from the Report: Guida M., Pulcini G. - Elementi
di Inferenza e Decisione Bayesiana (Fundamentals of Bayesian Inference and Decision) - C.N.R. Istituto
Motori (Engines Institute), Naples, November 6th-7th 2000.

These slides can not be reproduced or distributed without permission in writing from the author. 167
2.3.2.1. Probability definitions
BAYESIAN probability definition

The approach of Frequentists, which is the most commonly used,


implies that a certain phenomenon (at least in principle) can be
observed in the same conditions an indefinite number of times so
that the probability assumes the meaning of relative frequency of
occurrence of the events, in the repeated observations of the pheno-
menon.

So if we say that:
• an event is more probable than another one

is the same to say that


• the first event happens more frequently than the other ones
in the repetition of the experiment.

These slides can not be reproduced or distributed without permission in writing from the author. 168
2.3.2.1. Probability definitions
BAYESIAN probability definition

Bayesian School gives a definition of probability aimed to set an


ordered list of trustworthiness among the different hypothesis that we
can do about a certain actual phenomenon.
Of course in a specific actual phenomenon, each hypothesis can be
only or “true” or “false”.
Given a set (exhaustive and mutually exclusive) of hypothesis about
a certain phenomenon, in the Bayesian setting up, the probability as-
sumes the meaning of level of credibility that a coherent subject gi-
ves to the fact that every hypothesis is the true one.
The probability represents a (subjective) measure of credibility that a
hypothesis is true. In this context, we can also speak about the pro-
bability of no repeatable phenomena, while, in the case of repeata-
ble phenomena, the repeated observation can be used to modify the
starting credibility associated to each hypothesis (of this phenome-
non).

These slides can not be reproduced or distributed without permission in writing from the author. 169
2.3.2.1. Probability definitions
BAYESIAN probability definition
The most common use of forecast Bayesian approach is based on the fol-
lowing 3 steps:
1. a first estimate, prior (before), based on the best side information (both
objective and subjective) available;
2. a second estimate, posterior (after), based on experimental data;
3. the two estimates are then combined together, giving them different "weights",
in relation to the different situations.

E X A M P L E S
 To estimate the in field failure frequency of a new product, a Company can: 1. initially
use failure frequency data of similar products already in the market, after “correcting” them in
function of improvements/criticalities predictable on the basis of modifications planned for the
new model under development (prior); 2. as soon as it is possible to test the new product,
failure frequency can be estimated experimentally (posterior); 3. then, after verifying that
the “posterior” is not too much different from the “prior”, both estimates will be combined
together, quantifying, in some way, their different relative “weight” (open problem).
 To define the insurance premium of a new kind of risk (never managed before), an
Insurance Company will initially use data of “similar” risks, after recalibrating them on the
basis of subjective considerations about differences (side information prior). Then, gradually
over the years that will capture data on the specific risk (posterior), the relative weight of the
side information will be reduced respect to the “specific” one and will become zero after a
period long enough.
These slides can not be reproduced or distributed without permission in writing from the author. 170
2.3.2.1. Probability definitions

Example 2
Insurance
premiums
relating to
insurance
against
a new type
of risk:
the wall
of death
These slides can not be reproduced or distributed without permission in writing from the author. 171
2.3.2.1. Probability definitions
Probability BAYESIAN definition
For example, let us suppose that an Insurance Company want to ensure the motorcyclists
of the wall of death (fun fair), but they do not have any data about this kind of risk.
A first estimation of the average yearly cost for an insured of this category (cost from
which premium can be evaluated) can be obtained by the Bayesian method, exploiting the
similarities.
Let us suppose that we can subjectively state that the risks of the wall death
motorcyclists are 60% similar to those (known) of the firemen and 40% to those (also
known) of the trapezists. Defined cm, cf e ct the relative yearly costs, we can write, at the
moment:
cm = 0.60 cf + 0.40 ct
If we know that, for a good costs estimate, we need data of at least 10,000 polices, once
we have achieved actual data about wall death motorcyclists, the preceding subjective
estimation will lower its importance to leave greater importance to the true data of motor-
cyclists. Indicating by nm their number, we can write:

(10,000 - nm) . (0.60 cf + 0.40 ct) + nm . (cm)achieved


(cm)updated = -----------------------------------------------------------------------
10,000
where (cm)achieved is the value of the preceding year, while (cm)updated is the best estimate
for the following year. After nm = 10,000, the first term of the expression can be eliminated.

These slides can not be reproduced or distributed without permission in writing from the author. 172
2.3.2. Basic definitions and relationships about probability

2.3.2.2
Other definitions

These slides can not be reproduced or distributed without permission in writing from the author. 173
2.3.2.2. Other definitions

“EVENTS” definitions
EVENT DEFINITION P(E) EXAMPLES

IMPOSSIBLE It can never happen. P(E) = 0

PROBABLE It can happen. 0 < P(E) < 1

CERTAIN It surely happens. P(E) = 1

The probability to happen of The delay of the bus is


not related to the fact
MUTUALLY one event is not influenced by
that I woke up late
INDEPENDENT the probability to happen of (unless I am the
the other one and vice versa. driver!)

They can never happen toge- In a coin throw, if


MUTUALLY ther, because if one of them HEAD comes out,
EXCLUSIVE happens the other cannot TAIL can not come out
happen and vice versa. and vice versa.

These slides can not be reproduced or distributed without permission in writing from the author. 174
2.3.2.2. Other definitions
CONDITIONED PROBABILITY
Let us imagine that in a box there are a white ball and a black
ball. We want to know the probability to drawn the white ball at
the second drawing.
Done the 1st drawing ...
 If we do not know the outcome of
the 1st drawing, the probability that
the left ball be, for instance, white
is always 0.5.
 If the outcome of the 1st drawing is
known, then the 2nd drawing is
always certain: P(W\W) = 0;
P(W\B) = 1.
So the knowledge of a certain event can “condition” the estimation of
the probability that another event (linked to the previous one) happens.
These slides can not be reproduced or distributed without permission in writing from the author. 175
2.3.2. Basic definitions and relationships about probability

2.3.2.3
Relationships

These slides can not be reproduced or distributed without permission in writing from the author. 176
2.3.2.3. Probability relationships
GENERAL RULE OF SUM
Let us imagine that at a party there are 100 girls, of whom:
• 55 blond  P(A) ;
• 40 with blue eyes  P(B);
• 20 blond and with blue eyes;
• 25 neither blond nor with blue eyes.

The probability to meet a girl or blond


(A) (B) or with blue eyes, is (see diagram):
P(AB) = P(A) + P(B) – P(AB) =
35 20 20 = 55 + 40 - 20 = 75 .
If we do not remove the probability
25 P(AB) of “A intersection B”,
we would count it twice.
Venn diagram
These slides can not be reproduced or distributed without permission in writing from the author. 177
2.3.2.3. Probability relationships

SUMMARY OF BASIC EXPRESSION


FOR PROBABILITY CALCULATIONS

E V E N T S
ANY TYPE
RULES PARTICULAR
(general expressions)
sum Mutually exclusive
probability that one P(AB) = P(A) + P(B) - P(AB)
of two events happens
(one or the other, no matter what) P(AB) = P(A) + P(B)

multiplication = P(A) . P(B\A) Mutually independent

probability that both P(AB) =


events happen
= P(B) . P(A\B) P(AB) = P(A) . P(B)

These slides can not be reproduced or distributed without permission in writing from the author. 178
2.3.2.3. Probability relationships

• 55 blond  P(A) ;
EXAMPLES
35 20 20 • 40 with blue eyes  P(B);
about 100 girls • 20 blond and with blue eyes;
25
• 25 neither blond nor with blue eyes.
Venn diagram

Events A and B are not mutually independent because:


P(A) ≠ P(A\B) and (as a consequence): P(B) ≠ P(B\A).

These slides can not be reproduced or distributed without permission in writing from the author. 179
2.3.2. Basic definitions and relationships about probability

2.3.2.4
Sample space

These slides can not be reproduced or distributed without permission in writing from the author. 180
2.3.2.4. Sample space

Sample space is a “primitive” concept and therefore it can not be de-


fined. We can interpret it as the set of all possible outcomes of a
random experiment performed in specific conditions. Each random e-
vent, both elementary (= simple) or composed, represents a subset
of the sample space.

These considerations might also appear a bit pedantic, but they must
be considered in the probability calculations, because they can chan-
ge when the referring sample space changes.

For example, let us refer to a specific subsystem, for which we are


interested in the probability of occurrence of 3 kinds of failure, A, B
and C, which are considered particularly troublesome by customers.
Of course many other kinds of failure can happen, but let us suppose
we are interested only in these three.

These slides can not be reproduced or distributed without permission in writing from the author. 181
2.3.2.4. Sample space

For simplicity, let us also assume that the occurrences of these kinds
of failure are mutually independent events, since the occurrence of
any of them does not affect in any way the occurrence of the other
two. This implies that the occurrence of a type of failure should not facilitate
the occurrence of any of the other two kinds, both if they are related to a
single component or to different components.

For the three considered failures, the respective failure probability


related to the warranty period, PA, PB and PC, can be estimated by
the corresponding (cumulative) frequencies, FA, FB and FC, measu-
red in field at the end of the warranty period. Let us assume that the-
se values are very large, for example:
^ ^ ^
PA = FA = 45% → 0.45; PB = FB = 40% → 0.40; PC = FC = 35% → 0.35.

These slides can not be reproduced or distributed without permission in writing from the author. 182
2.3.2.4. Sample space

Let us evaluate the total probability PW that, during warranty time,


can happen at least one (i.e. one ore more) of the 3 analyzed kinds
of failure on the same component (other kinds of failure are not taken
into account).

Since it is assumed that the three kinds of failure are independent,


we can try to evaluate the desired probability as the sum of the 3
probabilities:
PW = PA + PB + PC ≈ FA + FB + FC = 0.45 + 0.40 + 0.35 = 1.20 = 120% !
But we would have the paradox of a percent of probability greater
than 100%, (or greater than 1) ! Where is the mistake ?

These slides can not be reproduced or distributed without permission in writing from the author. 183
2.3.2.4. Sample space

The mistake is to have forgotten that, passing from the individual


probabilities (that happens only one kind of failure) to the global pro-
bability (that happens one or more of the 3 kinds of failure), sample
space has changed !

In the calculations, we must always remember to use the correct


sample space. The consideration of mutually exclusive events
is a very helpful verification.

In the case that only a single type of failure can occur, we can use
a binary logic: the failure does happen or does not happen and
these two alternatives, mutually exclusive, are the whole sample
space.
In our example of 3 different kinds of failure, the description of
every outcome of the experiment must include the state (present or
absent) of each of them. The set of all possible outcomes, listed in
the following Table, represents the sample space.
These slides can not be reproduced or distributed without permission in writing from the author. 184
2.3.2.4. Sample space
States of every kind of failure
A B C
Occurrence, F 0.45 0.40 0.35

Frequency of not occurrence Probability of every point


0.55 0.60 0.65
or Reliability, R =1-F of the sample space
1 no no no RA . RB . RC = 0.55 . 0.60 . 0.65 = 0.2145 ← No failure
2 yes no no FA . RB . RC = 0.45 . 0.60 . 0.65 = 0.1755
Possible outcomes

3 no yes no RA . FB . RC = 0.55 . 0.40 . 0.65 = 0.1430


4 no no yes RA . RB . FC = 0.55 . 0.60 . 0.35 = 0.1155 Global failure frequency
(one or more failures) :
5 yes yes no FA . FB . RC = 0.45 . 0.40 . 0.65 = 0.1170
F W = 1 - R A . RB . RC =
6 yes no yes FA . RB . FC = 0.45 . 0.60 . 0.35 = 0.0945 = 0.7855 .
7 no yes yes RA . FB . FC = 0.55 . 0.40 . 0.35 = 0.0770
8 yes yes yes FA . FB . FC = 0.45 . 0.40 . 0.35 = 0.0630
Sample space full probability 1.0000

Of course probability calculations must be developed as in the above


Table.
We see that the sum of all probabilities of all possible outcomes is
now equal to 1 and that FW is the probability of not-success with an
OR logic, as the presence of even a single kind of failure is enough
to fail the result considered as a success.
These slides can not be reproduced or distributed without permission in writing from the author. 185
2.3.2.4. Sample space

Indicating, as usual, by FA, FB and FC the measured frequencies of the


3 kinds of failures and by RA = 1 - FA, RB = 1 - FB and RC = 1 - FC
the corresponding reliabilities or probabilities that the failures do not
happen (individually), we can indicate the total frequency of occurren-
ce FW (i.e. the probability that one or more kind of failure happen) by
one of the two following expressions (taken from the previous Table):

FW = 1 - RA . RB . RC = 1 - (1 - FA) . (1 - FB) . (1 - FC)

FW = FA . RB . RC + FB . RA . RC + FC . RA . RB + FA . FB . RC +
+ FA . FC . RB + FB . FC . RA + FA . FB . FC

Of course, substituting numerical values, each of the previous


expressions gives the same value for the desired probability:
FW = 0.7855 .

These slides can not be reproduced or distributed without permission in writing from the author. 186
2.3.2.4. Sample space

Operating simplifications
approximation and acceptability threshold

In the previous example, we made the hypothesis of high values


of failure frequencies. In practice, it is very rare that a subsy-
stem/component, also not very simple, has a failure mode with a
frequency greater than 1%.

When failure frequencies have low values, the value


M(t) = FA + FB + FC (see Chap. 3, Par. 3.6.1)
can be a good approximation of the total failure probability PWappr:
PWappr ≈ M(t) = FA + FB + FC

With very low failure frequencies, their products (of two and three
factors) can be neglected and the reliabilities R are very close to 1.

These slides can not be reproduced or distributed without permission in writing from the author. 187
2.3.2.4. Sample space

With the values of the example (FA, FB and FC respectively 0.45,


0.40, 0.35), the previous expression would have the result
(already seen) of 1.20, and an error of about 53% respect to the
correct value (0.7855) calculated before.
On the opposite, with frequencies (e.g.) 100 times lower:
FA, FB and FC respectively 0.0045, 0.0040, 0.0035,
the correct expression would give:
PW = 1 - RA . RB . RC = (1 - 0.0045) (1 - 0.0040) (1 - 0.0035) = 0.01195
and the approximate expression:
PW = FA + FB + FC = 0.0045 + 0.0040 + 0.0035 = 0.01200,
with a difference of only 0.4% (less than 5 per thousand!), surely
acceptable
As a thumb rule, the threshold to accept the approximated ex-
pression (accepting an error of 1%) can be about failure frequen-
cies of the order of 0.01 → 1%.
These slides can not be reproduced or distributed without permission in writing from the author. 188
2.3. Probability Theory

2.3.3
Examples of
probability calculations

These slides can not be reproduced or distributed without permission in writing from the author. 189
2.3.3. Examples of probability calculations
EXAMPLE 1

Let us imagine that in a bag there are 4 tablets:


2 with the letter G and 2 with the letter O.
Drawing one at the time the 4 tablets,
which is the probability to form the word “GOGO” ?
The probability of drawing a G at the 1st drawing is: 2/4
The probability of drawing an O at the 2nd drawing is: 2/3
The probability of drawing a G at the 3rd drawing is: 1/2
The probability of drawing an O at the 4th drawing is,
at this step, the certainty

The desired probability is the product of the 3 probabilities:


2 2 1 4 1
. .
---- ---- ---- . 1 = ----- = ----
4 3 2 24 6
These slides can not be reproduced or distributed without permission in writing from the author. 190
2.3.3. Examples of probability calculations
EXAMPLE 2: throws of a coin
Let us imagine to have decided to consider success = HEAD and
not-success = TAIL. Then we have :
p = success probability = P(H) = 0.5
q = not-success probability = P(T) = 1 - p = 0.5
Let us imagine to do 3 throws. We can write:
P(HHH) = p p p = p3 = 0.53 = 0.125  12.5%
P(TTT) = q q q = (1 - p)3 = 0.53 = 0.125  12.5%
P(THH) = P(HTH) = P(HHT) = q p2 = 0.53 = 0.125  12.5%
We immediately understand that the probability to obtain (only) one TAIL is always the same,
for every possible disposition, independently from the position in which it happens. The principle
remains valid also in the case of a different number of throws and/or of a different number of
TAILS (or HEADS) considered in each throw.

The probability to obtain 1 TAIL and 2 HEADS in 3 throws regardless of the order of
appearance is then:
P(1 TAIL and 2 HEADS) = 3 . P(THH) = 3 . q p2 = 3 . 0.53 = 3 . 0.125 =
= 0.375  37.5%
These slides can not be reproduced or distributed without permission in writing from the author. 191
2.3.3. Examples of probability calculations

R U L E

The number of all possible outcomes with n throws and with k successes,
regardless of the order of their appearance,
is given by binomial coefficients (see later about binomial distribution),
which have the following expression:

n n! n (n - 1) (n - 2) ... (n - k + 1)
( ) = ---------------- = ------------------------------------------
k (n - k)! . k! k!

If k = 0, binomial coefficients are always equal to 1,


because factorial definition includes 0! = 1.

These slides can not be reproduced or distributed without permission in writing from the author. 192
2.3.3. Examples of probability calculations
In the above example, if we were interested in knowing the proba-
bility to obtain, with 3 throws, one TAIL and two HEADS regar-
dless of the order of appearance, instead of to list all possible
dispositions as before, we can proceed as follows.
Calculate the probability of occurence of any of the wanted
dispositions (as before), for example:
P(THH) = q p2 = 0.53 = 0.125  12.5%

Calculate by binomial coefficients, the number of all possible


different dispositions:
3 3! 3.2
( ) = ---------------- = ------- = 3
2 (3 - 2)! . 2! 2

The desired probability is given by the product of found values:


P(1T and 2H) = 3 . P(THH) = 3 q p2 = 3 . 0.53 = 0.375  37.5%
exactly as found before, but following a more general approach.
These slides can not be reproduced or distributed without permission in writing from the author. 193
2.3.3. Examples of probability calculations

EXAMPLE 3: drawings with and without reinstatement

For instance, the probability to draw a KING at the 2nd drawing


of a card from a deck of 54 cards changes depending on whether
the first drawn card (let us suppose it was a KING) is again inser-
ted on the deck after the drawing (drawing with reinstatement) or
not (drawing without reinstatement). The desired probability is:
With reinstatement = 4/54  7.41%
Without reinstatement = 3/(54 - 1) = 3/53  5.66%

Therefore it is of fundamental importance to know


whether the tests are conducted with or without reinstatement.

These slides can not be reproduced or distributed without permission in writing from the author. 194
2.3.3. Examples of probability calculations

EXAMPLE 4: Probability that a number is drawn in a lottery drum

For every drum, 5 drawings without reinstatement are done.


The calculation must be conducted evaluating the probability that the
number has to be drawn in each of the 5 drawings and then summing
these 5 probabilities.
When we evaluate every probability, we must remember that:
 to be drawn in the ith drawing, a number does not be drawn in
the i - 1 previous drawings;
 once a number was drawn in the ith drawing, the probability to be
drawn in the next 5 - i drawings is zero (because the number
itself is no longer available) and therefore the probability of not
being drawn is the certainty, i.e. is equal to 1.

1 1 1 1 1 1
So the calculation: ---- + ---- + ---- + ---- + ---- = ----------  5.683% is wrong!
90 89 88 87 86 17.595
These slides can not be reproduced or distributed without permission in writing from the author. 195
2.3.3. Examples of probability calculations
Probability that a number is drawn in a lottery drum
It was very easy to
DRAWING imagine that every-
PROBABILITY CALCULATIONS
# position
one of the 5 events
1
has the same pro-
1 l ----- . 1 . 1 . 1 . 1 = 1/90 = 0.011111
90
bability, because
89 1
there is no reason
2 l ----- ----- . 1 . 1 . 1
.
= 1/90 = 0.011111 that a number is
90 89 more likely to be
89 88 1 drawn in a fixed
3 l ----- . ----- . ----- . 1 . 1 = 1/90 = 0.011111 drawing (e.g. the
90 89 88 first one) than in
89 88 87 1 another.
4 l ----- ----- ----- ----- . 1
. . .
= 1/90 = 0.011111
90 89 88 87 The right result
89 88 87 86 1 is 1/18
5 l ----- . ----- . ----- . ----- . ----- = 1/90 = 0.011111 against the
90 89 88 87 86
previous
S = 5/90 = 1/18 = 0.055556
1/17.595.
These slides can not be reproduced or distributed without permission in writing from the author. 196
2.3.3. Examples of probability calculations
EXAMPLE 5: Probability that a DOUBLE be drawn in a lottery drum
The calculation must be performed by a Table as shown below (and similar to that of
the previous example). For the first number drawn, the chances are 2 (one for both
the number of a double), while, after the first number was drawn, the second number
has only one chance.

# position single event probability


1 l l    2/90 . 1/89 . 1 . 1 . 1 = 2/90 . 1/89 = 0,00024969
2 l  l   2/90 . 88/89 . 1/88 . 1 . 1 = 2/90 . 1/89 = 0,00024969
3 l   l  2/90 . 88/89 . 87/88 . 1/87 . 1 = 2/90 . 1/89 = 0,00024969
4 l    l 2/90 . 88/89 . 87/88 . 86/87 . 1/86 = 2/90 . 1/89 = 0,00024969
5  l l   88/90 . 2/89 . 1/88 . 1 . 1 = 2/90 . 1/89 = 0,00024969
6  l  l  88/90 . 2/89 . 87/88 . 1/87 . 1 = 2/90 . 1/89 = 0,00024969
7  l   l 88/90 . 2/89 . 87/88 . 86/87 . 1/86 = 2/90 . 1/89 = 0,00024969
8   l l  88/90 . 87/89 . 2/88 . 1/87 . 1 = 2/90 . 1/89 = 0,00024969
9   l  l 88/90 . 87/89 . 2/88 . 86/87 . 1/86 = 2/90 . 1/89 = 0,00024969
10    l l 88/90 . 87/89 . 86/88 . 2/87 . 1/86 = 2/90 . 1/89 = 0,00024969
Probability of a DOUBLE in a lottery drum = 10 . 2/90 . 1/89 = 0,0024969
 1/ 401
These slides can not be reproduced or distributed without permission in writing from the author. 197
2.3.3. Examples of probability calculations
The fact that, in the previous Tables, all chances were equal
is not accidental, but according to a strict rule.

R U L E

The probability to have k successes (that means to draw k be-


tween kmax defined objects) in a population of N objects, with n
drawings without reinstatement is given by:
n kmax! (N - kmax)! (N - n)!
( ) . ----------------- . -------------------------- . --------------
k (kmax - k)! (N - kmax - n + k)! N!

If k = kmax, the previous expression is simplified into:


n kmax! (N - kmax)! (N - n)! n kmax! . (N - kmax)!
( . . .
) ---------- ------------------ ------------- = ( ) . ---------------------------
kmax 0! (N - n)! N! kmax N!

These slides can not be reproduced or distributed without permission in writing from the author. 198
2.3.3. Examples of probability calculations

EXAMPLE 6: Sampling [Incoming Quality Control]

Probability of finding at least one defective (one or more),


drawing n items (e.g. 12) out of a batch of known defectiveness: 5‰.
The probability (meant as frequency) that an item be defective is p = 0.005
and the probability that it is not defective is q = 1 - p = 1 - 0.005 = 0.995. In
this case, it is easier to subtract to 1 the probability of not finding any defecti-
ve item, having:
P(one or more) = 1 - P(0) = 1 - qn = 1 - q12 = 1 - 0.99512 =
= 1 - 0.94162 = 0.058377 (5.8%  1/17).

More often we are interested to the reverse problem, i.e. to determine the mi-
nimum sample size able to detect at least one defective, with a probability not
less than a fixed value. We get:
n = Log (1 - Pone or more) / Log (1 - p)

These slides can not be reproduced or distributed without permission in writing from the author. 199
2.3. Probability Theory

2.3.4
A brief mention of
the statistical distributions
of current use

These slides can not be reproduced or distributed without permission in writing from the author. 200
2.3.4. Statistical distributions of current use

Like the functions of Mathematical Analysis,


also statistical distributions may be:
 continuous: when they are defined on all points of (at
least) one interval of x-axis;

 discrete: when they are defined only on some points of


x-axis.

These slides can not be reproduced or distributed without permission in writing from the author. 201
2.3.4. Statistical distributions of current use

In general we follow the agreement to indicate by


capital letters (e.g.: X) the distribution of random
variables and by lower letters (e.g.: x1, x2, ….., xn)
their measurements (observations).

For instance, if the distances of shots fired by a gun


can be represented by a random variable Z normally
distributed, the observed distances z1 z2 z3 z4 z5 of
the five shots are 5 measurements of this variable.

These slides can not be reproduced or distributed without permission in writing from the author. 202
2.3.4. Statistical distributions of current use

2.3.4.1
Discrete distributions

These slides can not be reproduced or distributed without permission in writing from the author. 203
2.3.4.1. Discrete distributions

We will examine only :

 Binomial distribution;

 Poisson distribution.

These slides can not be reproduced or distributed without permission in writing from the author. 204
2.3.4. Statistical distributions of current use

2.3.4.2
Binomial distribution

These slides can not be reproduced or distributed without permission in writing from the author. 205
2.3.4.2. Binomial distribution

An experiment is called “Bernoulli’s experiment”


if it has only two possible outcomes
(e.g. HEAD or TAIL in a coin throw).
The corresponding random variable
associated to the experiment
is equal to 1 for a success (let us say HEAD)
and is equal to 0 for a not-success (let us say TAIL).

A binomial experiment consists of n Bernoulli’s experiments,


every one with the same success probability p.

These slides can not be reproduced or distributed without permission in writing from the author. 206
2.3.4.2. Binomial distribution

Let us imagine that in a box there are 75 yellow balls and 25 green balls.
Let us state to call:
• not-success the drawing of a yellow ball
• and success the drawing of a green ball .

If we do many drawings with the rule that, after each drawing, the drawn ball
be put in the box again and all the balls are shuffled (drawings with reinsta-
tement).

At every drawing:
 the probability q of drawing a yellow ball (not-success) is equal to 75%;
 the probability p of drawing a green ball (success) is equal to 25%.

These slides can not be reproduced or distributed without permission in writing from the author. 207
2.3.4.2. Binomial distribution

Let us suppose we make 5 drawings (with reinstatement) and to want to


evaluate the probability of a sequence of fixed outcomes, for example:
green, yellow, yellow, green, yellow = g, y, y, g, y.

As each drawing is an independent event, the desired probability is the


product of individual probabilities:
P(g, y, y, g, y) = p.q.q.p.q = p2.q3 = 0.252 . 0.753 = 0.0264  2.64% (1)

Obviously, expression (1) is valid for all sequences with the same number of
yellow (3) and green (2) balls, regardless of the order in which they occur:
that means that all outcomes of 5 drawings with 3 yellow balls and 2 green
balls have the same probability of occurrence given by (1).

These slides can not be reproduced or distributed without permission in writing from the author. 208
2.3.4.2. Binomial distribution

Generalizing the previous expression (1), if we think to have n drawings and


to indicate by k the fixed number of successes, as a consequence, the
number of not-successes will be n - k.

The expression:
bu(k) = pk qn-k = pk (1-p)n-k (2)
expresses the probability of each single fixed outcome with k successes
and n - k not-successes in n drawings: n and p are parameters, while k is
the independent variable which can never have values greater than n.

These slides can not be reproduced or distributed without permission in writing from the author. 209
2.3.4.2. Binomial distribution

If, as usually, we are not interested in the order of successes and not-suc-
cesses, but only in their number, it is sufficient to multiply the unitary proba-
bility bu, given by (2), by the number of all possible dispositions in which can
be present k successes in n drawings. This number is given by the following
expression, which, as we saw before, expresses binomial coefficients:

n n! n (n - 1) (n - 2) ... (n - k + 1)
( ) = ---------------- = ------------------------------------------ (3)
k (n - k)! . k! k!

The desired product is given by:


n n
b(k) = S bu(k) = ( ) bu(k) = ( ) pk (1 - p)n-k (4)
k k

which gives the total probability to have k successes in n drawings.

These slides can not be reproduced or distributed without permission in writing from the author. 210
2.3.4.2. Binomial distribution

Binomial coefficients were already defined (at the Par. 2.3.3., where we
exposed some examples of probability calculations) as:
For k = 0, bino-
n n! n (n - 1) (n - 2) ... (n - k + 1) mial coefficients
( ) = ---------------- = ------------------------------------------ are always equal
k (n - k)! . k! k! to 1, by definition.
Tartaglia/Pascal triangle for binomial coefficients
0,1,1,2,2,3,3,……
con kk = 0,
k ( (with ) )
0 1
1 1 1
2 1 2 1
3 1 3 3 1
4 1 4 6 4 1
5 1 5 10 10 5 1
6 1 6 15 20 15 6 1
n

7 1 7 21 35 35 21 7 1
8 1 8 28 56 70 56 28 8 1
9 1 9 36 84 126 126 84 36 9 1
10 1 10 45 120 210 252 210 120 45 10 1
11 1 11 55 165 330 462 462 330 165 55 11 1
12 1 12 66 220 495 792 924 792 495 220 66 12 1
e c ac ne d
t e sr ao on

Each term ofOgni every


termine row (after the
di ciascuna riga first)
(successivais theallasum ofè the
prima) two
somma deiterms nextdella
due termini to riga
it ofprecedente
the preceding row. It is the
ad essa contigui.
Tartaglia-Pascal
Si tratta del Triangolo Triangle.
di Pascal , così Thedetto name comes che
dal matematico from the mathematician
maggiormente who
l'ha diffuso, ma era diffused
già noto a Niccolòit,Fontana
but itsda discovery is
Brescia detto Tartaglia .
due to Niccolò Fontana da Brescia called “Tartaglia” (= stammerer).
These slides can not be reproduced or distributed without permission in writing from the author. 211
2.3.4.2. Binomial distribution
Andamenti esemplificativi della distribuzione BINOMIALE
Different shapes assumed by BINOMIAL probability distribution
(distribuzione di probabilità)
0,6

n = 30; p = 0,02
f(k)
probabilitàf(k)

0,5
n = 30; p = 0,04
distribution

n = 60; p = 0,02
0,4
n = 60; p = 0,04

0,3
Probability di
Distribuzione

0,2

0,1

0,0
0 1 2 3 4 5 6 7

Numeroof
Number disuccesses
successi kk

These slides can not be reproduced or distributed without permission in writing from the author. 212
2.3.4.2. Binomial distribution

Different Andamenti esemplificativi della distribuzione BINOMIALE


shapes assumed by BINOMIAL cumulative probability
(probabilità cumulata)

1,0

0,9
F(k)
cumulata F(k)

0,8
Probabilitàprobability

0,7

0,6

0,5
n = 30; p = 0,02
Cumulative

0,4 n = 30; p = 0,04


n = 60; p = 0,02
0,3
n = 60; p = 0,04
0,2

0,1

0,0
0 1 2 3 4 5 6 7

Numeroofdisuccesses
Number successi kk

These slides can not be reproduced or distributed without permission in writing from the author. 213
2.3.4.2. Binomial distribution

APPLICATION OF THE BINOMIAL DISTRIBUTION


TO THE FAILURES DETECTABILITY ON A SAMPLE

BINOMIAL DISTRIBUTION
The probability b of k successes in n tests
with unitary success probability p The probability P
is given by: to detect at least a failure (= one or more )
n with a field true frequency equal to p,
b(k) = ( ) . pk . (1 - p)n-k testing a sample of n elements,
k can be evaluated by the following expression,
The probability of zero successes is given by which refers to binomial distribution :

P = 1 - (1 - p)n
the previous expression with k = 0 :
n
b(0) = ( ) . p0 . (1 - p)n-0 = 1 . 1 . (1 - p)n = (1 - p)n This probability can also be regarded as the
0 fraction (or %) of different kinds of failure
The probability P of " one or more " successes (with roughly the same fixed field-frequency)
can be written as the complement to 1 detectable by a sample of n elements.
of the preceding:
P = 1 - b(0) = 1 - (1 - p)n .

These slides can not be reproduced or distributed without permission in writing from the author. 214
2.3.4.2. Binomial distribution
CLASSES OF FAILURE PERCENTTO
PROBABILITY OF DIFFERENT
DETECT FAILURE
AL LEAST KINDS
ONE OCCURENCE
FREQUENCY in detectable
a sample ofinassigned size
the sample
[ repairs / 100 units ] sample size n
from to class
centers
5 10 20 50 100 500
(not-included) (included)
27,50 32,50 30,000 83,193% 97,175% 99,920% 100,000% 100,000% 100,000%
22,50 27,50 25,000 76,270% 94,369% 99,683% 100,000% 100,000% 100,000%
17,50 22,50 20,000 67,232% 89,263% 98,847% 99,999% 100,000% 100,000%
12,50 17,50 15,000 55,629% 80,313% 96,124% 99,970% 100,000% 100,000%
7,50 12,50 10,000 40,951% 65,132% 87,842% 99,485% 99,997% 100,000%
5,50 7,50 6,500 28,541% 48,936% 73,925% 96,528% 99,879% 100,000%
4,50 5,50 5,000 22,622% 40,126% 64,151% 92,306% 99,408% 100,000%
3,50 4,50 4,000 18,463% 33,517% 55,800% 87,011% 98,313% 100,000%
2,50 3,50 3,000 14,127% 26,258% 45,621% 78,193% 95,245% 100,000%
1,70 2,50 2,100 10,068% 19,123% 34,589% 65,395% 88,025% 99,998%
1,30 1,70 1,500 7,278% 14,027% 26,086% 53,031% 77,939% 99,948%
1,10 1,30 1,200 5,858% 11,372% 21,451% 45,318% 70,098% 99,761%
0,90 1,10 1,000 4,901% 9,562% 18,209% 39,499% 63,397% 99,343%
0,70 0,90 0,800 3,937% 7,718% 14,840% 33,076% 55,211% 98,198%
0,50 0,70 0,600 2,964% 5,841% 11,340% 25,985% 45,218% 95,066%
0,35 0,50 0,425 2,107% 4,170% 8,165% 19,181% 34,682% 88,111%
0,25 0,35 0,300 1,491% 2,960% 5,832% 13,949% 25,952% 77,737%
0,15 0,25 0,200 0,996% 1,982% 3,925% 9,525% 18,143% 63,249%
0,05 0,15 0,100 0,499% 0,996% 1,981% 4,879% 9,521% 39,362%
 0,05 0,050 0,250% 0,499% 0,995% 2,470% 4,878% 22,125%
These slides can not be reproduced or distributed without permission in writing from the author. 215
2.3.4.2. Binomial distribution
PROBABILITY TO DETECT
PERCENTAGE OFAL LEAST ONE
DIFFERENT OCCURRENCE
KINDS OF FAILURE (ONE OR MORE)
in function
detectable of the
in function oftrue field
the true failure
field failurefrequency andofofthe
frequency and the sample
sample sizesize
100%
% OF PROBABILITY OF DETECTING AL LEAST ONE OCCURRENCE

90%

80%
% OF DIFFERENT KINDS OF FAILURE

70%
detectable in the sample

60%

50%

40%

30%
5

Sample size n
10
20% 20
50
10% 100
500
0%
0 1 2 3 4 5 6 7 8 9 10
TRUE
TRUE FIELD FIELD FREQUENCY
FAILURE FREQUENCY [ [repairs
repairs/ /100
100units
units] ]

These slides can not be reproduced or distributed without permission in writing from the author. 216
2.3.4.2. Binomial distribution
PROBABILITY TOPrecentuali
DETECT AL LEASTdiverse
di tipologie ONE OCCURRENCE
di guasto (ONE OR MORE)
in function
rilevabili of della
in funzione the true field failure
frequenza frequency
vera in rete and of the
e delle dimensioni delsample size
campione
OCCURRENCE

100% 5
DEL CAMPIONE
Sample size n
NUMEROSITÀ

10
20
90%
50
DIVERSE

100
80%
500
AL LEAST ONE
RILEVABILI DA CAMPIONE

70%
DI INCONVENIENTE

60%
OF DETECTING

50%

40%
% TIPOLOGIE

30%
% OF PROBABILITY

20%

10%

0%
0,0 0,5 1,0 1,5 2,0
TRUEFREQUENZA VERA
FIELD FAILURE IN RETE [inconvenienti
FREQUENCY / 100
[ repairs / 100 unità
units ] ]

Details for the lower frequencies


These slides can not be reproduced or distributed without permission in writing from the author. 217
2.3.4.2. Binomial distribution
EXAMPLE. Let us imagine that the failure “windscreen wiper blades: noise” has in
field a frequency of 2 repairs/100 units (actually, the frequency is much lower, but this
frequency is easy to read on the diagram). We want to know which is the probability to
detect at least one occurrence of this kind of failure in a sample of 10 cars (19%)
and in a sample of 50 cars (63%).OF DIFFERENT KINDS OF FAILURE
PERCENTAGE
detectable in function of the true field failure frequency and of the sample size
ONE OCCURRENCE

100%

90%

80%
OF FAILURE

70%
detectable in the sample
LEAST
more)

60%
DETECT AT KINDS
or

50%
DIFFERENT
(one

40%
% OFTO

30%
5

Sample size n
PROBABILITY

10
20% 20
50
10% 100
500
0%
0 1 2 3 4 5 6 7 8 9 10
TRUE
TRUE FIELD
FIELD FREQUENCY
FAILURE [ repairs
FREQUENCY / 100/ 100
[ repairs units ] ]
units
These slides can not be reproduced or distributed without permission in writing from the author. 218
2.3.4.2. Binomial distribution
Now let us imagine that the different kinds of failure with a frequency around 2
repairs/100 units (as “windscreen wiper blades: noise”) are 12. We want to know
which is the percentage (of this 12 kinds of failure) that can be expected to appear
with at least one occurence in a sample of 10 cars ( 0.19.12 = 2.28) and in a
sample of 50 cars ( 0.63 .12 = 7.56). Same procedure as before, but with a broader
PERCENTAGE OF DIFFERENT KINDS OF FAILURE
meaning. detectable in function of the true field failure frequency and of the sample size
100%

90%

80%
% OF DIFFERENT KINDS OF FAILURE

70%
detectable in the sample

60%

50%

40%

30%
5

Sample size n
10
20% 20
50
10% 100
500
0%
0 1 2 3 4 5 6 7 8 9 10
TRUE
TRUE FIELD
FIELD FREQUENCY
FAILURE [ repairs
FREQUENCY / 100/ 100
[ repairs units ] ]
units
These slides can not be reproduced or distributed without permission in writing from the author. 219
2.3.4.2. Binomial distribution

We know, at least for the main car models already marketed, the
distribution in frequency classes of the different kinds of failure (i.e.
component & defect). In other words, we know how many different kinds
of failure fall in a stated range of frequency (class). Hence (with the seen
use of the binomial distribution), we can evaluate the probability to get at
least one failure (one or more) in a sample of fixed size, or (which is the
same) we can evaluate the percentage of different kinds of failure we can
expect to be detectable in every frequency class, during the test on this
sample.

As an example, the next slide presents one of these analysis, invented, but
indicative of what you might find on a car of upper-middle class in the mid
80s. At the present time, the defects were reduced by about 10 times !

These slides can not be reproduced or distributed without permission in writing from the author. 220
2.3.4.2. Binomial distribution
736

136 DATA ARE NOT REAL, BUT POSSIBLE


FOR A CAR OF HIGH CLASS OF N°
THEof failure
80skinds
N° of different failiure kinds & Repairs/100 cars

TOTAL
Repairs/100 cars
in the class
Number of different failure kinds 1,216
TOTAL
1,216 different failure kinds 379.8
Repairs/100 cars (total of each class)
379.8 repairs/100 cars
85

57
46
38,8

43

37,6

34,3

33,3
28,5
27,2

26,0
25,4
24,9

20,0
23

17,9
17,0

19
13,8
13,6

17

17
11,4

10,1
12
9

3
2
0,05 0,10 0,20 0,30 0,43 0,60 0,80 1,00 1,20 1,50 2,10 3,00 4,00 5,00 6,50 10,00

CENTERS OF FREQUENCY FAILURE CLASSES [repairs/100 cars]

These slides can not be reproduced or distributed without permission in writing from the author. 221
2.3.4.2. Binomial distribution
Blue columns indicate the number of different kinds of
failure frequency in the class (defined by the x-axis).
Multiplying each class center for the relative number of kinds
of failure, we obtain an approximate value for the red co-
lumns: in fact, the exact result is a bit different, because it
was obtained by the actual frequency of each kind of failure of
the class.
Frequency classes do not have the same width, but they
must be chosen so that the values of their failure frequencies
(red columns) are quite close: low value of the class center
and large number of different kinds of failure in the class
balance each other.
We see that we have a total of about 1,200 different kinds of
failure mode, of which 736 have a failure frequency less than
0,05% (i.e. 0,5 per thousand). Generally we must not to fix
these kinds of failure with very low frequency, because of the
risk of produce other kinds of failure with greater failure
frequency.
These slides can not be reproduced or distributed without permission in writing from the author. 222
2.3.4.2. Binomial distribution

Knowing:
• the detectability of the kinds of failure in each class, using a
sample of given size (by means of the binomial distribution),
• and the number of different kinds of failure in each class,
which have the same detectability (obtained by the previous
histogram),

we can calculate their product, obtaining so the percentages of the actual


total failure frequency detectable in a sample of a given size, both in terms
of:
• different kinds of failure,
• overall failure frequency of a specific class (due to all different
kinds of failure present in the class).
The sum of the two categories of products (extended to all classes) is to be
divided respectively by “the overall number of different kinds of failure found
on the whole vehicle model“ or by "the overall failure frequency of the whole
vehicle”. These ratios represent the “detectabilities" on the sample.

These slides can not be reproduced or distributed without permission in writing from the author. 223
2.3.4.2. Binomial distribution
Detectable percentage of DIFFERENT KINDS OF FAILURE and of REPAIRS/100 CARS
CLASSES OF FAILURE
FREQUENCY Data measured IN FIELD as a function of the sample size n
(warranty) sample size n
[ repairs / 100 units ] 10 20 50 100
from Average Average Average Average
to class N° of failure Repairs/100 cars No. failure kinds Repairs/100 cars No. failure kinds Repairs/100 cars No. failure kinds Repairs/100 cars No. failure kinds Repairs/100 cars
(not-in- detectability detectability detectability detectability
(included) centers kinds in the class mildly detectable mildly detectable mildly detectable mildly detectable mildly detectable mildly detectable mildly detectable mildly detectable
cluded) (binomial) (binomial) (binomial) (binomial)
7,50 12,50 10,000 3 26,0 65,13% 1,95 16,93 87,84% 2,64 22,84 99,48% 2,98 25,87 100,00% 3,00 26,00
5,50 7,50 6,500 5 33,3 48,94% 2,45 16,30 73,92% 3,70 24,62 96,53% 4,83 32,14 99,88% 4,99 33,26
4,50 5,50 5,000 2 10,1 40,13% 0,80 4,05 64,15% 1,28 6,48 92,31% 1,85 9,32 99,41% 1,99 10,04
3,50 4,50 4,000 6 25,4 33,52% 2,01 8,51 55,80% 3,35 14,17 87,01% 5,22 22,10 98,31% 5,90 24,97
2,50 3,50 3,000 12 34,3 26,26% 3,15 9,01 45,62% 5,47 15,65 78,19% 9,38 26,82 95,24% 11,43 32,67
1,70 2,50 2,100 17 37,6 19,12% 3,25 7,19 34,59% 5,88 13,01 65,40% 11,12 24,59 88,03% 14,96 33,10
1,30 1,70 1,500 19 28,5 14,03% 2,67 4,00 26,09% 4,96 7,43 53,03% 10,08 15,11 77,94% 14,81 22,21
1,10 1,30 1,200 9 11,4 11,37% 1,02 1,30 21,45% 1,93 2,45 45,32% 4,08 5,17 70,10% 6,31 7,99
0,90 1,10 1,000 17 17,9 9,56% 1,63 1,71 18,21% 3,10 3,26 39,50% 6,71 7,07 63,40% 10,78 11,35
0,70 0,90 0,800 23 20,0 7,72% 1,78 1,54 14,84% 3,41 2,97 33,08% 7,61 6,62 55,21% 12,70 11,04
0,50 0,70 0,600 43 27,2 5,84% 2,51 1,59 11,34% 4,88 3,08 25,99% 11,17 7,07 45,22% 19,44 12,30
0,35 0,50 0,425 57 24,9 4,17% 2,38 1,04 8,17% 4,65 2,03 19,18% 10,93 4,78 34,68% 19,77 8,64
0,25 0,35 0,300 46 13,8 2,96% 1,36 0,41 5,83% 2,68 0,80 13,95% 6,42 1,92 25,95% 11,94 3,58
0,15 0,25 0,200 85 17,0 1,98% 1,68 0,34 3,92% 3,34 0,67 9,53% 8,10 1,62 18,14% 15,42 3,08
0,05 0,15 0,100 136 13,6 1,00% 1,35 0,14 1,98% 2,69 0,27 4,88% 6,64 0,66 9,52% 12,95 1,29
 0,05 0,050 736 38,8 0,50% 3,67 0,19 1,00% 7,33 0,39 2,47% 18,18 0,96 4,88% 35,90 1,89
Total 1.216 379,8 33,67 74,24 61,28 120,11 125,29 191,82 202,29 243,42
%: 100,0% 100,0% 2,8% 19,5% 5,0% 31,6% 10,3% 50,5% 16,6% 64,1%

Multiplying, frequency-class by frequency-class, the corresponding detect-


ability given by Binomial distribution (in function of the sample size) by the
failure frequency (of the class center) known from the above graph, we
obtain the percentage of failure frequency detectable in every class with
a sample of fixed size. For each fixed sample size, we can add the
percentages detectable in all classes and obtain the visibility (= total de-
tectability) on a sample of such a size.

These slides can not be reproduced or distributed without permission in writing from the author. 224
2.3.4.2. Binomial distribution

To plan the experimental tests for a new car model, it is necessary to esti-
mate the detectability of its failures with samples of a fixed size.

For simplicity, it must be assumed that the distribution of failure frequencies


has a shape geometrically similar to that of the archetype. That means that,
if the total failure frequency of the new car model will be lower as usually
happens, all frequency classes will decrease in proportion. And this implies
that the visibility remains (in percentage) the same as in the archetype.
However, it is likely that the greatest reductions relate to the higher failure
frequencies, if only because it is easier and this does reduce the visibility.

So to maintain the same frequency distribution of the archetype means to


make an optimistic estimation of detectability of the samples of the new
car model.

For practical reasons, we refer to a little number of frequency distributions:


each of which is obtained by averaging the frequencies of car models with
similar characteristics. Periodic updates are planned.

These slides can not be reproduced or distributed without permission in writing from the author. 225
2.3.4.2. Binomial distribution

A measured optimism on the detectability estimations is


not bad, because it guarantees non to test an
exaggerated number of cars without real benefits.

The following graph shows obtained results.

These slides can not be reproduced or distributed without permission in writing from the author. 226
2.3.4.2. Binomial distribution
100%

91,6%
No. failure kinds mildly detectable
90%
86,1%
% OF FAILURES DETECTABLE IN THE SAMPLE

Repairs/100 cars mildly detectable 80,7%


80%
75,4%

70%
64,1%

60% 58,0%

50,5%
50%

41,9%
40%

31,6% 32,1%

30%
25,5%

19,5%
20% 16,6%

10,3%
10%
5,0%
2,8%

0%

10 20 50 100 200 300 500 1.000


SAMPLE SIZE [number of cars]

These slides can not be reproduced or distributed without permission in writing from the author. 227
2.3.4. Statistical distributions of current use

2.3.4.3
Poisson Distribution

These slides can not be reproduced or distributed without permission in writing from the author. 228
2.3.4.2. Poisson distribution
Special case of the Binomial distribution with: small p; large n and n . p = l constant.
Poisson’s distribution has only one parameter l,
because it does not change, also if n and/or p change, provided that their product l = n . p does not change.

A random variable is distributed according to Poisson if the probability that it takes the value
x (0, 1, 2, 3, 4, ...) is given by density function showed below:
Probability
Funzionedistribution
densità Cumulative
Funzione distribution
ripartizione
lx x li
f(x, l) = e-l ------ F(x, l) = S e-l ------
x! i=0
i!
mean = m = l; standard deviation = s =  l; variance = s2 = l
It is mainly used when we want to evaluate the probability of events that occur each after the
other and the time between two successive events is exponentially distributed.

Reliability main use  determining the probability distribution of the


number (x) of failures per unit,
with l = n . p , where n can be thought as the number of components of the unit and p their
individual failure probability. However l assumes its independent meaning of “average
number of failures per unit”.
In the l failures happen one at the time (never both at once);
RELIABILITY l failure probability in a small interval is proportional to the time l . dt;
area l failure probability is independent from the number of failures occurred before.
These slides can not be reproduced or distributed without permission in writing from the author. 229
2.3.4.2. Poisson distribution

Examples
Andamenti of Poisson
esemplificativi distribution
della shapes
distribuzione di POISSON
(probability distribution)
(distribuzione di probabilità)
0,6

lambda = 0,6
f(k)

lambda = 1,0
di probabilitàf(k)

0,5

lambda = 1,2
Probability distribution,

0,4
lambda = 2,0
lambda = 2,4

0,3
Distribuzione

0,2

0,1

0,0
0 1 2 3 4 5 6 7
Numerokdiofsuccessi
Number k
successes
These slides can not be reproduced or distributed without permission in writing from the author. 230
2.3.4.2. Poisson distribution

Examples
Andamenti of Poisson
esemplificativi distribution
della distribuzioneshapes
di POISSON
(cumulated probability)
(probabilità cumulata)

1,0

0,9
F(k)
cumulata F(k)

0,8
Probabilitàprobability,

0,7

0,6

0,5
Cumulated

0,4 lambda = 0,6


lambda = 1,0
0,3
lambda = 1,2
0,2 lambda = 2,0
lambda = 2,4
0,1

0,0
0 1 2 3 4 5 6 7
Numerok di
Number ofsuccessi k
successes
These slides can not be reproduced or distributed without permission in writing from the author. 231
2.3.4.2. Poisson distribution

Poisson’s distribution can be used


as an approximation of binomial distribution,
but it is often used directly.

In the following, 3 examples of Poisson independent application are showed :


→ the 1st one regards the automotive field (very important)
→ the 2nd is of general purpose and very simple (less important)
→ the 3rd is of general purpose and a bit more structured ? (less important).

These slides can not be reproduced or distributed without permission in writing from the author. 232
2.3.4.2. Poisson distribution SLIDE
VERY
IMPORTANT
1st EXAMPLE OF INDEPENDENT APPLICATION
TYPICAL AUTOMOTIVE CASE
Based on data resulting from Customer Service, a car manufacturer found that his cars,
during the warranty period of two years, incurred an average of l = 0,80 failures per car.
According to this mean, Poisson distribution gives the distribution of the percent of cars
with 0, 1, 2, 3, … failures (each).
Where lindicates the mean number of defects per produced unit (related to the total
warranty period) and k indicates the (hypothesized) number of defects per unit:
lk e-l
p(k) = --------------- (with k = 0, 1, 2, 3, ..... )
k!
The Poisson distribution provides the probability of finding k failures in an unit. For exam-
ple, in the case of passenger cars, it provides the probability (or frequency, or percentage)
with which, at the end of the warranty period, you will find cars with 0 failures (no repair
required to the Customer Office), 1 failure, 2 failures, 3 failures and so on. This probability
corresponds to the searched percentage of cars (see histogram in the next slide) that pre-
sents the number (of course integer!) of failures marked in the ordinate (y-axis).

It is evident the importance of the histogram on the next page to immediately highlight the
economic consequences (in terms of warranty costs at the Customer Office) of the unre-
liability of a car model. This is one of the key reasons that drive us to study and use
the Poisson distribution in the automotive field!
These slides can not be reproduced or distributed without permission in writing from the author. 233
2.3.4.2. Poisson distribution
VERY
IMPORTANT
SLIDE

0,45 0,45

0,40

0,36

Probability distribution
44,93% 0,35
45%
0,30

0,25
40% 0,20

35,95% 0,15 0,14


35% 0,10

0,05
percentage of cars

0,04
30% 0,00 0,01 0,00 0,00 0,00 0,00
0 1 2 3 4 5 6 7 8

Number of failures for each car (during the warranty period)


25%

20%

15% 14,38%

10%

5% 3,83%

0,77%
0,12% 0,02% 0,00% 0,00%
0%
0 1 2 3 4 5 6 7 8

number of failures for each car (during the warranty period)


These slides can not be reproduced or distributed without permission in writing from the author. 234
2.3.4.2. Poisson distribution
SLIDE
VERY
IMPORTANT

l = 0,8 Using EXCEL POISSON function

k k! f(k) F(k) f(k) F(k)


0 1 0,44932896412 0,449328964117 0,449328964117 0,808792135411
1 1 0,35946317129 0,808792135411 0,359463171294 0,808792135411
2 2 0,14378526852 0,952577403929 0,143785268518 0,952577403929
3 6 0,03834273827 0,990920142200 0,038342738271 0,999979253162
4 24 0,00766854765 0,998588689854 0,007668547654 1,000000000000
5 120 0,00122696762 0,999815657479 0,001226967625 1,000000000000
6 720 0,00016359568 0,999979253162 0,000163595683 1,000000000000
7 5.040 0,00001869665 0,999997949812 0,000018696650 1,000000000000
8 40.320 0,00000186966 0,999999819477 0,000001869665 1,000000000000
9 362.880 0,00000016619 0,999999985669 0,000000166192 1,000000000000
10 3.628.800 0,00000001330 0,999999998964 0,000000013295 1,000000000000
11 39.916.800 0,00000000097 0,999999999931 0,000000000967 1,000000000000

12 479.001.600 0,000000000064 0,999999999996 0,000000000064 1,000000000000

These slides can not be reproduced or distributed without permission in writing from the author. 235
2.3.4.2. Poisson distribution

We see that less than half of the produced cars will not have any
failure in the warranty period, while 36% will have one, 14% will
have two and so on, with percentages quickly decreasing as the
number of failures per car increases.

Poisson distribution is the law


which governs the theoretical study of the
average number of failures per unit.

We can wonder if it is so true that, in all real applications, standard


deviation is equal to the square root of the mean. The answer is no.
Actually, in industrial applications, the standard deviation is almost
always significantly greater than the square root of the mean.

These slides can not be reproduced or distributed without permission in writing from the author. 236
2.3.4.2. Poisson distribution

The Poisson’s hypothesis (that the standard deviation is equal to the square root of the mean)
is true only if all lots of the various components comprising the considered system have
failure frequencies also different between them but constant over time. As it is highly
unlikely that this will continue to happen for some time in a plant, the Poisson distribution is, in
practice, a convenient indication of what would happen with a variance to its lower limit.

SYSTEM mS; s2S

Component Component Component


Component n
A B C
(subsequent
(subsequent (subsequent (subsequent
lots)
lots) lots) lots)

xA; s2A xB; s2B xC; s2C xn; s2n

In other words, if all the failure frequencies of the subsequent batches of the same component
(e.g.: xAi, xBi, xCi, etc.) remain substantially constant for all subsequent deliveries, then the Pois-
son’s law is valid and the system variance is equal to the average: s2S = mS . On the opposite, if
the values of the failure frequencies of the successive batches of even a single component (e.g.:
B) fluctuate from a batch to another, then the system variance increases and becomes:
s2S > mS .
These slides can not be reproduced or distributed without permission in writing from the author. 237
2.3.4.2. Poisson distribution
2nd EXAMPLE OF INDEPENDENT APPLICATION: SIMPLE
After discussing one of the main automotive independent applications of Poisson distribution,
we present now an additional (very simple) example of more general use.

Example. In a large company, the number of employees who need the medical room in a
day is on average equal to 3.8: what is the probability that in a single day there are exac-
tly 4 employees who use medical room?
Denoted by l= 3,8 the daily mean number of employees in the medical room, the
Poisson’s distribution:
lx e-l
p(x) = --------------- (with x = 0, 1, 2, 3, ..... )
x!
gives the probability to detect x employees in the medical room within a day.
To solve the proposed question, just put in the above equation:
l = 3,8; k = 4; k! = 4! = 24
and you get: f(k) = (3,84 . e-3,8) / 24 = 0,19436 ≈ 19%. The histogram in the next slide
shows the result just found and those corresponding to other values of k.

Worth to note that, from a strictly mathematical point of view, a random variable having the Poisson distribu-
tion can assume infinite values between zero and infinity, while, in practice, the chances become negligible
after a fairly small set of values of k.

These slides can not be reproduced or distributed without permission in writing from the author. 238
2.3.4.2. Poisson distribution

0,25

0,2046
0,20 0,1944

0,1615
probability

0,1477
0,15

0,10 0,0936
0,0850

0,0508
0,05

0,0224 0,0241

0,0102
0,0039 0,0013 0,0004
0,00
0 1 2 3 4 5 6 7 8 9 10 11 12

number of employees

These slides can not be reproduced or distributed without permission in writing from the author. 239
2.3.4.2. Poisson distribution

l = 3,8 Using EXCEL POISSON function

k k! f(k) F(k) f(k) F(k)


0 1 0,02237077 0,02237077 0,02237077 0,107379704910
1 1 0,08500893 0,10737970 0,08500893 0,107379704910
2 2 0,16151697 0,26889668 0,16151697 0,268896677711
3 6 0,20458817 0,47348484 0,20458817 0,909107604557
4 24 0,19435876 0,66784360 0,19435876 0,999999999999
5 120 0,14771266 0,81555626 0,14771266 1,000000000000
6 720 0,09355135 0,90910760 0,09355135 1,000000000000
7 5.040 0,05078502 0,95989262 0,05078502 1,000000000000
8 40.320 0,02412288 0,98401551 0,02412288 1,000000000000
9 362.880 0,01018522 0,99420072 0,01018522 1,000000000000
10 3.628.800 0,00387038 0,99807111 0,00387038 1,000000000000
11 39.916.800 0,00133704 0,99940815 0,00133704 1,000000000000

12 479.001.600 0,00042340 0,99983154 0,00042340 1,000000000000

These slides can not be reproduced or distributed without permission in writing from the author. 240
2.3.4.2. Poisson distribution
3rd EXAMPLE OF INDEPENDENT APPLICATION: STRUCTURED
We present now another example of Poisson general use:
more structured than the previous one.

Example. In a production process are randomly produced also defective parts. Let us
assume that the probability of producing a fixed number of defective units in a time-inter-
val is not influenced by the number of defective units produced in other time-intervals.

Then, indicating by lthe average number of defective units per day of production,
the Poisson’s distribution:
lx e-l
p(x) = --------------- (with x = 0, 1, 2, 3, ..... )
x!
gives the probability to detect x defective units in a day.

If the actual numbers of defective units detected in the production do not match with the
frequencies predicted by Poisson distribution, we should conclude that the defective units
do not occur randomly but may be related to some special cause.

The following Table shows data of a sample of 201 production days, during which 150
defective units have been collected, giving l = 150/201 = 0,746.

These slides can not be reproduced or distributed without permission in writing from the author. 241
2.3.4.2. Poisson distribution

F I T T I N G
x n Poisson Total
number of number of observed distribution number of
defective days with frequency defective
predicted
units [%] units
x defective frequency
produced
units [%] [x . n]
in a day
0 102 50.75% 47.413% 0
1 59 29.35% 35.383% 59
2 31 15.42% 13.203% 62
3 8 3.98% 3.284% 24
4 0 0.00% 0.613% 0
5 1 0.50% 0.091% 5
6 0 0.00% 0.011% 0
77oromore
più 0 0.00% 0.000% 0
Totali 201 100.000% 99.9987% 150
Mean ,l = 150 / 201 = 0.74627
These slides can not be reproduced or distributed without permission in writing from the author. 242
2.3.4.2. Poisson distribution
COMPARISON BETWEEN OBSERVED AND PREDICTED DISTRIBUTIONS
55%
50,7%
50%
47,4% Observed frequency
45% Poisson distribution predicted frequency
% of days with x defective units

40%
35,4%
35%

29,4%
30%

25%

20%
15,4%
15% 13,2%

10%

5% 4,0%
3,3%

0,0% 0,6% 0,5% 0,1% 0,0% 0,0% 0,0% 0,0%


0%
0 1 2 3 4 5 6 7 or
o più
more

x (number of defective units produced in a day)

We see that there is substantial matching and so


there is no reason to suspect the existence of special causes
These slides can not be reproduced or distributed without permission in writing from the author. 243
2.3.4. Statistical distributions of current use

2.3.4.4
Continuous distributions

These slides can not be reproduced or distributed without permission in writing from the author. 244
2.3.4.4. Continuous distributions

We will limit to :

 Rectangular or Uniform distribution;

 Gauss Normal distribution;

 Lognormal distribution;

 Weibull distribution

 Exponential distribution.

For some distributions, linked to particular subjects of Statistics


(t of Student, Chi-square, F of Fisher, etc.), we have preferred
to postpone their explanation when their knowledge is needed.

These slides can not be reproduced or distributed without permission in writing from the author. 245
2.3.4. Statistical distributions of current use

2.3.4.5
Rectangular or Uniform
distribution

These slides can not be reproduced or distributed without permission in writing from the author. 246
2.3.4.5. Rectangular or Uniform distribution

A random variable is called distributed in an “uniform” way, if every


value x of its definition interval has the same probability to be assu-
med.

Called a and b the lower and upper limits of the definition interval,
the probability density function is given by:
1
f(x) = ----------
b-a

This expression makes clear that, if the definition range is not


limited by both sides (i.e. if the interval becomes infinite), we have
f(x) = 0
everywhere and the distribution loses all meaning.

These slides can not be reproduced or distributed without permission in writing from the author. 247
2.3.4.5. Rectangular or Uniform distribution
Ordinates axis for CUMULATIVE distribution

cumulative function

probability density function

a b
The above diagram shows the typical trend of the probability density function, from which
we immediately understand why an uniform distribution is also called rectangular.
This distribution is symmetric around is central vertical axis so that mean and median are
the same.
Of course cumulative distribution has linear trend and its value is 0 in a and 1 in b.
These slides can not be reproduced or distributed without permission in writing from the author. 248
2.3.4.5. Rectangular or Uniform distribution

The mean is immediately evaluated by:


b+a
m = -----------
2

The standard deviation is the squared root of variance, whose


calculation, in this case, is analogous to that of the moment of
inertia of a rectangle respect to its barycentric axis, where f(x) is
in the place of the mass:
b (b - a)2
s2 = | (x - m)2 f(x) dx = -------------
a 12
and so: s = (b - a) /  12 .

These slides can not be reproduced or distributed without permission in writing from the author. 249
2.3.4.5. Rectangular or Uniform distribution

Rectangular or uniform distribution can be assumed also by


a discrete variable, which can take only some values inside
a certain interval (continuity correction).
In these cases, the term "probability density" is meaningless and we simply
use the term "probability" linked (with the same value) to each of the values
that can be taken by the variable.

For instance, the 90 numbers of the lottery have all the same probability
to be drawn; their distribution is defined only for integer numbers between
1 and 90 (limits included).
The single probability to be drawn, equal for all numbers, is:
1/90 = 0.01111  1.1% .

The distribution has mean: (90 + 1) / 2 = 45.5


and standard deviation: (90 - 1) /  12 = 89/3.4641 = 25.69 .

These slides can not be reproduced or distributed without permission in writing from the author. 250
2.3.4. Statistical distributions of current use

2.3.4.6
Gauss normal distribution

These slides can not be reproduced or distributed without permission in writing from the author. 251
2.3.4.6. Gauss normal distribution

We do not have much to add to what we have already


said in the Descriptive Statistics Paragraph.
The only difference is that the frequency concept
is now substituted by the concept of probability.

It is important to remember that, if X is a random variable


normally distributed with mean mand standard deviation s,
the random variable Z:
X-m
Z = -----------
s
is a random variable distributed according to the standard
normal distribution.

These slides can not be reproduced or distributed without permission in writing from the author. 252
2.3.4. Statistical distributions of current use

2.3.4.7
Lognormal distribution

These slides can not be reproduced or distributed without permission in writing from the author. 253
2.3.4.7. Lognormal distribution

Lognormal distribution is derived from Normal distribution, substitu-


ting x by ln(t). Of course that implies t > 0.

Density probability function is given by:


(ln t - ml)2
- -----------------
1 2 . s l2
f(x) = ------------------ . e
sl . t .  2 . 
where ml and sl represent the mean and the standard deviation of the loga-
rithm values (and not the mean and the standard deviation of the raw values
t).

So we must pay attention to distinguish mean and standard deviation mt and


st of the raw data from mean and standard deviation ml and sl of their loga-
rithms.

These slides can not be reproduced or distributed without permission in writing from the author. 254
2.3.4.7. Lognormal distribution

LOGNORMAL distribution: examples of density functions


(s always equal to 1)
0,7

0,6 mean-ln = 0.0


mean-ln = 0.5
0,5
mean-ln = 1.0
Probability density

mean-ln = 2.0
0,4

0,3

0,2

0,1

0,0 t
0 1 2 3 4

These slides can not be reproduced or distributed without permission in writing from the author. 255
2.3.4.7. Lognormal distribution
LOGNORMAL distrib.: examples of cumulative functions
(s always equal to 1)
1,1

1,0

0,9
Cumulative probability

0,8

0,7

0,6

0,5

0,4
mean-ln = 0.0
0,3
mean-ln = 0.5
0,2 mean-ln = 1.0
0,1
mean-ln = 2.0

0,0 t
0 2 4 6 8 10 12

These slides can not be reproduced or distributed without permission in writing from the author. 256
2.3.4.7. Lognormal distribution

We could demonstrate that :

s l2
ml + ------
2 (2 ml + sl2) s l2
mt = e s t2 = e . e -1

In many applications inverse expressions can be useful:

s t2 s t2
ml = ln (mt) - ------ s l2 = ln ( ------ + 1 )
2 mt2

These slides can not be reproduced or distributed without permission in writing from the author. 257
2.3.4.7. Lognormal distribution

Lognormal distribution
is frequently used to represent
the steel strength distribution,
when applying the methods of Probabilistic Design,
which will be discussed in the next Chapter 3.

These slides can not be reproduced or distributed without permission in writing from the author. 258
2.3.4. Statistical distributions of current use

2.3.4.8
Weibull distribution

These slides can not be reproduced or distributed without permission in writing from the author. 259
2.3.4.8. Weibull distribution

Mathematical expression of cumulative Weibull distribution is:


b
t
- (-----)
h
F(t) = 1 - e
with:
b = shape parameter (remark that it is the exponent of an exponent)
h = scale parameter: it enlarges or tightens the curve without modifying its shape;
it is the abscissa value which leaves on its left the 63,2% of data and
it is also called “characteristic life”.
In summary, Weibull distribution is a 2 parameters distribution: the two pa-
rameters are b and h. Note that normal distribution too is a 2 parameters di-
stribution and its two parameters are m and s.
One of the strong points of Weibull distribution is the variety of shapes that it
can assume as a function of different values of b.
These slides can not be reproduced or distributed without permission in writing from the author. 260
2.3.4.8. Weibull distribution
Shapes of density Weibull distribution

h = const. = 50,000
Probability density

These slides can not be reproduced or distributed without permission in writing from the author. 261
2.3.4.8. Weibull distribution
Shapes of cumulative Weibull distribution

Cumulative probability density

h = const. = 50,000

b
t
- (-----)
h
Setting t = h in the previous F(t) = 1 - e , we obtain F(t) = 1 - e-1 = 0,632 whatever
the value of b. This explains the important feature of the Weibull cumulative distributions
(see Figure). All intersect at the same point, defined by the value of h and by the value of its
cumulative probability, which always corresponds to 63,2%, as just proved. Hence the name of
characteristic life for h is justified.
These slides can not be reproduced or distributed without permission in writing from the author. 262
2.3.4.8. Weibull distribution

Let us anticipate that in automotive field, the different


shapes of Weibull distribution (defined by the value of the
exponent b called shape parameter) are used to repre-
sent specific failure types:

b < 1  infant mortality failures


b = 1  random failures
b > 1  wear-out failures

These slides can not be reproduced or distributed without permission in writing from the author. 263
2.3.4.8. Weibull distribution
Starting from basic expression of the cumulative Weibull distribution:
b
t
- (-----)
h
F(t) = 1 - e

we can write: b
t
- (-----)
h1
b 1 - F(t) = e = --------------
t b
(-----) t
h1 (----)
e = -------------- h
1 - F(t) e

b
t 1
(-----) 1 b . ln t - b . ln h = ln ln --------------
h = ln -------------- 1 - F(t)
1 - F(t)

1
ln ln -------------- = b . ln t - constant
1 - F(t)
which, in appropriate coordinates (Weibull Chart), is the equation of a straight line.

These slides can not be reproduced or distributed without permission in writing from the author. 264
2.3.4.8. Weibull distribution

Cumulative probability
Distance covered [km]
PDF, cumulative functions and
corresponding Weibull’s straight lines

Probability density

These slides can not be reproduced or distributed without permission in writing from the author.
Distance covered [km] 265
2.3.4.8. Weibull distribution
Weibull straight lines of previous examples
Car model: PANDA 30 HP
Component: Braking System / DISK Defect: EARLY WEAR-OUT (replacement)
Car model: UNO 45 HP
Position: Front Tested components = 74
Component: Braking System / DISK Defect: EARLY WEAR-OUT (replacement)
Kind of test: C.C.C. (FIAT Customer Constant Control) of which failed = 12 Position: Front Tested components = 79
b = 3.71 h = 47,823 km Average life = 43,164 km Kind of test: C.C.C. (FIAT Customer Constant Control) of which failed = 6
Date 12/10/1984 b = 2.15 h = 78,243 km Average life = 69,292 km

Date 05/25/1985

These slides can not be reproduced or distributed without permission in writing from the author. 266
2.3.4.8. Weibull distribution
Weibull straight lines of previous examples
Car model: DELTA
Car model: REGATA (gasoline motors)
Component: HORN Defect: FAULTINESS (replacement)
SENSOR OF THE ROD
Position: - Tested components = 88 Component: Defect: FAULTINESS (replacement)
OF ENGINE OIL LEVEL
Kind of test: TEST 4 YEARS (LANCIA) of which failed = 11 Position: - Tested components = 58

b = 1.03 h = 219,239 km Average life = 216,791 km Kind of test: C.C.C. (FIAT Customer Constant Control) of which failed = 5

Date 12/10/1984 b = 0.56 h = 505,742 km Average life = 841,728 km

Date 05/25/1986

These slides can not be reproduced or distributed without permission in writing from the author. 267
2.3.4.8. Weibull distribution

Pay attention to how much to extend a straight line of a Weibull Chart !

Probability density
Densità di probabilità

0 10.000 20.000 30.000 40.000 50.000 60.000 70.000 80.000 90.000 100.000
Percorrenza
Distance [km][km]
covered

These slides can not be reproduced or distributed without permission in writing from the author. 268
TYPE OF x = failed;
SAMPLE o = suspended SAMPLE DEFINITIONS

x
COMPLETE n = number of elements
x
x g=n in the sample;
x
x
x
(t = undefined) g = number of failed ele-
x If g = n ≥ 5, we are in the scope of the
Weibull.
ments, during the
t test;
TRUNCATED (end time)
g* = minimum number of
t = t* failed elements
S A M P L E S

x (0 ≤ g < n) scheduled to end the


O test (as an alternative
x If g = 0 when t = t*, that is the test
O
O
ends without failed components, we to use t*);
x are in the scope of the Success Run.
O Otherwise, if g ≥ 5, we are in the
scope of the Weibull.
t = test time;
*
t t

CENSORED t* = predetermined time


(after g* failed and with some “su- for the end of the
spended” at the time of the last failed) test (as an alternative
O
0 < g = g* < n to use g*).
x
“S U S P E N D E D“

x
x
x (t = undefined)
O If g ≥ 5, we are in the scope of the The term “incomplete sample” is
x Weibull. not the opposite of the term “com-
plete sample”, because this “opposi-
t te" is represented by any one of the
INCOMPLETE types of "suspended sample" (one
of which is the “incomplete sam-
(with some “suspended” before the ple”, which is characterized by some
last failed) item removed from the test still wor-
x
O 0<g<n king, before the last “failed"). A spe-
cial case of "opposite“ (in the sense
x
x
x (t = undefined) of "antipodes”) of the complete sam-
x If g ≥ 5, we are in the scope of the ple is the truncated sample with
O Weibull. zero “failed” (success run).

t
These slides can not be reproduced or distributed without permission in writing from the author. 269
2.3.4.8. Weibull distribution
SITUATIONS AND TOOLS RELATED
WITH WEIBULL DISTRIBUTION EXPRESSIONS
PROBLEMS TOOLS EXPRESSIONS
COMPLETE or TRUNCATED
MEDIAN RANKS (M.R.) For complete , truncated
or CENSORED SAMPLES
and censored samples
The expression on the right is valid Median ranks (MR.) give a good (stabilized) esti- (= without suspended before last failed):
only if suspended elements (if there mation of cumulative distribution. They are obtai-
are) are all successive or simulta- ned, by interpolation, from BETA distribution. The i - 0.3
M.R. =
neous to the last failed element. most used approximation is the expression in the N + 0.4
right. For more precise calculations, TABLES are where:
Complete sample = N failed elements ;
Truncated sample = test ends after a stated number of km,
available in Literature. i = data sequential index (in this case,
hours or cycles: failed number < N;
it concerns only the failed elements;
Censored sample = test ends when a stated number of k
elements have been failed, with k < N.
N = total number of tested elements.

INCOMPLETE SAMPLES ORDER NUMBER (O.N.) N + 1 - O.N.previous


(at least one failed is preceded O.I. =
and ORDER INCREMENT (O.I.) N+2-i
by one or more suspended)
The elements removed from the test When there are suspended (obviously before a
before they fail (after different test failed ), the data sequential index , i, includes, not O.N. = O.N.previous + O.I.
times and for different reasons) are only the failed (as before), but also the su-
called suspended . spended . In the expression of Median Ranks it is O.N. - 0.3
M.R. =
substituted by the Order Number O.N. evaluated N + 0.4
by Order Increment O.I.. Thus, the Median Ranks where:
calculations (always conducted only for the failed i = data sequential index including both fail-
elements) take into account of suspended too. ed and suspended in the order in which
The O.N. starts with a value of zero. they occur.

These slides can not be reproduced or distributed without permission in writing from the author. 270
2.3.4.8. Weibull distribution
1. example of calculations with a COMPLETE SAMPLE: needs of median ranks
PROBLEMS TOOLS EXPRESSIONS
COMPLETE or TRUNCATED
MEDIAN RANKS (M.R.) For complete , truncated
or CENSORED SAMPLES
and censored samples
The expression on the right is valid Median ranks (MR.) give a good (stabilized) esti- (= without suspended before last failed):

In a complete sample, as shown in the Table below, the simple only if suspended elements (if there
are) are all successive or simulta-
neous to the last failed element.
mation of cumulative distribution. They are obtai-
ned, by interpolation, from BETA distribution. The
most used approximation is the expression in the
M.R. =
i - 0.3
N + 0.4

cumulative percentages of elements failed during the test (full Complete sample = N failed elements ;
Truncated sample = test ends after a stated number of km,
hours or cycles: failed number < N;
right. For more precise calculations, TABLES are where:
available in Literature. i = data sequential index (in this case,

blue curve in the next slide) correctly represent what has happe-
it concerns only the failed elements;
Censored sample = test ends when a stated number of k
elements have been failed, with k < N.
N = total number of tested elements.

INCOMPLETE SAMPLES ORDER NUMBER (O.N.) N + 1 - O.N.previous

ned in the test sample, but can not be assumed as a general fai- (at least one failed is preceded
by one or more suspended)
The elements removed from the test
and ORDER INCREMENT (O.I.)
When there are suspended (obviously before a
O.I. =
N+2-i

lure law to be used for predictions, if only because, repeating the before they fail (after different test
times and for different reasons) are
called suspended .
failed ), the data sequential index , i, includes, not
only the failed (as before), but also the su-
spended . In the expression of Median Ranks it is
O.N. = O.N.previous + O.I.

O.N. - 0.3

experiment with other samples in nominally equal conditions (dot- substituted by the Order Number O.N. evaluated
by Order Increment O.I.. Thus, the Median Ranks where:
calculations (always conducted only for the failed
M.R. =
N + 0.4

i = data sequential index including both fail-

ted red curves in the next slide), the time at which the last element elements) take into account of suspended too.
The O.N. starts with a value of zero.
ed and suspended in the order in which
they occur.

fails (corresponding to 100% of failed elements) would be gene-


rally different from 275 hours (smaller or larger than 275 hours).

Current Percentage
Test time
data Cumulative percent of failed elements
for each
sequen- of failed elements calculated through
element
tial index the median ranks
[hours]
i Formula % Formula %
1 - 0,3
1 30 1/7  14,29%  9,46%
7 + 0,4
2 - 0,3
2 60 2/7  28,57%  22,97% Instead, by calculating the correct percenta-
7 + 0,4
3 - 0,3 ges according to the median ranks, the fai-
3 90 3/7  42,86%  36,49%
7 + 0,4 lure cumulative percentage corresponding to
4 195 4/7  57,14%
4 - 0,3
 50,00%
the last failed element is always less than
7 + 0,4 100% and it may prove that the general fai-
5 215 5/7  71,43%
5 - 0,3
 63,51%
lure law (useful for predictions) thus obtained
7 + 0,4 is the best possible among those deductible
6 240 6/7  85,71%
6 - 0,3
 77,03% from the data of the single tested sample.
7 + 0,4
7 - 0,3
7 275 7/7  100,00%  90,54%
7 + 0,4
These slides can not be reproduced or distributed without permission in writing from the author. 271
2.3.4.8. Weibull distribution
Graphical display of the concepts mentioned in the previous slide:
1. classical cumulative curve (100% of failed at 275 hours);
2. examples of different results that can occur when the experiment is repeated several times in nominally equal conditions;
3. curve of median ranks.
FAILED ELEMENTS

100%
OF CONSUNTIVATI

90%

80%

70%
DI ROTTI

60%
PERCENTAGE

50%
PERCENTUALE

40%

30%
CUMULATIVE

20%

10%

0%
0 50 100 150 200 250 300 350 400

TEST
ORETIME [hours]
DI PROVA
These slides can not be reproduced or distributed without permission in writing from the author. 272
2.3.4.8. Weibull distribution

These slides can not be reproduced or distributed without permission in writing from the author. 273
2.3.4.8. Weibull distribution
2. example of calculations with an INCOMPLETE SAMPLE PROBLEMS
COMPLETE or TRUNCATED
or CENSORED SAMPLES
TOOLS

MEDIAN RANKS (M.R.)


EXPRESSIONS

For complete , truncated


and censored samples
The expression on the right is valid Median ranks (MR.) give a good (stabilized) esti- (= without suspended before last failed):
only if suspended elements (if there mation of cumulative distribution. They are obtai-

Let’s suppose that, in this incomplete sample, failures


are) are all successive or simulta- ned, by interpolation, from BETA distribution. The i - 0.3
M.R. =
neous to the last failed element. most used approximation is the expression in the N + 0.4
right. For more precise calculations, TABLES are where:
Complete sample = N failed elements ;
available in Literature.

occur at the same hours of the previous example, but, in


Truncated sample = test ends after a stated number of km, i = data sequential index (in this case,
hours or cycles: failed number < N;
it concerns only the failed elements;
Censored sample = test ends when a stated number of k
elements have been failed, with k < N.
N = total number of tested elements.

INCOMPLETE SAMPLES

this case, there are also 5 suspended elements removed ORDER NUMBER (O.N.) N + 1 - O.N.previous
(at least one failed is preceded O.I. =
and ORDER INCREMENT (O.I.) N+2-i
by one or more suspended)
The elements removed from the test When there are suspended (obviously before a

from the test at the times indicated in the Table below. before they fail (after different test
times and for different reasons) are
called suspended .
failed ), the data sequential index , i, includes, not
only the failed (as before), but also the su-
spended . In the expression of Median Ranks it is
substituted by the Order Number O.N. evaluated
O.N. = O.N.previous + O.I.

M.R. =
O.N. - 0.3
N + 0.4
by Order Increment O.I.. Thus, the Median Ranks where:
Current calculations (always conducted only for the failed
elements) take into account of suspended too.
i = data sequential index including both fail-
ed and suspended in the order in which
Test time Failed (F) The O.N. starts with a value of zero. they occur.
data
for each or
sequential
element Suspended
index
[hours] (S)
i
Wanting at all costs to avoid recourse to the ORDER
1 25 S
NUMBER and the ORDER INCREMENT, we could:
2 25 S

3 30 F
1. ignore all suspended, giving up some useful infor-
mation (and already paid!); we would fall in the pre-
4 60 F vious case, but obtaining a worst case estimate;
5 70 S 2. imagine that any suspended element was working
6 90 F
when the last element failed; which is equivalent to
attribute to all suspended elements an equal test time of
7 110 S 275 hours, that is, to transform the incomplete sample
8 180 S in a censored sample; obviously, in doing so, we would
obtain a best case estimate.
9 195 F

10 215 F
In concluding this topic, it will make a comparison be-
tween these results and the correct ones, obtainable by
11 240 F using the ORDER NUMBER and ORDER INCREMENT.
12 275 F

These slides can not be reproduced or distributed without permission in writing from the author. 274
2.3.4.8. Weibull distribution
2a. example of calculations with a CENSORED SAMPLE
Current Percentage
Test time
data Cumulative percent of failed elements
for each
sequen- of failed elements calculated through
element
tial index the median ranks
i
[hours] Current Percentage
Formula % Formula % Test time
1 - 0,3 data Cumulative percent of failed elements
1 30 1/7  14,29%  9,46% for each
7 + 0,4 sequen- of failed elements calculated through
2 60 2/7  28,57%
2 - 0,3
 22,97%
element
7 + 0,4 tial index the median ranks
[hours]
3 90 3/7  42,86%
3 - 0,3
 36,49% i Formula % Formula %
7 + 0,4
4 - 0,3 1 - 0,3
4 195 4/7  57,14%
7 + 0,4
 50,00% 1 30 1/12  14,29%  5,65%
12 + 0,4
5 - 0,3
5 215 5/7  71,43%  63,51%
7 + 0,4 2 - 0,3
6 - 0,3 2 60 2/12  28,57%  13,71%
6 240 6/7  85,71%  77,03% 12 + 0,4
7 + 0,4
3 - 0,3
7 275 7/7  100,00%
7 - 0,3
 90,54% 3 90 3/12  42,86%  21,77%
7 + 0,4 12 + 0,4
4 - 0,3
4 195 4/12  57,14%  29,84%
12 + 0,4
The present application is 5 215 5/12  71,43%
5 - 0,3
12 + 0,4
 37,90%
very similar to the previous 6 240 6/12  85,71%
6 - 0,3
 45,97%
one: the only difference is 12 + 0,4
7 - 0,3
7 275 7/12  100,00%  54,03%
that, having imagined that 12 + 0,4

all 5 suspended elements 8

have reached the end of 9 Placed at the end, the "suspended" ele-
ments only serve to change the denomi-
the test, the percentages 10 nator, which runs from 7 to 12 (the cal-
no longer refer to a total 11
culation of the percentages of failed ele-
ments stops with the last failed ).
number of elements equal
12
to 7 but equal to 12.
These slides can not be reproduced or distributed without permission in writing from the author. 275
2.3.4.8. Weibull distribution

These slides can not be reproduced or distributed without permission in writing from the author. 276
2.3.4.8. Weibull distribution
2.b. example of correct calculations for an INCOMPLETE SAMPLE
Current
Test time Failed (F)
data
for each or Order Increment Order Number Median Rank
sequential
index
element Suspended O.I. O.N. M.R.
[hours] (S)
i
1 25 S

2 25 S
12 + 1 - 0 1.182 - 0.3
3 30 F = 1.182 0 + 1.182 = 1.182 = 0.071  0.071
12 + 2 - 3 12 + 0.4
12 + 1 - 1.182 2.364 - 0.3
4 60 F = 1.182 1.182 + 1.182 = 2.364 = 0.166  0.166
12 + 2 - 4 12 + 0.4
5 70 S
12 + 1 - 2.364 3.693 - 0.3
6 90 F = 1.330 2.364 + 1.330 = 3.694 = 0.274  0.274
12 + 2 - 6 12 + 0.4
7 110 S

8 180 S
12 + 1 - 3.693 5.555 - 0.3
9 195 F = 1.861 3.693 + 1.861 = 5.555 = 0.424  0.424
12 + 2 - 9 12 + 0.4
12 + 1 - 5.555 7.416 - 0.3
10 215 F = 1.861 5.555 + 1.861 = 7.416 = 0.574  0.574
12 + 2 - 10 12 + 0.4
12 + 1 - 7.416 9.277 - 0.3
11 240 F = 1.861 7.416 + 1.861 = 9.277 = 0.724  0.724
12 + 2 - 11 12 + 0.4
12 + 1 - 9.277 11.139 - 0.3
12 275 F = 1.861 9.277 + 1.861 = 11.138 = 0.874  0.874
12 + 2 - 12 12 + 0.4
NOTE - If there are not the two suspended at the beginning, the first failed element would have the data sequential index, i, equal to 1, an Order In-
crement, O.I., equal to (12+1)/(12+2-1) = 1, an Order Number equal to 1 (i.e. equal to the Order Increment) and a Median Rank, M.R., equal
to (1-0.3)/(12+0.4) = 0.056 (5.6%).

These slides can not be reproduced or distributed without permission in writing from the author. 277
2.3.4.8. Weibull distribution

N O T E
In the previous example, we can observe that, when there are not "suspended" elements between two "failed",
the value of the Order Increment (O.I.) remains constant.
This can be justified putting the Order Increment of a failed equal to k:
N + 1 - O.N.0
= k
N+2-i

The Order Increment of the failed immediately following (if there are no suspended elements between the two) will be given by:

N + 1 - O.N.0 (N + 2 - i) . (N + 1 - O.N.0) - (N + 1 - O.N.0)


N + 1 - O.N.0 -
N + 1 - (O.N.0 + k) N + 1 - O.N.0 - k N+2-i N+2-i
= = = =
N + 2 - (i + 1) N+2-i-1 N+2-i-1 N+2-i-1

(N + 1 - O.N.0) . (N + 2 - i - 1)
(N + 2 - i) (N + 1 - O.N.0) . (N + 2 - i - 1)
= = = k which
which was to be
be proved.
proven
(N + 2 - i - 1) (N + 2 - i) . (N + 2 - i - 1)

This reasoning may be repeated in a similar way for all next failed elements (without suspended elements interposed).

These slides can not be reproduced or distributed without permission in writing from the author. 278
2.3.4.8. Weibull distribution

These slides can not be reproduced or distributed without permission in writing from the author. 279
2.3.4.8. Weibull distribution

These slides can not be reproduced or distributed without permission in writing from the author. 280
As shown in the Weibull Chart at the
side, the more reliable failure law
(full black line), obtained with the cor-
rect calculation that uses the order
number and the order increment, is
intermediate with respect to those
obtainable with the two simplifica-
tions discussed above:
1. to completely neglect the suspen-
ded elements: in this way, the
incomplete sample becomes a
complete sample and obviously
we get a pessimistic failure law
(dashed blue line);
2a. to imagine that all suspended ele-
ments would have arrived at the
end of test without failing: in this
way, the incomplete sample be-
comes a censored sample and
obviously we get an optimistic
failure law (dotted red line).

These slides can not be reproduced or distributed without permission in writing from the author. 281
2.3.4.8. Weibull distribution

WEIBULL CALCULATED
BY CLASSES OF TIME/MILEAGES

With very large samples,


we can divide the “times to failure” in classes (intervals),
then we can construct the corresponding histogram
and calculate the cumulative percent of failed elements
on the basis of cumulative distribution,
without any kind of correction
(no Median Ranks and so on).

The larger the sample the smaller the error


vs. a rigorous calculation.

These slides can not be reproduced or distributed without permission in writing from the author. 282
2.3.4.8. Weibull distribution
For WEIBULL BY CLASSES, in the absence of anything better, we propose
the EXCEL sheet WeibullBYclasses.xls, located in the directory MiniSW.
h estimation AUXILIARY CALCULATIONS
EXPERIMENTAL WEIBULL
EXPERIMENTAL data NORMAL distribution WEIBULL distribution Searching among cumulative h data data
WARNING corrected fractions estimated
Classes Frequency Cum. Cumulative value from
calculations for calculations for
Probability Cumulative Probability Cumulative AREA
n° of abs. corrected experimental
Lower Upper Class Cumulative (if any)
clas- Absolute Fraction Density density fraction density fraction decision making data MEAN STD.DEV. MEAN STD.DEV.
limit limit center fraction values fraction 
ses
1 0 100 50 0 0 0,00000 0,00000 0 0,00000 0,00000 0,00000 0,00000 0,00000 no 0,00 0,00 0,00 0,13
2 100 200 150 0 0 0,00000 0,00000 0 0,00000 0,00000 0,00010 0,00000 0,00053 no 0,00 0,00 0,05 55,93
3 200 300 250 0 0 0,00000 0,00000 0 0,00000 0,00002 0,00343 0,00007 0,00862 no 0,00 0,00 1,69 645,32
4 300 400 350 0 0 0,00000 0,00000 0 0,00000 0,00036 0,04521 0,00048 0,06095 no 0,00 0,00 16,84 2.092,36
5 400 500 450 25 0,29411765 0,00294 0,29412 25 0,28923 0,00199 0,24724 0,00188 0,25376 no 11.250,00 346.020,76 84,71 2.217,31
6 500 600 550 30 0,35294118 0,00353 0,64217 55 0,64052 0,00397 0,62807 0,00402 0,64238 found 597,5760 16.500,00 9.342,56 221,23 29,29
7 600 700 650 20 0,23529412 0,00235 0,87581 75 0,87471 0,00285 0,90934 0,00318 0,94895 13.000,00 135.640,14 206,40 2.656,54
8 700 800 750 10 0,11764706 0,00118 0,99235 85 0,99180 0,00074 0,99053 0,00037 0,99943 7.500,00 332.525,95 27,53 1.345,43
9 800 900 850 0 0 0,00000 0,99180 85 0,99180 0,00007 0,99961 0,00000 1,00000 0,00 0,00 0,09 9,29
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
n° of classes = 9 S= 85 Mean = 567,65  Dmeans = -9,11 Mean = 558,53 597,5760 48.250,00 823.529,41 558,53 9.051,60

Std. dev. = 99,01 i - 0,3 Dstd.dev. = -3,31 Std. dev. = 95,70


-----------
Leave empty final cells without data. n + 0,4 S D2 = 94,0136 Shape p. b = 6,8916
 Scale p. h = 597,5760  597,5760
Recommended steps to find the Weibull that best fits the experimental data Target cell  Proposed starting
to INITIALIZE value for h
1. Copy the proposed starting value for h, from the red cell into the blu cell. and then input as (corresponding
MINIMIZE to 63,2%),
2. Looking at the density frequency graph of experimental data, determine whether it represents infant independent
mortality or wear-out failures: in the first case insert into the SOLVER (EXCEL tool) the con- by SOLVER variables to the interpolated from
experimental data
straint b<1, in the second case b>1 (if the kind of failure is unclear, insert a generic constraint, e.g.: SOLVER
b>0.01).
3. Make a first try using the SOLVER to optimize simultaneously both b and h. As we started with
an initial value of h deduced from experimental data and imposing a crucial constraint on b , we
should achieve a satisfac tory result. Otherwise, proceed as follows:
4. Search the best value for b, using the SOLVER to minimize SD2, keeping constant h.
5. Use the SOLVER again to optimize h, keeping constant b.
6. An additional (optional) step can be the following: starting from the pair of obtained values for h and
b, make a second try with the SOLVER to optimize simultaneously both h and b.
REMARK: the best solution is mainly determined by examining the graphs and not only on the basis of the
minimum value of SD2.

Although a little more sophisticated, the basic setting of the calculations is very similar to that
which will be soon explained when discussing the parametric method of interpolation.

These slides can not be reproduced or distributed without permission in writing from the author. 283
2.3.4.8. Weibull distribution

ADDITIONAL DETAILS
1. The calculation of the mean and variance of the Weibull distri-
bution, starting from shape (b) and scale (h) parameters:
m = h . G(1 + 1/b); s2 = h2 . G(1 + 2/b) - m2
requires the use of the Gamma function (G), whose exposure
exceeds the limits of this Course.
NOTE - In EXCEL we found the Gamma distribution, f(x, a, q), which is not the
Gamma function, G(a), of our interest. This last is defined as:

G(a) =  xa-1 e-x dx
0
If a is a positive integer equal to k, we have: G(k) = (k -1)! .
If a is greater than 1, we have: G(a) = (a -1) . G(a -1) .
For large values of a, we can use Sterling approximate formula:
G(a +1) =  2 .  . a . (a/e)a (where e is the basis of natural logarithms)
In an EXERCISE we will see an example of interpolation with the Weibull distribution using
the Solver of EXCEL.
These slides can not be reproduced or distributed without permission in writing from the author. 284
2.3.4.8. Weibull distribution

2. There is also a 3 parameters Weibull


distribution (in which to b and h it is
added a 3rd parameter t0, correspon-
ding to the so called waiting time, be-
cause no failure can occur before t0: It seemed more expressi-
in other words, there are cases where ve to postpone the expo-
failures need some time (equal to t0) sure of these two points in
before starting to mature. Chap 3. Fundamentals
of Reliability and Robust
3. To construct the Weibull interpolating Design, in order to get a
straight line in a Weibull Chart, at more ready reference to
least 5 points (i.e. 5 failed elements) applications.
must be available. With 4 points we
can try, but it is highly risky. With 3
points almost always the results are
unreliable.

These slides can not be reproduced or distributed without permission in writing from the author. 285
2.3.4. Statistical distributions of current use

2.3.4.9
Exponential distribution

These slides can not be reproduced or distributed without permission in writing from the author. 286
2.3.4.9. Exponential distribution

Exponential distribution corresponds with


Weibull distribution when b = 1,
i.e. for random failures
(which are defined as having a constant hazard rate).
This is one of the most frequently used distributions
in Reliability field.

Its expression is obtained from that of Weibull distribution with


some simplifications and becomes:

F(t) = 1 - e-t/h  f(t) = 1/h . e-t/h

m = h
s = h
These slides can not be reproduced or distributed without permission in writing from the author. 287
2.3.4.9. Exponential distribution

Exponential distribution has a hazard (or failure) rate constant.

Hazard rate h(t) can be expressed as:


d F(t) f(t) 1/h . e-t/h 1/h . e-t/h
h(t) = ------------- = --------- = ------------- = ----------------- =
R(t) dt R(t) 1 - F(t) 1 - (1 - e-t/h)
1/h . e-t/h 1
= ------------- = ----- = l = constant
e-t/h h

This is the main reason why this distribution is a base refe-


rence for reliability analysis of components but especially
of systems.
We will go into depth about the concept of hazard rate in
Par. 4.1.1 speaking about R(t), F(t) and M(t) functions.
These slides can not be reproduced or distributed without permission in writing from the author. 288
2.3.4. Statistical distributions of current use

2.3.4.10
Summary of main
statistical distributions

These slides can not be reproduced or distributed without permission in writing from the author. 289
2.3.4.10. Short summary of main statistical distributions

Short summary of the key concepts about the most important statistical distributions
DISTRIBUTION TYPE NUMBER OF PARAMETERS FEATURES MAIN APPLICATIONS MAIN RESULTS REMARKS

It is the most widely used distribution A small difference between the mean and the median
2 parameters: Simmetry: i.e. equiprobability of results
Normal continouos Distribution of sample means. (sometimes, for convenience, even of a sample ensures that data are acceptably distributed
m and s. by defect or by excess . according to the normal distribution.
inappropriately!).

Bernoulli's experiments Probability of seeing in the The probabilities of success , p, and of not-success ,
2 parameters: Criteria for designing
Binomial discrete (with only 2 possible outcomes): sample at least one defect (one q = 1 - p, may be different (and not the same as in the
p and n. reliability experimental tests. case of a fair coin).
e.g. Head & Tail . or more) of a given type.

It is enough to know the mean in order to completely


define the theoretical distribution, but it corresponds to
1 parameter Limit of Binomial distribution Histogram of % of units (e.g. cars)
Poisson discrete Number of defects per unit . the actual distribution only if the subsequent batches of
because it is: s = √ m . when p → 0 and n → ∞. with 0, 1, 2, 3, …, n defects (each). each component mantain the same variability in the
time (quite rare!).

b is called shape parameter ; with b = 1, the Weibull's


Failure law :
distribution becomes an exponential distribution (in
2 parameters: It has very different shapes, b < 1 → infant mortality ;
Weibull continouos Weibull Charts. which the hazard rate is constant);
b and h. depending on the shape parameter b. b = 1 → useful life (random failures );
h is called both scale parameter or characteristic life
b > 1 → wear-out . corresponding to 63.2%.

These slides can not be reproduced or distributed without permission in writing from the author. 290
2.3.4.10. Short summary of main statistical distributions
FEATURES MEAN VARIANCE TYPICAL APPLICATIONS R E M A R K S

(with respect to the


2 parameters:
It well represents all populations with continuous and symmetrical It is the best known and most widely used distribution: sometimes even impro-
NORMAL

Continuous

Symmetric
(Gauss)

m and s
distribution, rapidly sloping down as you move away from the mean perly used. It is the best known and most widely used distribution: sometimes

mean)
m s2 (e.g.: the measurement errors when those "by defect" are used even improperly. Mean, median and mode coincide and therefore a small
equiprobable to those "by excess"). difference between the mean and the median (of the sample data) provides the
It is the typical distribution of sample means. acceptability of their interpretation according to the normal law.
Confidence intervals with small samples (n  30). This distribution For large values o ​ f n, the Student's t distribution coincides with the normal
(or d.o.f. = n-1)

(with respect to the


3 parameters:
(Student)

Continuous

m, sandn

Symmetric

takes into account the greater uncertainty due to the fact that thesof distribution.
mean)

2 the sample is no longer a good estimate of that one of the For greater precision, it is common to resort to Student's t distribution even for
m s
t

population. It is as if it were used a normal distribution more and values ​of n greater than 30. If you are working manually (using Tables), the
more lower and wider, while the sample size decreases from n = 30 t-distribution is not used beyond n = 50, whereas if you use your computer, the
to n = 2. t-distribution may also be used beyond n = 100.
The domain may also be made ​up of several separate segments on the abscis-sa
(constant) is given by: y =
a and b extremes of the
definition domain on the
2 parameters:
RECTAN-

Continuous

abscissa, while the


probability density

(e.g. in the case of integer numbers, for which is performed the continuity
(b - a)2
GULAR

a+b
a and b

Situations of "equiprobability": eg., in the case of the 90 numbers of correction (1)), but in any case it must be limited both left and right.
1/(b-a).

--------- ---------- (1)


the LOTTO . As with the normal distribution, here too, the mean, the median and the mode
2 12 coincide: but the probability density remains constant even when you are away
from the mean.
It is suitable to determine the probability of detecting at least one
defective (one or more) of assigned (or hypothesized) frequency, in It is used when the outcome of an experiment has only two alternatives (Ber-
for p < 0,5 right skewed
for p > 0,5 left skewed
2 parameters:
BINOMIAL

a batch of established size. This is useful for batch control (in Quality noulli's experiment). Examples: outcomes of heads or tails in successive tos-
for p = 0,5 simmetric

n.p.q ses of a coin, presence of a face ≤ 2 in the throw of a die, extraction of a white
Discrete

Acceptance ), and just as well for planning reliability experimental


n

.
and

n p verifications. ball from a box containing also black balls in known proportion, extraction from a
batch of an operating or defective component, etc.. In general, the Binomial di-
p

(with q = 1-p)
It is also the basis for the definition of confidence intervals for stribution gives the probability of a predetermined number of " successes " in
proportions: e.g. the number of defective units per million a given number of experiments.
(dpm), regardless of the number of defects in each unit.

The Poisson distribution is the limit of the Binomial when p → 0 and n → ∞. Since
Right skewed
1 parameter:
POISSON

the variance is equal to the mean, it is not necessary to evaluate s from the data.
l=n p
Discrete

Distribution of the number of defects per unit. For example, once


.

l l known the mean l, we can calculate the percentage of units (e.g. However there is good correlation with reality only if the variability of successive
cars) with 0, 1, 2, 3, ... defects (each). batches of each component remains substantially constant over time, but if it
fluctuates, as often happens, the variability is higher than that assumed by the
Poisson's model.
1 parameter:
NENTIAL

Exponential
Continuous
ESPO-

It typically represents the random failures (or useful life failures),


trend

h h2 which have constant the hazard rate : It is obtainable from the Weibull distribution for b = 1.
h

h(t) = df(t)/[R(t) . dt] = constant.


always limited on the left
pes, from a hyperbole to

h = scale parameter ; but also " characteristic life " corresponding


an almost normal, but
Several different sha-

Obtainable from b and h with


2 parametersi:
WEIBULL

Continuous

to 63.2%;
by the zero
b and h

the help of the Gamma " Failure laws " of different shapes
b = shape parameter ; if it is:
distribution (usually indicated depending on components,
b < 1 : infant mortality failures
with a G) or by computerized usually represented in Weibull Cards .
recursive procedures b = 1 : random or useful life failures (esponential distribution )
b > 1 : wear-out failures.

(1) The continuous distributions can also be used (always in a continuous manner) to address problems in the field of discrete. For example, having to do with balls, numbered from 1 to 10, extracted from a box containing them in varying
quantities, the probability that is extracted a ball with the number 7 (or any other assigned number) is given by the area under the curve between the abscissas 6.5 and 7.5: this way of operating is called " continuity correction " .

These slides can not be reproduced or distributed without permission in writing from the author. 291
2.3. Probability Theory

2.3.5
A brief mention of
interpolating problems

These slides can not be reproduced or distributed without permission in writing from the author. 292
2.3.5. Interpolating problems

STATISTICAL DISTRIBUTION

The values grouped into the classes of an histogram show a pattern


which generally can be interpreted by a statistical continuous di-
stribution (interpolating them).

To overlap the histogram a suitable statistical distribution, we can


follow 2 methods:
• graphical: we join by a line the centers of the top of each column and,
of course, we change in a correct way the ordinates scale if we want to
perform graphical elaboration (as we told before, graphical calculations
must be done using cumulative distribution);
• mathematical interpolation: the purpose is to select, among a set of
known statistical distributions, the one that best interpolates the data
according to statistical criteria.

These slides can not be reproduced or distributed without permission in writing from the author. 293
2.3.5. Interpolating problems

PROS and CONS of two approaches


METHOD PROs CONs

GRAPHICAL • Final result is not obtained by a


• Application always possible numerical way, but by a manual
(manual) operation on the graph.

1. The interpolation by a function


gives a “smoothing” of the
histogram, giving a more ge-
Mathematical neral result (not valid only for • Not always we can find a known
INTERPO- the specific sample). distribution which fits the histo-
LATION 2. The areas of the distribution gram in a satisfactory way.
tails are evaluated by numeri-
cal (and not graphical) calcu-
lations.

These slides can not be reproduced or distributed without permission in writing from the author. 294
2.3.5. Interpolating problems

Moreover, in many cases,


data are not distributed in a symmetric way
vs. the mean
and therefore they can not be interpolated
by a Gauss normal distribution (which is symmetric).

These slides can not be reproduced or distributed without permission in writing from the author. 295
2.3.5. Interpolating problems

To select, from among the known statistical distributions, the best


one interpolating a histogram, there are 2 basic methods:

Whatever is the chosen interpolating distri-


PARAMETRIC bution, it will maintain the same mean and
method the same standard deviation (or other pa-
(or of the moments) rameter) of the histogram’s data. This is the
most common method, especially followed in ca-
ses of symmetrical distribution of data, when a
normal distribution can be used.

Whatever is the chosen interpolating distri-


MAXIMUM
bution, we shall ensure that its cumulative
LIKELIHOOD percentages are as close as possible to
ESTIMATION (MLE) those of the actual histogram’s cumulative,
method at least in some points of special interest.

These slides can not be reproduced or distributed without permission in writing from the author. 296
2.3.5. Interpolating problems
Typical supply problem

A restaurant specializing in
"T-bone steaks” recorded 41 52 46 42 46 36 44 68 58 44
during 50 successive Sun- 49 48 48 65 52 50 45 72 45 43
days, the number of steaks 47 49 57 44 48 49 45 47 48 43
requested and served, as 45 56 61 54 51 47 42 53 41 45
58 55 43 63 38 42 43 46 49 47
shown in the table to the
right.

Examples of questions that can be easily answered after interpolation


1. How many steaks should be available every Sunday, so that we can
expect to go out of stock, at most 10% of Sundays?
2. In this situation, what is the percentage of Sundays with more than 10
steaks not served ?

These slides can not be reproduced or distributed without permission in writing from the author. 297
2.3.5. Interpolating problems

Data parameters are:


From the difference
between median and mean
 mean = x = 49.00 D% = 100 . (49.00 - 47.00) / 49.00 = 4.08%
we see that the distribution is very close to the
limit at which it can not be considered
“symmetric”.
 median = 47.00 The asymmetry is even more evident on the
diagram of the frequency density.

 standard deviation = s = 7.52


To obtain the histogram, we should consider:
Nc = 1 + 10/3 . Log 50 = 1 + 3.333 . 1.699 = 6.66 classes
that we could round to 7.
But we prefer to have 8 classes
in order to have integer values for the class limits (see next slide).

These slides can not be reproduced or distributed without permission in writing from the author. 298
2.3.5. Interpolating problems
45%

40% Istogramma
Histogram
Normal
Normale
35% 34,0%
the classes
CLASSI

32,0%

30%
NELLE

25%
DOMENICHEin
%%ofDISundays

20%

15%
12,0%

10%
8,0%
6,0%
5% 4,0%
2,0% 2,0%

0%
40 45 50 55 60 65 70 75
Number of requested
NUMERO “T-bone
DI FIORENTINE steaks”
RICHIESTO (esposti estremivalues
(abscissa referdelle
superiori classi)
to class upper limits)

These slides can not be reproduced or distributed without permission in writing from the author. 299
2.3.5. Interpolating problems

Parametric Method

As the interpolation by a normal distribution


seems very poor, as shown by the difference
(small but not negligible) between median and
mean,
we can try to use the following EXCEL
sheet, which automatically applies the
Parametric Method both to the Normal
and to the Weibull distribution.
These slides can not be reproduced or distributed without permission in writing from the author. 300
2.3.5. Interpolating problems
PARAMETRIC INTERPOLATIONS

EXPERIMENTAL data NORMAL distribution WEIBULL distribution


Classes Frequency
n° of Cumulative Probability Cumulative Probability Cumulative
Lower Upper Class
clas- Absolute Fraction Density fraction density fraction density fraction
ses limit limit center
1 35 40 37,50 2 0,04 0,00800 0,04000 0,01801 0,12824 0,01428 0,12270
2 40 45 42,50 17 0,34 0,06800 0,38000 0,03807 0,31739 0,02686 0,25748
3 45 50 47,50 16 0,32 0,06400 0,70000 0,05209 0,57328 0,04130 0,46253
4 50 55 52,50 6 0,12 0,02400 0,82000 0,04611 0,80079 0,04845 0,70095
5 55 60 57,50 4 0,08 0,01600 0,90000 0,02642 0,93373 0,03851 0,89085
6 60 65 62,50 3 0,06 0,01200 0,96000 0,00979 0,98476 0,01729 0,97917
7 65 70 67,50 1 0,02 0,00400 0,98000 0,00235 0,99763 0,00338 0,99849
8 70 75 72,50 1 0,02 0,00400 1,00000 0,00036 0,99975 0,00020 0,99997
9 0 1,00000
10 0 1,00000
11 0 1,00000
12 0 1,00000
13 0 1,00000
n° of classes = 8 S= 50 Mean = 48,60 Dmeans = 0,00 Mean = 48,60
Std. dev. = 7,58 Dstd.dev. = 0,00 Std. dev. = 7,58
Leave empty final cells without data. S D2 = 0,0000 Shape p. b = 6,9761
Scale p. h = 53,5355
NOTE - Mean and standard deviation (automatically calculated on  
the basis of data grouped into histogram’s classes) present values Target cell to INITIALIZE
MINIMIZE and then input
of 48.60 and 7.58, respectively, rather than the correct previously by SOLVER as independent
calculated on the basis of all the data ( 49.00 and 7.52). variables to the
SOLVER
By overwriting the correct values in the corresponding cells (and
Determining the best interpolating
losing the expressions contained in them), we would get a more
curve by using the SOLVER
accurate interpolating distribution, but not worth it.
These slides can not be reproduced or distributed without permission in writing from the author. 301
2.3.5. Interpolating problems

These slides can not be reproduced or distributed without permission in writing from the author. 302
To better evidence, the centers of the upper bases of the columns of the above histogram have been replaced with
large diamond-shaped points.

PROBABILITY DENSITY
0,08

Experimental data
0,07 Normal distribution
Weibull distribution
0,06
Probability density

Despite the advantage of not


0,05 being bound to the symmetry,
not even the Weibull distribu-
tion is able to provide a good
0,04
interpolation.

0,03

0,02

0,01

0,00
35 40 45 50 55 60 65 70 75

Abscissa
These slides can not be reproduced or distributed without permission in writing from the author. 303
2.3.5. Interpolating problems
CUMULATIVE PROBABILITY

1,00

0,90

0,80
On the right side of the graph,
Cumulative Probability

0,70 both curves are placed upon


the top of the experimental
0,60 data and therefore they under-
estimate the tail areas.
0,50

0,40

0,30

0,20 Experimental data


Normal distribution
0,10
Weibull distribution
0,00
35 40 45 50 55 60 65 70 75 80

Abscissa
These slides can not be reproduced or distributed without permission in writing from the author. 304
2.3.5. Interpolating problems
But the Parametric method is not the only one, there is also the
Maximum Likelihood Estimation (MLE) method,
which is based on cumulative functions.
M A X I M U M L I K E L I H O O D E S T I M A T I O N (M.L.E.) I N T E R P O L A T I O N S
EXPERIMENTAL data NORMAL distribution WEIBULL distribution
Classes Frequency Cumulated Cumulative
Optional Probability Cumulative Optional Probability Cumulative
n° of
Lower Upper Class absolute correct(1) D2 D2
clas- Absolute Fraction Density WEIGHTS density fraction WEIGHTS density fraction
ses limit limit center values fraction
1 35 40 37,50 2 0,04 0,00800 2 0,03373 1,0 0,01850 0,12484 0,00830 1,0 0,01880 0,15295 0,01421

2 40 45 42,50 17 0,34 0,06800 19 0,37103 1,0 0,04307 0,33832 0,00107 1,0 0,03709 0,33851 0,00106

3 45 50 47,50 16 0,32 0,06400 35 0,68849 1,0 0,05850 0,62437 0,00411 1,0 0,05464 0,60720 0,00661

4 50 55 52,50 6 0,12 0,02400 41 0,80754 1,0 0,04635 0,85338 0,00210 1,0 0,05144 0,85841 0,00259

5 55 60 57,50 4 0,08 0,01600 45 0,88690 1,0 0,02143 0,96288 0,00577 1,0 0,02356 0,97839 0,00837

6 60 65 62,50 3 0,06 0,01200 48 0,94643 1,0 0,00578 0,99412 0,00227 1,0 0,00338 0,99920 0,00278

7 65 70 67,50 1 0,02 0,00400 49 0,96627 1,0 0,00091 0,99943 0,00110 1,0 0,00008 1,00000 0,00114

8 70 75 72,50 1 0,02 0,00400 50 0,98611 1,0 0,00008 0,99997 0,00019 1,0 0,00000 1,00000 0,00019

9 0 50 0,98611 1,0 1,0


10 0 50 0,98611 1,0 1,0
11 0 50 0,98611 1,0 1,0
12 0 50 0,98611 1,0 1,0
13 0 50 0,98611 1,0 1,0
n° of classes = 8 S= 50 Mean = 48,6 Mean = 47,84082 S = 0,02492 Shape p. b = 7,74397 S= 0,03695
Std. dev. = 7,58 Std. dev. = 6,81151 Scale p. h = 50,43956

Leave empty final cells without data. solver


The weights are used to "impose" the closeness of the interpolating curve to the

Initialize with the cor-


responding values of
i - 0,3
most important points, which will be affected by a greater weight. Giving to a point's

Initialize (as a

experi-mental
(1) i.e.: ---------------

the experimental

general rule)

h = mean of
weight a value of 0, the point will be excluded from the calculation (as if there was n + 0,4
not). Obviously, if all weights are 1, all points are kept in the same account. Often

b = 2;
greater weight is given to the central points or to points of the side where we are

with:

data
data
interested in the value of the tail area.



In this case, the SOLVER function must be used
once for the Normal and once for the Weibull.

These slides can not be reproduced or distributed without permission in writing from the author. 305
2.3.5. Interpolating problems
CUMULATIVE PROBABILITY

1,0

0,9

0,8
Cumulative probability

0,7 Even here, on the right side of the graph,


both curves are placed upon the top of the
0,6 experimental data and therefore they over-
estimate the tail areas (even more than
0,5 with the parametric interpolation).

0,4

0,3

0,2 Experimental data


Normal distribution
0,1
Weibull distribution
0,0
35 40 45 50 55 60 65 70 75 80

Abscissa
These slides can not be reproduced or distributed without permission in writing from the author. 306
To better evidence, the centers of the upper bases of the columns of the above histogram have been replaced with
large diamond-shaped points.

PROBABILITY DENSITY
0,08

Experimental data
0,07 Normal distribution
Weibull distribution
0,06
Probability density

0,05 Not even the Maximum Likeli-


hood Estimation (MLE) method
provides satisfactory results (not
0,04 even by the Weibull).

0,03

0,02

0,01

0,00
35 40 45 50 55 60 65 70 75

Abscissa
These slides can not be reproduced or distributed without permission in writing from the author. 307
2.3.5. Interpolating problems

Since all the four showed interpolations


having left unsatisfied,
especially in the tails,
the most important aspect,
it is better to work directly on the histogram,
by using the cumulative distribution
with a graphical method
as shown in the following slide.

These slides can not be reproduced or distributed without permission in writing from the author. 308
2.3.5. Interpolating problems
Answer to the 2nd question Answer to the 1st question

100% 100%
98%
96%
90% 90%
classes

82%
80%
the CLASSI

70% 32.0% + 34.0% + 4.0% = 70% 70%


To have a maximum of
10% of out of stock,
NELLE

60% we must have, every


Sundays in

Sunday, at least
60 – 10 = 50
DI DOMENICHE

50% 60 steaks

40%
34% 38%
32%
% of

30%
%

20%
12%
10% 8%
6%
4%
4% 2% 2%
0%
35 40 45 50 55 60 65 70 75
Number
NUMERO DI of requested
FIORENTINE “T-bone
RICHIESTO steaks”
IN UNA DOMENICA
These slides can not be reproduced or distributed without permission in writing from the author. 309
2.3.5. Interpolating problems

Resolution of the problem proposed as an example:

1. for a maximum of 10% of out of stock,


we must have at least 60 steaks every
Sunday;
2. In this situation, more than 10 steaks will
remain not served in 70% of Sundays.

These slides can not be reproduced or distributed without permission in writing from the author. 310
2.3.5. Interpolating problems

CONCLUSIONS ABOUT INTERPOLATIONS


1. Normal distribution is the most commonly used, but it
has the limit of symmetry, so it is not suitable when
errors of underestimating and of overestimating are not
equally likely (as in the steaks case).
2. Not always the best interpolation can be obtained assu-
ming, for the interpolating distributions, the same mean
and the same standard deviation of the data, as sugge-
sted by the Parametric Method.
3. The most common alternative is the Maximum Likeli-
hood Estimation (MLE) method.
4. An option always possible, although less automatic, is
the graphical approach (= manual).
These slides can not be reproduced or distributed without permission in writing from the author. 311
2.3. Probability Theory

2.3.6
Possible deductions when we can not use
a theoretical distribution:
Tchébychev’s inequality

These slides can not be reproduced or distributed without permission in writing from the author. 312
2.3.6. Tchébychev’s inequality

When we need to evaluate the area of a “tail”,


right or left,
of a distribution of experimental observations,
but it is not possible to find a good interpolating
among known distributions,
we can still use the Tchébychev’s inequality,
which allows to calculate a “limit value”
over which we can find
“no more than a fixed percentage” of data.

These slides can not be reproduced or distributed without permission in writing from the author. 313
2.3.6. Tchébychev’s inequality

We saw that standard deviation indicates the scattering of the popula-


tion elements.
The Bienaymé-Tchébychev Theorem quantifies this intuitive observa-
tion in the following way.

Given a random variable, whatever is the shape of its distribution, the


fraction of data falling within ± k units of standard deviation from their
mean is at least:
1
1 - -----
k2
with k > 0.
The same can be said also in the equivalent form: no more than a data
fraction equal to 1/k2 will be outside the interval between ± k units of
standard deviation from their mean.

These slides can not be reproduced or distributed without permission in writing from the author. 314
2.3.6. Tchébychev’s inequality

WHATEVER SHAPE DISTRIBUTION

mean
1
fraction of data > 1 - ------
k2

m
m-ks m+ks

Generally, the two "tails" have different areas


(their sum is of course 1/k2)

These slides can not be reproduced or distributed without permission in writing from the author. 315
2.3.6. Tchébychev’s inequality

Indicating with m and s the mean and the standard deviation of


the selected random variable, the following inequalities mathe-
matically summarize what we just said:
1
P(|x - m|  k s)  1 - -----
k2
or, which is the same:
1
P(|x - m|  k s)  -----
k2

This theorem is true for any kind of data: no matter if they relate
to populations or to samples, to continuous or to discrete distri-
butions. Moreover it is always true regardless of the shape of
the distribution.

These slides can not be reproduced or distributed without permission in writing from the author. 316
2.3.6. Tchébychev’s inequality

Example. The number of cars (of a certain model) monthly produced by


a plant is a random variable with mean m = 3,000 and standard devia-
tion s = 400. The fraction of months with a number of produced cars
within the range m  2 s, i.e. between 2,200 and 3,800 cars per month,
well be, according to the Tchébychev’s inequality with k = 2 :

1 1 1
1 - ----- = 1 - ----- = 1 - ----- = 1 - 0.25 = 0.75  75%
k2 22 4

This can also be expressed by saying that in no more than 25% of the
months the production will be outside the range 2,200÷3,800 cars.

These slides can not be reproduced or distributed without permission in writing from the author. 317
2.3.6. Tchébychev’s inequality

In this kind of applications, it often happens to be interested only in an one-sided esti-


mation, because we are worried to the data outside of the interval by only one of the
two limits. In the above example, the two limits (defining the interval) correspond to a
production that is: or greater than 3,800 cars/month or less than 2,200 cars/month.
But (even with bilateral estimates) the Tchébychev’s inequality merely asserts that
inside the interval m ± k s there are at least a data fraction equal to 1-1/k2 (or maybe
more) and, therefore, outside the interval, there is at most a data fraction equal to 1/k2.
But, a priori, we cannot know how this fraction is allocated between the two distribution
tails. In general, we can only say that each tail will contain a data fraction certainly not
greater than 1/k2 (the same applies to the sum of the two tails!).

In conclusion, in the above example, we cannot say that in each tail there are less than
25%/2 = 12.5% of data, because, in general, we cannot say that data are distributed a
half in a tail and the other half in the other tail ! The only thing we can say is that the
sum of two tails contains a data fraction less than 25% and that this value applies, a
fortiori, for each tail, which surely contains less than 25% of data (this is the same thre-
shold value of the sum of two tails and not the half corresponding to 12.5%).

Of course, if the random variable is defined only for positive values (produced units,
number of operations, etc.), if the value m - k s is negative, the Tchébychev lower li-
mit must be put equal to zero.

These slides can not be reproduced or distributed without permission in writing from the author. 318
2.3.6. Tchébychev’s inequality

So Tchébychev’s Theorem is very helpful in the (conservative) evalua-


tion of quantiles (or percentiles), every time we don’t know distribution
law or its calculation is problematic.

Of course, we can be interested also in the inverse problem of obtaining


the value of k corresponding to an assigned value of the probability P,
clearly specifying if this probability refers to the event that the points are
respectively inside or outside of the interval. Indicating these two
probabilities with P, and with P, we obtain:

1
k = ----------
1 - P

k = 1 /  P

These slides can not be reproduced or distributed without permission in writing from the author. 319
2.3.6. Tchébychev’s inequality

It is important to note that the general validity of the Tchéby-


chev’s inequality affects the accuracy of the estimate. In
other words, the application of Tchébychev’s inequality, when
the data distribution is among those studied in Statistics, is
usually too conservative. For example, the 90-percentile of a
data set is given by m + 3.1623 s if nothing is known about
the distribution, but becomes m + 1.2816 s if the distribution
is normal.

These slides can not be reproduced or distributed without permission in writing from the author. 320
2.3.6. Tchébychev’s inequality
TCHÉBYCHEV's INTERVAL NORMAL DISTRIBUTION
or for a comparison
upper percentile with the same upper percentile
1 k z % of data
lower upper
P = 1 - ----- [units of standard [units of within
limit limit
k2 deviation s] standard deviation s ] mz s

75,00% 2,0000 0,6745 25,00% 75,00% 50,00%


80,00% 2,2361 0,8416 20,00% 80,00% 60,00%
85,00% 2,5820 1,0364 15,00% 85,00% 70,00%
90,00% 3,1623 1,2816 10,00% 90,00% 80,00%
95,00% 4,4721 1,6449 5,00% 95,00% 90,00%
97,00% 5,7735 1,8808 3,00% 97,00% 94,00%
97,50% 6,3246 1,9600 2,50% 97,50% 95,00%
98,00% 7,0711 2,0537 2,00% 98,00% 96,00%
99,00% 10,0000 2,3263 1,00% 99,00% 98,00%
99,50% 14,1421 2,5758 0,50% 99,50% 99,00%
99,90% 31,6228 3,0902 0,10% 99,90% 99,80%

90,00% 3,1623 1,2816 10,00% 90,00% 80,00%

90,00% 3,1623 1,2816 10,00% 90,00% 80,00%


FREE INPUTs
in yellow cells

90,00% 3,1623 1,2816 10,00% 90,00% 80,00%

90,00% 3,1623 1,2816 10,00% 90,00% 80,00%

90,00% 3,1623 1,2816 10,00% 90,00% 80,00%

90,00% 3,1623 1,2816 10,00% 90,00% 80,00%

These slides can not be reproduced or distributed without permission in writing from the author. 321
2. Fundamentals of Applied Statistics

2.4
S T A T I S T I C A L
I N F E R E N C E

These slides can not be reproduced or distributed without permission in writing from the author. 322
2.4. Statistical inference

The word inference is the most general form for "reasoning", which
can be referred both to deductions and to inductions. “Statistical
inference” is the process that, starting from information collected
from a sample, allows to reach conclusions about the population
from which the sample was taken.

The Chapter of STATISTICAL INFERENCE, is divided into


two main chapters:
 ESTIMATES, that complete the “Punctual estimates”
with their confidence intervals, taking into account
the population variability,
 and STATISTICAL HYPOTHESIS VERIFICATION.

These slides can not be reproduced or distributed without permission in writing from the author. 323
2.4. Statistical inference

2.4.1
Estimates

These slides can not be reproduced or distributed without permission in writing from the author. 324
2.4.1. Estimates

2.4.1.1
Punctual estimates

These slides can not be reproduced or distributed without permission in writing from the author. 325
2.4.1.1. Punctual estimates
Without going into details, we simply remember that
Statistics proves that:
 the best “estimator” of the “true” mean of a population is the
mean of the sample;
 the best “estimator” of the “true” proportion in a population
is the proportion detected on the sample, provided that the
proportion in the sample is enough far away from 0 and from
1 (which is practically the same situation)(1);
 the best “estimator” of the “true” standard deviation of a
population is the standard deviation of the sample(2).
(1) Even when the proportion of "successes" detected on the sample is zero, it is plausible that the true propor-
tion of successes in the whole population (but also simply in a larger sample) is greater than zero (see also
at the end of the discussion of the PROPORTIONS, Par. 2.4.1.8). It is also obvious that something similar hap-
pens when the proportion is very close to 1, because, by simply exchanging the term "success" with the
term “not-success“, you fall in the previous case (with the proportion close to 0).
(2) Provided that we have calculated the sample standard deviation dividing the sum of squares or deviance
(numerator) by n - 1. If we would divide the sum of squares by n (instead of by n-1), in order to obtain an
“unbiased” estimator of the standard deviation of the population, we need to multiply this value of the sam-
ple standard deviation by the corrective coefficient:  n / (n – 1) , (where n is the sample size, as usual).
These slides can not be reproduced or distributed without permission in writing from the author. 326
2.4.1. Estimates

2.4.1.2
Distribution of sample means

These slides can not be reproduced or distributed without permission in writing from the author. 327
2.4.1.2. Distribution of sample means

Let us suppose to take N = 7 equal tickets numbered from 1 to 7


(or 7 pieces of paper of length from 1 to 7 cm and then rolled)

The probability that, drawing a ticket at random, we find that one with
the number 3 is the same as finding a ticket with any other number.

DRI S
E TCRTIAB N
UG Z IUOLNAER R D
E ITST TAR
N IGBOULTAI ROEN
(equally probable outcomes)
o dell'equiprobabilità
0,24 This probability,
0,22
0,20 the same
density
Densità di probabilità

0,18
0,16 Probability density is equal
Densità di probabilità to i0.142857
per tutti bigliettinifor allathe
pari tickets
0,142857 for all tickets,
0,14

is equal to
Probability

0,12
0,10
0,08
0,06
1/7  0.143
0,04
0,02 corresponding to
0,00
0 1 2 3 4 5 6 7 8 14.3%
B ITGI L
CI K
EET TTI S
NI
These slides can not be reproduced or distributed without permission in writing from the author. 328
2.4.1.2. Distribution of sample means

The mean is:


1 + 2 + 3 + 4+ 5+ 6+ 7
m = ----------------------------------- = 4
7

Lo standard deviation is:


(1-4)2 + (2-4)2 + (3-4)2 + (4-4)2 + (5-4)2 + (6-4)2 +(7-4)2
s = --------------------------------------------------------- = 2
7
Standard deviation is divided by N = 7 (instead of by N - 1
= 6), because it’s referred to a whole population.

These slides can not be reproduced or distributed without permission in writing from the author. 329
2.4.1.2. Distribution of sample means

Now let us consider


samples of n = 3 tickets each
and let us investigate about the distribution
of the means of all different samples
(with 3 tickets each)
drawn from the population of N = 7 tickets
described above.

These slides can not be reproduced or distributed without permission in writing from the author. 330
2.4.1.2. Distribution of sample means
In total there are 35 different samples with 3 tickets each C L
samples means samples means samples means samples means samples means

All samples with the ticket 1


minimum
1 2 3 2.00 1 3 4 2.67 1 4 5 3.33 1 5 6 4.00 1 6 7 4.67
1 2 4 2.33 1 3 5 3.00 1 4 6 3.67 1 5 7 4.33
1 2 5 2.67 1 3 6 3.33 1 4 7 4.00
1 2 6 3.00 1 3 7 3.67
1 2 7 3.33

All reamaining samples with the ticket 2


2 3 4 3.00 2 4 5 3.67 2 5 6 4.33 2 6 7 5.00
2 3 5 3.33 2 4 6 4.00 2 5 7 4.67
2 3 6 3.67 2 4 7 4.33
2 3 7 4.00

All reamining samples with the ticket 3


3 4 5 4.00 3 5 6 4.67 3 6 7 5.33
3 4 6 4.33 3 5 7 5.00
3 4 7 4.67

All reamining samples with the ticket 4


4 5 6 5.00 4 6 7 5.67
4 5 7 5.33

All reamining samples with the ticket 5 (only one)


maximum
5 6 7 6.00
These slides can not be reproduced or distributed without permission in writing from the author. 331
2.4.1.2. Distribution of sample means

We can calculate that the means


of the 35 samples with 3 tickets each have:
 mean = 4 (just as the mean of all tickets, becau-
se each value of the tickets (1 to 7) appears in the set of all
35 possible samples (see previous slide) the same number
of times of all the other (in this case 15 times);

 standard deviation = 0.9428 (much smaller


than the standard deviation of single tickets equal
to 2).

Also in this case, the standard deviation is divided by


n = 35 (and not by n - 1 = 34),
because it is a whole population.
These slides can not be reproduced or distributed without permission in writing from the author. 332
2.4.1.2. Distribution of sample means

15
The histogram shows that the
14
means of samples 13 … well approximated by a
13 with 3 tickets each NORMAL DISTRIBUTION ...
12 are distributed as a
11 symmetric bell ... We saw before that the
10 mean remain the same (4)
9 9
9

6 … even if the single ele-


5 ments (= tickets) distribu-
4
tion is rectangular (as they
are equally probable)
3
2 2
2

0 1 2 3 4 5 6 7 8
These slides can not be reproduced or distributed without permission in writing from the author. 333
2.4.1.2. Distribution of sample means

15

14
13
13

12

11

10
9 9
9

4
… and the same Of course the mean of
3 happens, on the left the biggest sample (6)
side, for the smaller 2 2 is smaller than the big-
2 gest ticket (7) …
sample
1

0 1 2 3 4 5 6 7 8
These slides can not be reproduced or distributed without permission in writing from the author. 334
2.4.1.2. Distribution of sample means
Moving from counting the number of elements (tickets)
0,50 and of the number of samples
0,45
to analyzing their statistical distributions, we obtain:

0,40 Sample
PROBABILITÀ

Single elements (with 3 tickets each)


0,35
(tickets) means distribution
DENSITÀ DIDENSITY

0,30 distribution n=3


n=1 m = 4; s = 0.9428
0,25
m = 4; s = 2
PROBABILITY

0,20

0,15

As the two distributions must have


0,10 the same area (1 i.e. 100%),
the distribution of the sample means,
0,05 which (as we have seen) has a narrow basis,
must necessarily become higher.
0,00
0 1 2 3 4 5 6 7 8
Values
Valori of
deiTICKETS or ofothe
BIGLIETTINI MEANS
delle ofdei
MEDIE samples withda
campioni 33tickets each
bigliettini
These slides can not be reproduced or distributed without permission in writing from the author. 335
2.4.1.2. Distribution of sample means

We see that it is easier to find


0,50
a sample,
rather than a single element, This area indicates
0,45
with its mean (or value) the probability to
0,40 close to the overall mean (4) draw at random
a sample
DI PROBABILITÀ
DENSITY

0,35 This area indicates the with mean between


probability to draw at random 4,5 and 5,5
0,30
a single element with mean
between 4,5 and 5,5,
PROBABILITY

0,25
i.e. in this case
the ticket with the number 5
DENSITÀ

0,20

0,15

0,10

0,05

0,00
0 1 2 3 4 5 6 7 8

Valori of
Values deiTICKETS
BIGLIETTINI
or ofothe
delle MEDIE
MEANS ofdei campioni
samples withda
33 bigliettini
tickets each
These slides can not be reproduced or distributed without permission in writing from the author. 336
2.4.1.2. Distribution of sample means

What we have shown above is synthesized by two fundamen-


tal theorems of statistics.

The 1st theorem, called OF CENTRAL LIMIT, says that


the distributions of the sample means
can be well approximate
by a normal distribution,
whatever is the distribution of single elements;
and the larger the sample size n the better the approximation.

These slides can not be reproduced or distributed without permission in writing from the author. 337
2.4.1.2. Distribution of sample means
0,50

0,45

0,40
PROBABILITÀ

0,35
DENSITÀ DIDENSITY

0,30

0,25
PROBABILITY

0,20

0,15

0,10

0,05

0,00
0 1 2 3 4 5 6 7 8
Values
Valori of
deiTICKETS or ofothe
BIGLIETTINI MEANS
delle ofdei
MEDIE samples withda
campioni 33tickets each
bigliettini

These slides can not be reproduced or distributed without permission in writing from the author. 338
2.4.1.2. Distribution of sample means

The following examples show, once more, as,


even with the single elements distributions very far from the normal,
the sample means distribution
always tends to the normal distribution,
(and rather quickly too: in this case with samples of 5 elements).
0,20 0,20
DENSITY

PROBABILITY DENSITY
DENSITÀ DI PROBABILITÀ

DENSITÀ DI PROBABILITÀ
0,15 0,15

n=5 n=5
PROBABILITY

0,10 0,10

0,05 0,05

0,00 0,00
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

And if the single elements distribution is normal ?


A fortiori, the sample means distribution will be normal !

These slides can not be reproduced or distributed without permission in writing from the author. 339
Additional examples…

These slides can not be reproduced or distributed without permission in writing from the author. 340
2.4.1.2. Distribution of sample means

The 2nd theorem defines the characteristics of the


normal distribution:

 The mean mx of the sample means distribution is equal


to the mean mof the population (of the single elements).
 The standard deviation sx of the sample means distri-
bution is given by:
s
 sx = ------ for infinite populations (or assumed as equivalent);
n

sN - n
 sx = ------ . ------ for finite populations with N elements.
n N-1

These slides can not be reproduced or distributed without permission in writing from the author. 341
2.4.1.2. Distribution of sample means
In practice, we often consider
the populations as “infinite”,
also because the value of the corrective coefficient
(see previous slide) is very often close to 1
(and therefore of low importance)
(e.g.: with N = 1000 and n = 100, it is 0.949 ≈ 1).
We use the correction only when a sample
contains a significant percentage of the whole population.
For example, in the case of tickets, we saw that:
 standard deviation s of single ements is equal to 2;
 standard deviation sx of the distribution of the means of all the
samples with 3 tickets is equal to 0.9428;
 the corrective coefficient with N = 7 and n = 3 is 0.8165;
 sdivided by 3 and multiplied by the corrective coefficient is
equal to (2/1.7321) . 0.8165 = 0.9428, just as we calculated using
the means of all possible different samples.
These slides can not be reproduced or distributed without permission in writing from the author. 342
2.4.1.2. Distribution of sample means

D I S T R I B U T I O N S
of of sample means
single elements (samples of n elements)

they tend to the Gauss normal distri-


Shape whatever bution: the larger the sample size n , the stron-
ger the similarity with the normal distribution

Mean always the same in both cases

Infinite
populations
sx = s /  n
Standard
Finite s


deviation
populations s N-n
of N
sx =
elements n N-1

These slides can not be reproduced or distributed without permission in writing from the author. 343
2.4.1.2. Distribution of sample means

D I S T R I B U T I O N S
of of sample means
single elements (samples of n elements)

they tend to the Gauss normal distri-


Shape whatever bution: the larger the sample size n , the stron-
ger the similarity with the normal distribution

Mean always the same in both cases

Infinite
populations
sx = s /  n
Standard
Finite s


deviation
populations s N-n
of N
sx =
elements n N-1

Last expression can be verified in the case of tickets, with s = 2, N = 7 and n = 3.


We find: sx = (2 / V3) V(7-3) / 6 = 0,9428: just as before.

These slides can not be reproduced or distributed without permission in writing from the author. 344
2.4.1.2. Distribution of sample means

An additional demonstration
of the expression
of the variance of a sample
to obtain an unbiased estimator

After discussing the Sample Means, we can prove that,


if we want that the variance of the sample represents
an unbiased estimator
of the "true" variance of the whole population,
we must put as denominator n - 1 and not n.

These slides can not be reproduced or distributed without permission in writing from the author. 345
2.4.1.2. Distribution of sample means
Let’s consider a whole population of N elements with mean m and variance s2. As already
seen, the mathematical expression of s2 is:
N

S (xi - m)2
i=1
s2 = ---------------
N
Adding and subtracting, at the numerator, any two values, that however we regard as the
mean, x, of a generic sample of n items taken from the population, you can write:
N

S (xi - m)2 1
N
1
N
--------------- = ----- S (xi - x + x - m) = ----- S [(xi - x) + (x - m)]2 =
i=1
s2 = . 2 .
N N i=1 N i=1
1 N 1 N
= ----- S [(xi-x) + (x-m)] = ----- .S [(xi-x)2 + (x-m)2 + 2 (xi-x) . (x-m)] =
. 2
N i=1 N i=1 constant
(independent of i)
1 N 1 N 2 N
= ----- . S (xi - x)2 + ----- .S (x - m)2 + ----- .S [(xi - x) . (x - m)] =
N i=1 N i=1 constant N i=1 zero (by definition of mean)
1 N N (independent of i) 2 N
= ----- S (xi - x) + ----- (x - m) + ----- (x - m) S (xi - x) =
. 2 . 2 . .
N i=1 N N i=1

These slides can not be reproduced or distributed without permission in writing from the author. 346
2.4.1.2. Distribution of sample means
Ultimately, taking into account that the last term LEGENDA
(the 3rd one) of the second member is 0, it is N = size of the whole population
easy to rewrite the last expression found as:
n = size of the sample
1 N
s2 = ----- . S (xi - x)2 + (x - m)2 k = number of all possible samples (of n elements)
extractable from the whole population (of N ele-
N i=1 ments)
Indicating by s2 the 1st term of the 2nd mem- m = (true) mean of the whole population
ber, we get: x = mean of a sample of n elements
s2 = s2 + (x - m)2 s2 = (true) variance of the whole population
s2 = variance of all elements of the population, but
hence, we get s2 as: calculated with reference to the mean of a sample
s2 = s2 - (x - m)2 of n elements

Let’s consider all possible samples of n elements extractable from the whole population (of N
elements) and denote by k their number. We can now calculate the means of the three
terms of the previous equation extended to all k samples of n elements:
k k k

S s2j
j=1
S s2
j=1
S (xj - m)2
j=1
--------- = --------- - ---------------
k k k
s2 True variance of the Variance
whole population of the k “sample means”
of the samples of n elements
(whose general mean is
always equal to m)
These slides can not be reproduced or distributed without permission in writing from the author. 347
About the last shown equation, the following remarks can be done:
1. the first member is the mean of the k values of s2 and may be indicated by s2;
2. as s2 is here a constant, the first term of the second member is given by s2 multiplied by k and
divided by k, that is s2;
3. the second term of the second member is, by definition, the variance of the sample means, sx2,
which, as has been seen(1), is equal to the variance s2 of single elements of the whole population,
divided by the size n of the sample.
At this point, the previous equation may be written in the following way:
s2 n-1
s2 = s 2 - s x2 = s2 - ----- = ---------- . s2
n n
The final result is:
n-1
s2 = ---------- . s2
n
The variance s2 is the mean of the k variances of all the N data of the whole population with
respect to each of the k sample means (of all possible samples of n elements each). If, in-
stead of this mean value, we would use, as is usually done, the variance of a unique sample
(of n elements, instead of N), we would introduce an additional source of deviation in the esti-
mate of the true variance, s2, but that's part of the “samplig randomness”.
The reason why variances s2 and s2 do not coincide resides in the fact that the variance s2
is calculated with respect to the sample means of all possible samples of size n, instead than
respect to the overall (or true) mean m.

(1) From the relationship between standard deviations sx = s / √ n it is immediate to obtain the analogous
relationship between variances: sx2 = s2 / n.
These slides can not be reproduced or distributed without permission in writing from the author. 348
The last highlighted expression implies that, taking successively, one after the other, many
samples of size n and calculating the variance, s2, for each of them and then calculating the
mean of all the variances gradually obtained, the value to which these means tend while the
number of samples (of size n) increases, is not the population’s true variance, s2true, but a
value a little smaller, s2biased, equal to:
n-1
s biased = --------- . s2true
2
n

s2 biased s2 true

averages s2 of successive sample of n elements

bias

It is said that s2 is a biased estimator of s2. The coefficient (n -1) / n represents the bias of
the estimator (of s2) s2.
It is worth to remark that the bias coefficient tends to 1 (and therefore its importance decrea-
ses) with increasing the size n of the sample, while the bias coefficient may be essential with
low values of n (i. e. with small samples).
These slides can not be reproduced or distributed without permission in writing from the author. 349
2.4.1.2. Distribution of sample means
In order to obtain an unbiased (= corrected) estimator of s2 …
n-1
… let’s consider the above equation (penultimate and last slide): s2 = ---------- . s2
n
and solve it with respect to s2; we removed the upper dash of s2
because we assumed to calculate this variance for any sample n
of n elements (and no longer on the whole population of N ele- s
^2 = ---------- . s2
ments), thus the second member of the equation becomes an
estimate of the variance s2 (in itself biased, but corrected by n-1
multiplying it by the bias coefficient) indicated by the circumflex
s2
accent on s2.

From this last equation, it is evident that an estimator s2 = [n / (n - 1)] . s2 is unbiased


(= correct). Finally this estimator is given by:
n n

n n S (xi - x)2 S (xi - x)2


i=1 i=1
s2 = -------- . s2 = -------- . --------------- = ---------------
n-1 n-1 n n-1
Qui sopra è stata evidenziata in blu la dimostrazione cercata, che costituisce l’espressione
della varianza del campione più comunemente impiegata quando si vuole inferire sulla va-
rianza della popolazione completa.
È appena il caso di ricordare che, estraendo la radice quadrata, si ricava un’analoga relazio-
ne per la deviazione standard.
These slides can not be reproduced or distributed without permission in writing from the author. 350
2.4.1. Estimates

2.4.1.3
Confidence interval
for the estimation of a mean
(and Student’s t distribution)

These slides can not be reproduced or distributed without permission in writing from the author. 351
2.4.1.3. Confidence interval for a mean (and t distribution)

The accuracy of an estimate can be evaluated taking into


account of:
• the population variability (even if only estimated)
• the sample size.

The problem of evaluating the confidence interval


for a mean is matched by two steps:
 first we examine the problem under the simpli-
fying assumption that the standard deviation s
is known;
 then we determine what to do in cases where
the standard deviation s is unknown.

These slides can not be reproduced or distributed without permission in writing from the author. 352
2.4.1. Estimates

2.4.1.4
Confidence intervals for a mean
if s is known

These slides can not be reproduced or distributed without permission in writing from the author. 353
2.4.1.4. Confidence intervals for a mean if s is known

General Purpose
To estimate the mean of a population,
trying to quantify the uncertainty of the estimate.

We start from simplest situation, where we know the


standard deviation s of the population.

This assumption is not merely theoretical.


For example, a production process can have
a standard deviation s quite constant,
but its mean can have some drifts.

These slides can not be reproduced or distributed without permission in writing from the author. 354
2.4.1.4. Confidence intervals for a mean if s is known

E X A M P L E
We want to evaluate the mean of a population with
standard deviation known: s = 60
by a sample of n = 36 elements
(e.g. because we cannot afford a bigger one)

The standard deviation


of the sample means distribution will then be:
s 60
sx = ------- = --------- = 10
n  36

These slides can not be reproduced or distributed without permission in writing from the author. 355
2.4.1.4. Confidence intervals for a mean if s is known

Although clearly this will never be possible,


let us suppose, just for a moment, to know,
the true mean and let us say m = 100.

These slides can not be reproduced or distributed without permission in writing from the author. 356
2.4.1.4. Confidence intervals for a mean if s is known
 The red area under the curve is proportional to the probability of finding a
sample (of n = 36 elements) with its mean falling inside to the interval in
abscissa.
 Now let us consider a "tail" (yellow in Figure) of 2.5%. The distance E
between the true mean mand the initial limit of the tail (according to the
normal distribution Table, see Par. 2.2.9.2), is given by:
E = 1.96 . s = 1.96 . 10 = 19.6
and the limit value is equal to m + E = 119.6 .
 This means that only 2.5% of the
samples have their means greater than
n = 36
119.6 and therefore far from the true
E = 19.6 mean m over a value of E (19.6).
sx = 10
 Taking into account that, on the left of
the graph, there is a further 2.5% of
samples with their means less than:
m - E = 100 - 19.6 = 80.4
2.5% and therefore far from the true mean m
over a value of E in absolute value, we
m = 100 can say that there is, in all, a 5% of
samples with their mean far from the
m + 19.6 = 119.6 true mean m over an absolute value
equal to E.
These slides can not be reproduced or distributed without permission in writing from the author. 357
2.4.1.4. Confidence intervals for a mean if s is known

In practice, we use only a single sample


of n = 36 elements
drawn at random from the population,
and around its mean
we construct the distribution of sample means,
which will have the same shape as the previous one,
because it has the same (known and calculated)
s value.
The only difference between the two distributions is
the position of the mean.

These slides can not be reproduced or distributed without permission in writing from the author. 358
2.4.1.4. Confidence intervals for a mean if s is known
Samples that can be extracted are many and different
and it is not possible to know which of them happened ...

true mean

….. but we know that there are many samples


with their mean near to the true mean
and less and less as their distance from it increases.
These slides can not be reproduced or distributed without permission in writing from the author. 359
2.4.1.4. Confidence intervals for a mean if s is known
Reversing the previous arguments, we can say that, if we
extracted a sample with the mean very far from the true mean
(of the whole population), the confidence interval (x ± E) con-
structed on the sample will not contain the true mean.
But in the above example, this can happen no more than 5% of
times. In all other cases, the confidence interval will contain the
true mean.

n = 36

E = 19,6
sx = 10

2,5% 2,5%

m = 100
m + 19,6 = 119,6
These slides can not be reproduced or distributed without permission in writing from the author. 360
2.4.1.4. Confidence intervals for a mean if s is known

In conclusion,
in the conditions of the previous example, we can say that,
although we based the construction
of the distribution of sample means on a random sample,
there is a risk less than 5%
that the 95% confidence interval, built on the sample,
does not contain the true mean.

These slides can not be reproduced or distributed without permission in writing from the author. 361
2.4.1.4. Confidence intervals for a mean if s is known

Generalizations are obvious, because the whole reasoning also ap-


plies to different values of the distance E and of the area of the tail.

The significance a of the estimate


2.5% + 2.5 % = 5.0%,
corresponding
to the sum of the tail areas,
Confidence
level is the complement to 1
2.5% 1 - a = 95% 2.5%
of the confidence level
and represents the risk of failing,
E E
m – 19.6 m + 19.6
i.e. that the confidence interval
Confidence
does not contain the true mean m.
interval

E is the half confidence interval and corresponds


to the accuracy (or “tolerance”) of the estimate.
These slides can not be reproduced or distributed without permission in writing from the author. 362
0,50

0,45

0,40
95% of data are within ± 1.960 s.

99% of data are within ± 2.576 s.


Based on the normal distribution, we know
0,35

0,30
(e.g.) that only 5% of samples of n = 36
0,25 elements has a mean far from the true
0,20

0,15
mean m (unknowable) more than a distan-
0,10
ce E, called half confidence interval.
Known s = 60 and using the normal distri-
0,05

0,00
-4 -3 -2 -1 0 1 2 3 4

± 1 s  68.26% of data

± 2 s  95.45% of data
bution properties, we can evaluate this di-
± 3 s  99.73% of data stance E as:

s 60
E = |Li - x| = za/2 -------- = 1.96 --------- = 19.6
n  36
Accuracy of the esti-
mate or maximum ac-
ceptable uncertainty.
It is the 1st of the two Value obtained from the
initial choices. normal distribution Ta-
ble, depending on the va-
lue chosen for a/2, i.e. for
the risk of failing.
Significance or risk to 2.5% 2.5%
fail. It is the complement
to 1 of the confidence
level and is the 2nd initial E E
choice.
m – 19.6 m + 19.6

These slides can not be reproduced or distributed without permission in writing from the author. 363
2.4.1.4. Confidence intervals for a mean if s is known
Evaluation of the Improving of the estimate’s
variability of the accuracy by increasing the
investigated phe- sample size (= time & mo-
nomenon. ney invested).

Accuracy (uncertainty)
of the estimate.

s 60
E = |Li - x| = za/2 -------- = 1,96 --------- = 19,6
n  36

Significance or risk to
fail. It is the complement
to 1 of the confidence
level and can be chosen
regardless of the physica-
lity of the investigated 2.5% 2.5%
phenomenon, but only
according to the risk of
failing that we accept to E E
run. m – 19.6 m + 19.6

These slides can not be reproduced or distributed without permission in writing from the author. 364
2.4.1.4. Confidence intervals for a mean if s is known
On this basis, it is easy to establish a relationship (with the same sample
size n) between:
 the confidence level (= credibility of the estimate)
 and the half confidence interval, E (= accuracy of the estimate)
100%

90%

80%
level

Value of E in the previous example


70%
Livello di fiducia

60%
Confidence

50%

40%

30%
n = 18
20% n = 36
10%
n = 72

0%
0 5 10 15 20 25 30 35 40

Valori della semiampiezza E dell'intervallo di fiducia


Values of the half confidence interval, E

Of course, the larger the samples the better the results


and the smaller the sample the worst the results.
These slides can not be reproduced or distributed without permission in writing from the author. 365
2.4.1.4. Confidence intervals for a mean if s is known
Lower and upper limits of confidence interval are defined by the
following expressions :

Upper limit = x + za/2 . s / n = LU

Lower limit = x - za/2 . s / n = LL


where :
x = sample mean
za/2 = units of standard deviation from the mean (normal distribution)
a = significance = 1 - confidence level
s = standard deviation (of single elements), usually estimated
from the s of the sample (calculated dividing by n-1, because
we are no longer in Descriptive Statistics)
n = sample size.
These slides can not be reproduced or distributed without permission in writing from the author. 366
2.4.1.4. Confidence intervals for a mean if s is known

We can also say, with a confidence level equal to 1 - a, that


the true mean m is within the limits Li ans Ls or that it is:

x - za/2 . s / n = Li < m < Ls = x + za/2 . s / n

which can also be written as:


x-m
- za/2 < ------------ < + za/2
s / n

and can be summarized with the following expression:


x-m
z = ------------
s / n
These slides can not be reproduced or distributed without permission in writing from the author. 367
2.4.1. Estimates

2.4.1.5
Confidence intervals for a mean
if s is unknown
(Student’s t distribution)

These slides can not be reproduced or distributed without permission in writing from the author. 368
2.4.1.5. Confidence intervals for a mean if s is unknown (t distrib.)

In order to estimate the C.I. of a mean, when s is unknown :


 if the sample is large, i.e. with 50 elements or more, the
value s of the sample is a good estimate of the s of the po-
pulation: so, for the sample means distribution, we can use
the normal distribution as in the previous case of s known;
 if the sample is small, i.e. with 30 elements or less, the
value s of the sample is not a good estimate of the s of the
population; so, for the sample means distribution, we must
use the Student’s(*) t distribution (see next slide), which ta-
kes into account the increased uncertainty of the estimate;
 if the sample is intermediate, the choice is under the
responsibility of the User, but, having a software (e.g.
EXCEL) it is preferable to use the Student’s t distribution.
(*) Student is the pseudonym of William Sealy Gosset (1876-1937), head of the experimental
department of the Guinness Brewery, with whom he developed his method to determine the
best varieties of barley for beer dark Stout. It seems that the company has allowed him to pu-
blish his studies but only in an anonymous way and he chose “A Student of Statistics” hence
the famous Student.
These slides can not be reproduced or distributed without permission in writing from the author. 369
2.4.1.5. Confidence intervals for a mean if s is unknown (t distrib.)

Student's t distributions in comparison with normal distribution


0,45 Let x1, x2, …, xn be a random sample
drawn from a normal distributed popula-
0,40 tion with mean m and standard deviation
Normal s. The averages of several samples of
t n=30 this type are distributed according to the
t n=20 0,35 Student’s t random variable:
t n=10 x-m
Probability density

t n=5 0,30 t = -------------


t n=3
t n=2
s/√n
0,25

0,20

0,15

0,10

0,05

0,00
-4,0 -3,0 -2,0 -1,0 0,0 1,0 2,0 3,0 4,0
Units of standard deviation from the mean

These slides can not be reproduced or distributed without permission in writing from the author. 370
Significance livel a
n d.o.f. 25% 20% 10% 5% 2,5% 1% 0,5% 0,10%
2 1 1,000 1,376 3,078 6,314 12,706 31,821 63,657 318,309
3 2 0,816 1,061 1,886 2,920 4,303 6,965 9,925 22,327
4 3 0,765 0,978 1,638 2,353 3,182 4,541 5,841 10,215
5 4 0,741 0,941 1,533 2,132 2,776 3,747 4,604 7,173

Table of
6 5 0,727 0,920 1,476 2,015 2,571 3,365 4,032 5,893
7 6 0,718 0,906 1,440 1,943 2,447 3,143 3,707 5,208
8 7 0,711 0,896 1,415 1,895 2,365 2,998 3,499 4,785
9 8 0,706 0,889 1,397 1,860 2,306 2,896 3,355 4,501

Student’s t
10 9 0,703 0,883 1,383 1,833 2,262 2,821 3,250 4,297
11 10 0,700 0,879 1,372 1,812 2,228 2,764 3,169 4,144
12 11 0,697 0,876 1,363 1,796 2,201 2,718 3,106 4,025
13 12 0,695 0,873 1,356 1,782 2,179 2,681 3,055 3,930

distribution
14 13 0,694 0,870 1,350 1,771 2,160 2,650 3,012 3,852
15 14 0,692 0,868 1,345 1,761 2,145 2,624 2,977 3,787
16 15 0,691 0,866 1,341 1,753 2,131 2,602 2,947 3,733
17 16 0,690 0,865 1,337 1,746 2,120 2,583 2,921 3,686
18 17 0,689 0,863 1,333 1,740 2,110 2,567 2,898 3,646
19 18 0,688 0,862 1,330 1,734 2,101 2,552 2,878 3,610
20 19 0,688 0,861 1,328 1,729 2,093 2,539 2,861 3,579
21 20 0,687 0,860 1,325 1,725 2,086 2,528 2,845 3,552
22 21 0,686 0,859 1,323 1,721 2,080 2,518 2,831 3,527
23 22 0,686 0,858 1,321 1,717 2,074 2,508 2,819 3,505 n = 30 (d.o.f. = 29)
Normal distribu-
24 23 0,685 0,858 1,319 1,714 2,069 2,500 2,807 3,485 tion: n = 
n = 10 (d.o.f. = 9)
25 24 0,685 0,857 1,318 1,711 2,064 2,492 2,797 3,467
26 25 0,684 0,856 1,316 1,708 2,060 2,485 2,787 3,450
27 26 0,684 0,856 1,315 1,706 2,056 2,479 2,779 3,435
28 27 0,684 0,855 1,314 1,703 2,052 2,473 2,771 3,421
29 28 0,683 0,855 1,313 1,701 2,048 2,467 2,763 3,408
30 29 0,683 0,854 1,311 1,699 2,045 2,462 2,756 3,396
31 30 0,683 0,854 1,310 1,697 2,042 2,457 2,750 3,385
32 31 0,682 0,853 1,309 1,696 2,040 2,453 2,744 3,375
n = 5 (d.o.f. = 4)
33 32 0,682 0,853 1,309 1,694 2,037 2,449 2,738 3,365
34 33 0,682 0,853 1,308 1,692 2,035 2,445 2,733 3,356 1- F(t)
n = 2 (d.o.f. = 1)
35 34 0,682 0,852 1,307 1,691 2,032 2,441 2,728 3,348
36 35 0,682 0,852 1,306 1,690 2,030 2,438 2,724 3,340
37 36 0,681 0,852 1,306 1,688 2,028 2,434 2,719 3,333 -4,0 -3,0 -2,0 -1,0 0,0 1,0 2,0 t 3,0 4,0
38 37 0,681 0,851 1,305 1,687 2,026 2,431 2,715 3,326
39 38 0,681 0,851 1,304 1,686 2,024 2,429 2,712 3,319
40 39 0,681 0,851 1,304 1,685 2,023 2,426 2,708 3,313
41 40 0,681 0,851 1,303 1,684 2,021 2,423 2,704 3,307
42 41 0,681 0,850 1,303 1,683 2,020 2,421 2,701 3,301
43 42 0,680 0,850 1,302 1,682 2,018 2,418 2,698 3,296
44 43 0,680 0,850 1,302 1,681 2,017 2,416 2,695 3,291
45 44 0,680 0,850 1,301 1,680 2,015 2,414 2,692 3,286
46 45 0,680 0,850 1,301 1,679 2,014 2,412 2,690 3,281
47 46 0,680 0,850 1,300 1,679 2,013 2,410 2,687 3,277
48 47 0,680 0,849 1,300 1,678 2,012 2,408 2,685 3,273
49 48 0,680 0,849 1,299 1,677 2,011 2,407 2,682 3,269
50 49 0,680 0,849 1,299 1,677 2,010 2,405 2,680 3,265

These slides can not be reproduced or distributed without permission in writing from the author.
0,674 0,842 1,282 1,645 1,960 2,326 2,576 3,090 371
2.4.1.5. Confidence intervals for a mean if s is unknown (t distrib.)

Confidence interval (bilateral), as for normal distribution,


except the use of t instead of z:

Upper limit = x + ta/2 . s / n = LU

Lower limit = x - ta/2 . s / n = LL


where :
x = sample mean
ta/2 = units of standard deviation from the mean (Student’s t distribution)
a = significance = 1- confidence level

s = standard deviation (of single elements) usually estimated from


the s of the sample (calculated dividing by n-1, because we are
no longer in Descriptive Statistics)
n = sample size.
These slides can not be reproduced or distributed without permission in writing from the author. 372
2.4.1.5. Confidence intervals for a mean if s is unknown (t distrib.)

As for the normal distribution, also for the Student’s t distribu-


tion we can say, with a confidence level 1 - a, that the true
mean m is between Li and Ls, which can be written as:

x - ta/2 . s / n = Li < m < Ls = x + ta/2 . s / n

which can also be written as:


x-m
- ta/2 < ------------ < + ta/2
s / n

and can be summarized with the following expression:


x-m
t = ------------
s / n
These slides can not be reproduced or distributed without permission in writing from the author. 373
2.4.1.5. Confidence intervals for a mean if s is unknown (t distrib.)

It is important to keep in mind that the confidence interval


defined by the Student’s t distribution takes into account:
• the inherent variability of population: e.g. in the
case of a batch of items, the t distribution takes into ac-
count the variability of their production process (whose
quality is the responsibility of the Supplier);
• the additional uncertainty due to the small sam-
ple size, which in the case of a batch of items, is not re-
sponsibility of the Supplier.

To avoid future disputes between Consumer and Supplier, usually


the supply contracts refer to an Operating Characteristic curve
(shortly: OC curve), which provide, in a shared manner, the Con-
sumer’s and Cupplier’s risks (see next slide).
These slides can not be reproduced or distributed without permission in writing from the author. 374
2.4.1.5. Confidence intervals for a mean if s is unknown (t distrib.)

Rischio del
SUPPLIER's
FORNITORE
Let’s
Supponiamo
assume che
that un lotto sia
a batch considerato
is considered:
[%]

risk
 acceptable
batch is accepted[%]

di vedersi accettabile (= good)


buono)if seits la
true sua difetto-
percen-
that a very
rifiutare un
good
lottobatch
del sità (vera)
tage è ≤ 1,5%;
of defective units is ≤ 1.5%;
1,5%
tutto buono
is rejected
theaccettazione

 absolutely
assolutamente inaccettabile
unacceptable if its se la per-
true sua
difettosità
centage of(vera) è ≥units
defective 6,5%iso≥più. 6.5%.
Probability thatdi
Probabilità

Rischio del risk


CONSUMER’s
CONSUMATORE
of accepting an
di accettare un
unacceptable batch
lotto inaccettabile

True percentage of defective units in the batch


Percentuale (vera) di difettosi all’arrivo
These slides can not be reproduced or distributed without permission in writing from the author. 375
2.4.1. Estimates

2.4.1.6
Example of evaluation
of the confidence interval
for a mean

These slides can not be reproduced or distributed without permission in writing from the author. 376
2.4.1.6. Example of evaluation of the confidence interval for a mean

A biologist wants to estimate the average length of trout one year aged,
who are reared in a basin.

A sample of 50 trout were taken at random and the following


Table shows the measures of their length in mm:
92 88 85 82 89 86 81 66 75 61
78 76 91 82 82 78 82 86 96 61
62 59 80 65 70 86 78 78 71 71
95 86 84 84 88 72 81 64 71 58
60 81 73 67 85 89 75 79 77 65

We want to evaluate the confidence interval for the mean,


with a 95% confidence level.

These slides can not be reproduced or distributed without permission in writing from the author. 377
2.4.1.6. Example of evaluation of the confidence interval for a mean

Mean and standard deviation can be calculated as usual:


S xi
m
^ = x = -------- = 77.4 mm
n
S (xi - x)2
s
^ = s = ------------- = 10.0 mm
n-1
We can observe that, having a large sample (50 measure-
ments), we can use normal distribution.
As we want a bilateral confidence interval
1- a = 95%,
we must search on the Table the value of za/2,
which leaves a tail of (1 - 0.95) / 2 = 0.025 .
These slides can not be reproduced or distributed without permission in writing from the author. 378
2.4.1.6. Example of evaluation of the confidence interval for a mean

Table of
standard normal distribution z
1-F(z)

z 0,00 0,01 0,02 0,03 0,04 0,05 0,06 0,07 0,08 0,09
0,0 0,500000 0,496011 0,492022 0,488033 0,484047 0,480061 0,476078 0,472097 0,468119 0,464144
0,1 0,460172 0,456205 0,452242 0,448283 0,444330 0,440382 0,436441 0,432505 0,428576 0,424655
0,2 0,420740 0,416834 0,412936 0,409046 0,405165 0,401294 0,397432 0,393580 0,389739 0,385908
0,3 0,382089 0,378281 0,374484 0,370700 0,366928 0,363169 0,359424 0,355691 0,351973 0,348268
0,4 0,344578 0,340903 0,337243 0,333598 0,329969 0,326355 0,322758 0,319178 0,315614 0,312067
0,5 0,308538 0,305026 0,301532 0,298056 0,294598 0,291160 0,287740 0,284339 0,280957 0,277595
0,6 0,274253 0,270931 0,267629 0,264347 0,261086 0,257846 0,254627 0,251429 0,248252 0,245097
0,7 0,241964 0,238852 0,235762 0,232695 0,229650 0,226627 0,223627 0,220650 0,217695 0,214764
0,8 0,211855 0,208970 0,206108 0,203269 0,200454 0,197662 0,194894 0,192150 0,189430 0,186733
0,9 0,184060 0,181411 0,178786 0,176186 0,173609 0,171056 0,168528 0,166023 0,163543 0,161087
1,0 0,158655 0,156248 0,153864 0,151505 0,149170 0,146859 0,144572 0,142310 0,140071 0,137857
1,1 0,135666 0,133500 0,131357 0,129238 0,127143 0,125072 0,123024 0,121001 0,119000 0,117023
1,2 0,115070 0,113140 0,111233 0,109349 0,107488 0,105650 0,103835 0,102042 0,100273 0,098525
1,3 0,096801 0,095098 0,093418 0,091759 0,090123 0,088508 0,086915 0,085344 0,083793 0,082264
1,4 0,080757 0,079270 0,077804 0,076359 0,074934 0,073529 0,072145 0,070781 0,069437 0,068112
1,5 0,066807 0,065522 0,064256 0,063008 0,061780 0,060571 0,059380 0,058208 0,057053 0,055917
1,6 0,054799 0,053699 0,052616 0,051551 0,050503 0,049471 0,048457 0,047460 0,046479 0,045514
1,7 0,044565 0,043633 0,042716 0,041815 0,040929 0,040059 0,039204 0,038364 0,037538 0,036727
1,8 0,035930 0,035148 0,034379 0,033625 0,032884 0,032157 0,031443 0,030742 0,030054 0,029379
1,9 0,028716 0,028067 0,027429 0,026803 0,026190 0,025588 0,024998 0,024419 0,023852 0,023295
2,0 0,022750 0,022216 0,021692 0,021178 0,020675 0,020182 0,019699 0,019226 0,018763 0,018309
2,1 0,017864 0,017429 0,017003 0,016586 0,016177 0,015778 0,015386 0,015003 0,014629 0,014262
2,2 0,013903 0,013553 0,013209 0,012874 0,012545 0,012224 0,011911 0,011604 0,011304 0,011011
2,3 0,010724 0,010444 0,010170 0,009903 0,009642 0,009387 0,009137 0,008894 0,008656 0,008424
2,4 0,008198 0,007976 0,007760 0,007549 0,007344 0,007143 0,006947 0,006756 0,006569 0,006387
2,5 0,006210 0,006037 0,005868 0,005703 0,005543 0,005386 0,005234 0,005085 0,004940 0,004799
2,6 0,004661 0,004527 0,004397 0,004269 0,004145 0,004025 0,003907 0,003793 0,003681 0,003573
2,7 0,003467 0,003364 0,003264 0,003167 0,003072 0,002980 0,002890 0,002803 0,002718 0,002635
2,8 0,002555 0,002477 0,002401 0,002327 0,002256 0,002186 0,002118 0,002052 0,001988 0,001926
2,9 0,001866 0,001807 0,001750 0,001695 0,001641 0,001589 0,001538 0,001489 0,001441 0,001395
3,0not be 1,350E-03
These slides can reproduced or distributed without permission in writing from the author. 379
2.4.1.6. Example of evaluation of the confidence interval for a mean

For a bilateral confidence level of 1- a = 95%,


we find za/2 = 1.96 .

Applying the usual expressions:

Lower limit = x - za/2 . s / n =


= 77.4 - 1.96 . 10.0 /  50 = 74.63 mm

Upper limit = x + za/2 . s / n =


= 77.4 + 1.96 . 10.0 /  50 = 80.17 mm

These slides can not be reproduced or distributed without permission in writing from the author. 380
2.4.1. Estimates

2.4.1.7
Confidence interval
of the estimation
for a standard deviation
( short mention )

These slides can not be reproduced or distributed without permission in writing from the author. 381
2.4.1.7. Confidence interval for the estimation of a std. deviation

We could demonstrate that if the population from which we extract the


sample has a shape, at least roughly normal, the variable:

(n - 1) . s2 s2
c2 = -------------- = ---------
s2 s2
called chi-square , follows the well-known distribution of the same
name (which is available in Excel). For it the quantity n - 1 is a
parameter, called degrees of freedom.

In this expression:
s is the sample standard deviation
s is the population standard deviation (estimable, but, in general,
unknowable).

These slides can not be reproduced or distributed without permission in writing from the author. 382
2.4.1.7. Confidence interval for the estimation of a std. deviation

Without going in deeper details, (in the same way we did for the
confidence interval of a mean) we can write:

(n - 1) . s2
c21-a/2 < -------------- < c2a/2
s2

and hence:

(n - 1) . s2 (n - 1) . s2
---------------- < s < ----------------
c2a/2 c21-a/2

These slides can not be reproduced or distributed without permission in writing from the author. 383
2.4.1.7. Confidence interval for the estimation of a std. deviation

For large samples (n ≥ 50 elements), the sample standard


deviation distribution (i.e. the distribution of sample’s s) can
be approximated by a normal distribution with mean
equal to s and standard deviation equal to s /  2 . n .

So we can write:

s s
------------------- < s < -------------------
za/2 za/2
1 + --------- 1 - ---------
2n 2n

These slides can not be reproduced or distributed without permission in writing from the author. 384
2.4.1. Estimates

2.4.1.8
Confidence interval
of the estimation
for a proportion

These slides can not be reproduced or distributed without permission in writing from the author. 385
2.4.1.8. Confidence interval for the estimation of a proportion

DIFFERENCE BETWEEN MEANS AND PROPORTIONS

By definition, the calculation of the mean applies only to


measurable characteristics (or “variables”).
On the opposite, in the calculation of a proportion,
we count
the number of elements with a specific characteristic
(no matter whether it is measurable or not,
because in any case it is not measured)
and we relate this number to the total number
of elements of the population (or of the sample):
i.e. we divide this number by the total number of elements.

Example. Determine the fraction (or percentage) of employees


who have requested unpaid leave (one or more does not matter)
during 2015.
These slides can not be reproduced or distributed without permission in writing from the author. 386
2.4.1.8. Confidence interval for the estimation of a proportion
PROPORTIONS

Indicated by p the probability of success of every trial, the


number of successes in n trials is given by the binomial
distribution with mean m = n . p and with standard de-
viation (of the number of trials) st =  n . p . (1 - p) .
We see immediately that:
• sp = st /  n =  p . (1 - p) is the “sample” standard
deviation of a proportion evaluated from a sample of
n elements;
• the expression p . (1 - p) has its maximum value for
p = 0.5 and therefore also the above standard devia-
tion has its maximum for p = 0.5; of course, the smaller
the probability p (or 1-p), the larger the sample size n.
These slides can not be reproduced or distributed without permission in writing from the author. 387
2.4.1.8. Confidence interval for the estimation of a proportion
For brevity,
the calculation of
confidence intervals
for proportions is only
developed by
graphics.

The graph on the right


refers to a
95% bilateral
(= 97.5% one-sided)
confidence level.
Example for:
• p = 0.64 (= 64%)
• n = 100.
0.54 < p < 0.73
These slides can not be reproduced or distributed without permission in writing from the author. 388
This graph is
similar to the
previous one,
but related to a
99% bilateral
(= 99.5% one-sided)
confidence level.

These slides can not be reproduced or distributed without permission in writing from the author. 389
2.4.1.8. Confidence interval for the estimation of a proportion

Looking at the two previous diagrams, we can clearly see that the pairs of curves
for the same sample size, n, define confidence intervals almost symmetrical
with respect to the midline (drawn with dots and dashes) only when they are in the
right side of the diagram, i.e. for values of the proportion not too smaller and not
too greater than 0.5 (that is far enough away from 0 and 1, or 0% and 100%). On
the opposite, in the left side of the diagram, these intervals become dissymme-
trical, because the lower curves progressively concentrate as they approach
(coming from right) to the zero (of the proportion) at the origin of the x-axis; while
the upper curves tend to proportionately expand with respect to the midline
(drawn with dots and dashes).
The shape of these curves does not allow to calculate the confidence intervals
using the normal distribution (which is symmetric) in the left side of these
diagrams, while it is not impossible to do that in the right side. Looking at the
diagrams, we can see that, as we move from right to left, the first pairs of curves
which become dissymmetrical are those relating to smaller samples, while those
relating to larger samples remain longer (almost) symmetrical. We can conclude
that the limit value of the proportion, within which we can evaluate the confidence
intervals of the diagram by means of the normal distribution, can be pushed the
further to the left, the larger is the sample and, of course, the greater is the
approximation that we are willing to accept for the confidence interval !

These slides can not be reproduced or distributed without permission in writing from the author. 390
2.4.1.8. Confidence interval for the estimation of a proportion
The above diagrams are easy to use, but only solve the most common problems. If we
want to estimate a confidence interval with a confidence level different from 95% and from
99%, or if we need to enlarge the area of the graph in the bottom left, because the detec-
ted frequency is very close to zero (or to 1)(1), it is necessary to conduct calculations on
their own, and then it comes in handy what will be discussed in the following slides.

CALCULATION OF CURVES IN THE DIAGRAMS FOR PROPORTIONS

The correct construction of these diagrams would require, strictly speaking,


the use of the binomial distribution. But, as will be seen below, in special
conditions and with some approximation, also the Poisson distribution can
acceptably be used and even the normal distribution. In the following, appli-
cations of the three distributions will be discussed:
1. binomial (the main way)
2. Poisson (with very large samples and proportions, p, close to 0 or to 1)
3. normal (with medium-large samples and proportions, p, far away from 0 and 1).
A synoptic comparison Table will conclude the exposure.
(1) As was done, about the binomial distribution, in the previous Paragraph 2.3.4.2, slide 217.
These slides can not be reproduced or distributed without permission in writing from the author. 391
2.4.1.8. Confidence interval for the estimation of a proportion

1. BINOMIAL DISTRIBUTION

Points of curves of the previous diagrams can be correctly calculated using the bino-
mial distribution, of which (as already seen) the basic expression is:
n
P= ( ) pk (1 - p)n-k
k
where P is the probability of obtaining k successes(1) in n experiments and p is the
(Bernoulli’s) probability of success in a single experiment. In the diagrams for propor-
tions, the two-sided (or bilateral) Confidence Interval is displayed on the pair of curves
(related to the sample size n) by their intersections with a vertical line that crosses the
x-axis at the value k/n, corresponding to the proportion detected on sample. Therefore,
each point of the upper curve represents the upper limit of the Confidence Interval
(with Confidence Level equal 95% in the 1st of the two previous diagrams and equal to
99% in the 2nd one).
These points express the probability of success, pu, corresponding to a probability
Pu(2). And similarly each point of a lower curve represents the lower limit (of the Confi-
dence Interval) which is given by the probability, pl, corresponding to a probability Pl(3).
(1) Of course, k will always be integer and never greater than n.
(2) Equal to 95+(100-95)/2 = 97,5% in the 1st previous diagram and equal to 99+(100-99)/2 = 99,5% in the 2nd previous diagram.
(3) Equal to 5/2 → 2,5% in the 1st previous diagram and equal to 1/2 = 0,5% in the 2nd previous diagram.

These slides can not be reproduced or distributed without permission in writing from the author. 392
2.4.1.8. Confidence interval for the estimation of a proportion
For example, suppose we find k = 3 defectives in a sample of n = 12 items. The de-
tected proportion is k/n = 3/12 = 0,25 i.e. 25%. With reference to a confidence level
of 95% (1st diagram), the previous expression of the bino-mial distribution becomes
the following(1):
1 - 0,95 12
Pa/2 = ------------ = ( ) p3 (1 - p)9 = 220 . p3 (1 - p)9
2 3
0,30

Plotting P as function of p, you would get the


0,25
graph on the right, which displays 2 values of
p for which P is equal to 0,25. To obtain these 0,20

two values, you can solve the above equation P 0,15

through successive approximations(2), with 0,10

the help of a pocket calculator or preferably


via an EXCEL spreadsheet (see top-table of the 0,05
0,25
following slide): but it is even easier to use (al- 0,00
0,0 0,1 0,2 0,3 0,4 0,5 0,6 0,7 0,8 0,9 1,0

ways through successive approximations(2)) p


the function of the binomial distribution availa-
ble in EXCEL (see bottom-table in the following slide).
12! 12
479001600
(1) After calculating the binomial coefficient: ( ) = ------------------ = ------------------ = 220 .
3 (12 - 3)! . 3! 362880 . 6
(2) EXCEL has a specific “tool”, the SOLVER, to provide an automatic search for successive approximations: here the
input will be the minimization of the difference between the probability P (target) and the values obtained at each
iteration (see Tables of the following slide).
These slides can not be reproduced or distributed without permission in writing from the author. 393
2.4.1.8. Confidence interval for the estimation of a proportion
Proportion Limits Calculations
Calculations by Probability
pocket calculator P pi n = 12; k = 3; pdetected = k/n = 0,25;
Obviously the or EXCEL assumed (obtained by successive Confidence Level 95% bilateral
spreadsheet approximations using the
results are the as target
function on the right) formulas results
same, both Lower n
0,025 0,05793300 P = ( ) pkLower (1 - pLower)n-k = 220 . p3Lower . (1 - pLower)9 0,025000
among them- Limit k

selves and in Upper


0,025 0,55695000
n
P = ( ) pkUpper (1 - pUpper)n-k = 220 . p3Upper . (1 - pUpper)9 0,025000
Limit
comparison k

with those Calculations by Probability Proportion Limits Calculations


readable on pocket calculator P pi n = 12; k = 3; pdetected = k/n = 0,25;
the 1st of the or EXCEL assumed (obtained by successive
approximations using the
Confidence Level 95% bilateral
spreadsheet as target
previous two function on the right) call to the EXCEL function results
diagrams for Lower
0,025 0,05793300 =DISTRIB.BINOM(3;12;pLower;FALSE) 0,025000
proportions. Limit
Upper
Limit
0,025 0,55695000 =DISTRIB.BINOM(3;12;pUpper;FALSE) 0,025000

A limitation on the use of the binomial distribution is the need to calculate the bino-
mial coefficients which, in turn, require the “factorial” operation. Generally, the po-
cket calculators calculate the factorial, n!, until n=69, and not for larger values! How-
ever, especially in the last versions, the function of EXCEL binomial distribution
works even up to values of n much larger.
Anyway, with very large samples, the manual use of the binomial distribution may lead
to considerable complications.
These slides can not be reproduced or distributed without permission in writing from the author. 394
2.4.1.8. Confidence interval for the estimation of a proportion

2. POISSON DISTRIBUTION

We already mentioned that the Poisson distribution is the limit of the binomial
distribution when n tends to infinity and p tends to zero. So, if the sample is
very large (e.g. with more than 100 items), the binomial distribution can be
replaced by the Poisson distribution: especially where p is small, i.e. in the
left area of the diagrams where the dissymmetry mainly occurs. That's just
what we need, because if the sample is small, we have already seen that we
can use the binomial distribution without problems.
In conclusion, when the sample is very large, the application of the Poisson
distribution is unsuitable only in the case where p is not small enough.
For example, imagine finding k = 2 defective items in a sample with n = 1000
items. The detected proportion is k/n = 2/1000 = 0,002 i.e. 2‰.
With reference to the usual Confidence Level equal to 95%, we can calculate,
by successive approximations, the lower and upper confidence limits
shown in the Table of the following slide.

These slides can not be reproduced or distributed without permission in writing from the author. 395
2.4.1.8. Confidence interval for the estimation of a proportion

Calculations by Probability Proportion Limits Calculations


Binomial
POISSON() pi n = 1000; k = 2; pdetected = k/n = 0,002;
P (as a correct reference)
function assumed (obtained by successive Confidence Level 95% bilateral
approximations using the Deviations
of EXCEL as target
function on the right) call to the EXCEL function results Values
current result vs binomial

Lower
Limit
0,025 0,00025387 =POISSON(2;1000*pLower;FALSE) 0,025000 0,00025396 -0,035%
Upper
Limit
0,025 0,00684187 =POISSON(2;1000*pUpper;FALSE) 0,025000 0,00682650 0,225%

As you can see in the above Table, in this situation, the results obtained with
the Poisson distribution are substantially the same as those obtainable using
the binomial distribution.

These slides can not be reproduced or distributed without permission in writing from the author. 396
2.4.1.8. Confidence interval for the estimation of a proportion
3. NORMAL DISTRIBUTION
If the sample is large (say, n ≥ 100) and p is far enough away from 0 and 1,
and then we are on the right side of the diagram where the pairs of curves
are fairly symmetrical with respect to median line (drawn with dots and da-
shes), we can use even the normal distribution with a mean value of the pro-
portion equal to k/n and with a standard deviation of the proportion given by:
sp = √ p (1 - p)
For example, whith n = 200, k = 142, the detected proportion is:
pr = k/n = 142/200 = 0,71 i.e. 71%.
As usual, with reference to a Confidence Level of 95%, but this time bilateral
(= one-sided), we obtain za/2 = 1,96. We can now rewrite the same expres-
sion used in the Confidence Intervals for a mean, except change the stan-
dard deviation, which must consist of that of the proportion divided by √ n
(because it is "as if" we were working with sample means):
k sp k pr (1 - pr)
Limit = ----- ± za/2 ------- = ----- ± za/2 --------------
Upper n √n n n
Lower
with the example data, the previous expressions become:
0,71 (1 - 0,71) 0,773
Limit = 0,71 ± 1,96 ---------------------- = 0,71 ± 1,96 0,0321 = 0,71 ± 0,06289 
.
Upper 200 0,647
Lower
These slides can not be reproduced or distributed without permission in writing from the author. 397
2.4.1.8. Confidence interval for the estimation of a proportion

Direct calculations Calculations


( and no longer by Binomial
successive
n = 200; k = 142; pdetected = k/n = 0,71;
(as a correct reference)
approximations ) Confidence Level 95% bilateral
according to Deviations
NORMAL DISTRIBUTION formulas results Values
current result vs binomial

Lower pr ± za/2 √ pr (1 - pr)/n


Limit
0,64711179 0,665550 -2,770%
pr = 142 / 200 = 0,710
Upper
Limit 0,71 ± 1,96 √ 0,71 (1 - 0,71)/200
0,77288821 0,751910 2,790%

We see that, in this situation, the approximation with the normal distribution is
more than acceptable since it shows (last column on the right) a deviation
less than ± 3% compared to the results obtainable with the binomial distribu-
tion, which is considered here as the correct reference. Clearly the only ad-
vantage of the use of the normal distribution is the ease of use.
The calculation of confidence intervals for proportions using the normal
distribution is particularly common in Attribute Control Charts.

These slides can not be reproduced or distributed without permission in writing from the author. 398
2.4.1.8. Confidence interval for the estimation of a proportion
#. COMPARISON AMONG THE RESULTS OF ALL SITUATIONS
The Table below shows the results obtained with the 3 distributions in all three examples
discussed above: the first two columns on the left characterize the context (generalized
situation), while the succeeding three (numerically) describe the 3 examples and the latest
right column proposes, situation to situation, comparative remarks among the 3 distributions.
The development of calculations is exactly the same we have already seen.
OBTAINED RESULTS THROUGH THE 3 DISTRIBUTIONS
TYPICAL SITUATIONS (in the same way as in the previous slides)
Generalized description Examples of application BINOMIAL POISSON NORMAL
Detected
D% D%

Limits
Sample size values
proportion n k pdet=k/n (assumed to be the values compared to values compared to
n pd correct reference) the binomial the binomial COMMENTS
In this situation, only the binomial di-
LLower 0,05793300 0,05522200 -4,680% 0,00500000 -91,369% stribution provides valid results, while the
other two distributions just capture the or-
whatever whatever 12 3 0,250 der of magnitude. Be noted that Poisson
LUpper 0,55695000 0,68458300 22,916% 0,49500000 -11,123% distribution is better than normal in the
assessment of the Lower Limit.

In this other situation, the Poisson di-


LLower 0,00025396 0,00025387 -0,035% -0,00076909 -402,837%
stribution gives results very close to those
very large very small 1000 2 0,002 of the binomial distribution (assumed to be
exact), while the normal distribution gives
LUpper 0,00682650 0,00684187 0,225% 0,00476909 -30,139% results quite unreliable.

LLower 0,66555000 0,66547750 -0,011% 0,64711179 -2,770% This is one of the situations where the
far away normal distribution gives the best of
large 200 142 0,710
from 0 and 1 himself. In this case, however, the Poisson
LUpper 0,75191000 0,75646550 0,606% 0,77288821 2,790% distribution provides even better results.

Note that, in the first example with n = 12 and k = 3, the normal distribution does not provide
good results (D% equal to -91% and to -11%), due to the too small sample (n = 12 instead of
n ≥ 100), but it captures at least the order of magnitude, especially for the Upper Limit: this pro-
ves that its applicability is far from restricted (e.g. Attribute Control Charts).
These slides can not be reproduced or distributed without permission in writing from the author. 399
2.4.1.8. Confidence interval for the estimation of a proportion

DETECTIONS FROM THE SAMPLE


OF PROPORTIONS
EXACTLY EQUAL TO ZERO (OR EQUAL TO 1 → 100%)

Due to the importance of the topic, in the following slide,


we will repeat (Figure included)
the discussion already made about the histogram
in the Chapter of Descriptive Statistics (Paragraph 2.2.4, slide 52).

These slides can not be reproduced or distributed without permission in writing from the author. 400
2.4.1.8. Confidence interval for the estimation of a proportion
40 6

Prescribedprescritte
Tolleranze tolerance

(histogram)

FREQUENCY DENSITY (normal distribution)


35
When the detected

(istogramma)
5

proportion is zero,

DENSITÀ DI PROBABILITÀ (gaussiana)


30

for example because

CLASS
4

CLASSI
not even a defective 25

IN EACH
was detected in the
PEZZI NELLE
20 3

sample, this does OFDIITEMS

not mean that the 15


2

“true” proportion is Predicted Predicted


NUMERO

10 Previsione Previsione
defectives half defectives half
actually zero, but frazione frazione
NUMBER

percentage percentage di non conformi di non conformi


1

only that we have to 5

estimate more accu- 0 0


rately the proportion 4,70 4,75 4,80 4,85 4,90 4,95 5,00 5,05 5,10 5,15 5,20 5,25 5,30
QUOTE MISURATE [ [mm]
MEASUREMENTS mm ]
of defectives:
1. by constructing the histogram (which can also not be symmetrical);
2. by interpolating it with a statistical distribution (that generally may also be
not normal);
3. by calculating the area of the two tails (of the distribution) outside the
tolerance limits, which is the searched estimate of the defective pro-
portion.
These slides can not be reproduced or distributed without permission in writing from the author. 401
2.4.1. Estimates

2.4.1.9
Confidence interval
bilateral
and unilateral (one-sided)

These slides can not be reproduced or distributed without permission in writing from the author. 402
2.4.1.9. Confidence interval bilateral and unilateral

A confidence interval bounded by two limits,


a lower one and an upper one, is called bilateral.

In many cases one of the two limits can not be of interest.

For example, it might be of interest (with a given confidence level)


that a car model has a fuel consumption not greater than a fixed
threshold (while the lower limit is not worrisome, as a low fuel con-
sumption makes happy the customers). On the other hand, it is im-
portant that the car model has performances not less than ano-
ther fixed threshold (in this case, is the upper limit that does not
worry, as high performances make happy the customers).

In all these cases, in which it is bounded by a single side


(and unlimited by the other one),
the confidence interval is called unilateral or one-sided.
These slides can not be reproduced or distributed without permission in writing from the author. 403
2.4.1.9. Confidence interval bilateral and unilateral
90% BILATERAL CONFIDENCE LEVEL 95% UNILATERAL CONFIDENCE LEVEL
true value true value
(unknown) (unknown)

90% 95%
confidence confidence
interval interval
estimated estimated
value value
sample mean

sample mean
90% of times the confidence interval contains the true value (as shown in the above 95% of times the confidence interval contains the true value (as shown in the above
Figure), while 10% of times the estimated value will shift (5% right, and 5% left) Figure), while 5% of times the estimated value will shift left enough so that, under the
enough for the confidence interval does not contain the true value. true value, there is the shaded area (outside the confidence interval).

The distributions shown in the above Figures are not normal


(as they are when representing a sample means distribution)
to emphasize that these definitions are also applicable
to other parameters such as standard deviation.

There are no special problems


in using one-sided confidence intervals,
we just must be careful in correctly assessing
the distribution tail area.
These slides can not be reproduced or distributed without permission in writing from the author. 404
2.4.1. Estimates

2.4.1.10
Determination of
sample size as a function
of confidence interval

These slides can not be reproduced or distributed without permission in writing from the author. 405
2.4.1.10. Determination of sample size as a function of C.I.

Mean
Starting from: LU = x + za/2 . s / n , we can write:

E = LU - x = za/2 . s / n ,

from which we easily get:


Similarly, for s unknown and small samples:
za/2 . s ta/2 . s
n = ( ------------ )2 n = ( ------------ )2
E E
where E is the maximum allowed error (up or down), i.e. the half confi-
dence interval.

These slides can not be reproduced or distributed without permission in writing from the author. 406
2.4.1.10. Determination of sample size as a function of C.I.

Sample size for confidence interval of a


M E A N (large sample  normal distribution)
Enter the input data in yellow cells (light gray on printed paper),
after reading the instructions about optional inputs.

Confidence level 1-a = 95,00%


Significance  a= 5,00%
bilateral (b) or unilateral (u)  b
Normal distribution abscissa  z a/2 = 1,960 a/2

Estimated population standard deviation 


s= 0,080
(an estimate may be the target value of s )

Half confidence interval (maximum allowed error = ± E)  h/2 = (±) 0,040

Size of population (if available ) 


Important input if N < 500(1): N=
with infinite () or unknown populations, leave the field blank (or 0)
Assumed size for the population  N= 
(1) Already with N = 5,000, the sample size n decreases of about 5%, but, conservatively, the s corrective coefficient is commonly used only for N < 500.

Minimum sample size  n = 16 ( 15,37 )


NOTE - If n is less than 30 elements, we need to redo the calculations with the Student's t distribution (see next sheet );
if it is 30 < n < 50 elements, we should redo the calculations with the Student's t distribution (see next sheet ).

These slides can not be reproduced or distributed without permission in writing from the author. 407
2.4.1.10. Determination of sample size as a function of C.I.
Sample size for confidence interval of a
M E A N (small sample  t distribution)
Enter the input data in yellow cells (light gray on printed paper),
after reading the instructions about optional inputs.

Confidence level 1-a = 95,00%


Significance  a= 5,00%
bilateral (b) or unilateral (u)  b
Assumptions on the degrees of freedom = n - 1 d.o.f. 17 To be verified
(where n is an initial value to be recalculated by subsequent steps)
Student's t distribution abscissa  t a/2 = 2,110 a/2

Estimated population standard deviation 


s= 0,080
(an estimate may be the target value of s )

Half confidence interval (maximum allowed error = ± E )  h/2 = (±) 0,040

Size of population (if available ) 


Important input if N < 500(1): N=
with infinite () or unknown populations, leave the field blank (or 0)
Assumed size for the population  N= 
(1) Already with N = 5,000, the sample size n decreases of about 5%, but, conservatively, the s corrective coefficient is commonly used only for N < 500.

Minimum sample size  n = 18 ( 17,81 )


NOTE - If n is less than 30 elements, we need to redo the calculations with the Student's t distribution.
These slides can not be reproduced or distributed without permission in writing from the author. 408
2.4.1.10. Determination of sample size as a function of C.I.

Proportion
(the proof is similar to that of the mean, but in this case it is omitted for brevity)

za/2
n = p . (1 - p) . ( -------- )2
sp2 E
where, as for the mean, E is the maximum admitted error (for up or down,
i.e. the half confidence interval).
The product p . (1 - p) takes its maximum value equal to ¼ when p = 1/2,
which is the value currently assumed without best information. We highlight
that this condition is the worst case only if the absolute error E is kept con-
stant (regardless of p), but usually E decreases with p (or with 1 - p), be-
cause we try to maintain the percentage error approximately the same.
These slides can not be reproduced or distributed without permission in writing from the author. 409
2.4.1.10. Determination of sample size as a function of C.I.
Sample size for confidence interval of a
P R O P O R T I O N
(valid only if the assumptions for using normal distribution are verified)
Enter the input data in yellow cells (light gray on printed paper),
after reading the instructions about optional inputs.

Confidence level 1-a = 90,00%


Significance  a= 10,00%
bilateral (b) or unilateral (u)  b
Normal distribution abscissa  z a/2 = 1,645 a/2

Estimated fraction (if available ) 


An estimate may be the target value : p= 0,50000 50,000%
if a reliable estimate is not available/possible, we can leave the field blank (or 0)(1)
Frazione assunta  p= 0,50000 50,000%

Half confidence interval


± E% = maximum accepted percentage error on the estimate  E% = ± 20,00%
± E = maximum accepted absolute error on the estimate  E=± 0,10000

Size of population (if available ) 


Important input if N < 500(2): N=
with infinite () or unknown populations, leave the field blank (or 0)
Dimensione assunta per la popolazione  N= 
(1) In these cases, is generally considered the most favorable situation (smallest sample ) with p = 50%.
(2) Already with N = 5,000, the sample size n decreases of about 5%, but, conservatively, the s corrective coefficient is commonly used only for N < 500÷1000.

Minimum sample size  n = 68 ( 67,64 )

to estimate, with a chosen confidence level, a fraction: ^


p= 0,50000 ± 0,10000
These slides can not be reproduced or distributed without permission in writing from the author. 410
2.4. Statistical inference

2.4.2
Test of
a Statistical Hypothesis

These slides can not be reproduced or distributed without permission in writing from the author. 411
2.4.2. Test of a Statistical Hypothesis

Often we are interested in comparing two situations


(or populations), known by taking two separate samples
(not necessarily of the same size).

For example, we may want to know:

 if the trout of a tank, fed with an innovative feedstuff, grow


faster than those of another tank, fed in the traditional way;
 if the improvement of infrastructures has led to a substantial
reduction in the time of a transport.

Confidence intervals provide a measure of the reality,


but do not answer the questions above.

These slides can not be reproduced or distributed without permission in writing from the author. 412
2.4.2. Test of a Statistical Hypothesis

In these cases, assuming that the difference between the


means of the two samples will go in the expected direction
(otherwise it would make no sense to pose the problem!),
it is not so important to define a confidence interval for
this difference, but rather to know if this difference:

 may be due to the randomness of sampling


(in practice the two means could be equal);

 or may be regarded as “systematic”, albeit with


some risk of failing (called significance a).

These slides can not be reproduced or distributed without permission in writing from the author. 413
2.4.2. Test of a Statistical Hypothesis

2.4.2.1
Type I and Type II errors

These slides can not be reproduced or distributed without permission in writing from the author. 414
2.4.2.1. Type I and Type II errors
The problem is always addressed
first of all considering the credibility
of the null hypothesis H0,
namely that there is no real difference
between the two compared populations.
In the following, we will refer to the previous example of trout,
which,
after having been fed for a year with the traditional feedstuff,
have
a mean, ^ m0, estimated equal to 77.4 mm
and a standard deviation, ^ s0, estimated equal to 10.0 mm
(estimates are based on data from a sample of n = 50 trout).
The corresponding distribution
is normal, because we are working with sample means
and the null hypothesis H0
is that trout fed with the new feedstuff are of the same population .
These slides can not be reproduced or distributed without permission in writing from the author. 415
2.4.2.1. Type I and Type II errors
The most sensitive assumption is the definition of
an acceptance limit for H0.
It is often convenient to refer
to an alternative hypothesis, called H1,
which is the "reasonably“ alternative to the occurrence of
the null hypothesis H0 (i.e. the fact that it does not occur).
For example, if a trout length (at this stage of growth)
greater than or equal to 81.0 mm is considered sufficient
in order to opt for the new feedstuff,
we can consider,
in addition to the sample means distribution
with mean m0 = 77,4 mm and standard deviation s0 = 10,0 mm
corresponding to the null hypothesis H0 (on the left in the next Figure)
another distribution with mean m1 = 81.0 mm
and standard deviation a bit bigger, let us say equal to s1 = 12,0 mm
corresponding to the alternative hypothesis H1
(on the right in the next Figure):
it indicates that if the actual distribution is this (or even moved further right),
the null hypothesis H0 is surely false.
These slides can not be reproduced or distributed without permission in writing from the author. 416
2.4.2.1. Type I and Type II errors

Acceptance
0,30

accettazione
If the true mean vera is greater

limite di
limit
than this value, we accept H1
0,25
If
SeHH0 0isè true,
vera, as true (and H0 as false)
di probabilità

HH11 is false
è falsa
density

0,20

seen as "break-even"
Probability

0,15
Densità

0,10

0,05 b
a
0,00

70 75 80 85 90

Lunghezza trote[mm]
Trout length [mm]

WE ACCEPT H0 (and reject H1) WE REJECT H0 (and accept H1)


These slides can not be reproduced or distributed without permission in writing from the author. 417
2.4.2.1. Type I and Type II errors

In practice, we want to define a threshold (for the average length m1 of the


trout fed with the new feedstuff) beyond which there is an actual economical
benefit in comparison to the traditional feedstuff. The standard deviation s1
may slightly increase with the new feedstuff, because we are now working in
improved conditions (i.e. more difficult) and this usually implies a greater
dispersion of results.
The size n0 and n1 of the two samples may be different, but, once establi-
shed, they can not change if we want that all planned conditions remain valid.

If the null hypothesis H0 is true, there is a certain probability (equal to the si-
gnificance a) that the mean m1 of the 2nd sample (new feedstuff, but under
this hypothesis equivalent to the traditional feedstuff), is on the right of the
threshold. On the other hand, if the alternative hypothesis H1 is true (i.e. if
the true mean of trout fed with the new feedstuff is greater than or equal to
m1), there is still a certain probability (expressed by the value b) that the
mean of a sample taken from the second tank is on the left of the threshold.

These slides can not be reproduced or distributed without permission in writing from the author. 418
2.4.2.1. Type I and Type II errors

Risks are H0 H0
of two kinds true false
We accept the Right decision TYPE II error
null hypothesis
b
H0 (1 - a) probability of erroneously
confidence level accepting the null
hypothesis

We reject TYPE I error Right decision


the
null hypothesis a
H0
probability of erroneously (1 - b)
rejecting
the null hypothesis = test power
significance)

These slides can not be reproduced or distributed without permission in writing from the author. 419
Acceptance
limit
di probabilità
Probability density

Moving the acceptance


Densità

limit, we can reduce only


one of the two risks, while
the other one increases.
b
a
di probabilità
Probability density

To reduce
both a and b risks togheter,
Densità

we must increase the


sample size.
b
a

These slides can not be reproduced or distributed without permission in writing from the author. 420
2.4.2.1. Type I and Type II errors
It is important to keep in mind that (when possible)
we demonstrate
(with a risk of failing equal to the significance a)
that two populations are different;
while it is never possible to prove
that two populations are equal.
It is also worthwhile to note that, in most cases,
to consider two populations as significantly
(with risk of failing = a)
different implies an economic investment
(for example: the adoption of the new feedstuff)
in order to exploit the benefits of new knowledge.
Instead, not being able to detect
that the two populations are different (with risk of failing = b)
results in a loss of business
(but without immediate disbursements).
For this reason it is common to assume a < b.
These slides can not be reproduced or distributed without permission in writing from the author. 421
2.4.2. Test of a Statistical Hypothesis

2.4.2.2
Chi-square test for
the goodness of fit

These slides can not be reproduced or distributed without permission in writing from the author. 422
2.4.2.2. Chi-square test for the goodness of fit

Let us suppose we want to calculate the probabilities associated with


the number of heads obtained in 3 throws of a balanced coin
(or when you launch 3 balanced coins).

For this calculation, we use binomial distribution, but in an elemen-


tary case like this, we can deduct everything with a simple reasoning.
Considering the 8 possible outcomes :
TTT, HTT, THT, TTH, HHT, HTH, THH and HHH,
as having the same probability to occur, we can easily verify that the
probabilities of obtaining 0, 1, 2, 3 heads are respectively:
1/8, 3/8, 3/8 and 1/8 .

These slides can not be reproduced or distributed without permission in writing from the author. 423
2.4.2.2. Chi-square test for the goodness of fit
Let us imagine to actually throw 3 coins 200 times and to obtain the results
in the column “OBSERVED frequencies" of the Table.
OBSERVED EXPECTED EXPECTED
Number of HEADs
frequencies probabilities frequencies
0 18 1/8 = 0.125 25
1 63 3/8 = 0.375 75
2 84 3/8 = 0.375 75
3 35 1/8 = 0.125 25
Total 200 8/8 = 1.000 200
90 OBSERVED frequencies 84
EXPECTED frequencies
80 75 75 Paired
70
63 columns
histogram
Frequencies

60

50

40 35
30 25 25
20
18

10

0 1 2 3
Number of HEADs
We note that there are discrepancies between observed and expected
frequencies.
These slides can not be reproduced or distributed without permission in writing from the author. 424
2.4.2.2. Chi-square test for the goodness of fit

In order to test if these discrepancies are so small that they can be attribu-
ted to the random variability (or not), let us indicate by “f” the observed fre-
quencies and by “e” the expected ones, and then determine the value of the
statistical variable c2 (chi-square) using the following expression:

( f - e )2
c2 = S -------------
e
calculating the ratio (f-e)2/e separately for each of the 4 distribution classes.

These slides can not be reproduced or distributed without permission in writing from the author. 425
2.4.2.2. Chi-square test for the goodness of fit
If the obtained value is too large (compared to the threshold obtained from
chi-square Table), we reject the null hypothesis that the binomial distribu-
tion with n = 3 and p = 1/2 adequately represents the examined experiment.
In fact, the rejection of the null hypothesis implies either that the coins are
not well balanced or that they were not thrown in randomly.
By substituting the values of expected and observed frequencies, we get:
(18 - 25)2 (63 - 75)2 (84 - 75)2 (35 - 25)2
c2 = --------------- + -------------- + -------------- + --------------- = 8.96
25 75 75 25

To decide if this value is large enough to reject the null hypothesis (at the
level of significance a), we only need to check whether it exceeds the c2
value related to the degrees of freedom of this case.
Generally, in this kind of test, the number of degrees of freedom is given by:
• the number of terms (f-e)2/e that have been added to obtain c2,
• subtracting the number of quantities that are used in calculating the ex-
pected frequencies.

These slides can not be reproduced or distributed without permission in writing from the author. 426
2.4.2.2. Chi-square test for the goodness of fit

In our example, we have 4


terms in the expression of c2,
and the only quantity needed to
calculate the expected frequen- c values as a function of the degrees of freedom, d.o.f. (rows)
2

Tabella dei andvalori


of di c shown
, corrispondenti
values foraithe
valori di livello di significatività a indicati
a (columns)
2

cies is the total number of occur- the significance


livello di significatività a
s i g n i f i c a n c e a
rences = 200. g.d.l.
d.o.f.
1
0,995
0,995
0,990
0,990
0,975
0,975
0,950
0,950
3,927E-05 1,571E-04 9,821E-04 3,932E-03
0,050
0,050
3,841
0,025
0,025
5,024
0,010
0,010
6,635
0,005 g.d.l.
0,005 d.o.f.
7,879 1
1 3,927E-05 1,571E-04 9,821E-04 3,932E-03 3,841 5,024 6,635 7,879 1
2 0,0100 0,0201 0,0506 0,103 5,991 7,378 9,210 10,597 2
2 0,0100 0,0201 0,0506 0,103 5,991 7,378 9,210 10,597 2
3 0,0717 0,115 0,216 0,352 7,815 9,348 11,345 12,838 3
3 0,0717 0,115 0,216 0,352 7,815 9,348 11,345 12,838 3
Thus the number of degrees 4
4
5
0,207
0,207
0,412
0,297
0,297
0,554
0,484
0,484
0,831
0,711
0,711
1,145
9,488
9,488
11,070
11,143
11,143
12,832
13,277
13,277
15,086
14,860
14,860
16,750
4
4
5
5 0,412 0,554 0,831 1,145 11,070 12,833 15,086 16,750 5
of freedom is 4 - 1 = 3, 66
7 7
0,676
0,676
0,989
0,989
0,872
0,872
1,239
1,239
1,237
1,237
1,690
1,690
1,635
1,635
2,167
2,167
12,592
12,592
14,067
14,067
14,449
14,449
16,013
16,013
16,812
16,812
18,475
18,475
18,548
18,548
20,278
20,278
66
77
8 1,344 1,647 2,180 2,733 15,507 17,535 20,090 21,955 88
which, for the chosen signifi- 8
99
1,344
1,735
1,735
1,646
2,088
2,088
2,180
2,700
2,700
2,733
3,325
3,325
15,507
16,919
16,919
17,535
19,023
19,023
20,090
21,666
21,666
21,955
23,589
23,589 99

cance a = 0.05, 10 10 2,156


2,156 2,558
2,558 3,247
3,247 3,940
3,940 18,307
18,307 20,483
20,483 23,209
23,209 25,188
25,188 10
10
1111 2,603
2,603 3,053
3,053 3,816
3,816 4,575
4,575 19,675
19,675 21,920
21,920 24,725
24,725 26,757
26,757 11
11
12 12 3,074
3,074 3,571
3,571 4,404
4,404 5,226
5,226 21,026
21,026 23,337
23,337 26,217
26,217 28,300
28,300 12
12
gives c20,05 = 7.815. 1313
1414
3,565
3,565
4,075
4,075
4,107
4,107
4,660
4,660
5,009
5,009
5,629
5,629
5,892
5,892
6,571
6,571
22,362
22,362
23,685
23,685
24,736
24,736
26,119
26,119
27,688
27,688
29,141
29,141
29,819
29,819
31,319
31,319
13
13
14
14
15 15 4,601
4,601 5,229
5,229 6,262
6,262 7,261
7,261 24,996
24,996 27,488
27,488 30,578
30,578 32,801
32,801 15
15
1616 5,142
5,142 5,812
5,812 6,908
6,908 7,962
7,962 26,296
26,296 28,845
28,845 32,000
32,000 34,267
34,267 16
16
17 17 5,697
5,697 6,408
6,408 7,564
7,564 8,672
8,672 27,587
27,587 30,191
30,191 33,409
33,409 35,718
35,718 17
17
1818 6,265
6,265 7,015
7,015 8,231
8,231 9,390
9,390 28,869
28,869 31,526
31,526 34,805
34,805 37,156
37,156 18
18
1919 6,844
6,844 7,633
7,633 8,907
8,907 10,117
10,117 30,144
30,144 32,852
32,852 36,191
36,191 38,582
38,582 19
19
Since the computed value of 2020
2121
7,434
7,434
8,034
8,034
8,260
8,260
8,897
8,897
9,591
9,591
10,283
10,283
10,851
10,851
11,591
11,591
31,410
31,410
32,671
32,671
34,170
34,170
35,479
35,479
37,566
37,566
38,932
38,932
39,997
39,997
41,401
41,401
20
20
21
21
c2 = 8.96 exceeds that of the 22 22
2323
8,643
8,643
9,260
9,260
9,542
9,542
10,196
10,196
10,982
10,982
11,689
11,689
12,338
12,338
13,091
13,091
33,924
33,924
35,172
35,172
36,781
36,781
38,076
38,076
40,289
40,289
41,638
41,638
42,796
42,796
44,181
44,181
22
22
23
23
2424 9,886 10,856 12,401 13,848 36,415 39,364 42,980 45,558 24
Table equal to 7.815, we 2525
9,886
10,520
10,520
10,856
11,524
11,524
12,401
13,120
13,120
13,848
14,611
14,611
36,415
37,652
37,652
39,364
40,646
40,646
42,980
44,314
44,314
45,559
46,928
46,928
24
25
25
2626 11,160
11,160 12,198
12,198 13,844
13,844 15,379
15,379 38,885
38,885 41,923
41,923 45,642
45,642 48,290
48,290 26
26
reject the null hypothesis. 2727
2828
11,808
11,808
12,461
12,461
12,878
12,879
13,565
13,565
14,573
14,573
15,308
15,308
16,151
16,151
16,928
16,928
40,113
40,113
41,337
41,337
43,195
43,195
44,461
44,461
46,963
46,963
48,278
48,278
49,645
49,645
50,994
50,993
27
27
28
28
2929 13,121
13,121 14,256
14,256 16,047
16,047 17,708
17,708 42,557
42,557 45,722
45,722 49,588
49,588 52,335
52,336 29
29
3030 13,787
13,787 14,953
14,953 16,791
16,791 18,493
18,493 43,773
43,773 46,979
46,979 50,892
50,892 53,672
53,672 30
30

These slides can not be reproduced or distributed without permission in writing from the author. 427
2.4.2.2. Chi-square test for the goodness of fit

To reject the null hypothesis means:


• that the binomial distribution with n = 3 e p = ½
does not provide a good representation of the
actual distribution;
• and/or that the coins are not adequately balanced,
• or that they have not been randomly thrown.

These slides can not be reproduced or distributed without permission in writing from the author. 428
2.4.2.2. Chi-square test for the goodness of fit

It is worth noting that, in the expression already seen:


( f - e )2
c2 = S -------------
e
we can take as denominator the expected frequencies or the ob-
served ones, depending on what is the most reliable reference
for the specific problem.

Examples
• In the most common case, in which we want to know if the data are ar-
ranged according to a known distribution, we take as denominator the
expected frequencies e;
• On the opposite, if we want to know which of a set of known statistical
distributions, is best suited to interpret the experimental data, the most
reliable reference is given by experimental data and therefore we take
as denominator the observed frequencies f.

These slides can not be reproduced or distributed without permission in writing from the author. 429
2.4.2.2. Chi-square test for the goodness of fit
TESTING THE FIT OF A NORMAL (or other) DISTRIBUTION
Problem 1: experimental data are arranged according to a normal distribution ?

DIAMETER MEASUREMENTS OF 80 ROLLS PRODUCED BY A LATHE


comparison with expected values from a normal distribution
35

31,5
30 Measured values
30
Expected values
Number of rolls in each class

25
22
21
19,4 19,3
20
Paired
columns
15 histogram

10

4,5 4,5
5
3
2
1 0,4 1
0 0,0 0,4 0 0,0
0
4,80 4,85 4,90 4,95 5,00 5,05 5,10 5,15 5,20

Diameter [mm]
These slides can not be reproduced or distributed without permission in writing from the author. 430
2.4.2.2. Chi-square test for the goodness of fit
f e
C L A S S E S EXPECTED (f-e)2
OBSERVED frequencies ----------
Class
# from to frequencies (normal e
center distribution)
1 4,825 4,875 4,85 1 0,393 0,939
2 4,875 4,925 4,90 3 4,521 0,512
3 4,925 4,975 4,95 21 19,417 0,129
4 4,975 5,025 5,00 30 31,462 0,068
5 5,025 5,075 5,05 22 19,319 0,372
6 5,075 5,125 5,10 2 4,476 1,370
7 5,125 5,175 5,15 1 0,387 0,972
Total 80 79,975 4,361
Mean 4,99987 (f-e)2
Std. dev. 0,048567 c2 = S ---------
e

degress of freedom, d.o.f. = nr. of classes - 1 = 7- 1 = 6 d.o.f.

c2 = 4,361 corresponds to a significance of 62,80%


c2 with a significance of 0,05 = 12,5916 (for completeness)

The null hypothesis can not be rejected with a significance of 5%


and therefore we are allowed to assume that data are normally distributed.
These slides can not be reproduced or distributed without permission in writing from the author. 431
2.4.2.2. Chi-square test for the goodness of fit
TESTING THE FIT OF A NORMAL (or other) DISTRIBUTION
Problem 2: is the normal distribution suitable to interpret experimental data ?
f e
C L A S S E S EXPECTED (f-e)2
OBSERVED frequencies ----------
Class
# from to frequencies (normal f
center distribution)
1 4,825 4,875 4,85 1 0,393 0,369
2 4,875 4,925 4,90 3 4,521 0,772
3 4,925 4,975 4,95 21 19,417 0,119
4 4,975 5,025 5,00 30 31,462 0,071
5 5,025 5,075 5,05 22 19,319 0,327
6 5,075 5,125 5,10 2 4,476 3,065
7 5,125 5,175 5,15 1 0,387 0,376
Total 80 79,975 5,098
Mean 4,99987 (f-e)2
Std. dev. 0,048567 c2 = S ---------
f

degress of freedom, d.o.f. = nr. of classes - 1 = 7- 1 = 6 d.o.f.

c2 = 5,098 corresponds to a significance of 53,12%


c2 with a significance of 0,05 = 12,5916 (for completeness)

The null hypothesis can not be rejected with a significance of 5%


and therefore we are allowed to accept the normal distribution for the data interpolation.
These slides can not be reproduced or distributed without permission in writing from the author. 432
2.4.2. Test of a Statistical Hypothesis

2.4.2.3
Summary of criteria
to check if available data
are distributed according to
the normal distribution

These slides can not be reproduced or distributed without permission in writing from the author. 433
2.4.2.2. Summary of criteria (to check if available data are distributed according to the normal distribution)
Because of their importance, all available criteria to test whether a series of experimental
data can be properly interpreted by a normal distribution are summarized below.

MATHEMATICAL
VISUAL APPLICATION
PRINCIPLE APPLICATION
(subjective)
(measured)

Visual symmetry test


Difference between
on the probability
Distribution Symmetry mean and median
density function or
(normalized to mean)
directly on the histogram

Visual test of the


Normal Probability Plot, proximity of points to
NPP the least-squares line
(calculated or simply drawn)
Calculation of c2
Visual comparison,
Comparison of (chi-square)
on a paired columns
observed and
histogram,
expected distributions
of the trends
(of frequency classes)
correspondence
These slides can not be reproduced or distributed without permission in writing from the author. 434

S-ar putea să vă placă și