Chapter 2
Chapter 2
Introduction to
Spreadsheet Modeling
This Chapter
2
This Lecture
3
Example A
4
Note:
– Switching between relative and absolute references: F4 key
5
Example B
– IF()
(1) Ignoring investment returns, how much can John spend each year?
(2) John thinks his investment portfolio can yield 10% return per annum. How
much can he spend each year?
(3) How much he can spend if he wants it to increase in the inflation rate which
is expected to be 5% in average?
(Assume that money to be spent in a year is withdrawn at the beginning of the year.)
– Goal seek
7
Exercises
Chapter 2:
- 23, 38
8
This Lecture
9
Example D: Tax calculation for
salary income in HK (2018-2019)
10
Hong Kong’s Salary Tax calculation:
11
Creating Good Excel Model
for Decision Making
12
A typical mathematical model for
decision making
Input, Decision variable, Output
Purposes:
– To find the values of decision variables that minimize or
maximize a particular output / objective function (under some
conditions / constraints) Optimal Solutions
14
Good Spreadsheet Model?
15
Example 2.1
Randy’s is a NCAA t-shirt vendor. The fixed cost of any
order is $750, the variable ordering cost is $8 per shirt.
Randy’s selling price is $18 per shirt during the
tournament. After the tournament it will drop to $6 apiece
with which all left over will be sold.
He wants to build a spreadsheet model that will let him
experiment with the uncertain demand during the
tournament and his order quantity.
16
Ex. 2.1 (cont’d) – Influence Diagram
Normal price Demand at
normal price
Units sold at
Revenue from selling normal price
at normal price Order Quantity
Fixed Cost
Cost
19
Ex. 2.1 (cont’d) - Building a Model
Base Model:
Demand 1500
Order 1450
Profit 13750
Demand 1500
Order 1450
Profit
21
Exercises
Chapter 2:
- 20, 22
22
This Lecture
Example – Finding break-even point:
– Summary what we learnt
Future production cost projection
– Multiple period model
– Relative/absolute reference
– Creating scatter chart
Mortgage calculation
– Functions for mortgage calculation
– Two way table
23
Example 2.2:
The Great Threads Co. sells special designed sweaters. It is
planning to print a catalog and undertake a direct mail campaign.
The cost of printing is $20,000 plus $0.10 per catalog. The cost
of mailing each catalog is $0.15.
The average size of a customer order is $40, and the company’s
variable cost per order averages at $32.
The company plans to mail 100,000 catalogs.
Mail campaign
24
Questions
The company wants to develop a spreadsheet model
to answer the following questions:
25
Ex. 2.2 (cont’d) – Influence Diagram
# of catalog mailed
# of orders
Profit
# of orders
27
Example 2.3 – Cost Projections
Kitchel produces two kinds of bookshelves,
Cherry and Oak. Wood prices and labor costs are
likely to increase in the future, and Kitchel likes to
project its costs of manufacturing the bookshelves
into the future.
28
Example (continue)
29
Ex. 2.3 (cont’d) - Planning the Model
Calculate the cost:
1. Project the unit costs for wood and labor into the future.
3. Add the wood and labor costs to obtain the total cost of a
bookshelf.
30
Ex. 2.3 (cont’d) – Developing the Model
Develop the model with the following steps.
– Inputs: Enter the inputs into the upper left corner of a worksheet.
These can be referred to later with Excel formulas.
• You should design your spreadsheet so that you can enter a single
formula and then copy it whenever possible.
31
Ex. 2.3 (cont’d) – The Model
32
Developing the Model -- continued
6. Chart: Highlight the ranges A19:A25 and E19:F25, and insert Chart …
The model can be used to answer any what-if questions Woodworks might want to ask.
33
Example E
Mortgage calculation
– For a given loan (principle, loan period and interest rate), calculate the
monthly installment;
35
Example F: Return a value from a table
• Approximate match (1 or true or omit): match value may or may not be found
in the leftmost column
– If match value is not found, use the largest smaller value instead
36
Example 2.4 Ordering decision with
quantity discount
Sam’s Bookstore, with many locations, orders the latest books
and then distributes them to individual stores.
It plans to order a new hardback novel, which it will sell for $30. It
can purchase any number of this book from the publisher, but due
to quantity discounts, the unit cost for all books it orders depends
on the number ordered.
Sam’s is very uncertain about the demand for this book –- it
estimates that demand could be any where from 500 to 4500.
37
Background Information
Quantity discount:
– For less than 1000 copies, the unit cost is $24
– For at least 1000 copies the price is $23
– For at least 2000 copies the price is $22.25
– For at least 3000 copies the price is $21.75
– For at least 4000 copies the price is $21.30
Leftover copies will be put on sale for $10, at which price all leftovers will
be sold.
How many copies of this hardback novel should Sam’s order from the
publisher? (Assume the demand has the distribution below:)
38
What to do
1. Develop a model to calculate Sam’s profit f(q,d) for any given
order quantity (q) and any given possible demand (d).
39
Building the Model
Revenues: total income from selling the products;
40
Answering the Question
Use a two-way data table to show how profit depends on order
quantity and demand.
Optimal order quantity?
– Sam’s has complete control over the order quantity, but has no direct
control over demand.
– The ordering decision depends not just on which demands are possible,
but on which demands are likely to occur.
– Sam needs to estimate these probabilities, possibly on the basis of other
similar novels it has sold in the past.
41
Answering the Question
Use these probabilities to find an expected profit for each order
quantity;
42
Exercises
Chapter 2: # 5 and 7
43
What to be covered in this lecture:
Find best-fitting curse
Use data table to find optimal solution
Conditional format
Index(), Match()
44
Example 2.5 Estimating the
Relationship between Price and Demand
The Links Company sells its
golf clubs at golf outlet
stores.
The company knows that
demand for its clubs varies
considerably with price.
45
Questions
Estimate the relationship between demand and price and then use the estimated relationship to answer the following questions:
a) Assuming the unit cost of producing a set of clubs is $250 and the price must be a multiple of $10, what price should Links charge to
maximize its profit?
b) How does the optimal price depend on the unit cost of producing a set of clubs?
46
Estimating the Relationship
The first part of this example is estimating the relationship
between price and demand.
A scatterplot of demand versus price:
47
Curve Fitting
We can superimpose several curves onto the scatterplot.
We will consider the linear, power and exponential curves,
where y and x correspond to demand and price:
– Linear: y = a+bx
– Power: y = axb
– Exponential: y = aebx
If we choose a curve type, then Excel will choose the best fitting
parameters for a curve of that type.
48
Chart/Add Trendline
After creating the chart, select the Chart, “+” to bring up
a dialog box to add trend line based on the R-square
value.
49
Best-Fitting Straight Line
140
130
120
110
100
Dem and
90 y = -0.3546x + 211.31
80
70
60
50
40
280 320 360 400 440 480 520
Price
To see the equation, click the options tab of the dialog box and
check Display Equation on Chart.
50
Best-Fitting Power Curve
140
130
120
110
100
Demand
y = 6E+06x -1.9082
90
80
70
60
50
40
280 320 360 400 440 480 520
Price
51
Best-Fitting Exponential Curve
140
130
120
110
100
Dem and
90 y = 466.51e-0.0049x
80
70
60
50
40
280 320 360 400 440 480 520
Price
52
The Profit Model
We use the best-fitting power curve y = axb
53
The Profit Model
a) Optimal price when unit cost is $250:
Create a two-way data table to see how profit depends on price and
unit cost
For each unit cost, what is the maximum profit and related optimal
price
54
Flaws of the Model
A possible flaw is the implicit assumption that price is the only
factor that influences demand.
Another flaw in our model is that demand might not equal sales.
– For example, if the actual demand for golf clubs during a month is
150 but the company’s inventory is only 130, the company would
observe sales of only 130.
– This would cause us to underestimate actual demand, and our
curve fitting method would produce biased predictions.
55
Exercises for Chapter 2
Problems
- 5, 7, 20, 21, 22, 23, 28, 37, 38
56