A Core Course on Modeling - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

A Core Course on Modeling

Description:

A Core Course on Modeling Week 4-The Function of Functions Contents * What is a Formal Model? A Practical Route to Formal Models – PowerPoint PPT presentation

Number of Views:124
Avg rating:3.0/5.0
Slides: 33
Provided by: Systeem
Category:

less

Transcript and Presenter's Notes

Title: A Core Course on Modeling


1
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? Contents ? ? ? ? ?
  • What is a Formal Model?
  • A Practical Route to Formal Models
  • Example 1 The Detergent Problem
  • Example 2 The Chimney Sweepers Problem
  • Example 3 The Peanut Butter Problem
  • The relation wizard
  • The function selector
  • Summary
  • References to lecture notes book
  • References to quiz-questions and homework
    assignments (lecture notes)

2
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? What is a Formal Model? ? ? ? ? ?
2
  • What is the meaning of ?

the intuition of addition, accumulation
resistors Rtot 1/(1/R1 1/R2) springs Ctot
C1 C2
resistors Rtot R1 R2 springs Ctot
1/(1/C11/C2)
3
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? What is a Formal Model? ? ? ? ? ?
3
  • What is the meaning of ?

the intuition of addition, accumulation
Conclusion there is always a need for
interpretation going from relations in real
world to mathematical relations There is no
simple, generic way to infer mathematical
relations from relations in real world We need a
(heuristic) process to do so.
4
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? A Practical Route to Formal Models ? ?
? ? ?
4
  • Heuristics to arrive at formal expressions
  • meaningful names
  • chain of dependencies
  • todo-list
  • dimensional analysis
  • wisdom of the crowds
  • two models is better than one model
  • when is a model good enough?
  • Baron von Münchhausen

In a conceptual model, properties are always part
of a concept (myCar.wheel.diameter). In a
formal model, properties may be just quantities
(myCarWheelDiameter) with names that may be
meaningfully abbreviated (mCWhD).
  • General scheme start with the quantitiy needed
    for your purpose, and try to express this in
    other quantities
  • in the simplest possible form
  • with as few as possible assumptions
  • such that the quantity is written as function of
    the other quantities
  • continue with the arguments of the function

Everytime when introducing a new quantity, add it
to the todo list. When a quantity is expressed
into in something known ( a value or another
expression), take it off the todo list. When the
todo list is empty, models first version is
ready.
  • When seeking a mathematical expression,
  • if possible, use dimensional considerations to
    find needed expression
  • but at least verify expression with dimensional
    analysis
  • even if this may require inventing units and
    dimensions.

Often values need guessing. If you can involve a
number of people, let them guess independently.
This gives (a) a more accurate estimate if there
are no systematic errors and (b) an idea of the
variation. Otherwise try to relate the unknown
values to values you (and your friends) may know.
Sometimes, there are two or more routes to (part)
of your model. Implement them all, and compare
the results. The spread in results is a clue to
the reliability of the achievable outcome.
A model is never complete and fully accurate.
But, given its purpose, it can be complete and
accurate enough. (See chapter 6.) Regularly check
if your purpose is met.
  • Once you have your first version running, you
    can
  • use it to find out which of the uncertainties of
    your inputs are the most dominant ? try to get
    these more accurate if necessary
  • find out which modifications could be worthwhile

5
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
5
  • What is the total amount of detergent
  • annually dumped in the
  • Environment in the Netherlnds?

6
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
6
relations
dimensions
assumptions
todo
amAnDetDmp f(nrAnWshs , detPWsh)
kg / year F(wash / year , kg / wash)
amAnDetDmp nrAnWshs detPWsh
Detdetergent An annual Wsh wash Fam
family P people am amount Dmp dump
7
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
7
relations
dimensions
assumptions
todo
amAnDetDmp nrAnWshs detPWsh
kg / year wash / year kg / wash
amAnDetDmp nrAnWshs detPWsh
Detdetergent An annual Wsh wash Fam
family P people am amount Dmp dump
8
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
8
relations
dimensions
assumptions
todo
amAnDetDmp nrAnWshs detPWsh
kg / year wash / year kg / wash
Washing laundry is the only way detergent gets
into the environment
amAnDetDmp nrAnWshs detPWsh nrAnWshsPFam nrFamIH n
rPIH nrPPFam
No institutional laundry washing, only families
nrAnWshs nrAnWshsPFam nrFamIH
wash / year wash / (fam year) fam
nrFamIH nrPIH / nrPPFam
fam people / people / fam
Everybody belongs to exactly one family families
are disjoint
todo list is empty ? model is ready
common knowledge
nrPIH 17 ? 0.5 million people
public domain
nrPPFam 2.2 ? 0.2 people/fam
nrAnWshsPFam 100 ? 20 wash / year
wisdom of the crowds
detPWsh 0.17 ? 0.03 kg / wash
wisdom of the crowds
Detdetergent An annual Wsh wash Fam
family P people am amount Dmp dump
9
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
9
todo
amAnDetDmp

