Batch 1 - Simulation and Modelling
Batch 1 - Simulation and Modelling
Pre-Requisites: SMA 2101 Calculus I, SMA 2102 Calculus II, SMA 2200 Calculus III, STA 2100
Probability and Statistics I & STA 2200 Probability and Statistics II
Course Description:
Systems modeling: terminology, and types of models. Role of models, model building techniques.
Simulation: discrete and continuous event simulations, design of simulation experiments, and simulation
languages. Essential Mathematics: probability and distribution theory, statistical estimation, and inference.
Random number generators: Pseudo-random number generators, test of randomness, and sequences for
random number generation. Model development (models in calculus, statistics and algebra) and simulation:
use of simulation software such as MATLAB, translation of models into high level language and simulation.
Monte Carlo Simulation: output analysis, sample event, parameter estimation, maximum likelihood, and
least mean square error.
Teaching and Learning Methodology:
Lectures, tutorials, practical sessions, class discussions, individual/group projects.
Instructional Materials/Equipment:
Whiteboards/smart boards, whiteboard markers, duster, flipcharts, computers, projector, other
computer laboratory resources, and hand-outs.
Course Assessment Procedures:
Continuous Assessment Tests (15%); Practicals (10%); Assignments (5%); End-of-Semester Examination
(70%).
Course Textbooks:
1. Banks, J., Carson, J. S., Nelson, B. L. & Nicol, D. M. (2009), Discrete-Event System Simulation, 5th
ed., Prentice Hall, ISBN-13: 978-0136062127.
2. Law, A. M. & Kelton, W. D. (2007). Simulation Modeling & Analysis, 4th ed., McGraw-Hill Inc.,
ASIN: B013HIO2E6.
Reference Textbooks:
1. Chung, C. A. (2003), Simulation Modeling Handbook: A Practical Approach, CRC Press, ISBN-13:
978-0849312410.
2. Bekey, G. A. and Kogan, B. Y. (2003), Modeling and Simulation: Theory and Practice, Academic
Publishers, ASIN: B010BDCLCA.
MODELLING AND SIMULATION CONCEPTS
1.0 Introduction
The ability of man to define what may happen in the future and to choose among
alternatives lie at the heart of contemporary societies. Our knowledge of the way things
work, in society or nature are trailed with clouds of imprecision, and vast harms have
followed a belief in certainty. To reduce the level of disparity between outcome and reality,
we require a decision analysis and support tool to enable us to evaluate, compare and
optimize alternative. Such a tool should be able to provide explanations to various
stakeholders and defend the decisions. One such tool that has been successfully employed
is simulation which we use to vary the parameter of a model and observe the outcome.
Simulation has been particularly valuable:
a. When there is significant uncertainty regarding the outcome or consequences of a
particular alternative under consideration. It allows you to deal with uncertainty and
imprecision in a quantifiable way.
b. When the system under consideration involves complex interactions and requires
input from multiple disciplines. In this case, it is difficult for any one person to easily
understand the system. A simulation of the model can in such situations act as the
framework to integrate the various components in order to better understand their
interactions. As such, it becomes a management tool that keeps you focused on the
"big picture" without getting lost in unimportant details.
c. when the consequences of a proposed action, plan or design cannot be directly and
immediately observed (i.e., the consequences are delayed in time and/or dispersed in
space) and/or it is simply impractical or prohibitively expensive to test the alternatives
directly.
Modern science would be inconceivable without computers to gather data and run model
simulations. Whether it involves bringing back pictures of the surface of the planet Mars or
detailed images to guide brain surgeons, computers have greatly extended our knowledge
of the world around us and our ability to turn ideas into engineering reality. Thus
modelling and computer simulation are important interdisciplinary tools.
2.2 Definitions
2.2.1 Modelling is the process of generating abstract, conceptual,
graphical and/or mathematical models. Science offers a growing
collection of methods, techniquesand theory about all kinds of
specialized scientific modelling.
Modelling also means to find relations between systems and models. Stated
otherwise, models are abstractions of real or imaginary worlds we create to
understand their behaviour, play with them by performing "what if"
experiments,make projections, animate or simply have fun.
2.2.2 A model in general is a pattern, plan, representation (especially in
miniature), or description designed to show the main object or
workings of an object, system, orconcept.
2.2.3 A model (physical or hypothetical) is a representation of real-world
phenomenon or elements (objects, concepts or events). Stated
otherwise a model is an attempt toexpress a possible structure of
physical causality.
Models in science are often theoretical constructs that represent any particular thing
with a set of variables and a set of logical and or quantitative relationships between
them. Models in this sense are constructed to enable reasoning within an idealized
logical framework about these processes and are an important component of
scientific theories.
2.2.4 Simulation -is the manipulation of a model in such a way that it
operates on timeor space to compress it, thus enabling one to
perceive the interactions that would not otherwise be apparent
because of their separation in time or space.
2.2.5 Modelling and Simulation is a discipline for developing a level of
understanding ofthe interaction of the parts of a system, and of the
system as a whole. The level of understanding which may be
developed via this discipline is seldom achievable viaany other
discipline.
2.2.6 A computer model is a simulation or model of a situation in the
real world or animaginary world which has parameters that the
user can alter.
For example Newton considers movement (of planets and of masses) and writes equations,
among which f = ma (where f is force, m mass and a acceleration), that make the dynamics
intelligible. Newton by this expression makes a formidable proposition, that force causes
acceleration, with mass as proportionality coefficient. Another example, a model airplane
is a physical representation of the real airplane; model of airplanes are useful in predicting
the behaviour of the real airplane when subjected to different conditions; weather, speed,
load, etc. Models help us frame our thinking about objects in the real world. It should be
noted that more often than not we model dynamic (changing) systems.
A simulation is a technique (not a method) for representing a dynamic real world system
by a model and experimenting with the model in order to gain information about the
system and therefore take appropriate decision. Simulation can be done by hand or by a
computer. Simulations are generally iterative in their development. One develops a model,
simulates it, learns from the result, revises the model, and continues the iterations until an
adequate level of understanding is attained.
Modelling and Simulation is a discipline, it is also very much an art form. One can
learnabout riding a bicycle from reading a book. To really learn to ride a bicycle one must
become actively engaged with a bicycle. Modelling and Simulation follows much the same
reality. You can learn much about modelling and simulation from reading books and
talking with other people. Skill and talent in developing models and performing
simulations is only developed through the building of models and simulating them. It is
very much ―learn as you go‖ process. From the interaction of the developer and the
models emerges an understanding of what makes sense and what doesn't.
b. Mathematical Models
These are models used for predictive (projecting) purposes. They are abstract and take the
form of mathematical expressions of relationships. For examples:
c. Analogue Models
These are similar to iconic models. But here some other entities are used to represent
directly the entities of the real world. An example is the analogue computer where the
magnitudes of the electrical currents flowing in a circuit can be used to represent quantities
of materials or people moving around in a system. Other examples are; the gauge used to
check the pressure in a tyre. The movement of the dial represent the air pressure in the tyre.
In medical examination, the marks of electrical current on paper, is the analogue
representation of the working of muscles or organs.
d. Simulation Models
Here, instead of entities being represented physically, they are represented by sequences of
random numbers subject to the assumptions of the model. These models represent
(emulate) the behaviour of a real system. They are used where there are no suitable
mathematical models or where the mathematical model is too complex or where it is not
possible to experiment upon a working system without causing serious disruption.
e. Heuristic Models
These models use intuitive (or futuristic) rules with the hope that it will produce workable
solutions, which can be improved upon. For example, the Arthur C Clerk‘s heuristic model
was the forerunner of the communications satellite and today‘s international television
broadcast.
f. Deterministic Models
These are models that contain certain known and fixed constants throughout their
formulation e.g., Economic Order Quantity (EOQ) for inventory control under uncertainty.
g. Stochastic models
These are models that involve one or more uncertain variables and as such are subject to
probabilities.
2.6 Applications
One application of scientific modelling is the field of "Modelling and Simulation",
generally referred to as "M&S". M&S has a spectrum of applications which range from
concept development and analysis, through experimentation, measurement and
verification, to disposal analysis. Projects and programs may use hundreds of different
simulations, simulators and model analysis tools
The first important step is to extract from the real world situation the essential features to be
included in the model. Include only factors that make the model a meaningful representation
of reality, while not creating a model, which is difficult by including many variables that do
not have much effect. Factors to be considered include ones over which management has
control and external factors beyond management control. For the factors included,
assumptions have to be made about their behaviour.
Run (simulate) the model and measure what happens. For example, if we have simulation of
a queuing situation where two servers are employed, we can run this for hundreds of
customers passing through the system and obtain results such as the average length of the
queue and the average waiting time per customer. We can then run it with three servers, say,
and see what new values are obtained for these parameters. Many such runs can be carried
out making different changes to the structure and assumptions of the model.
In the case of a mathematical model we have to solve a set of equations of some sort, e.g.
linear programming problem where we have to solve a set of constraints as simultaneous
equations, or in stock control – where we have to use previously accumulated data to predict
the future value of a particular variable.
When we have solved our mathematical model or evaluated some simulation runs, we can
now draw some conclusions about the model. For example, if we have the average queue
length and the average waiting time for a queuing situation varied in some ways, we can use
this in conjunction with information on such matters as the wage-rates for servers and value
of time lost in the queue to arrive at decisions on the best way to service the queue.
Finally, we use our conclusions about the model to draw some conclusions about the original
real world situation. The validity of the conclusions will depend on how well our model
actually represented the real world situation.
Usually the first attempt at modelling the situation will almost certainly lead to results at
variance with reality. We have to look back at the assumptions in the model and adjust them.
The model must be rebuilt and new results obtained. Usually, a large number of iterations of
this form will be required before acceptable model is obtained. When an acceptable model
has been obtained, it is necessary to test the sensitivity of that model to possible changes in
condition.
The modelling process can then be considered for implementation when it is decided that the
model is presenting the real world (object or system) sufficiently well for conclusions drawn
from it to be a useful guide to action.
The model can be solved by hand, especially if it is simple. It could take time to arrive at an
acceptable model. For complex models or models which involve tremendous amount of data,
the computer is very useful.
1.0 Introduction
Real world phenomenon are very dynamic thus difficult to exactly predict. To make
decisions in such circumstances, we need a tool or verifiable procedures that guide
decision makers to an informed and provable decision and action. In this unit we will look
at one such tool; simulation which has become cornerstone to many probabilistic projects.
The underlying purpose of simulation is to shed light on the underlying mechanisms that
control the behaviour of a system. More practically, simulation can be used to predict
(forecast) the future behaviour of a system, and determine what you can do to influence
that future behaviour. That is, simulation can be used to predict the way in which the
system will evolve and respond to its surroundings, so that you can identify any necessary
changes that will help make the system perform the way that you want it to.
For example, a fisheries biologist could dynamically simulate the salmon population in a
river in order to predict changes to the population, and quantitatively understand the
impacts on the salmon of possible actions (e.g., fishing, loss of habitat) to ensure that they
do not go extinct at some point in the future.
Also flight simulator on PC is also a computer model of some aspect of the flight; it shows
on the screen the controls and what the pilot is supposed to see from the ―cockpit‖ (his
armchair).
Simulation therefore, is a technique (not a method) for representing a dynamic real world
system by a model and experimenting with the model in order to gain information about
the system and hence take appropriate decision. Simulation can be done by hand or by a
computer.
Simulation is a powerful and important tool because it provides a way in which alternative
designs, plans and/or policies can be evaluated without having to experiment on a real
system, which may be prohibitively costly, time-consuming, or simply impractical to do.
That is, it allows you to ask "What if?" questions about a system without having to
experiment on the actual system itself (and hence incur the costs of field tests, prototypes,
etc.).
What happens when a system is not amenable to treatment using the above model?
Constructing a real physical system could be very expensive and what more testing it with
live human beings and observing what happens could be fatal. Training a new pilot using
an airplane is suicidal. This is why simulation is designed and utilized.
Thus simulation is the answer to our question. Many operations Research analysts consider
simulation to be a method of last resort. This is because it may be useful when other
approaches cannot be used, for example when a real world situation is complex. Note that
nothing prevents you from using simulation approach to analytic problem. Results can at
least be compared!
Thus, before designing and implementing a real life system, it is necessary to find out via
simulation studies whether the system will work otherwise the whole exercise will be a wild
goose chase. Inevitably huge sums of money might have been wasted.
Unlike the situation in mathematical programming, so far there are no clear cut underlying
principle guiding the formulation of simulation models. Each application is ad-hoc to a large
extent. In general there are three basic objectives of simulation studies:
1. To Describe a Current System – Suppose that a manufacturing company has suddenly
observed a marked deterioration in meeting due-dates of customers order. It may be
necessary to build a simulation model to see how the current procedures for
estimating due dates, scheduling production and ordering raw materials are giving
rise to observed delays.
2. To explore a Hypothetical System – such as installing a new system, which will cost a
lot of money, it might be better to build a hypothetical model of the system and learn
from its behaviour.
3. To Design an Improved System – for example consider a supermarket that has
onepayment counter. Due to increase in patronage, it is considering to increase
the number of pay points. A simulation experiment may identify if one, two or more
additional points are needed or not needed.
There are two basic types of simulation for which models are built, and the process of
choosing the subset of characteristics or features is different for each. The distinction
between the two types is based on how time is represented; either as a continuous variable or
as a discrete variable.
Suppose we are interested in a gas station. We may describe the behaviour of this system
graphically by plotting the number of cars in the station; the state of the system. Every time a
car arrives the graph increases by one unit while a departing car causes the graph to drop by
one unit. This graph (called sample path), could be obtained from observation of real station,
but could also be artificially constructed. Such artificial construction and analysis of the
resulting sample path (or more sample paths in more complex cases) consists of the
simulation.
The path consists of only horizontal and vertical lines, as cars arrivals and departures
occurred, at distinct points in time, what we refer to as events. Between two consecutive
events, nothing happens – the graph is horizontal. When the number of events are finite, we
call the simulation discrete event.
Discrete event systems (DES) are dynamic systems, which evolve in time by the occurrence
of events at possible irregular time intervals. DES abound in real-world applications.
Examples include traffic systems, flexible manufacturing systems, computer communication
systems, production lines, flow networks etc. Most of these systems can be modelled in terms
of discrete events whose occurrence causes the system to change from one state to another.
Simulations may be performed manually. Most often, however, the system model is written
either as a computer program or as some kind of input into simulator software.
A discrete event simulation (DE) manages events in time. Most computer, logic-test and
fault-tree simulations are of this type. In this type of simulation, the simulator maintains a
queue of events sorted by the simulated time they should occur. The simulator reads the
queue and triggers new events as each event is processed. It is not important to execute the
simulation in real time. It's often more important to be able to access the data produced by
the simulation, to discover logic defects in the design, or the sequence of events.
A special type of discrete simulation which does not rely on a model with an underlying
equation, but can nonetheless be represented formally, is agent-based simulation. In agent-
based simulation, the individual entities (such as molecules, cells, trees or consumers) in the
model are represented directly (rather than by their density or concentration) and possess an
internal state and set of behaviours or rules which determine how the agent's state is updated
from one time-step to the next.
Next, specify what to do at each event. The above example would look like this:
At event of entity arrival: Create next arrival. If the server is free, send entity for start of
service. Otherwise it joins the queue. At event of service start: Server becomes occupied.
Schedule end of service for this entity. At event of service end: Server becomes free. If any
entity is waiting in the queue: remove the first entity from the queue; send it for start of
service.
Some initiation is still required, for example, the creation of the first arrival. Lastly, the
above is translated into code. This is easy with appropriate library function, which has
subroutine for creation, scheduling, proper timing of events, queue manipulations, random
variate generation and statistics collection.
Computer graphics can be used to display the results of a computer simulation. Animations
can be used to experience a simulation in real-time e.g. in training simulations. In some cases
animations may also be useful in faster than real-time or even slower than real-time modes.
For example, faster than real-time animations can be useful in visualizing the build up of
queues in the simulation of humans evacuating a building.
There are many different types of computer simulation; the common feature they all share is
the attempt to generate a sample of representative scenarios for a model in which a complete
enumeration of all possible states of the model would be prohibitive or impossible. Several
software packages also exist for running computer-based simulation modelling that makes
the modelling almost effortless and simple.
In computer programming, a simulator is often used to execute a program that has to run on
some inconvenient type of computer, or in a tightly controlled testing environment For
example, simulators are usually used to debug a micro program or sometimes commercial
application programs. Since the operation of the computer is simulated, all of the information
about the computer's operation is directly available to the programmer, and the speed and
execution of the simulation can be varied at will.
Simulators may also be used to interpret fault trees, or test very large scale integration
(VLSI) logic designs before they are constructed. In theoretical computer science the term
simulation represents a relation between state transition systems.
b. Simulation in training
Simulation is often used in the training of civilian and military personnel. This usually occurs
when it is prohibitively expensive or simply too dangerous to allow trainees to use the real
equipment in the real world. In such situations they will spend time learning valuable lessons
in a "safe" virtual environment. Often the convenience is to permit mistakes during training
for a safety-critical system.
Training simulations typically come in one of three categories:
live simulation (where real people use simulated (or "dummy") equipment in the real
world);
virtual simulation (where real people use simulated equipment in a simulated world
(or "virtual environment")), or
constructive simulation (where simulated people use simulated equipment in a
simulated environment). Constructive simulation is often referred to as "wargaming"
since it bears some resemblance to table-top war games in which players command
armies of soldiers and equipment which move around a board.
c. Simulation in Education
Simulations in education are somewhat like training simulations. They focus on specific
tasks. In the past, video has been used for teachers and students to observe, problem solve
and role play; however, a more recent use of simulation in education include animated
narrative vignettes (ANV). ANVs are cartoon-like video narratives of hypothetical and
reality-based stories involving classroom teaching and learning. ANVs have been used to
assess knowledge, problem solving skills and dispositions of children, and pre-service and in-
service teachers.
Another form of simulation has been finding favour in business education in recent years.
Business simulations that incorporate a dynamic model enable experimentation with business
strategies in a risk free environment and provide a useful extension to case study discussions.
d. Medical Simulators
Medical simulators are increasingly being developed and deployed to teach therapeutic and
diagnostic procedures as well as medical concepts and decision making to personnel in the
health professions. Simulators have been developed for training procedures ranging from the
basics such as blood draw, to laparoscopic surgery and trauma care.
Many medical simulators involve a computer connected to a plastic simulation of the
relevant anatomy. Sophisticated simulators of this type employ a life size mannequin which
responds to injected drugs and can be programmed to create simulations of life- threatening
emergencies. In others simulations, visual components of the procedure are reproduced by
computer graphics techniques, while touch-based components are reproduced by haptic
feedback devices combined with physical simulation routines computed in response to the
user's actions. Medical simulations of this sort will often use 3D CT or MRI scans of patient
data to enhance realism.
Another important medical application of a simulator -- although, perhaps, denoting a
slightly different meaning of simulator -- is the use of a placebo drug, a formulation which
simulates the active drug in trials of drug efficacy.
g. Marine simulators
This bears resemblance to flight simulators. The marine simulators are used to train ship
personnel. Simulators like these are mostly used to simulate large or complex vessels, such as
cruise ships and dredging ships. They often consist of a replication of a ships' bridge, with
operating desk(s), and a number of screens on which the virtual surroundings are projected.
In classrooms of the future, the simulator will be more than a "living" textbook; it will
become an integral a part of the practice of Education and training. The simulator
environment will also provide a standard platform for curriculum development in educational
institutions.
A common approach is to split the measured data into two parts; training data and
verification data. The training data are used to train the model, that is, to estimate the model
parameters (see above). The verification data are used to evaluate model performance.
Assuming that the training data and verification data are not the same, we can assume that if
the model describes the verification data well, then the model describes the real system well.
However, this still leaves the extrapolation question open. How well does this model
describe events outside the measured data? Consider again Newtonian classical mechanics-
model. Newton made his measurements without advanced equipment, so he could not
measure properties of particles travelling at speeds close to the speed of light. Likewise, he
did not measure the movements of molecules and other small particles, but macro particles
only. It is then not surprising that his model does not extrapolate well into these domains,
even though his model is quite sufficient for ordinary life physics.
The reliability and the trust people put in computer simulations depends on the validity of the
simulation model, therefore verification and validation are of crucial importance in the
development of computer simulations. Another important aspect of computer simulations is
that of reproducibility of the results, meaning that a simulation model should not provide a
different answer for each execution. Although this might seem obvious, this is a special point
of attention in stochastic simulations, where random numbers should actually be semi-
random numbers. An exception to reproducibility are human in the loop simulations such as
flight simulations and computer games. Here a human is part of the simulation and thus
influences the outcome in a way that is hard if not impossible to reproduce exactly.
Case Studies
Operations study to add a new plane arrival at La Guardia southwest terminal
LaGuardia airport planned to add a new flight to the schedule of the southwest terminal. The
airport administration wanted to understand how the introduction of a new flight would
influence terminal capacity.
Problem
In order to understand the scale of the problem, the developers conducted a preliminary static
pedestrian flow analysis based on data of how long before the flight passengers arrived at the
airport. In the picture, the solid line represented the number of seats in the waiting area, the
red stacks represented the number of passengers in the terminal before introducing the new
flight, and additional passengers from the new flight were represented by purple areas. The
graph showed that if the new plane took off in the afternoon at 5:00 pm, the already crowded
waiting area would have to bear an additional burden that could lead to a significant problem.
The developers used the AnyLogic Pedestrian Library to create a crowd simulation model of
the terminal in order to examine the use of seats under different scenarios. The basic model
displayed the operation of all terminal areas before the introduction of the new flight, and
then various assumptions could be checked against this model. The best situation was when
people were waiting for departure at their gates, but the consultants wanted to check how far
they would have to move away from their gates to wait for their departure.
To set up the crowd simulation model, the developers used tables of passenger preference for
waiting areas.
The model showed how far from their gate people would have to wait. The results of
modeling the base scenario, without the new flight, showed that some of the peaks were
reduced compared with the static analysis. This was due to passengers lining up 30 minutes
before their flights. The model also showed where the people would actually wait. From this,
it could be verified that there was no overflow and that the situation was stable.
In the afternoon, the waiting area was a lot more heavily utilized. There were a lot of
passengers mixing in different areas and waiting for different gates. With the new flight at
this peak time, some of these areas would get extremely overloaded. This pedestrian
simulation was very useful in showing the operations of this terminal and how adding the
new flight would affect the passengers in this area, including how far they would have to
move to wait for their flights.
Solution
Designing large transport facilities requires careful consideration and agreement on every
detail. That means that such projects must go through a great deal of decision making. The
initial task of engineers usually produces alternatives and functional designs. These consider
physical requirements and standards, but whether business or operating objectives will be met
can be hard to determine accurately. It is here that AnyLogic based modeling helps by
enabling faster decision-making and significantly improving insight into the various tasks
that engineers face when planning large transport facilities.
2.6 Conclusion
Simulation is used to shed light on the underlying mechanisms that control the behaviour of a
system. It can be used to predict (forecast) the future behaviour of a system, and determine
what you can do to influence that future behaviour. We simulation when we require
information to solve bottlenecks, service time, flows, and queues of clients and provide
important information on how to improve your business.
We simulate when a system is not amenable to treatment using any of the physical model,
mathematical or analogue models. Other reasons to resort to simulation include when it is
very expensive to construct a real physical system and what more testing it with live human
beings and observing what happens could be fatal. Training a new pilot using an airplane is
suicidal. These are where and when simulations are designed and utilized.
2.7 Summary
In this unit we:
defined simulation as the process of creating a model (i.e., an abstract representation
or exact copy) of an existing or proposed system (e.g., a project, a business, a mine, a
forest, the organs in your body, etc.) in order to identify and understand those factors
which control the system and/or to predict (forecast) the future behaviour of the
system.
Stated that simulation is required when a system is not amenable to treatment using
any existing model or when it is very expensive to construct a real physical system or
when testing it with live human beings could be fatal.
classified simulation into:
o Stochastic or deterministic (and as a special case of deterministic, chaotic)
o Steady-state or dynamic
o Continuous or discrete (and as an important special case of discrete, discrete
event or DE models)
o Local or distributed
Stated that simulations are done by: Formulating the model, Design the Experiment
and Developing the Computer Programs.
Listed areas of applications of Simulation to include: Computer science, Medicine,
Education, City/Urban planning, Training etc.
Further Readings
Gordon, S. I., & Guilfoos, B. (2017). Introduction to Modeling and Simulation with
MATLAB® and Python. Milton: CRC Press.
Zeigler, B. P., Muzy, A., & Kofman, E. (2019). Theory of modeling and simulation:
Discrete event and iterative system computational foundations. San Diego (Calif.):
Academic Press.
Kluever, C. A. (2020). Dynamic systems modeling, simulation, and control. Hoboken,
N.J: John Wiley & Sons.
Law, A. M. (2015). Simulation modeling and analysis. New York: McGraw-Hill.
Verschuuren, G. M., & Travise, S. (2016). 100 Excel Simulations: Using Excel to Model
Risk, Investments, Genetics, Growth, Gambling and Monte Carlo Analysis. Holy
Macro! Books.
Grigoryev, I. (2015). AnyLogic 6 in three days: A quick course in simulation modeling.
Hampton, NJ: AnyLogic North America.
Dimotikalis, I., Skiadas, C., & Skiadas, C. H. (2011). Chaos theory: Modeling, simulation
and applications: Selected papers from the 3rd Cghaotic Modeling and Simulation
International Conference (CHAOS2010), Chania, Crete, Greece, 1-4 June, 2010.
Singapore: World Scientific.
Velten, K. (2010). Mathematical modeling and simulation: Introduction for scientists and
engineers. Weinheim: Wiley-VCH.
Random Numbers
1.0 Introduction
The use of Random numbers lies at the foundation of modelling and simulations.
Computer applications such as simulations, games, graphics, etc., often need the ability to
generate random numbers for such application.
The quality of a random number generator is proportional to its period, or the number of
random numbers it can produce before a repeating pattern sets in. In large-scale
simulations, different algorithms (called shift-register and lagged-Fibonacci) can be used,
although these also have some drawbacks, combining two different types of generators
may produce the best results.
Random Number can be defined as numbers that show no consistent pattern, with each
number in a series and are neither affected in any way by the preceding number, nor
predictable from it.
One way to get random digits is to simply start with an arbitrary number with a specified
number of digits, for example 4 digits. The first number is called the seed. The seed is
multiplied by a constant number of the same number of digits(length), and the desired
number of digits is taken off the right end of the product. The result becomes the new seed. It
is again multiplied by the original constant to generate a new product, and the process is
repeated as often as desired. The result is a series of digits that appear randomly distributed
as though generated by throwing a die or spinning a wheel. This type of algorithm is called a
congruential generator.
Generating a random number series from a single seed works fine with most simulations that
rely upon generating random events under the control of probabilities (Monte Carlo
simulations). However, although the sequence of numbers generated from a given seed is
randomly distributed, it is always the same series of numbers for the same seed. Thus, a
computer poker game that simply used a given seed would always generate the same hands
for each player.
What is needed is a large collection of potential seeds from which one can be more or less
randomly chosen. If there are enough possible seeds, the odds of ever getting the same series
of numbers become diminishingly small.
One way to do this is to read the time (and perhaps date) from the computer‘s system clock
and generate a seed based on that value. Since the clock value is in milliseconds, there are
millions of possible values to choose from. Another common technique is to use the interval
between the user‘s keystrokes (in milliseconds). Although they are not perfect, these
techniques are quite adequate for games.
The so-called true random number generators extract random numbers from physical
phenomena such as a radioactive source or even atmospheric noise as detected by a radio
receiver.
What we usually do is to take for instance ten pieces of papers and number them
0,1,2,3,4,5,6,7,8, and 9 , fold and place them in a box. Shake the box and thoroughly mix the
slips of paper. Select a slip; then record the number that is on it. Replace the slip and repeat
this procedure over and over. The resultant record of digits is a realized sequence of random
numbers. Assuming you thoroughly mix the slips before every draw, the nth digit of the
sequence has an equal or uniform chance of being any of the digits 0, 1, 2,3,4,5,6,7,8, 9
irrespective of all the preceding digits in the recorded sequence.
In some simulations, we use random numbers that are between 0 and 1. For example, if you
need such numbers with four decimal digits, then you can take four at a time from the
recorded sequence of random digits, and place a decimal point in front of each group of
four. To illustrate, if the sequence of digits is 358083429261… then the four decimal placed
random numbers are .3580, .8342, and .9261.
Experts in computer science have devised mathematical processes for generating digits that
yield sequences satisfying many of the statistical properties of a truly random process. To
illustrate, if you examine a long sequence of digits produced by deterministic formulas, each
digit will occur with nearly the same frequency, odd numbers will be followed by even
numbers about as often as by odd numbers, different pairs of numbers occur with nearly the
same frequency, etc. Since such a process is not really random, it is called pseudo-random
number generator.
Exercise
Suggest one or two experimental set-ups (analogous to the slip-in-a-box approach) for
generating uniform random digits.
RANDOMIZE
This way, we can control the sequence of random numbers generated. RANDOMIZE will
result to the following prompt on the VDU:
Suppose your response to the above prompt is 100. Then the computer would use this
number, 100, to generate the first random number. This number generated is used to generate
the next random number. Thus by specifying the seed for the first random number, we are in
a way controlling all random numbers that will be generated until the seed is reset. A control
such as this can be very useful in validating a simulation program or other computer
programs that use random numbers.
Consider the following BASIC program:
FOR K% = 1 TO 5
PRINT RND NEXT K%
END
If the above program is run, some seven-digit decimal numbers like the following will be
displayed: .6291626, .1948297, .6305799, .8625749, .736353. The particular
digits displayed depend on the system time.
Every time you run the above program, different sequence of numbers will be displayed.
Now add a RANDOMIZE statement to the program:
If you run this program with 300 as a response to the prompt for the random number seed,
the following may be displayed: .1851404, .9877729, .806621, .8573399,
.6208935
Exercise
Find out whether the same set of random numbers will be displayed each time the above
program is run with seed 300.
Now the function RND generates a random number between 0 and 1. Specifically, the
random variable X is in the range: 0 < X < 1
The expression X = RND *6
Will generate a number in the range: 0 < X < 6
We must convert these numbers to integers as follows: X% = INT (RND*6)
The expression produces an integer in the range: 0<X<5
Therefore if we need to add 1 to the above expression in simulating the tossing of a die.
Thus,
X% = INT (RND*6) + 1
In general, to generate a random integer between P and N we use the expression:
INT(RND*N+1-P) + P;
where N>P
While for integer number between 0 and N – 1 we use the expression INT (RND *N).
Example 1
A simple QBASIC program that will stimulate the tossing of two dice and display the value
obtained after each toss, and the total value of the dice is shown below.
CLS
REM DI and D2 represent the individual dice. RANDOMIZE
DO
D1% = INT(RND*6) + 1
D2% = INT(RND*6) + 1
TOTAL% = D1% + D2%
PRINT ―Die 1:‖; D1%; ―Die 2:‖; D2%
PRINT: PRINT
INPUT ―Toss Again (Y/N)?‖, Y$
LOOP UNTIL UCASE$(Y$) = ―N‖
END
Exercise
Run the program of example 1several times using different random number seeds to determine if the
integers generated for the individual die are uniformly distributed between 1and 6 inclusive.
If we want the computer to be generating the random number seed automatically, we use
RANDOMIZE TIMER
In place of RANDOMIZE.
Example 2
Another QBASIC program to simulate the tossing of a fair coin 10 times. The program
displays a H when a head appears and a T when a tail appears.
CLS
REM Program to simulate the tossing of a coin 10 times
REM and print the outcome
RANDOMIZE TIMER
FOR K% = 1 TO 10
RANDNO = RND
IF RANDNO <= 0.5 PRINT ―H‖
IF RANDNO > 0.5
PRINT ―T‖
NEXT K%
END
Example 3
Suppose the output of the program of example 3 is: HHTHHTTTHH
and that there are two players X and Y involved in the tossing of the coin. Given that player
X wins N50.00 from player Y if a head appears and loses it to player Y if a tail appears.
Determine who won the game and by how much.
Solution
From the output there are 6 heads and 4 tails.
Player X wins N50.00 x 6 = N300.00 from player Y. He loses N50.00 x 4 = N200.00 to
player Y.
Thus, player X won the game with N300.00 – N200.00 = N100.00.
5.0 Conclusion
In this unit, you have been introduced to Random Numbers generation. You have also learnt
the how to manipulate the RND function of QBASIC.
6.0 Summary
What you have learnt in this unit concern:
The different ways of generating pseudorandom numbers,
The properties of good random number generator.
The use of QBasic RND function to simulate randomness,
The other Random number generating methods,
23
Unit 3: Congruential Random Number Generator
Contents
1.0 Introduction
2.0 Intended Learning Outcomes (ILOs)
3.0 Main Content
3.1 The Congreuential Method
3.2 Choice of a, c and m
3.3 RANECU Random Number Generator
3.4 Other Methods of Generating Random Numbers
3.4.1 Quadratic Congruential Method,
3.4.2 Mid-square method,
3.4.3 Mid-product Method
3.4.4 Fibonnachi Method
4.0 Self-Assessment Exercise(s)
5.0 Conclusion
6.0 Summary
7.0 Further Readings
1.0 Introduction
As has been stated earlier, if you want to write a simulation program and you neither have
a simulation language at your disposal nor a programming language with a random number
generating function, you must design and write a random number generating function and
call it whenever you need it.
Classical uniform random number generators have some major defects, such as, short
period length and lack of higher dimension uniformity. However, nowadays there are a
class of rather complex random number generators which are as efficient as the classical
generators which enjoy the property of a much longer period and of higher dimension
uniformity.
24
3.0 Main Content
3.1 The Congruential Method
The Congruential Method is widely used. The method is based on modulus arithmetic,
which we now discuss briefly.
We say that two numbers x and y are congruent modulo m if (x-y) is an integral multiple
of m. Thus we can write: x = y(modulo m)
For example, let m = 10, then we can write:
13 ≡ 3 (modulo 10)
84 ≡ 4 (modulo 10)
The congruential method generates random numbers by computing the next random
number from the last random number obtained, given an initial random number say, X0,
called the seed.
From the above formula, it follows that the random number generated must be between 0
and (m-1) since MOD (modulo) produces remainder after division. Hence the above
formula will produce the remainder after dividing (aXn + C ) by m. So to generate a
random number between p and m we use:
The multiplicative congruential method is very handy. It is obtained using the general
formula:
where the parameters a, m and the seed r0 are specified to give desirable statistical
properties of the resultant sequence. By virtue of modulo arithmetic, each rn must be one of
the numbers 0,1,2,3… m-1. Clearly, you must be careful about the choice of a and r0. The
25
values of ‗a‘ and r0 should be chosen to yield the largest cycle or period, that is to give the
largest value for n at which rn = r0 for the first time.
Example 4
To illustrate the technique, suppose you want to generate ten decimal place numbers u1,
u2, u3,…. It can be shown that if you use
un = rn x 10-1
where rn = 100003rn-1 (modulo 1010), and r0 = any odd number not divisible by 5,
then the period of the sequence will be 5 x 108, that is rn = r0 for the first time at n = 5 x
108 and the cycle subsequently repeats itself. 3650721436
n Xn+1 = (5Xn+7)mod 8
0 X1 = (5*X0+7)mod 8 = (5*X4+7)mod 8 = 27 mod 8 = 3
1 X2 = (5*X1+7)mod 8 = (5*X3+7)mod 8 = 22 mod 8 = 6
2 X3 = (5*X2+7)mod 8 = (5*X6+7)mod 8 = 37 mod 8 = 5
3 X4 = (5*X3+7)mod 8 = (5*X5+7)mod 8 = 32 mod 8 = 0
4 X5 = (5*X4+7)mod 8 = (5*X0+7)mod 8 = 7 mod 8 = 7
5 X6 = (5*X5+7)mod 8 = (5*X7+7)mod 8 = 42 mod 8 = 2
6 X7 = (5*X6+7)mod 8 = (5*X2+7)mod 8 = 17 mod 8 = 1
7 X8 = (5*X7+7)mod 8 = (5*X1+7)mod 8 = 12 mod 8 = 4
Note that the value of X8 is 4, which is the value of the seed X0. So if we compute X9, X10,
etc the same random numbers 3,6,5,0,7,2,1,4 will be generated once more.
Note also that if we divide the random integer values by 8, we obtain random numbers in
the range 0 < Xn+1 < 1 which is similar to using the RND function of BASIC.
In his book, The Art of Computer Programming, Donald Knuth presents several rules for
maximizing the length of time before the random number generator comes up with the
same value as the seed. This is desirable because once the random number generator comes
up with the initial seed, it will start to repeat the same sequence of random numbers (which
26
will not be so random since the second time around we can predict what they will be).
According to Knuth's rules, if M is prime, we can let C be 0.
The LCM defined above has full period if and only if the following conditions are
satisfied:
a) m and c are relatively prime
b) If q is a prime number that divides m , then q divides a-1
c) If 4 divides m, then 4 divides a-1
Therefore, the values for a, c and m are not generated randomly, rather they are carefully
chosen based on certain considerations. For a binary computer with a word length of r bits,
the normal choice for m is m = 2r-1. With this choice of m, a can assume any of the values
1, 5,9,13, and c can assume any of the values 1, 3, 5, 7… However, experience shows that
the congruential method works out very well if the value of a is an odd integer not divisible
by either 3 or 5 and c chosen such that c mod 8 = 5 (for a binary computer) or c mod 200 =
21 (for a decimal computer).
Example 5
Develop a function procedure called RAND in QBASIC which generates a random number
between 0 and 1 using the mixed congruential method. Assume a 16-bit computer.
Solution
FUNCTION RAND (SEED)
CONST M = 32767, A = 2743, C = 5923
IF SEED < 0 THEN SEED = SEED + M
SEED = (A* SEED + C) MOD M
RAND = SEED/M
END FUNCTION
Note that in the main program that references the above function in (a), the TIMER function
can be used to generate the SEED to be passed to the function RAND as illustrated in
example 2.
Example 5
Write a program that can generate that can generate 20 random integer number distributed
between 1 and 64 inclusive using mixed congruential method.
Solution
QBASIC
27
SEED = RAND (SEED) ‗Call of function RAND PRINT SEED: SPC(2)
NEXT K%
END ‗End of main program
PROGRAM RANDNUM
COMMON SEED
CLS ‗Clear screen
DO 50 K = 1, 25
WRITE (*, 5)
FORMAT(/)
50 CONTINUE
WRITE(*,*) ‗Enter the seed‘
READ(*,*) SEED
DO 30 J = 1, 20
SEED = RAND
WRITE (*, 6) SEED
6 FORMAT (I4)
30 CONTINUE
END
FUNCTION RAND
COMMON SEED
PARAMETER (M = 64, A = 27, C =13)
IF (SEED.LT.0) SEED = SEED + M
HOLD = (A*SEED + C)
SEED = AMOD (HOLD,M) + 1
RAND = SEED
RETURN END
28
failing which a default set is employed. If supplied, these three seeds, in order, should lie in
the ranges [1,32362], [1,31726] and [1,31656] respectively. The program is given below.
29
3.4.1 The Quadratic congruential method
This method uses the formula:
Xn=1 = (dX 2 + cX + a) modulo mn n
Where d is chosen in the same way as c and m should be a power of 2 for the method to yield
satisfactory results.
30
a. A sequence of 10 one-digit random numbers given that
Xn+1 ≡ (Xn + 3)(modulo 10) and X0 = 2
b. A sequence of eight random numbers between 0 and 7 given that
Xn+1 ≡ (5Xn + 1)(modulo 8) and X0 = 4
c. A sequence of two-digit random numbers such that
Xn+1 ≡ (61Xn + 27)(modulo 100) and X0 = 40
d. A sequence of five-digit random numbers such that
Xn+1 ≡ (21Xn + 53)(modulo 100) and X0 = 33
5. Define a methods period and state how to improve a period. Show two examples of
such improvement.
6. Consider the multiplicative congruential method for generating random digits. In
each part below, assume modulo 10 arithmetic and determine the length of the
cycle:
a. Let a = 2 and r0 = 1, 3 and 5
b. Let a = 3 and r0 = 1,2 and 5
5.0 Conclusion
In this unit, you have been introduced to Random Numbers generation. You have also
learnt how to design random number generator.
6.0 Summary
What you have learnt in this unit concern:
The Congruential methods of generating random numbers,
The use of QBasic RND function to simulate randomness,
The other Random number generating methods,
The properties of good random number generator.
31
Pishro-Nik, H. (2014). Introduction to probability, statistics, and random processes. Blue
Bell, PA: Kappa Research, LLC.
Spiegel, M. R., Schiller, J. J., & Srinivasan, R. A. (2013). Schaums outline of probability
and statistics. New York: McGraw-Hill.
32
Unit 4: Monte Carlo Methods
Contents
1.0 Introduction
2.0 Intended Learning Outcomes (ILOs)
3.0 Main Content
3.1 Overview of Monte Carlo Method
3.2 History of Monte Carlo Method
3.3 Applications of Monte Carlo Methods
4.0 Self-Assessment Exercise(s)
5.0 Conclusion
6.0 Summary
7.0 Further Readings
1.0 Introduction
Monte Carlo methods (or Monte Carlo experiments) are a class of computational algorithms
that rely on repeated random sampling to compute their results. Monte Carlo methods are
often used in simulating physical and mathematical systems. The methods are especially
useful in studying systems with a large number of coupled (interacting) degrees of freedom,
such as fluids, disordered materials, strongly coupled solids, and cellular structures. More
broadly, Monte Carlo methods are useful for modelling phenomena with significant
uncertainty in inputs, such as the calculation of risk in business. These methods are also
widely used in mathematics: a classic use is for the evaluation of definite integrals,
particularly multidimensional integrals with complicated boundary conditions. It is a widely
successful method in risk analysis when compared with alternative methods or human
intuition. When Monte Carlo simulations have been applied in space exploration and oil
exploration, actual observations of failures, cost overruns and schedule overruns are routinely
better predicted by the simulations than by human intuition or alternative "soft" methods.
Notice how the π approximation follows the general pattern of Monte Carlo algorithms. First,
we define an input domain: in this case, it's the square which circumscribes our circle. Next,
we generate inputs randomly (scatter individual grains within the square), then perform a
computation on each input (test whether it falls within the circle). At the end, we aggregate
the results into our final result, the approximation of π.
Note, also, two other common properties of Monte Carlo methods: the computation's reliance
on good random numbers, and its slow convergence to a better approximation as more data
points are sampled. If grains are purposefully dropped into only, for example, the center of
the circle, they will not be uniformly distributed, and so our approximation will be poor. An
approximation will also be poor if only a few grains are randomly dropped into the whole
square. Thus, the approximation of π will become more accurate both as the grains are
dropped more uniformly and as more are dropped.
……..6
Most integrals can be converted to this form with a suitable change of variables, so we can
consider this to be a general application suitable for the Monte Carlo method.
The integral represents a non-random problem, but the Monte Carlo method approximates a
solution by introducing a random vector U that is uniformly distributed on the region of
integration. Applying the function f to U, we obtain a random variable f(U). This has
expectation:
………..(7)
………..(8)
Comparing [6] and [8], we obtain a probabilistic expression for the integral Ψ:
……………..(9)
so random variable f(U) has mean Ψ and some standard deviation ζ. We define
………….(10)
as an unbiased estimator for Ψ with standard error ζ. This is a little unconventional, since
[10] is an estimator that depends upon a sample {U[1]}of size one, but it is a valid estimator
nonetheless.
To estimate Ψ with a standard error lower than ζ, let‘s generalize our estimator to
accommodate a larger sample {U[1], U [2], … , U [m]}. Applying the function f to each of these
yields m independent and identically distributed (IID) random variables f(U [1]), f(U [2]), … ,
f(U [m]), each with expectation Ψ and standard deviation ζ. The generalization of [10]
………….(11)
…………..(12)
If we have a realization {u , u[2], … , u[m]} for our sample, we may estimate Ψ as:
[1]
…………….(13)
We call [11] the crude Monte Carlo estimator. Formula [12] for its standard error is
important for two reasons. First, it tells us that the standard error of a Monte Carlo analysis
decreases with the square root of the sample size. If we quadruple the number of
realizations used, we will half the standard error. Second, standard error does not depend
upon the dimensionality of the integral [6]. Most techniques of numerical integration such
as the trapezoidal rule or Simpson's method suffer from the curse of dimensionality.
When generalized to multiple dimensions, the number of computations required to apply
them, increases exponentially with the dimensionality of the integral. For this reason, such
methods cannot be applied to integrals of more than a few dimensions. The Monte Carlo
method does not suffer from the curse of dimensionality. It is as applicable to a 1000-
dimensional integral as it is to a one-dimensional integral.
While increasing the sample size is one technique for reducing the standard error of a
Monte Carlo analysis, doing so can be computationally expensive. A better solution is to
employ some technique of variance reduction. These techniques incorporate additional
information about the analysis directly into the estimator. This allows them to make the
Monte Carlo estimator more deterministic, and hence have a lower standard error.
Due to high mathematics required and burden of understanding at this level, we have to
stop this discussion here.
It was only after electronic computers were first built (from 1945 on) that Monte Carlo
methods began to be studied in depth. In the 1950s they were used at Los Alamos for early
work relating to the development of the hydrogen bomb, and became popularized in the
fields of physics, physical chemistry, and operations research. The Rand Corporation and
the U.S. Air Force were two of the major organizations responsible for funding and
disseminating information on Monte Carlo methods during this time, and they began to
find a wide application in many different fields.
Uses of Monte Carlo methods require large amounts of random numbers, and it was their
use that spurred the development of pseudorandom number generators, which were far
quicker to use than the tables of random numbers which had been previously used for
statistical sampling.
a. Physical sciences:
Monte Carlo methods are very important in computational physics, physical chemistry, and
related applied fields, and have diverse applications from complicated quantum
calculations to designing heat shields and aerodynamic forms. The Monte Carlo method is
widely used in statistical physics, particularly Monte Carlo molecular modelling as an
alternative for computational molecular dynamics as well as to compute statistical field
theories of simple particle and polymer models. In experimental particle physics, these
methods are used for designing detectors, understanding their behaviour and comparing
experimental data to theory, or on vastly large scale of the galaxy modelling.
Monte Carlo methods are also used in the models that form the basis of modern weather
forecasting operations.
b. Engineering
Monte Carlo methods are widely used in engineering for sensitivity analysis and
quantitative probabilistic analysis in process design. The need arises from the interactive,
co-linear and non-linear behaviour of typical process simulations. For example,
in microelectronics engineering, Monte Carlo methods are applied to analyze
correlated and uncorrelated variations in analog and digital integrated circuits. This
enables designers to estimate realistic 3 sigma corners and effectively optimise
circuit yields.
in geostatistics and geometallurgy, Monte Carlo methods strengthen the design of
mineral processing flow sheets and contribute to quantitative risk analysis.
c. Visual Designs
Monte Carlo methods have also proven efficient in solving coupled integral differential
equations of radiation fields and energy transport, and thus these methods have been used
in global illumination computations which produce photorealistic images of virtual 3D
models, with applications in video games, architecture, design and computer generated
films.
d. Finance and business
Monte Carlo methods in finance are often used to calculate the value of companies, to
evaluate investments in projects at a business unit or corporate level, or to evaluate
financial derivatives. Monte Carlo methods used in these cases allow the construction of
stochastic or probabilistic financial models as opposed to the traditional static and
deterministic models, thereby enhancing the treatment of uncertainty in the calculation.
e. Telecommunications
When planning a wireless network, design must be proved to work for a wide variety of
scenarios that depend mainly on the number of users, their locations and the services they
want to use. Monte Carlo methods are typically used to generate these users and their
states. The network performance is then evaluated and, if results are not satisfactory, the
network design goes through an optimization process.
f. Games
Monte Carlo methods have recently been applied in game playing related artificial
intelligence theory. Most notably the game of Battleship have seen remarkably successful
Monte Carlo algorithm based computer players. One of the main problems that this
approach has in game playing is that it sometimes misses an isolated, very good move.
These approaches are often strong strategically but weak tactically, as tactical decisions
tend to rely on a small number of crucial moves which are easily missed by the randomly
searching Monte Carlo algorithm.
g. Uses in mathematics
In general, Monte Carlo methods are used in mathematics to solve various problems by
generating suitable random numbers and observing that fraction of the numbers which
obeys some property or properties. The method is useful for obtaining numerical solutions
to problems which are too complicated to solve analytically. The most common application
of the Monte Carlo method in mathematics are:
i. Integration
Deterministic methods of numerical integration usually operate by taking a number of
evenly spaced samples from a function. In general, this works very well for functions of
one variable. However, for functions of vectors, deterministic quadrature methods can be
very inefficient. To numerically integrate a function of a two-dimensional vector, equally
spaced grid points over a two-dimensional surface are required. For instance a 10x10 grid
requires 100 points. If the vector has 100 dimensions, the same spacing on the grid would
require 10100 points which is far too many to be computed. But 100 dimensions is by no
means unusual, since in many physical problems, a "dimension" is equivalent to a degree
of freedom.
Monte Carlo methods provide a way out of this exponential time-increase. As long as the
function in question is reasonably well-behaved, it can be estimated by randomly selecting
points in 100-dimensional space, and taking some kind of average of the function values at
these points. By the law of large numbers, this method will display convergence (i.e.
quadrupling the number of sampled points will halve the error, regardless of the number of
dimensions).
ii. Optimization
Most Monte Carlo optimization methods are based on random walks. The program will
move around a marker in multi-dimensional space, tending to move in directions which
lead to a lower function, but sometimes moving against the gradient.
When analyzing an inverse problem, obtaining a maximum likelihood model is usually not
sufficient, as we normally also wish to have information on the resolution power of the
data. In the general case we may have a large number of model parameters, and an
inspection of the marginal probability densities of interest may be impractical, or even
useless. But it is possible to pseudorandomly generate a large collection of models
according to the posterior probability distribution and to analyze and display the models in
such a way that information on the relative likelihoods of model properties is conveyed to
the spectator. This can be accomplished by means of an efficient Monte Carlo method,
even in cases where no explicit formula for the a priori distribution is available.
h. Computational mathematics
Monte Carlo methods are useful in many areas of computational mathematics, where a
lucky choice can find the correct result. A classic example is Rabin's algorithm for
primality testing (algorithm which determines whether a given number is prime). It states
that for any n which is not prime, a random x has at least a 75% chance of proving that n is
not prime. Hence, if n is not prime, but x says that it might be, we have observed at most a
1-in-4 event. If 10 different random x say that "n is probably prime" when it is not, we
have observed a one-in-a-million event. In general a Monte Carlo algorithm of this kind
produces one correct answer with a guarantee that n is composite, and x proves it so, but
another one without, but with a guarantee of not getting this answer when it is wrong too
often; in this case at most 25% of the time.
Remark:
In physics, two systems are coupled if they are interacting with each other. Of special
interest is the coupling of two (or more) vibratory systems (e.g. pendula or resonant
circuits) by means of springs or magnetic fields, etc. Characteristic for a coupled
oscillation is the effect of beat.
6.0 Summary
In this unit we discussed the following:
The algorithm of Monte Carlo method
The history of Monte Carlo method which spurred the development of pseudorandom
number generator
The application of Monte Carlo methods in areas such as physical sciences,
Engineering, Finance and Business, telecommunications, Games, Mathematics, etc.
Contents
1.0 Introduction
2.0 Intended Learning Outcomes (ILOs)
3.0 Main Content
3.1 What is Statistics
3.2 What is a Statistical Distribution?
3.3 Measures of Central Tendency
3.4 Measures of Variation
3.5 Showing Data Distribution in Graphs
3.6 The Difference between a Continuous and a Discrete Distribution
3.7 Normal Distribution
3.7.1 Standard Normal Distribution
3.7.2 The Normal Distribution as a Model for Measurements
3.7.3 Conversion to a Standard Normal Distribution
3.7.4 Skewed Distributions µ
3.8 What is a Percentile?
3.9 Probabilities in Discrete Distributions
3.10 Probability and the Normal Curve
4.0 Self-Assessment Exercise(s)
5.0 Conclusion
6.0 Summary
7.0 Further Readings
1.0 Introduction
Although simulation can be a valuable tool for better understanding the underlying
mechanisms that control the behaviour of a system, using simulation to make predictions
of the future behaviour of a system can be difficult. This is because, for most real-world
systems, at least some of the controlling parameters, processes and events are often
stochastic, uncertain and/or poorly understood. The objective of many simulations is to
identify and quantify the risks associated with a particular option, plan or design.
Simulating a system in the face of such uncertainty and computing such risks requires that
the uncertainties be quantitatively included in the calculations. To do this we collect data
about the system parameters and subject them to statistical analysis.
The mean, median and mode are called measures of central tendency.
Mean, Median, Mode, Range, and Standard Deviations are measurements in a sample
(statistics) and can also be used to make inferences on a population.
Discrete distributions describe a finite number of possible values. (shown by the bars)
In a normal distribution, data are most likely to be at the mean. Data are less likely to be
farther away from the mean.
The normal distribution is defined by the following equation:
The graph of the normal distribution depends on two factors - the mean and the standard
deviation. The mean of the distribution determines the location of the center of the graph,
and the standard deviation determines the height and width of the graph. When the
standard deviation is large, the curve is short and wide; when the standard deviation is
small, the curve is tall and narrow. All normal distributions look like a symmetric, bell-
shaped curve, as shown in figure 3a and 3b.
(a) (b)
Fig. 3: Graph of Normal Distribution Based on Size of Mean and Standard Deviation
The curve on the left is shorter and wider than the curve on the right, because the curve on
the left has a bigger standard deviation.
z = (X - µ) / ζ
where X is a normal random variable, µ is the mean of X, and ζ is the standard deviation of
X.
Transform raw data. Usually, the raw data are not in the form of z-scores. They
need to be transformed into z-scores, using the transformation equation presented
earlier: z = (X - µ) / ζ.
Find the probability. Once the data have been transformed into z-scores, you can
use standard normal distribution tables, online calculators (e.g., Stat Trek's free
normal distribution calculator) to find probabilities associated with the z-scores.
The problem in the next section demonstrates the use of the normal distribution as a model
for measurement.
Example 1 - Ada earned a score of 940 on a national achievement test. The mean test
score was 850 with a standard deviation of 100. What proportion of students had a higher
score than Ada? (Assume that test scores are normally distributed.)
Solution - As part of the solution to this problem, we assume that test scores are normally
distributed. In this way, we use the normal distribution as a model for measurement.
Given an assumption of normality, the solution involves three steps.
First, we transform Ada's test score into a z-score, using the z-scoretransformation
equation.
z = (X - µ) / ζ = (940 - 850) / 100 = 0.90
Then, using a standard normal distribution table, we find the cumulative
probability associated with the z-score. In this case, we find P(Z < 0.90) = 0.8159.
Therefore, the P(Z > 0.90) = 1 - P(Z < 0.90) = 1 - 0.8159 = 0.1841.
Thus, we estimate that 18.41 percent of the students tested had a higher score than Ada.
Example 2 - An average light bulb manufactured by the Acme Corporation lasts 300 days
with a standard deviation of 50 days. Assuming that bulb life is normally distributed, what
is the probability that an Acme light bulb will last at most 365 days?
Solution: Given a mean score of 300 days and a standard deviation of 50 days, we want to
find the cumulative probability that bulb life is less than or equal to 365 days. Thus, we
know the following:
We enter these values into the formula and compute the cumulative probability. The
answer is: P( X < 365) = 0.90. Hence, there is a 90% chance that a light bulb will burn out
within 365 days.
Equations (1) and (2) are called; Pearson‘s first and second coefficients of skewness.
3.8 What is a Percentile?
A percentile (or cumulative probability) is the proportion of data in a distribution less
than or equal to a data point. If you scored a 90 on a math test and 80% of the class had
scores of 90 or lower; your percentile is 80. In the figure 4, b=90 and P(Z<b)=80.
6.0 Summary
In this unit:
We defined Statistics as field of study that is concerned with the collection,
description, and interpretation of data.
We saw that Statistical Distributions describe the numbers of times each possible
outcome occurs in a sample.
We computed various measures of Central Tendency and Variations which can be
used to make inferences.
And explained the following components of Statistical Distributions:
o Normal Distributions,
o z-score
o percentile,
o Skewed Distributions
o Ways to transform data to Graphs
Contents
1.0 Introduction
2.0 Intended Learning Outcomes (ILOs)
3.0 Main Content
3.1 Distribution Functions and Simulation
3.2 Probability Definitions
3.3 Random Variables
3.4 Probability Function
3.5 Mathematical Treatment of Probability
3.6 Probability theory
3.7 The Limit theorems
3.8 Probability Distribution Functions
3.9 Summary of Common Probability Distributions
4.0 Self-Assessment Exercise(s)
5.0 Conclusion
6.0 Summary
7.0 Further Readings
1.0 Introduction
In this section we look at the branch of statistics that deals with analysis of random events.
Probability is the numerical assessment of likelihood on a scale from 0 (impossibility) to 1
(absolute certainty). Probability is usually expressed as the ratio between the number of ways
an event can happen and the total number of things that can happen (e.g., there are 13 ways
of picking a diamond from a deck of 52 cards, so the probability of picking a diamond is
13/52, or ¼). Probability theory grew out of attempts to understand card games and
gambling. As science became more rigorous, analogies between certain biological, physical,
and social phenomena and games of chance became more evident (e.g., the sexes of newborn
infants follow sequences similar to those of coin tosses). As a result, probability became a
fundamental tool of modern genetics and many other disciplines.
1. Frequentists talk about probabilities only when dealing with experiments that are
random and well-defined. The probability of a random event denotes the relative
frequency of occurrence of an experiment's outcome, when repeating the experiment.
Frequentists consider probability to be the relative frequency "in the long run" of
outcomes.
2. Bayesians, however, assign probabilities to any statement whatsoever, even when no
random process is involved. Probability, for a Bayesian, is a way to represent an
individual's degree of belief in a statement, or an objective degree of rational belief,
given the evidence
The scientific study of probability is a modern development. Gambling shows that
there has been an interest in quantifying the ideas of probability for millennia, but
exact mathematical descriptions of use in those problems only arose much later.
Probability Distribution
A probability distribution gathers together all possible outcomes of a random variable (i.e.
any quantity for which more than one value is possible), and summarizes these outcomes by
indicating the probability of each of them. While a probability distribution is often associated
with the bell-shaped curve, recognize that such a curve is only indicative of one specific type
of probability, the so-called normal probability distribution. However, in real life, a
probability distribution can take any shape, size and form.
In this case, we would have a uniform probability distribution: the chances that our random
day would fall on any particular day are the same, and the graph of our probability
distribution would be a straight line.
Examples:
Rates of return can theoretically range from –100% to positive infinity.
Time is bound on the lower side by 0.
Market price of a security will also have a lower limit of $0, while its upper limit will
depend on the security – stocks have no upper limit (thus a stock price‘s outcome >
$0),
Bond prices are more complicated, bound by factors such as time-to-maturity and
embedded call options. If a face value of a bond is $1,000, there‘s an upper limit
(somewhere above $1,000) above which the price of the bond will not go, but
pinpointing the upper value of that set is imprecise.
The two key properties of a probability function, p(x) (or f(x) for continuous), are the
following:
1. 0 < p(x) < 1, since probability must always be between 0 and 1.
2. Add up all probabilities of all distinct possible outcomes of a random variable, and the
sum must equal 1.
Determining whether a function satisfies the first property should be easy to spot since we
know that probabilities always lie between 0 and 1. In other words, p(x) could never be
1.4 or –0.2. To illustrate the second property, say we are given a set of three possibilities
for X: (1, 2, 3) and a set of three for Y: (6, 7, 8), and given the probability functions f(x)
and g(y).
x f(x) y g(y)
1 0.31 6 0.32
2 0.43 7 0.40
3 0.26 8 0.23
x f(x)
<0 0.2
>0 0.8
Joint Probabilty
If both the events A and B occur on a single performance of an experiment this is called
the intersection or joint probability of A and B, denoted as and .
If two events, A and B are independent then the joint probability is:
for example, if two coins are flipped the chance of both being heads is: .
this is called the union of the events A and B denoted as . If two events are
mutually exclusive then the probability of either occurring is:
.
For example, the chance of rolling a 1 or 2 on a six-sided die is
For example, when drawing a single card at random from a regular deck of cards, the chance
of getting a heart or a face card (J,Q,K) (or one that is both) is , because
of the 52 cards of a deck 13 are hearts, 12 are face cards, and 3 are both: here the possibilities
included in the "3 that are both" are included in each of the "13 hearts" and the "12 face
cards" but should only be counted once.
Conditional Probability
This is the probability of some event A, given the occurrence of some other event B.
Conditional probability is written P(A|B), and is read "the probability of A, given B". It is
defined by:
Summary of probabilities
Event Probability
A
Not A P(A) = 1-P(A)
A or B P(A U B) = P(A) + P(B)-P(A∩B)
= P(A)+P(B) If A and B are mutually exclusive
A and B P(A∩B) = P(A|B)P(B)
= P(A)P(B) If A and B are independent
A given B P(A|B) = P(A∩B)/P(B)
Two or more events are mutually exclusive if the occurrence of any one of them excludes
the occurrence of the others.
3.6 Probability theory
There have been at least two successful attempts to formalize probability, namely the
Kolmogorov formulation and the Cox formulation. In Kolmogorov's formulation sets are
interpreted as events and probability itself as a measure on a class of sets. In Cox's
theorem, probability is taken as a primitive (that is, not further analyzed) and the emphasis
is on constructing a consistent assignment of probability values to propositions. In both
cases, the laws of probability are the same, except for technical details.
Probability theory is a mathematical science that permits one to find, using the
probabilities of some random events, the probabilities of other random events connected in
some way with the first.
The assertion that a certain event occurs with a probability equal, for example, to 1/2, is
still not, in itself, of ultimate value, because we are striving for definite knowledge. Of
definitive, cognitive value are those results of probability theory that allow us to state that
the probability of occurrence of some event A is very close to 1 or (which is the same
thing) that the probability of the non-occurrence of event A is very small. According to the
principle of ―disregarding sufficiently small probabilities,‖ such an event is considered
practically reliable. Such conclusions, which are of scientific and practical interest, are
usually based on the assumption that the occurrence or non-occurrence of event A depends
on a large number of factors that are slightly connected with each other.
Consequently, it can also be said that probability theory is a mathematical science that
clarifies the regularities that arise in the interaction of a large number of random factors.
To describe the regular connection between certain conditions S and event A, whose
occurrence or non-occurrence under given conditions can be accurately established, natural
science usually uses one of the following schemes:
(a) For each realization of conditions S, event A occurs. All the laws of classical
mechanics have such a form, stating that for specified initial conditions and
forces acting on an object or system of objects, the motion will proceed in an
unambiguously definite manner.
(b) Under conditions S, event A has a definite probability P(A/S) equal to p.
Thus, for example, the laws of radioactive emission assert that for each
radioactive substance there exists the specific probability that, for a given
amount of a substance, a certain number of atoms N will decompose within a
given time interval.
Let us call the frequency of event A in a given set of n trials (that is, of n repeated
realizations of conditions S) the ratio h = m/n of the number m of those trials in which A
occurs to the total number of trials n. The existence of a specific probability equal to p for
an event A under conditions S is manifested in the fact that in almost every sufficiently
long series of trials, the frequency of event A is approximately equal to p.
Statistical laws, that is, laws described by a scheme of type (b), were first discovered in
games of chance similar to dice. The statistical rules of birth and death (for example, the
probability of the birth of a boy is 0.515) have also been known for a long time. A great
number of statistical laws in physics, chemistry, biology, and other sciences were
discovered at the end of the 19th and in the first half of the 20th century.
(1) P(A) = pi + pj + … + pk
Formula (2) expresses the so-called classical definition of probability according to which
the probability of some event A is equal to the ratio of the number r of outcomes favorable
to A to the number s of all ―equally likely‖ outcomes. The classical definition of
probability only reduces the concept of probability to the concept of equal possibility,
which remains without a clear definition.
EXAMPLE. In the tossing of two dice, each of the 36 possible outcomes can be designated
by (i, j), where i is the number of pips that comes up on the first dice and j, the number on
the second. The outcomes are assumed to be equally likely. To the event A, ―the sum of the
pips is 4,‖ three outcomes are favorable: (1,3); (2,2); (3,1). Consequently, P(A) = 3/36 =
1/12.
Starting from certain given events, it is possible to define two new events: their union
(sum) and intersection (product). Event B is called the union of events A1, A2, …, Ar if it
has the form ―A1 or A2, …, or Ar occurs.‖
Event C is called the intersection of events A1, A2 …, Ar if it has the form ―A1, and A2, …
, and Ar occurs.‖
The union of events is designated by the symbol 𝖴, and the intersection, by ∩. Thus, we
write:
B = A1 𝖴 A2 𝖴 ... 𝖴 Ar C =
A1 ∩ A2 ∩ ... ∩ Ar
Events A and B are called disjoint if their simultaneous occurrence is impossible—that is,
if among the outcomes of a trial not one is favourable to A and B simultaneously.
Two of the basic theorems of probability theory are connected with the operations of union
and intersection of events; these are the theorems of addition and multiplication of
probabilities.
Thus, in the example presented above of tossing two dice, event B, ―the sum of the pips
does not exceed 4,‖ is the union of three disjoint events A2, A3, A4, consisting of the fact the
sum of the pips is equal to 2, 3, and 4, respectively. The probabilities of these events are
1/36, 2/36, and 3/36, respectively. According to the theorem of addition of probabilities,
probability P(B) is:
that is, the probability of the intersection of independent events is equal to the product of
the probabilities of these events. Formula (3) remains correct, if on both sides some of the
events are replaced by their inverses.
EXAMPLE:
Four shots are fired at a target, and the hit probability is 0.2 for each shot. The target hits
by different shots are assumed to be independent events. What is the probability of hitting
the target three times?
Each outcome of the trial can be designated by a sequence of four letters [for example, (s,
f, f, s) denotes that the first and fourth shots hit the target (success), and the second and
third miss (failure)]. There are 2 · 2 · 2 · 2 = 16 outcomes in all. In accordance with the
assumption of independence of the results of individual shots, one should use formula (3)
and the remarks about it to determine the probabilities of these outcomes. Thus, the
probability of the outcome (s, f, f, f) is set equal to 0.2 x 0.8 x 0.8 x 0.8 = 0.1024; here,
0.8 = 1 - 0.2 is the probability of a miss for a single shot. For the event ―three shots hit the
target,‖ the possible outcomes are: (s, s, s, f), (s, s, f, s), (s, f, s, s), and (f, s, s, s) are
favorable and the probability of each is the same:
0.2 · 0.2 · 0.2 · 0.8 = · · · = 0.8 · 0.2 · 0.2 ·.02 = 0.0064
Consequently, the desired probability is 4 x 0.0064 = 0.0256.
Generalizing the discussion of the given example, it is possible to derive one of the
fundamental formulas of probability theory: if events A1, A2, …, An are independent and
each has a probability p, then the probability of exactly m such events occurring is:
m
Pn(m) = Cn (1- p)n- m ....................................................................................................(4)
Here, Cm n denotes the number of combinations of n elements taken m at a time. For large n,
the calculation using formula (4) becomes difficult. In the preceding example, let the number
of shots equal 100; the problem then becomes one of finding the probability x that the
number of hits lies in the range from 8 to 32. The use of formula (4) and the addition theorem
gives an accurate, but not a practically useful, expression for the desired probability
The approximate value of the probability x can be found by the Laplace theorem
with the error not exceeding 0.0009. The obtained result demonstrates that the event 8 ≤ m
≤ 32 is practically certain. This is the simplest, but a typical, example of the use of the limit
theorems of probability theory.
According to the probabilities of (5), probabilities P(E) for all the outcomes of E of the
compound trial and, in addition, the probabilities of all events connected with this trial can
be determined using the multiplication theorem (just as was done in the example above).
Two types of compound trials are the most significant from a practical point of view:
(a) the component trials are independent, that is, the probabilities (5) are equal to the
unconditional probabilities P(Ai), P(Bj), …, P(Yl); and
(b) the results of only the directly preceding trial have any effect on the probabilities of
the outcomes of any trial—that is, the probabilities (5) are equal, respectively, to
P(Ai), P(Bj/Ai), … , P(Yl/Xk).
In this case, it is said that the trials are connected in a Markov chain. The probabilities of
all the events connected with the compound trial are completely determined here by the
initial probabilities P(Ai) and the transition probabilities P(Bj/Ai), … , P(Yl/Xk).
Often, instead of the complete specification of a probability distribution of a random
variable, it is preferable to use a small number of numerical characteristics. The most
frequently used are the mathematical expectation and the dispersion.
Let X1, X2, …, Xn, be independent random variables that have one and the same probability
distribution with EXK = a, DXK = ζ2 and Yn be the arithmetic mean of the first n variables
of sequence such that:
Yn = (X1 + X2 + X 2 + · · · +Xn)/n
In accordance with the law of large numbers, for any ε > 0, the probability of the inequality
| Yn - a | ≤ ε has the limit 1 as n → ∞, and thus Yn, as a rule, differs little from a.
The central limit theorem makes this result specific by demonstrating that the deviations
of Yn from a are approximately subordinate to a normal distribution with mean zero and
dispersion 82/n. Thus, to determine the probabilities of one or another deviation of Yn from
a for large n, there is no need to know all the details about the distribution of the variables
Xn; it is sufficient to know only their dispersion.
In the 1920‘s it was discovered that even in the scheme of a sequence of identically
distributed and independent random variables, limiting distributions that differ from the
normal can arise in a completely natural manner. Thus, for example, if X1 is the time until
the first reversion of some randomly varying system to the original state, and X2 is the time
between the first and second reversions, and so on, then under very general conditions the
distribution of the sum X1 + · · · + Xn (that is, of the time until the Aith reversion), after
multiplication by n-1/α(α is a constant less than 1), converges to some limiting distribution.
Thus, the time until the nth reversion increases, roughly speaking, as n1/α, that is, more
rapidly than n (in the case of applicability of the law of large numbers, it is of the order of
n).
The mechanism of the emergence of the majority of limiting regularities can be understood
ultimately only in connection with the theory of random processes.
Random processes.
In a number of physical and chemical investigations of recent decades, the need has arisen
to consider, in addition to one-dimensional and multidimensional random variables,
random processes—that is, processes for which the probability of one or another of their
courses is defined. In probability theory, a random process is usually considered as a one-
parameter family of random variables X(t). In an overwhelming number of applications,
the parameter t represents time, but this parameter can be, for example, a point in space,
and then we usually speak of a random function. In the case when the parameter t runs
through the integer-valued numbers, the random function is called a random sequence.
Just as a random variable is characterized by a distribution law, a random process can be
characterized by a set of joint distribution laws for X(t1), X(t2), …, X(tn) for all possible
moments of t1, t2, …, tn for any n > 0.
When the random variable takes values in the set of real numbers, the probability
distribution is completely described by the cumulative distribution function, whose value at
each real x is the probability that the random variable is smaller than or equal to x.
The concept of the probability distribution and the random variables which they describe
underlies the mathematical discipline of probability theory, and the science of statistics.
There is spread or variability in almost any value that can be measured in a population (e.g.
height of people, durability of a metal, sales growth, traffic flow, etc.); almost all
measurements are made with some intrinsic error; also in physics many processes are
described probabilistically, from the kinetic properties of gases to the quantum mechanical
description of fundamental particles. For these and many other reasons, simple numbers
are often inadequate for describing a quantity, while probability distributions are often
more appropriate.
measure of singletons .
Another convention reserves the term continuous probability distribution for absolutely
continuous distributions. These distributions can be characterized by a probability density
function: a non-negative Lebesgue integrable function ƒ defined on the real numbers such
that
Discrete distributions and some continuous distributions do not admit such a density.
Terminologies
The support of a distribution is the smallest closed interval/set whose complement has
probability zero. It may be understood as the points or elements that are actual members of
the distribution.
Some properties
The probability density function of the sum of two independent random variables is
the convolution of each of their density functions.
The probability density function of the difference of two independent random
variables is the cross-correlation of their density functions.
Probability distributions are not a vector space – they are not closed under linear
combinations, as these do not preserve non-negativity or total integral 1 – but they
are closed under convex combination, thus forming a convex subset of the space of
functions (or measures).
In mathematics and, in particular, functional analysis, convolution is a mathematical
operation on two functions f and g, producing a third function that is typically viewed as a
modified version of one of the original functions. Convolution is similar to cross-
correlation. It has applications that include statistics, computer vision, image and signal
processing, electrical engineering, and differential equations
3.9.1 Related to real-valued quantities that grow linearly (e.g. errors, offsets)
Normal distribution (aka Gaussian distribution), for a single such quantity; the most
common continuous distribution;
Multivariate normal distribution (aka multivariate Gaussian distribution), for
vectors of correlated outcomes that are individually Gaussian-distributed;
3.9.6 Related to categorical outcomes (events with K possible outcomes, with a given
probability for each outcome)
Categorical distribution, for a single categorical outcome (e.g. yes/no/maybe in a
survey); a generalization of the Bernoulli distribution;
Multinomial distribution, for the number of each type of categorical outcome, given a
fixed number of total outcomes; a generalization of the binomial distribution;
Multivariate hyper geometric distribution, similar to the multinomial distribution, but
using sampling without replacement; a generalization of the hyper geometric
distribution;
3.9.7 Related to events in a Poisson process (events that occur independently with a
given rate)
Poisson distribution, for the number of occurrences of a Poisson-type event in a given
period of time
Exponential distribution, for the time before the next Poisson-type event occurs
5.0 Conclusion
The basis of simulation is randomness. Here we have discussed this fundamental basis
which offers us the possibility to quantitatively represent uncertainties in simulations.
With Probabilities in simulation we can explicitly represent uncertainties by specifying
inputs as probability distributions.
6.0 Summary
In this unit we discussed the following:
Defined Probability as
Discussed the fundamental concepts of probability theory
The limit theorem
Random variables and Random processes
Probability distributions
Provided a listing of common probability distributions grouped by their related
processes
Contents
1.0 Introduction
2.0 Intended Learning Outcomes (ILOs)
3.0 Main Content
3.1 Basic Modelling Concepts
3.2 Visual and Conceptual models
3.3 Features of Visual and Conceptual Model
3.4 Cognitive Affordances of Visual Models
4.0 Self-Assessment Exercise(s)
5.0 Conclusion
6.0 Summary
7.0 Further Readings
1.0 Introduction
Modelling is an essential and inseparable part of all scientific activity, and many scientific
disciplines have their own ideas about specific types of modelling. There is little general
theory about scientific modelling, offered by the philosophy of science, systems theory,
and new fields like knowledge visualization.
We create models for representation of the objects within a system together with the rules
that govern the interactions of the objects. The representation may be concrete as in the
case of the spaceship or flight simulators or abstract as in the case of the computer program
that examines the number of checkout stations in service queue.
For the scientist, a model is also a way in which the human thought processes can be
amplified. For instance, models that are rendered in software allow scientists to leverage
computational power to simulate, visualize, manipulate and gain intuition about the entity,
phenomenon or process being represented.
We can however define visual models by what they strive to do, and list some of the
important characteristics that distinguish 'visual models' from other kinds of graphic art.
Visual representation of data depends fundamentally on an appropriate visual scheme for
mapping numbers into graphic patterns (Berlin 1983). One reason for the widespread use
of graphical methods for quantitative data is the availability of a natural visual mapping:
magnitude can be represented by length, as in a bar chart, or by position along a scale, as in
dot charts and scatter plots. One reason for the relative paucity of graphical methods for
categorical data may be that a natural visual mapping for frequency data is not so apparent.
Conceptual model helps you interpret what is shown in a drawing or graph. A good
conceptual model for a graphical display will have deeper connections with underlying
statistical ideas as well.
For quantitative data, position along a scale can be related to mechanical models in which
fitting data by least squares or least absolute deviations correspond directly to balancing
forces or minimizing potential energy (Farebrother 1987).
The mechanical model for least squares regression, for example, likens each observation to
a unit mass connected vertically to a rod by springs of unit modulus. Sall (1991a) shows
how this mechanical model neatly describes the effects of sample size on power of a test,
the leverage of outlying observations in regression, principal components, and collinearity
among others.
Conceptual Modelling
• Is used for abstract (visual) representation of the problem domain
• It serves to enhance understanding of complex problem domains.
• It provides a basis for communication among project team members
3.3 Features of Visual and Conceptual Model
A visual model should:
Render conceptual knowledge as opposed to quantitative data (information
visualization) or physical things (technical illustration). We usually express
conceptual knowledge with words alone, and yet the meaning behind those words
is often inherently visual. Visual models seek to render directly the image-
schematic (meaning that lies behind our words).
Be good models - the images should accurately reflect the situation in the world
and embody the characteristics of a useful model.
Integrate the most salient aspects of the problem into a clear and coherent picture.
Fit the visual structure to the problem – and not force the problem into a
predefined visual structure.
Use a consistent visual grammar.
Should be visually and cognitively tractable. Visual models exist to support robust
qualitative thinking: they're software for 'human-simulation' (as opposed to
computer-simulation) of the issue at hand. To serve as effective 'simulation
software', visual models must be 'readable' and 'run able' by our visio-cognitive
'hardware' and should positively engage our prodigious visual intelligence.
Tap into the power of elegant design. In other words, they shouldn't be ugly
Conceptual Modelling
A good conceptual model should NOT reflect a solution bias.
Should model the problem domain, not the solution domain.
Initial conceptual model may be rough and general.
May be refined during incremental development.
3.4 Cognitive Affordances of Visual Models
Due to the limited capacity of our working memory, 7 ± 2 ‗chunks‘ of information, we
cannot hold in our minds concepts, arguments, or problems that consist of more than 5 to 9
objects or relationships. While this cognitive limitation severely restricts our ability to
think about complex things, we can do what we often do: extend our intellectual abilities
with external representations or 'models' of the problem.
The particular affordances diagrams – their ability to simultaneously show many objects
and relationships – make them an ideal tool for thinking about conceptually-complex
problems. Diagrams provide an external mnemonic aid that enables us to see complicated
relationships and easily move between various mind-sized groupings of things.
5.0 Conclusion
The essence of constructing a model is to identify a small subset of characteristics or
features that are sufficient to describe the behaviour of the system under investigation.
Since a model is an abstraction of a real system and not the system itself, there is therefore,
a fine line between having too few characteristics to accurately describe the behaviour of
the system and more than you need to accurately describe the system. The goal should be
to build the simplest model that effectively describes the relevant behaviour of the system.
6.0 Summary
We defined modelling as the process of generating abstract, conceptual, graphical
and/or mathematical models. Science offers a growing collection of methods, techniques and
theory about all kinds of specialized scientific modelling.
We Listed and briefly explained some basic modelling concepts
Differentiating between Visual and Conceptual models
we discussed the important factors in evaluating a model to include:
o Ability to explain past observations
o Ability to predict future observations
o Cost of use, especially in combination with other models
o Refutability, enabling estimation of the degree of confidence in the model
o Simplicity, or even aesthetic appeal
We discussed the features of a good visual model which include:
o Ability to render conceptual knowledge as opposed to quantitative data
(information visualization) or physical things (technical illustration),
o the images should accurately reflect the situation in the world,
o the model should Integrate the most salient aspects of the problem into a clear
and coherent picture,
o Fit the visual structure to the problem,
o It should Use a consistent visual grammar,
o Should be visually and cognitively tractable.
We also stated the Characteristics of Conceptual models