Está en la página 1de 127

Some Quantitative Tools and Their Use in Excel

FIMMOD - FInancial Management MODels (750562)


(University of Brescia) 1 / 42
Main topics
1
Linear Programming
2
Statistics
Descriptive Statistics
Linear Regression
Probability
Inference
(University of Brescia) 2 / 42
Linear Programming
General statements
Managers often have to make decisions on how best to allocate scarce
resources among competing activities
Limited resources are used to manufacture various products, or
provide services
Typically, there are many dierent ways to produce these products or
services. Management's problem is to nd the best way, given the
limitations of the resources
Linear programming (LP) is a mathematical technique designed to
help in the planning and allocation of the resources
Both the objective function and the constraints of an LP problem
must be linear
(University of Brescia) 3 / 42
Linear Programming
General statements
Managers often have to make decisions on how best to allocate scarce
resources among competing activities
Limited resources are used to manufacture various products, or
provide services
Typically, there are many dierent ways to produce these products or
services. Management's problem is to nd the best way, given the
limitations of the resources
Linear programming (LP) is a mathematical technique designed to
help in the planning and allocation of the resources
Both the objective function and the constraints of an LP problem
must be linear
(University of Brescia) 3 / 42
Linear Programming
General statements
Managers often have to make decisions on how best to allocate scarce
resources among competing activities
Limited resources are used to manufacture various products, or
provide services
Typically, there are many dierent ways to produce these products or
services. Management's problem is to nd the best way, given the
limitations of the resources
Linear programming (LP) is a mathematical technique designed to
help in the planning and allocation of the resources
Both the objective function and the constraints of an LP problem
must be linear
(University of Brescia) 3 / 42
Linear Programming
General statements
Managers often have to make decisions on how best to allocate scarce
resources among competing activities
Limited resources are used to manufacture various products, or
provide services
Typically, there are many dierent ways to produce these products or
services. Management's problem is to nd the best way, given the
limitations of the resources
Linear programming (LP) is a mathematical technique designed to
help in the planning and allocation of the resources
Both the objective function and the constraints of an LP problem
must be linear
(University of Brescia) 3 / 42
Linear Programming
General statements
Managers often have to make decisions on how best to allocate scarce
resources among competing activities
Limited resources are used to manufacture various products, or
provide services
Typically, there are many dierent ways to produce these products or
services. Management's problem is to nd the best way, given the
limitations of the resources
Linear programming (LP) is a mathematical technique designed to
help in the planning and allocation of the resources
Both the objective function and the constraints of an LP problem
must be linear
(University of Brescia) 3 / 42
Linear Programming
General statements
An LP problem consists in
an objective function, typically a prot to maximize or a cost to
minimize
constraints due to the fact that scarce resources imply limitations to
the courses of actions available
A typical application of LP is the search for the mix of nancial
instruments driving to the highest possible return
Non linear programming involves an objective function
and/constraints which are non linear
(University of Brescia) 4 / 42
Linear Programming
General statements
An LP problem consists in
an objective function, typically a prot to maximize or a cost to
minimize
constraints due to the fact that scarce resources imply limitations to
the courses of actions available
A typical application of LP is the search for the mix of nancial
instruments driving to the highest possible return
Non linear programming involves an objective function
and/constraints which are non linear
(University of Brescia) 4 / 42
Linear Programming
General statements
An LP problem consists in
an objective function, typically a prot to maximize or a cost to
minimize
constraints due to the fact that scarce resources imply limitations to
the courses of actions available
A typical application of LP is the search for the mix of nancial
instruments driving to the highest possible return
Non linear programming involves an objective function
and/constraints which are non linear
(University of Brescia) 4 / 42
Linear Programming
General statements
An LP problem consists in
an objective function, typically a prot to maximize or a cost to
minimize
constraints due to the fact that scarce resources imply limitations to
the courses of actions available
A typical application of LP is the search for the mix of nancial
instruments driving to the highest possible return
Non linear programming involves an objective function
and/constraints which are non linear
(University of Brescia) 4 / 42
Linear Programming
General statements
An LP problem consists in
an objective function, typically a prot to maximize or a cost to
minimize
constraints due to the fact that scarce resources imply limitations to
the courses of actions available
A typical application of LP is the search for the mix of nancial
instruments driving to the highest possible return
Non linear programming involves an objective function
and/constraints which are non linear
(University of Brescia) 4 / 42
Linear Programming
Adopting the notation of matrix algebra a problem of linear programming
(L.P.) in the canonical form can be written in the following way:
8
>
>
<
>
>
:
max c
T
x
s.t.
Ax _ b
x _ 0
where z = c
T
x is the objective function to be maximized,
x = [x
1
, x
2
, .., x
n
] R
n
is the vector of decision variables, b R
m
is a
vector of known constants and c R
n
is a vector of coecients.
(University of Brescia) 5 / 42
Linear Programming
An L.P. problem can often appear in a dierent form than the canonical
one. However it is always possible to turn it in the canonical form. A
maximization problem can be turned into a minimization one observing
that:
min z = max (z)
and viceversa
max z = min (z) .
Besides, all the contraints of the type Ax _ b can be rewritten as
Ax _ b; equality constraints Ax = b can be replaced with two
inequality contraints, imposing that at the same time Ax _ b and
Ax _ b.
(University of Brescia) 6 / 42
Linear Programming
Denition
An admissible solution to an L.P. problem is any vector x R
n
satisfying
the system of constraints. The set of all the admissible solutions, which
usually named S
a
is dened as S
a
= x R
n
[x _ 0, Ax _ b
Denition
An optimal solution to an L.P. problem is an admissible solution letting
the objective function to assume the maximum nite value.
(University of Brescia) 7 / 42
Linear Programming - example
In this video we try to solve gracally the following optimization probelm:
Link:
http://www.engineeringvideos.net/optimization/optimization.php
(University of Brescia) 8 / 42
Excel Solver
Excel Solver is a powerful tool for analyzing and solving various
types of linear programming problems which contain many variables
and constraints
It can analyze and solve linear programming (LP) problems, as well
as other kinds of mathematical programming problems (non-linear,
integer, mixed linear-integer,...).
Because of its algorithmic nature, Excel solver may not always
converge to the best solution
the result is inuenced by options such as the maximum time allowed,
the maximum number of iterations allowed, the size of the residual
error, etc.
Excel solver provides default settings for all options, which are
appropriate for most problems.
(University of Brescia) 9 / 42
Excel Solver
Excel Solver is a powerful tool for analyzing and solving various
types of linear programming problems which contain many variables
and constraints
It can analyze and solve linear programming (LP) problems, as well
as other kinds of mathematical programming problems (non-linear,
integer, mixed linear-integer,...).
Because of its algorithmic nature, Excel solver may not always
converge to the best solution
the result is inuenced by options such as the maximum time allowed,
the maximum number of iterations allowed, the size of the residual
error, etc.
Excel solver provides default settings for all options, which are
appropriate for most problems.
(University of Brescia) 9 / 42
Excel Solver
Excel Solver is a powerful tool for analyzing and solving various
types of linear programming problems which contain many variables
and constraints
It can analyze and solve linear programming (LP) problems, as well
as other kinds of mathematical programming problems (non-linear,
integer, mixed linear-integer,...).
Because of its algorithmic nature, Excel solver may not always
converge to the best solution
the result is inuenced by options such as the maximum time allowed,
the maximum number of iterations allowed, the size of the residual
error, etc.
Excel solver provides default settings for all options, which are
appropriate for most problems.
(University of Brescia) 9 / 42
Excel Solver
Excel Solver is a powerful tool for analyzing and solving various
types of linear programming problems which contain many variables
and constraints
It can analyze and solve linear programming (LP) problems, as well
as other kinds of mathematical programming problems (non-linear,
integer, mixed linear-integer,...).
Because of its algorithmic nature, Excel solver may not always
converge to the best solution
the result is inuenced by options such as the maximum time allowed,
the maximum number of iterations allowed, the size of the residual
error, etc.
Excel solver provides default settings for all options, which are
appropriate for most problems.
(University of Brescia) 9 / 42
Excel Solver
Excel Solver is a powerful tool for analyzing and solving various
types of linear programming problems which contain many variables
and constraints
It can analyze and solve linear programming (LP) problems, as well
as other kinds of mathematical programming problems (non-linear,
integer, mixed linear-integer,...).
Because of its algorithmic nature, Excel solver may not always
converge to the best solution
the result is inuenced by options such as the maximum time allowed,
the maximum number of iterations allowed, the size of the residual
error, etc.
Excel solver provides default settings for all options, which are
appropriate for most problems.
(University of Brescia) 9 / 42
Excel Solver
Excel Solver (i.e. Risolutore) must be activated, if it is not already
active
To activate the Analysis ToolPak, choose the Tools -> Data Analysis
command (in Excel 2003) or click on Risolutore button (in Excel
2007).
Figure: Excel 2007
(University of Brescia) 10 / 42
Excel Solver
Excel Solver (i.e. Risolutore) must be activated, if it is not already
active
To activate the Analysis ToolPak, choose the Tools -> Data Analysis
command (in Excel 2003) or click on Risolutore button (in Excel
2007).
Figure: Excel 2007
(University of Brescia) 10 / 42
Excel Solver
The Solver interface to enter all the parameters of an L.P. problem:
- the cell containing the objective function
- if the user wants to solve a max, min or equal to problem
- enter the contraints
Figure: Solver interface
(University of Brescia) 11 / 42
Linear Programming
Case: Acme Company
Among other products, Acme produces leg muscle vitamins (V) and
jet-propelled tennis shoes (S)
The Acme Company products.
(University of Brescia) 12 / 42
Linear Programming
Case: Acme Company
Acme uses Excel solver to for the following LP problem:
maximize its total prot from assembling and packaging boxes of V
and S;
decision variable is the number of units of V and S to be produced;
subject to the constraints on the use of its producing factors (plants
and workforce have a limited productivity).
(University of Brescia) 13 / 42
Linear Programming
Case: Acme Company
Acme uses Excel solver to for the following LP problem:
maximize its total prot from assembling and packaging boxes of V
and S;
decision variable is the number of units of V and S to be produced;
subject to the constraints on the use of its producing factors (plants
and workforce have a limited productivity).
(University of Brescia) 13 / 42
Linear Programming
Case: Acme Company
Acme uses Excel solver to for the following LP problem:
maximize its total prot from assembling and packaging boxes of V
and S;
decision variable is the number of units of V and S to be produced;
subject to the constraints on the use of its producing factors (plants
and workforce have a limited productivity).
(University of Brescia) 13 / 42
Linear Programming
Acme Company: The LP mathematical formulation
Let us see the mathematical formulation of the objective function and
constraints. The decision variables appearing both in the objective
function and the constraints are
x
1
, which is the number of boxes of V,
x
2
, which is the number of boxes of S
The prot to be maximized is
Z = 2x
1
+ 3x
2
,
where
2 is the unit prot of a box of V,
3 is the unit prot of a box of S
(University of Brescia) 14 / 42
Linear Programming
Acme Company: The LP mathematical formulation
Let us see the mathematical formulation of the objective function and
constraints. The decision variables appearing both in the objective
function and the constraints are
x
1
, which is the number of boxes of V,
x
2
, which is the number of boxes of S
The prot to be maximized is
Z = 2x
1
+ 3x
2
,
where
2 is the unit prot of a box of V,
3 is the unit prot of a box of S
(University of Brescia) 14 / 42
Linear Programming
Acme Company: The LP mathematical formulation
Let us see the mathematical formulation of the objective function and
constraints. The decision variables appearing both in the objective
function and the constraints are
x
1
, which is the number of boxes of V,
x
2
, which is the number of boxes of S
The prot to be maximized is
Z = 2x
1
+ 3x
2
,
where
2 is the unit prot of a box of V,
3 is the unit prot of a box of S
(University of Brescia) 14 / 42
Linear Programming
Acme Company: The LP mathematical formulation
Let us see the mathematical formulation of the objective function and
constraints. The decision variables appearing both in the objective
function and the constraints are
x
1
, which is the number of boxes of V,
x
2
, which is the number of boxes of S
The prot to be maximized is
Z = 2x
1
+ 3x
2
,
where
2 is the unit prot of a box of V,
3 is the unit prot of a box of S
(University of Brescia) 14 / 42
Linear Programming
Acme Company: The LP mathematical formulation
Let us see the mathematical formulation of the objective function and
constraints. The decision variables appearing both in the objective
function and the constraints are
x
1
, which is the number of boxes of V,
x
2
, which is the number of boxes of S
The prot to be maximized is
Z = 2x
1
+ 3x
2
,
where
2 is the unit prot of a box of V,
3 is the unit prot of a box of S
(University of Brescia) 14 / 42
Linear Programming
Acme Company: The LP mathematical formulation
Let us see the mathematical formulation of the objective function and
constraints. The decision variables appearing both in the objective
function and the constraints are
x
1
, which is the number of boxes of V,
x
2
, which is the number of boxes of S
The prot to be maximized is
Z = 2x
1
+ 3x
2
,
where
2 is the unit prot of a box of V,
3 is the unit prot of a box of S
(University of Brescia) 14 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The assembly time constraint is
9x
1
+ 15x
2
_ 108, 000
where
9 is the number of minutes required to assemble a box of V,
15 is the number of minutes required to assemble a box of S,
108, 000 is the maximum number of minutes available in assembling
The packaging time constraint is
11x
1
+ 5x
2
_ 108, 000
where
11 is the number of minutes required to package a box of V,
5 is the number of minutes required to package a box of S,
108, 000 is the maximum number of minutes available in packaging
(University of Brescia) 15 / 42
Linear Programming
Acme Company: The LP mathematical formulation
The integer constraint is
x
1
, x
2
Z
+
' 0 ,
and means that the numbers of boxes must be non negative and
integer
(University of Brescia) 16 / 42
Linear Programming
Acme Company: The LP Excel Solver formulation
The following picture shows the input data and the formulas required
to run the Excel Solver
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
A B C D E F G H I
Acme Company
Assembly Packaging
Time (min) Time (min) Profit Changing Cells
leg muscle vitamins (V) 9 11 2 9'000
jet-propelled tennis shoes (S) 15 5 3 1'800
Maximum time (min) 108'000 108'000
Actual time (min) 108'000 108'000
Target cell
23'400
Input data
Formulas
Cell Formula Copied to
C10 C6*$G6 + C7*$G7 D10
F12 E6*G6 + E7*G7
Solver Parameters
F12
max
G6:G7
C10 <= C9 = Assembly time constraint
D10 <= D9 = Packaging time constraint
G6:G7 >= 0 = Decision variables must be positive
G6:G7 = int = Decision variables must be integer
by modifying Changing Cells
subject to Constraints
Constraints
User input cells are shaded
Set Target Cell
equal to
The Acme Company problem solved with Excel Solver.
(University of Brescia) 17 / 42
Linear Programming
Acme Company: The LP Excel Solver formulation
Changing cells: cells containing the decision variables. The changing
cells are usually left blank or are assigned zero values
Target cell: cell containing the objective function in terms of the
decision variables
Constraints: cells containing the limits which are imposed upon
decision variables
(University of Brescia) 18 / 42
Linear Programming
Acme Company: The LP Excel Solver formulation
Changing cells: cells containing the decision variables. The changing
cells are usually left blank or are assigned zero values
Target cell: cell containing the objective function in terms of the
decision variables
Constraints: cells containing the limits which are imposed upon
decision variables
(University of Brescia) 18 / 42
Linear Programming
Acme Company: The LP Excel Solver formulation
Changing cells: cells containing the decision variables. The changing
cells are usually left blank or are assigned zero values
Target cell: cell containing the objective function in terms of the
decision variables
Constraints: cells containing the limits which are imposed upon
decision variables
(University of Brescia) 18 / 42
Linear Programming
Acme Company: Excel Solver at work
Activate the Excel Solver. Select Tools -> Solver to display the Solver
Parameters dialog box and follow what is written in the spreadsheet
Click the `Solve' button to start Solver
Select the `Keep Solver Solution' option on the `Solver Results' dialog
box in order to store the answer in the worksheet
For most problems, the default settings in the `Solver Options' box
are appropriate
The answer is 9, 000 boxes of V and 1, 800 boxes of S, giving a
maximum prot of 23, 400. The actual amount of time used in each
department is 1, 800 hours, equalling the maximum time available
(University of Brescia) 19 / 42
Linear Programming
Acme Company: Excel Solver at work
Activate the Excel Solver. Select Tools -> Solver to display the Solver
Parameters dialog box and follow what is written in the spreadsheet
Click the `Solve' button to start Solver
Select the `Keep Solver Solution' option on the `Solver Results' dialog
box in order to store the answer in the worksheet
For most problems, the default settings in the `Solver Options' box
are appropriate
The answer is 9, 000 boxes of V and 1, 800 boxes of S, giving a
maximum prot of 23, 400. The actual amount of time used in each
department is 1, 800 hours, equalling the maximum time available
(University of Brescia) 19 / 42
Linear Programming
Acme Company: Excel Solver at work
Activate the Excel Solver. Select Tools -> Solver to display the Solver
Parameters dialog box and follow what is written in the spreadsheet
Click the `Solve' button to start Solver
Select the `Keep Solver Solution' option on the `Solver Results' dialog
box in order to store the answer in the worksheet
For most problems, the default settings in the `Solver Options' box
are appropriate
The answer is 9, 000 boxes of V and 1, 800 boxes of S, giving a
maximum prot of 23, 400. The actual amount of time used in each
department is 1, 800 hours, equalling the maximum time available
(University of Brescia) 19 / 42
Linear Programming
Acme Company: Excel Solver at work
Activate the Excel Solver. Select Tools -> Solver to display the Solver
Parameters dialog box and follow what is written in the spreadsheet
Click the `Solve' button to start Solver
Select the `Keep Solver Solution' option on the `Solver Results' dialog
box in order to store the answer in the worksheet
For most problems, the default settings in the `Solver Options' box
are appropriate
The answer is 9, 000 boxes of V and 1, 800 boxes of S, giving a
maximum prot of 23, 400. The actual amount of time used in each
department is 1, 800 hours, equalling the maximum time available
(University of Brescia) 19 / 42
Linear Programming
Acme Company: Excel Solver at work
Activate the Excel Solver. Select Tools -> Solver to display the Solver
Parameters dialog box and follow what is written in the spreadsheet
Click the `Solve' button to start Solver
Select the `Keep Solver Solution' option on the `Solver Results' dialog
box in order to store the answer in the worksheet
For most problems, the default settings in the `Solver Options' box
are appropriate
The answer is 9, 000 boxes of V and 1, 800 boxes of S, giving a
maximum prot of 23, 400. The actual amount of time used in each
department is 1, 800 hours, equalling the maximum time available
(University of Brescia) 19 / 42
Main topics
1
Linear Programming
2
Statistics
Descriptive Statistics
Linear Regression
Probability
Inference
(University of Brescia) 20 / 42
Statistics
Introduction and examples
The primary role of statistics is to provide managers with
mathematical tools that will help them to organize and analyze the
information data in an eective and meaningful way
The easiest method of organizing data is to construct a frequency
distribution table using classes. Usually a class is an interval
One possible analysis on data is to test for the dierence among
groups of data. The test can concentrate on the measures of position
(mode, median, mean) and dispersion (range, standard deviation,
variance)
(University of Brescia) 21 / 42
Statistics
Introduction and examples
The primary role of statistics is to provide managers with
mathematical tools that will help them to organize and analyze the
information data in an eective and meaningful way
The easiest method of organizing data is to construct a frequency
distribution table using classes. Usually a class is an interval
One possible analysis on data is to test for the dierence among
groups of data. The test can concentrate on the measures of position
(mode, median, mean) and dispersion (range, standard deviation,
variance)
(University of Brescia) 21 / 42
Statistics
Introduction and examples
The primary role of statistics is to provide managers with
mathematical tools that will help them to organize and analyze the
information data in an eective and meaningful way
The easiest method of organizing data is to construct a frequency
distribution table using classes. Usually a class is an interval
One possible analysis on data is to test for the dierence among
groups of data. The test can concentrate on the measures of position
(mode, median, mean) and dispersion (range, standard deviation,
variance)
(University of Brescia) 21 / 42
Statistics
Wheelie Company: Excel FREQUENCY function and ChartWizard
Consider the 100 numbers representing the length (in 100s
kilometers) travelled by bicycle tyres before one tyre of the couple
failed to meet minimum Wheelie Company standards
The Wheelie Company tyres.
We can organize the tyres survivorship into a frequency distribution.
The rst task is to convert the raw data into a number of groups or
classes, and then count the number of values which fall into each class
(University of Brescia) 22 / 42
Statistics
Wheelie Company: Excel FREQUENCY function and ChartWizard
Consider the 100 numbers representing the length (in 100s
kilometers) travelled by bicycle tyres before one tyre of the couple
failed to meet minimum Wheelie Company standards
The Wheelie Company tyres.
We can organize the tyres survivorship into a frequency distribution.
The rst task is to convert the raw data into a number of groups or
classes, and then count the number of values which fall into each class
(University of Brescia) 22 / 42
Statistics
Wheelie Company: Excel FREQUENCY function and ChartWizard
The FREQUENCY function needs two input ranges: the range of
data (RD) and the range of classes upper bounds (RCUB)
Given the minimum, m, and the maximum, M, of data, the class
width, cw, is
cw =
M m
N
,
where N is the desired number of classes. Each upper bound ub
i
,
i = 1, ..., N, is calculated as
ub
i
= m +i cw
Select N vertically adjacent cells, write
"=FREQUENCY(RD;RCUB)", then press "CTRL+ALT+ENTER"
Use ChartWizard to plot the frequency distribution
(University of Brescia) 23 / 42
Statistics
Wheelie Company: Excel FREQUENCY function and ChartWizard
The FREQUENCY function needs two input ranges: the range of
data (RD) and the range of classes upper bounds (RCUB)
Given the minimum, m, and the maximum, M, of data, the class
width, cw, is
cw =
M m
N
,
where N is the desired number of classes. Each upper bound ub
i
,
i = 1, ..., N, is calculated as
ub
i
= m +i cw
Select N vertically adjacent cells, write
"=FREQUENCY(RD;RCUB)", then press "CTRL+ALT+ENTER"
Use ChartWizard to plot the frequency distribution
(University of Brescia) 23 / 42
Statistics
Wheelie Company: Excel FREQUENCY function and ChartWizard
The FREQUENCY function needs two input ranges: the range of
data (RD) and the range of classes upper bounds (RCUB)
Given the minimum, m, and the maximum, M, of data, the class
width, cw, is
cw =
M m
N
,
where N is the desired number of classes. Each upper bound ub
i
,
i = 1, ..., N, is calculated as
ub
i
= m +i cw
Select N vertically adjacent cells, write
"=FREQUENCY(RD;RCUB)", then press "CTRL+ALT+ENTER"
Use ChartWizard to plot the frequency distribution
(University of Brescia) 23 / 42
Statistics
Wheelie Company: Excel FREQUENCY function and ChartWizard
The FREQUENCY function needs two input ranges: the range of
data (RD) and the range of classes upper bounds (RCUB)
Given the minimum, m, and the maximum, M, of data, the class
width, cw, is
cw =
M m
N
,
where N is the desired number of classes. Each upper bound ub
i
,
i = 1, ..., N, is calculated as
ub
i
= m +i cw
Select N vertically adjacent cells, write
"=FREQUENCY(RD;RCUB)", then press "CTRL+ALT+ENTER"
Use ChartWizard to plot the frequency distribution
(University of Brescia) 23 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
Among the models used to represent phenomena, the regression
models play a major role
Regression models allow the specication of a causal relationship
between a dependent variable and one or more independent variables.
The former variable is to be explained in terms of the latter
A general regression (linear or non-linear) model is
Y = f (X
1
, ..., X
p
) + ,
where Y is the dependent variable, X
1
, ..., X
p
are the independent
variables, and is the error random variable
the error random variable is included to take into account
independent variables not included in the model on purpose, or simply
inadvertently
a non deterministic relationship, f , between X
1
, ..., X
p
and Y
errors in the measurement of the variables
errors in the specication of f
(University of Brescia) 24 / 42
Linear regression
Introduction
f typically depends on parameters to be estimated based on a sample
of observations of Y and X
1
, ..., X
p
Y X
1
... X
p
y
1
x
1,1
... x
p,1
.
.
.
.
.
.
.
.
.
.
.
.
y
N
x
1,N
... x
p,N
Estimating the parameters estimates in f yields the empirical model

Y =

f (X
1
, ..., X
p
),
i.e. the formula for obtaining y
1
from x
1,1
, ..., x
p,1
, ..., y
N
from
x
1,N
, ..., x
p,N
Typically the parameters are estimated to make the dierences
y
1
y
1
, ..., y
N
y
N
as small as possible
(University of Brescia) 25 / 42
Linear regression
Introduction
f typically depends on parameters to be estimated based on a sample
of observations of Y and X
1
, ..., X
p
Y X
1
... X
p
y
1
x
1,1
... x
p,1
.
.
.
.
.
.
.
.
.
.
.
.
y
N
x
1,N
... x
p,N
Estimating the parameters estimates in f yields the empirical model

Y =

f (X
1
, ..., X
p
),
i.e. the formula for obtaining y
1
from x
1,1
, ..., x
p,1
, ..., y
N
from
x
1,N
, ..., x
p,N
Typically the parameters are estimated to make the dierences
y
1
y
1
, ..., y
N
y
N
as small as possible
(University of Brescia) 25 / 42
Linear regression
Introduction
f typically depends on parameters to be estimated based on a sample
of observations of Y and X
1
, ..., X
p
Y X
1
... X
p
y
1
x
1,1
... x
p,1
.
.
.
.
.
.
.
.
.
.
.
.
y
N
x
1,N
... x
p,N
Estimating the parameters estimates in f yields the empirical model

Y =

f (X
1
, ..., X
p
),
i.e. the formula for obtaining y
1
from x
1,1
, ..., x
p,1
, ..., y
N
from
x
1,N
, ..., x
p,N
Typically the parameters are estimated to make the dierences
y
1
y
1
, ..., y
N
y
N
as small as possible
(University of Brescia) 25 / 42
Linear regression
The linear regression model
The linear regression model is specied by the formula
Y =
0
+
p

k=1

k
X
k
+
Each parameter
k
tells how the dependent variable Y modies as X
k
modies by 1 unit, letting all other independent variables xed
Parameters
0
, ...,
p
are typically estimated with the least squares
method to yield the empirical model

Y =

0
+
p

k=1

k
X
k
(University of Brescia) 26 / 42
Linear regression
The linear regression model
The linear regression model is specied by the formula
Y =
0
+
p

k=1

k
X
k
+
Each parameter
k
tells how the dependent variable Y modies as X
k
modies by 1 unit, letting all other independent variables xed
Parameters
0
, ...,
p
are typically estimated with the least squares
method to yield the empirical model

Y =

0
+
p

k=1

k
X
k
(University of Brescia) 26 / 42
Linear regression
The linear regression model
The linear regression model is specied by the formula
Y =
0
+
p

k=1

k
X
k
+
Each parameter
k
tells how the dependent variable Y modies as X
k
modies by 1 unit, letting all other independent variables xed
Parameters
0
, ...,
p
are typically estimated with the least squares
method to yield the empirical model

Y =

0
+
p

k=1

k
X
k
(University of Brescia) 26 / 42
Linear regression
The linear regression model
Consider now the i th linear regression model
Y
i
=
0
+
p

k=1

k
X
k,i
+
i
, i = 1, ..., N,
i.e. the model referred to the i th observation of the variables,
independently of the values y
i
, x
1,i
, ..., x
p,i
, e
i
that will be observed.
Classical assumptions about the linear regression model are
E(
i
) = 0
Var (
i
) =
2
Cov(
i
,
j
), j = 1, ..., N, i = j
X
1,i
, ..., X
p,i
are not random, i.e. they are xed at the observed values
x
1,i
, ..., x
p,i
(University of Brescia) 27 / 42
Linear regression
The linear regression model
Consider now the i th linear regression model
Y
i
=
0
+
p

k=1

k
X
k,i
+
i
, i = 1, ..., N,
i.e. the model referred to the i th observation of the variables,
independently of the values y
i
, x
1,i
, ..., x
p,i
, e
i
that will be observed.
Classical assumptions about the linear regression model are
E(
i
) = 0
Var (
i
) =
2
Cov(
i
,
j
), j = 1, ..., N, i = j
X
1,i
, ..., X
p,i
are not random, i.e. they are xed at the observed values
x
1,i
, ..., x
p,i
(University of Brescia) 27 / 42
Linear regression
The linear regression model
Consider now the i th linear regression model
Y
i
=
0
+
p

k=1

k
X
k,i
+
i
, i = 1, ..., N,
i.e. the model referred to the i th observation of the variables,
independently of the values y
i
, x
1,i
, ..., x
p,i
, e
i
that will be observed.
Classical assumptions about the linear regression model are
E(
i
) = 0
Var (
i
) =
2
Cov(
i
,
j
), j = 1, ..., N, i = j
X
1,i
, ..., X
p,i
are not random, i.e. they are xed at the observed values
x
1,i
, ..., x
p,i
(University of Brescia) 27 / 42
Linear regression
The linear regression model
Consider now the i th linear regression model
Y
i
=
0
+
p

k=1

k
X
k,i
+
i
, i = 1, ..., N,
i.e. the model referred to the i th observation of the variables,
independently of the values y
i
, x
1,i
, ..., x
p,i
, e
i
that will be observed.
Classical assumptions about the linear regression model are
E(
i
) = 0
Var (
i
) =
2
Cov(
i
,
j
), j = 1, ..., N, i = j
X
1,i
, ..., X
p,i
are not random, i.e. they are xed at the observed values
x
1,i
, ..., x
p,i
(University of Brescia) 27 / 42
Linear regression
The linear regression model
Consider now the i th linear regression model
Y
i
=
0
+
p

k=1

k
X
k,i
+
i
, i = 1, ..., N,
i.e. the model referred to the i th observation of the variables,
independently of the values y
i
, x
1,i
, ..., x
p,i
, e
i
that will be observed.
Classical assumptions about the linear regression model are
E(
i
) = 0
Var (
i
) =
2
Cov(
i
,
j
), j = 1, ..., N, i = j
X
1,i
, ..., X
p,i
are not random, i.e. they are xed at the observed values
x
1,i
, ..., x
p,i
(University of Brescia) 27 / 42
Linear regression
The linear regression model
To assess the linear regression model t, many indicators have been
developed. We see the R square indicator, R
2
The more the model will adapt to data the lower the error variability
will be w.r.t. the total variability
The formula is
R
2
= 1
RSS
TSS
,
where RSS is the Residual Sum of Squares and TSS is the Total Sum
of Squares
(University of Brescia) 28 / 42
Linear regression
The linear regression model
To assess the linear regression model t, many indicators have been
developed. We see the R square indicator, R
2
The more the model will adapt to data the lower the error variability
will be w.r.t. the total variability
The formula is
R
2
= 1
RSS
TSS
,
where RSS is the Residual Sum of Squares and TSS is the Total Sum
of Squares
(University of Brescia) 28 / 42
Linear regression
The linear regression model
To assess the linear regression model t, many indicators have been
developed. We see the R square indicator, R
2
The more the model will adapt to data the lower the error variability
will be w.r.t. the total variability
The formula is
R
2
= 1
RSS
TSS
,
where RSS is the Residual Sum of Squares and TSS is the Total Sum
of Squares
(University of Brescia) 28 / 42
Linear regression
The linear regression model
Notice that R
2
[0, 1] and the better the t is the closer to 1 R
2
is
Notice also that R
2
increases as p, the number of independent
variables, increases. Thus, an adjusted R square indicator has been
advanced
R
2
adj
= 1
RSS
Np1
TSS
N1
.
The numbers N p 1 and N 1 are also called Residual Degrees
of Freedom and Total Degrees of Freedom, respectively
(University of Brescia) 29 / 42
Linear regression
The linear regression model
Notice that R
2
[0, 1] and the better the t is the closer to 1 R
2
is
Notice also that R
2
increases as p, the number of independent
variables, increases. Thus, an adjusted R square indicator has been
advanced
R
2
adj
= 1
RSS
Np1
TSS
N1
.
The numbers N p 1 and N 1 are also called Residual Degrees
of Freedom and Total Degrees of Freedom, respectively
(University of Brescia) 29 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Linear regression
The linear regression model at work: Excel Analysis ToolPak regression routine
Consider the data of the "Regression" sheet
In Excel, choose Tools -> Data Analysis -> Regression:
input the ranges of the Y and Xs variables observations. In our case,
the Y variable is the return of stock A and the X variable is the return
of Index SPP
specify the top-left cell where you would like the output to appear. In
our case, it is cell F7
check the Residuals option
Notice the values of cells R Square, Adjusted R Square, the column
SS including RSS and TSS, and the column Coecients including the
estimates of parameters
0
, intercept, and
1
, X Variable 1
The cell Standard Error is the estimate of the standard deviation of
the model residuals; its formula is

2
=
r
RSS
N 2
=
s
var (Residuals) N 1
N 2
(University of Brescia) 30 / 42
Probability
Introduction
Decision-making means choosing between two or more alternatives.
Good decision-making is based on evaluating which alternative has
the best chance of succeeding. When managers refer to the chance of
something occurring, they are using probability in the decision-making
process
Probability is the chance (expressed with a real number p [0, 1])
that something (an event) will happen
The ve Platonic solids and two
trapezohedrons.
(University of Brescia) 31 / 42
Probability
Introduction
Decision-making means choosing between two or more alternatives.
Good decision-making is based on evaluating which alternative has
the best chance of succeeding. When managers refer to the chance of
something occurring, they are using probability in the decision-making
process
Probability is the chance (expressed with a real number p [0, 1])
that something (an event) will happen
The ve Platonic solids and two
trapezohedrons.
(University of Brescia) 31 / 42
Probability
Introduction
Old, unsatisfactory classical probability dened the probability of an
event, given that each of the outcomes of an experiment are equally
likely, as
P(event) =
number of outcomes realizing the event
total number of outcomes
Frequentist denition improves on classical weakness. It proposes to
dene probability of an event as a limit, in particular as the limit of
the ratio between the number of time when the event happens over
the total number of observations:
lim
n
n
A
n
= P (A)
(University of Brescia) 32 / 42
Probability
Introduction
Old, unsatisfactory classical probability dened the probability of an
event, given that each of the outcomes of an experiment are equally
likely, as
P(event) =
number of outcomes realizing the event
total number of outcomes
Frequentist denition improves on classical weakness. It proposes to
dene probability of an event as a limit, in particular as the limit of
the ratio between the number of time when the event happens over
the total number of observations:
lim
n
n
A
n
= P (A)
(University of Brescia) 32 / 42
Probability
Probability distributions
A probability distribution is a way of recording the way probability
distributes over each event linked to an experiment. We will briey
discuss of four probability distributions. They are real probability
distributions because they are linked to events represented by sets of
real numbers
the Binomial distribution, which is a discrete distribution
the Poisson distribution, which is a discrete distribution often used to
count the number of occurrences of some event in a given period of
time
the exponential distribution, which is a continuous distribution used to
measure the length of time needed to perform some activity
the important continuous distribution known as the normal distribution
The cumulative probability distribution of real -dened events is the
probability of events dened by interval (, x], with x R. As
x + we see that P((, x]) 1
(University of Brescia) 33 / 42
Probability
Probability distributions
A probability distribution is a way of recording the way probability
distributes over each event linked to an experiment. We will briey
discuss of four probability distributions. They are real probability
distributions because they are linked to events represented by sets of
real numbers
the Binomial distribution, which is a discrete distribution
the Poisson distribution, which is a discrete distribution often used to
count the number of occurrences of some event in a given period of
time
the exponential distribution, which is a continuous distribution used to
measure the length of time needed to perform some activity
the important continuous distribution known as the normal distribution
The cumulative probability distribution of real -dened events is the
probability of events dened by interval (, x], with x R. As
x + we see that P((, x]) 1
(University of Brescia) 33 / 42
Probability
Probability distributions
A probability distribution is a way of recording the way probability
distributes over each event linked to an experiment. We will briey
discuss of four probability distributions. They are real probability
distributions because they are linked to events represented by sets of
real numbers
the Binomial distribution, which is a discrete distribution
the Poisson distribution, which is a discrete distribution often used to
count the number of occurrences of some event in a given period of
time
the exponential distribution, which is a continuous distribution used to
measure the length of time needed to perform some activity
the important continuous distribution known as the normal distribution
The cumulative probability distribution of real -dened events is the
probability of events dened by interval (, x], with x R. As
x + we see that P((, x]) 1
(University of Brescia) 33 / 42
Probability
Probability distributions
A probability distribution is a way of recording the way probability
distributes over each event linked to an experiment. We will briey
discuss of four probability distributions. They are real probability
distributions because they are linked to events represented by sets of
real numbers
the Binomial distribution, which is a discrete distribution
the Poisson distribution, which is a discrete distribution often used to
count the number of occurrences of some event in a given period of
time
the exponential distribution, which is a continuous distribution used to
measure the length of time needed to perform some activity
the important continuous distribution known as the normal distribution
The cumulative probability distribution of real -dened events is the
probability of events dened by interval (, x], with x R. As
x + we see that P((, x]) 1
(University of Brescia) 33 / 42
Probability
Probability distributions
A probability distribution is a way of recording the way probability
distributes over each event linked to an experiment. We will briey
discuss of four probability distributions. They are real probability
distributions because they are linked to events represented by sets of
real numbers
the Binomial distribution, which is a discrete distribution
the Poisson distribution, which is a discrete distribution often used to
count the number of occurrences of some event in a given period of
time
the exponential distribution, which is a continuous distribution used to
measure the length of time needed to perform some activity
the important continuous distribution known as the normal distribution
The cumulative probability distribution of real -dened events is the
probability of events dened by interval (, x], with x R. As
x + we see that P((, x]) 1
(University of Brescia) 33 / 42
Probability
Probability distributions
A probability distribution is a way of recording the way probability
distributes over each event linked to an experiment. We will briey
discuss of four probability distributions. They are real probability
distributions because they are linked to events represented by sets of
real numbers
the Binomial distribution, which is a discrete distribution
the Poisson distribution, which is a discrete distribution often used to
count the number of occurrences of some event in a given period of
time
the exponential distribution, which is a continuous distribution used to
measure the length of time needed to perform some activity
the important continuous distribution known as the normal distribution
The cumulative probability distribution of real -dened events is the
probability of events dened by interval (, x], with x R. As
x + we see that P((, x]) 1
(University of Brescia) 33 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
A salesman at SellEvryThing Company makes twenty calls per day to
randomly selected homes. The probability of the salesman making a
sale is 0.1, i.e.
P(1) = 0.1,
where 1 indicates the event "a phone call ends with a sale"
The client answering the call of SellEvryThing
Company.
(University of Brescia) 34 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Given that the probability of a successful outcome is p, the binomial
distribution indicates the probability of succeeding q times over n
trials (n _ q):
P(q) =

n
q

p
q
(1 p)
nq
=
n!
q!(n q)!
p
q
(1 p)
nq
Each trial is independent of the others
Each trial is also called Bernoulli trial
Each Bernoulli trial has two outcames: success, or fail
(University of Brescia) 35 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Given that the probability of a successful outcome is p, the binomial
distribution indicates the probability of succeeding q times over n
trials (n _ q):
P(q) =

n
q

p
q
(1 p)
nq
=
n!
q!(n q)!
p
q
(1 p)
nq
Each trial is independent of the others
Each trial is also called Bernoulli trial
Each Bernoulli trial has two outcames: success, or fail
(University of Brescia) 35 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Given that the probability of a successful outcome is p, the binomial
distribution indicates the probability of succeeding q times over n
trials (n _ q):
P(q) =

n
q

p
q
(1 p)
nq
=
n!
q!(n q)!
p
q
(1 p)
nq
Each trial is independent of the others
Each trial is also called Bernoulli trial
Each Bernoulli trial has two outcames: success, or fail
(University of Brescia) 35 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Given that the probability of a successful outcome is p, the binomial
distribution indicates the probability of succeeding q times over n
trials (n _ q):
P(q) =

n
q

p
q
(1 p)
nq
=
n!
q!(n q)!
p
q
(1 p)
nq
Each trial is independent of the others
Each trial is also called Bernoulli trial
Each Bernoulli trial has two outcames: success, or fail
(University of Brescia) 35 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Use Excel binomial distribution function BINOMDIST to nd the
probability of
no sales, i.e. P(0)
four sales, i.e. P(4)
more than four sales, i.e.
20

i =5
P(i ) = P(5) +P(6) + ... +P(20)
= 1 P(0) P(1)
P(2) P(3) P(4) = 1
4

i =0
P(i ) = 1 P((, 4])
four or more sales, i.e.
20

i =4
P(i ) = 1
3

i =0
P(i ) = 1 P((, 3])
(University of Brescia) 36 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Use Excel binomial distribution function BINOMDIST to nd the
probability of
no sales, i.e. P(0)
four sales, i.e. P(4)
more than four sales, i.e.
20

i =5
P(i ) = P(5) +P(6) + ... +P(20)
= 1 P(0) P(1)
P(2) P(3) P(4) = 1
4

i =0
P(i ) = 1 P((, 4])
four or more sales, i.e.
20

i =4
P(i ) = 1
3

i =0
P(i ) = 1 P((, 3])
(University of Brescia) 36 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Use Excel binomial distribution function BINOMDIST to nd the
probability of
no sales, i.e. P(0)
four sales, i.e. P(4)
more than four sales, i.e.
20

i =5
P(i ) = P(5) +P(6) + ... +P(20)
= 1 P(0) P(1)
P(2) P(3) P(4) = 1
4

i =0
P(i ) = 1 P((, 4])
four or more sales, i.e.
20

i =4
P(i ) = 1
3

i =0
P(i ) = 1 P((, 3])
(University of Brescia) 36 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Use Excel binomial distribution function BINOMDIST to nd the
probability of
no sales, i.e. P(0)
four sales, i.e. P(4)
more than four sales, i.e.
20

i =5
P(i ) = P(5) +P(6) + ... +P(20)
= 1 P(0) P(1)
P(2) P(3) P(4) = 1
4

i =0
P(i ) = 1 P((, 4])
four or more sales, i.e.
20

i =4
P(i ) = 1
3

i =0
P(i ) = 1 P((, 3])
(University of Brescia) 36 / 42
Probability
SellEvryThing Company: BINOMDIST, Excel binomial distribution function
Use Excel binomial distribution function BINOMDIST to nd the
probability of
no sales, i.e. P(0)
four sales, i.e. P(4)
more than four sales, i.e.
20

i =5
P(i ) = P(5) +P(6) + ... +P(20)
= 1 P(0) P(1)
P(2) P(3) P(4) = 1
4

i =0
P(i ) = 1 P((, 4])
four or more sales, i.e.
20

i =4
P(i ) = 1
3

i =0
P(i ) = 1 P((, 3])
(University of Brescia) 36 / 42
Inference
Introduction and sampling distribution
Inferential statistics, usually abbreviated to inference, is a process by
which conclusions about the features of a population are
reached on the basis of examining only a part of it. Think to an
opinion poll that is used to predict the voting pattern of a country's
population during an election
A quality-control manager will take a random sample of products and
if it is found that the number of defective items is too high the entire
batch will be rejected. Label a defective item of the sample with 1,
while put a 0 to each complying item. The sample mean of 1s and 0s
is the proportion of defective items
(University of Brescia) 37 / 42
Inference
Introduction and sampling distribution
Inferential statistics, usually abbreviated to inference, is a process by
which conclusions about the features of a population are
reached on the basis of examining only a part of it. Think to an
opinion poll that is used to predict the voting pattern of a country's
population during an election
A quality-control manager will take a random sample of products and
if it is found that the number of defective items is too high the entire
batch will be rejected. Label a defective item of the sample with 1,
while put a 0 to each complying item. The sample mean of 1s and 0s
is the proportion of defective items
(University of Brescia) 37 / 42
Inference
Introduction and sampling distribution
When the mean is calculated from a sample, the observed value,

X,
depends on which sample was extracted (of the many possible
samples that could be chosen).
Two samples from the same population are likely to have dierent
sample means, therefore possibly leading to dierent conclusions
Managers need to understand how sample means are distributed
throughout the population, i.e. the sampling mean distribution.
(University of Brescia) 38 / 42
Inference
Introduction and sampling distribution
When the mean is calculated from a sample, the observed value,

X,
depends on which sample was extracted (of the many possible
samples that could be chosen).
Two samples from the same population are likely to have dierent
sample means, therefore possibly leading to dierent conclusions
Managers need to understand how sample means are distributed
throughout the population, i.e. the sampling mean distribution.
(University of Brescia) 38 / 42
Inference
Introduction and sampling distribution
When the mean is calculated from a sample, the observed value,

X,
depends on which sample was extracted (of the many possible
samples that could be chosen).
Two samples from the same population are likely to have dierent
sample means, therefore possibly leading to dierent conclusions
Managers need to understand how sample means are distributed
throughout the population, i.e. the sampling mean distribution.
(University of Brescia) 38 / 42
Inference
AstroReturns Company: sampling mean distribution
The investment manager of AstroReturns Company has been asked
by a client to formulate a hypothesis about the average return on his
portfolio investment of six stocks at the end of the next year
How stock markets are perceived nowadays more than ever.
(University of Brescia) 39 / 42
Inference
AstroReturns Company: sampling mean distribution
The manager has the following data about the six stocks returns (in
%) realized in the last year
Stock A B C D E F
Return (%) 8 11 3 18 3 5
Let's illustrate the concept of sampling error. The investment
manager is shrewd and he will base his report on the best mean
return of a sample of three stocks from the six available, i.e. stocks
D, B, and A. The hypothesis he formulates to the client is:
next year's return on your portfolio investment of stocks A, B, C, D, E,
and F will be
18 + 11 + 8
3
= 12, 33%
(University of Brescia) 40 / 42
Inference
AstroReturns Company: sampling mean distribution
The manager has the following data about the six stocks returns (in
%) realized in the last year
Stock A B C D E F
Return (%) 8 11 3 18 3 5
Let's illustrate the concept of sampling error. The investment
manager is shrewd and he will base his report on the best mean
return of a sample of three stocks from the six available, i.e. stocks
D, B, and A. The hypothesis he formulates to the client is:
next year's return on your portfolio investment of stocks A, B, C, D, E,
and F will be
18 + 11 + 8
3
= 12, 33%
(University of Brescia) 40 / 42
Inference
AstroReturns Company: sampling mean distribution
However the client is not dumb, because he knows that this is only
one of the possible 20 outcomes. See the following table
Stock sample Mean return (%) Stock sample Mean return (%)
CEF 1.67 ABE 7.33
ACE 2.67 ACD 7.67
ACF 3.33 ABF 8.00
BCE 3.67 BCD 8.67
BCF 4.33 DEF 8.67
ABC 5.33 ADE 9.67
AEF 5.33 ADF 10.33
CDE 6.00 BDE 10.67
BEF 6.33 BDF 11.33
CDF 6.67 ABD 12.33
where the 20 outcomes are calculated from the combinations (without
repetition) of 6 objects of class 3
(University of Brescia) 41 / 42
Inference
AstroReturns Company: sampling mean distribution
To avoid "loosing his fees" for having been too optimistic, the
investment manager should organize the sample means to have a
clearer picture, i.e. he needs to draw the sampling mean distribution
Exercise: use Excel FRQUENCY function and ChartWizard to
represent the frequency distribution of the sample mean by grouping
the data into 5 intervals. Notice that the mean of the sample
mean distribution is equal to the mean of the population
Exercise: repeat the previous exercise on a table of means of samples
of four stocks
Exercise: repeat the previous exercise on a table of means of samples
of ve stocks
Notice that the chart of the sampling mean distribution tends
to become more bell-shaped
(University of Brescia) 42 / 42
Inference
AstroReturns Company: sampling mean distribution
To avoid "loosing his fees" for having been too optimistic, the
investment manager should organize the sample means to have a
clearer picture, i.e. he needs to draw the sampling mean distribution
Exercise: use Excel FRQUENCY function and ChartWizard to
represent the frequency distribution of the sample mean by grouping
the data into 5 intervals. Notice that the mean of the sample
mean distribution is equal to the mean of the population
Exercise: repeat the previous exercise on a table of means of samples
of four stocks
Exercise: repeat the previous exercise on a table of means of samples
of ve stocks
Notice that the chart of the sampling mean distribution tends
to become more bell-shaped
(University of Brescia) 42 / 42
Inference
AstroReturns Company: sampling mean distribution
To avoid "loosing his fees" for having been too optimistic, the
investment manager should organize the sample means to have a
clearer picture, i.e. he needs to draw the sampling mean distribution
Exercise: use Excel FRQUENCY function and ChartWizard to
represent the frequency distribution of the sample mean by grouping
the data into 5 intervals. Notice that the mean of the sample
mean distribution is equal to the mean of the population
Exercise: repeat the previous exercise on a table of means of samples
of four stocks
Exercise: repeat the previous exercise on a table of means of samples
of ve stocks
Notice that the chart of the sampling mean distribution tends
to become more bell-shaped
(University of Brescia) 42 / 42
Inference
AstroReturns Company: sampling mean distribution
To avoid "loosing his fees" for having been too optimistic, the
investment manager should organize the sample means to have a
clearer picture, i.e. he needs to draw the sampling mean distribution
Exercise: use Excel FRQUENCY function and ChartWizard to
represent the frequency distribution of the sample mean by grouping
the data into 5 intervals. Notice that the mean of the sample
mean distribution is equal to the mean of the population
Exercise: repeat the previous exercise on a table of means of samples
of four stocks
Exercise: repeat the previous exercise on a table of means of samples
of ve stocks
Notice that the chart of the sampling mean distribution tends
to become more bell-shaped
(University of Brescia) 42 / 42
Inference
AstroReturns Company: sampling mean distribution
To avoid "loosing his fees" for having been too optimistic, the
investment manager should organize the sample means to have a
clearer picture, i.e. he needs to draw the sampling mean distribution
Exercise: use Excel FRQUENCY function and ChartWizard to
represent the frequency distribution of the sample mean by grouping
the data into 5 intervals. Notice that the mean of the sample
mean distribution is equal to the mean of the population
Exercise: repeat the previous exercise on a table of means of samples
of four stocks
Exercise: repeat the previous exercise on a table of means of samples
of ve stocks
Notice that the chart of the sampling mean distribution tends
to become more bell-shaped
(University of Brescia) 42 / 42