amAnDetDmp nrAnWshs detPWsh nrAnWshsPFam nrFamIH n
rPIH nrPPFam
detPWsh
nrAnWshs

/
nrFamIH
nrAnWshsPFam
nrPPFam
nrPIH
10
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
10
todo
amAnDetDmp

1.31? million
amAnDetDmp nrAnWshs detPWsh nrAnWshsPFam nrFamIH n
rPIH nrPPFam
detPWsh
nrAnWshs

0.17?0.03
772?million
/
7.72? million
nrFamIH
nrAnWshsPFam
100?20
nrPPFam
nrPIH
2.2?0.2
17?0.5 million
11
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
11
  • This type of model is a thumbnail calculation
  • OK for quick order of magnitude estimations
  • Uses straightforward substitutions, only based on
    dimension analysis
  • Work with intervals to get an impression of the
    variation of the answers (143 ? 67 M correct
    value according to various sites such as
    http//wiki.watmooi.nl/pages/Wassen_en_onderhoud
    is 150 M kg)
  • Purpose pub quizzes, trivial pursuit,

a.k.a. sledgehammer estimation
12
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Detergent Problem ? ? ? ? ?
12
About accuracy model outcome function of
inputs yf(x1,x2,) ?y?f/?x1 ?x1 ?f/?x2 ?x2
So ?y?f/?x1 ?x1 ?f/?x2 ?x2
This is a very pessimistic upperbound all
quantities need to conspire to give worst case
deviation. In chapter 6, we will get a more
realistic estimate.
13
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Chimney Sweepers Problem ? ? ? ? ?
13
  • How many chimney sweepers
  • work in Amsterdam?

