Professional Documents
Culture Documents
Instructor:
Associate Professor Guo Zhiling
School of Information Systems
zhilingguo@smu.edu.sg
Review:
Solver for optimization
Decisions
Objectives
Constraints
Lookup functions
Vlookup
Lookup
Index and Match
2.
3.
Solver Definition
Decision variables = new price table
Constraints
Drop projected revenue for big customers as a group as
much as 9%
(Revenue before Revenue after)/ Revenue before >= 9%
Solver Constraints
>=
3
>=
1
Agenda Today
Excel Functions for Simulation
RAND(), RANDBETWEEN(bottom, top)
Simulating Data
From frequency bins
By re-sampling discrete/continuous data
SMALL(), PERCENTILE()
Exercises
MonteHall.xls
DataSim.xls
You pick a door, and the host, who knows what's behind
the other doors, opens another door which is empty.
He then asks you whether you would stay with your initial selection or
you would switch to the other remaining door?'
Question: Should you switch?
Random: Half of the time Stay and half of the time Switch
Prize
Door
RB(2,3)
If(RAND()>0.5,1,3)
RB(1,2)
RB = randbetween()
2
1
1
RB = randbetween()
Probability of Winning
If prize is at door 2, we can have 3 possible scenarios
where the contestant can choose one of the 3 possible
doors.
We try to determine the probability of winning if the
contestant change door
Either door 1 or 3
can be opened
3
Open
Open
Open
Simulating Data
1. Cumulative Relative Frequency (CRF) Table
2. Re-sampling
3. Inverse Distribution
Continuous Data
PERCENTILE(array, RAND())
Method 2: Resampling
Resampling discrete data
Use Randbetween(1,N) to generate a position number k.
This number is used to return the kth value in the raw
data collection as if the raw data is already sorted in
ascending order.
X=SMALL(array,k)
X=SMALL(raw data, RNADBETWEEN(1,N))
This ensures that higher frequency results occur more
likely than the lower frequency results.
Randbetween
(1,10)
Number
Frequency
10
Method 2: Resampling
Resampling continuous data
Use Rand() to generate a random number between 0
and 1, to represent the percentile value k.
This percentile value k is used to return the
corresponding percentile number in the raw data
collection.
X=PERCENTILE(array,k)
X=PERCENTILE(raw data, RNAD())
PERCENTILE() sorts and interpolates among the raw
data using the number returned by RAND().
The newly generated data X may be DIFFERENT from
the raw data due to interpolation.
Reminders
Review todays class exercises
Project team to arrange to meet instructor to get
in-principle approval for their project before the
end of week 7
Preparation for Next Week
Chapter 7: Processes and Time
EX57: TimerCliker.xls
Ex58: XDBbank.xls