14
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Chimney Sweepers Problem ? ? ? ? ?
14
relations
dimensions
assumptions
todo
nrChSwIA nrChIA nrSwPCh
Sw / A Ch / A SW / Ch
Amsterdam ch.-sweepers sweep Amsterdam chimneys
only
nrChSwIA nrChIA nrSwPCh nrChPFam nrFamIA nrPIA nrP
PFam
ch.-sweepers sweep only chimneys on family houses
nrChIA nrChPFam nrFamIA
Ch / A Ch / Fam Fam / A
nrPPFam is the same everywhere (does not depend
on Amsterdam)
nrFamIA nrPIA / nrPPFam
Fam / A P / A / P / Fam
common knowledge
nrPIA 790000 P
nrPPFam 2.2 ? 0.2 P/Fam
public domain
nrChPFam ( 1/nrFamPCh) 0.1?0.02 Ch/Fam
wisdom of the crowds
Swsweeper ChchimneyAAmsterdamFamFamilyPpe
opleSeService
15
To find an expression for nrSwPCh, ask what
links the nr of sweepers to the nr chimneys?.
Answer sweepers service chimneys. How many
services (1) relates to the capacity (available
resource) of a sweeper, and (2) to the need of a
chimney (needed resource). Here,
resourcetime. The capacity of a sweeper is
expressed in the time he works (Swyear) The
need of a chimney is therefore expressed
(Chyear).
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Chimney Sweepers Problem ? ? ? ? ?
15
Notice two different units, both with dimension
time. To verify that units are consistent,
substitute back into expressions for nrSwPSe and
nrSwPCh check that all units multiply and divide
to produce the correct final result. In this
case nrSwPChtimeP1Se nrSePCh / timeP1Sw has
unit sweeper / chimney which is correct.
relations
dimensions
assumptions
todo
nrSwPCh nrSwPSe nrSePCh
Sw / Ch Swyear/Se Se/(Chyear)
Introduce time to associate sweepers ca-pacity
to chimneys need
nrChSwIA nrChIA nrSwPCh nrChPFam nrFamIA nrPIA nrP
PFam nrSwPSe nrSePCh timeP1Se timeP1Sw
assume average times (i.e., no season influences
etc.)
nrSwPSe timeP1Se / timeP1Sw
Sw year / Se hour / Se / hour /
(Swyear)
timeP1Se 2?0.25 hour / Se
wisdom of the crowds
work year 1600 hours
timeP1Sw 1200?100 hour / Sw year)
nrSePCh 1 Se /( Ch year)
insurance requirement
todo list is empty ? model is ready
but what does it mean ? ? NOTHING, since we
formulated no purpose
Swsweeper ChchimneyAAmsterdamFamFamilyPpe
opleSeService
16
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Chimney Sweepers Problem ? ? ? ? ?
16
What purposes could we think of are there at
least 300 Chimney Sweepers so that we can begin a
professional journal? so we only need to know if
NrChSwIA gt 300 are there less than 50 Chimney
Sweepers so that we can have next years ChSw
convention meeting in the Restaurant the
Swinging Sweeper? so we only need to know if
NrChSwIA lt50 are there about as many Chimney
Sweepers as there are Sewer Cleaners so that we
can form efficient Chimney and Sewage Control
and Service Units? so we only need to know if
NrChSwIA is between 50 and 60 each purpose
poses different challenges / allows different
approximations in our model.
but what does it mean ? ? NOTHING, since we
formulated no purpose
17
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Chimney Sweepers Problem ? ? ? ? ?
17
doing experiments beyond the scope of modeling
  • To assess credibility of a model
  • confront with actual measurements
  • confront with outcome of a second, independent
    model
  • how much soot and ashes are disposed of by the
    municipal Ash Soot Depot?
  • how often do you see a chimney sweeper at work
    (wisdom of the crowds)?
  • how much money do people in A. spend annually in
    cleaning their chimneys?

check out a model for the later case
(notice this model is not completely independent
from the previous it uses some common quantities)
18
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Chimney Sweepers Problem ? ? ? ? ?
18
  • Thusfar, all mathematical relations were obtained
    via dimension analysis.
  • Dimensions are more generic than just SI
    dimensions/units.
  • Dimensional analysis often works for models of a
    particular form
  • y x1n1 x2n2 x3n3 ?i xini,
  • where (integer) ni can be both larger and smaller
    than 0.
  • How to go about when other forms are needed?

19
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
19
  • How to get rich
  • by selling a new brand
  • of
  • peanut butter?

20
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
20
relations
dimensions
assumptions
todo
profit income expenses pricePerItem nrSoldItems nr
SoldTotal marketShare
profit income - expenses
Euro / year Euro/year
no taxes, no inflation
income pricePerItem nrSoldItems
Euro / year Euro/myPB myPB/year
no discount with larger quantities per purchase
nrSoldItems nrSoldTotal marketShare
myPB / year allPB / year myPB/allPB
my PB will not increase the total market
nrSoldTotal allPB/year
from a neutral marketing bureau
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

pricePerItem
marketShare
21
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
21
Approach 1 glass box (glass jar -)
?
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

22
A Core Course on Modeling
If something gets more expensive, the chance
people will buy it decreases
A market share cannot be lt0 it could be gt1 but
only if it creates additional request
Week 4-The Function of Functions
If something gets sufficiently expensive, nobody
will buy it
If something gets sufficiently cheap, every
potentially interested customer will buy (or
get!) it
It would need a glass box model of customers
brains to derive this dependency from first
principles
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
22
Approach 1 glass box (glass jar -)
  • What mechanism determines marketShare(pricePerItem
    )?
  • monotonically decreasing
  • between 0 and 1
  • asymptote marketShare?0 if pricePerItem ??
  • asymptote marketShare?1 if pricePerItem ?- ?
  • what sort of mathematical dependency ???
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

23
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
23
Approach 1 glass box (glass jar -)
  • 1st guess straight lines
  • advantage simple
  • disadvantage not smooth
  • uncertain does this represent the actual
    behavior?
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

24
A Core Course on Modeling
Week 4-The Function of Functions
Depending on what you are going to DO with the
math (e.g., optimisation), smoothness can be
important
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
24
Approach 1 glass box (glass jar -)
  • 2nd, 3rd guess arctan, logistic, ?
  • advantage smooth
  • disadvantage more parameters?
  • what values for the parameters?
  • uncertain if this follows the actual behaviour
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

25
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
25
Approach 1 glass box (glass jar -)
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

26
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
26
Approach 2 black box use panel of test
subjects ask them if they would buy your PB for
price X
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

27
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
27
Approach 2 black box use panel of test
subjects ask them if they would buy your PB for
price X
  • problems
  • I have a choice for pricePerItem
  • marketShare depends on pricePerItem

but, anyway let us assume we have some
function then the model predicts the income as
function of the pricePerItem.
28
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
28
Revisit the peanut butter example incomepricePer
Item nrSoldItems nrSoldItemsnrSoldTotal
marketShare marketSharef(pricePerItem)
for convenience, introduce abbreviations
29
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
29
This is irrelevant if all customers would buy
equal amounts of peanutbutter. But there are
mega-consumers and mini-consumers !
Realize that the decision to choose MY
peanutbutter is taken by a customer. Suppose that
the majority of mega customers would decide
against my peanutbutter then the original model
with mSh(pPI) instead of mSh(pPI,i) would give an
overestimate ? misleading. So think about which
arguments a function should depend on!
Revisit the peanut butter example inc pPI nSI
(incincome pPIpricePerItem
nSInrSoldItems) nSI nST mSh
(nSTnrSoldTotal mShmarketShare) mShf(pPI) So
inc pPI nST mSh(pPI) This is naive
first, realize that nST ?i nSTi, i ranges over
customers. So inc pPI mSh(pPI) ?i
nST(i) Improved model inc pPI ?i nST(i)
mSh(pPI, i)
30
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
30
  • To go from conceptual model to formal model
  • while your purpose is not satisfied
  • start with quantity you need for the purpose
  • put this on the to-do list
  • while the todo list is not empty
  • take a quantity from the todo list
  • think what does it depend on?
  • if depends on nothing ? substitute constant value
    (perhaps with uncertainty bounds)
  • else give an expression for it
  • if possible, use dimensional analysis
  • propose suitable mathematical expression
  • think about assumptions
  • in any case, verify dimensions
  • add newly introduced quantities to the todo list
  • todo list is empty evaluate your model
  • check if purpose is satisfied if not, refine
    your model
  • ready

31
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? The Peanut Butter Problem ? ? ? ? ?
31
  • To go from conceptual model to formal model
  • while your purpose is not satisfied
  • start with quantity you need for the purpose
  • put this on the to-do list
  • while the todo list is not empty
  • take a quantity from the todo list
  • think what does it depend on?
  • if depends on nothing ? substitute constant value
    (perhaps with uncertainty bounds)
  • else give an expression for it
  • if possible, use dimensional analysis
  • propose suitable mathematical expression
  • think about assumptions
  • in any case, verify dimensions
  • add newly introduced quantities to the todo list
  • todo list is empty evaluate your model
  • check if purpose is satisfied if not, refine
    your model
  • ready

logistic function
spline
arctan
asymptote
optimisation
32
A Core Course on Modeling
Week 4-The Function of Functions
? ? ? ? ? Summary ? ? ? ? ?
32
  • Conceptual model ? formal model not in a
    formally provable correct way
  • Appropriate naming
  • Structure
  • Chain of dependencies the formal model as a
    directed acyclic graph
  • What mechanism?
  • What quantities drive this mechanism?
  • What is the qualitative behavior of the
    mechanism?
  • What is the mathematical expression to describe
    this mechanism?
  • To-do-list all intermediate quantities are
    found and elaborated in turn
  • Formation of mathematical expressions
  • dimensional analysis ? mathematical expressions,
    e.g in the case of proportionality
  • the Relation Wizard can help finding appropriate
    fragments of mathematics
  • the Function Selector can help finding an
    appropriate expression for a desired behavior
  • wisdom of the crowds can help improve the
    accuracy of guessed values
Write a Comment
User Comments (0)
About PowerShow.com