0% found this document useful (0 votes)
49 views56 pages

Chapter 2

Uploaded by

Chan Hin Chun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views56 pages

Chapter 2

Uploaded by

Chan Hin Chun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 56

Chapter 2

Introduction to
Spreadsheet Modeling
This Chapter

 Introduces some very useful Excel features /


functions / tools
 Illustrates some interesting and relatively
simple models
 Demonstrates typical Excel modeling approach

2
This Lecture

 Introduces some very useful Excel features / functions / tools

 Illustrates some interesting and relatively simple Excel


applications

3
Example A

 How to input formulas effectively using relative vs. absolute cell


reference in Excel
– (a) Calculate the expense for purchasing fruits

– (b) Creating a Multiplication Table

4
 Note:
– Switching between relative and absolute references: F4 key

– Switching between display formula and results: “CTRL+` (grave accent)”


key

– Return value in given row and column of a table: Index( ) function

5
Example B

 Select a name from a table randomly

– IF()

– Generating random number

– Use Insert function

Note: F9 key for regenerating random numbers. 6


Example C
 Making a financial plan for retirement:
John Lau, now 60, has accumulated a retirement fund of $6,000,000. John
hopes the money will last at least 30 years. He is not planning to leave
anything behind.

(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

 Example D: Tax calculation


– One Way Data Table, Sumproduct function

 How to create good spreadsheet model


– Using Range Name

9
Example D: Tax calculation for
salary income in HK (2018-2019)

 Compute the tax amount for a given income levels


 Create a table for the tax amounts for various income
levels
– Sumproduct function

– (One-way) Data table

10
Hong Kong’s Salary Tax calculation:

Pay the less one of the following two numbers:

1.Based on standard rate: 15% of total salary income;

2.Based on progressive rates for Net Chargeable Income


(= Total Salary Income - Deductions of allowances)
• Basic allowance for single person: $132,000

• Married person’s allowance: $264,000

• Allowance for each child: $120,000

Hong Kong Salary Tax

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

– To see how one or more outputs change as selected inputs or


decision variables change  Sensitivity Analysis
13
Spreadsheet modeling
 The process of entering the inputs, and decision
variables into spreadsheet;
 Relating them appropriately, by means of formulas, to
obtained the outputs.
 Performing various works.

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

Revenue Discount price


Revenue from selling Demand at
at discount price Units sold at normal price
discount price
Profit Order Quantity

Fixed Cost
Cost

Unit variable cost


Variable Cost
Order Quantity 17
18
Building a Readable Model
 A clear, logical layout to the overall model
 Separation of different parts
 Clear headings for different sections and for all inputs,
decision variables and outputs
 Use of range names
 Use of boldface, italics, larger font size, coloring,
indentation, and other formatting features
 Use of cell comments and text boxes for explanations

19
Ex. 2.1 (cont’d) - Building a Model
 Base Model:

NCAA t-shirt sales

Demand 1500
Order 1450

Profit 13750

 This model is entirely correct, but it is not very readable


or flexible.
20
Ex. 2.1 (cont’d) - Building a Model
 A better model: list the input parameters;

 A more readable model: use range names;


 A more clear model: separate different parts, using comments, boldface titles, coloring etc.

NCAA t-shirt sales

Fixed order cost 750


Variable cost 8
Selling price 18
Discount price 6

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:

1) How does a change in the response rate affect profit?

2) For what response rate does a company break even?

3) If the company estimates a response rate of 3%, should it


proceed with the mailing?

25
Ex. 2.2 (cont’d) – Influence Diagram
# of catalog mailed
# of orders

Revenue Response rate

Sale per order

Profit

Fixed Cost for printing and mailing


Cost

# of orders

Variable Cost for ordering

Cost per order


26
Answering the Questions
1) use a data table to show how profit varies with the response
rate.

2) Goal seek for breakeven point

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.

Resource Cherry Oak Labor


Required per bookshelf 30 30 16
Current unit cost $5.50 $4.30 $18.50
Anticipated annual cost increase 2.4% 1.7% 1.5%

28
Example (continue)

 Build a spreadsheet model that allows Kitchel to


experiment with the growth rates in wood and labor
costs so that a manager can see, both numerically
and graphically, how the costs of the bookshelves will
vary in the next six years.

29
Ex. 2.3 (cont’d) - Planning the Model
Calculate the cost:

1. Project the unit costs for wood and labor into the future.

2. For any year, multiply the unit costs by the required


numbers of board-feet and labor hours per bookshelf.

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.

– Projected unit costs of wood and labor:


• It is important to have a strategy in mind before you enter the
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;

– Create a table for various loans;

– Compute the interest payment and principle payment each month

– PMT, IPMT, PPMT functions

– Two way data table


34
This lecture:
 Inventory plan problem
– Vlookup function

– Problem with uncertainty

35
Example F: Return a value from a table

 In given row and column of a table: Index( ) function


 Based on another information: vlookup( ) or hlookup( ) functions
– Range lookup (Match type)
• Exact match (0 or false): match value could be found in the leftmost column

• 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

– The leftmost column should be in ascending order!

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).

2. Perform a sensitivity analysis to see how profit depends on these


two quantities. (Use two-way table.): f(qi,dj) for different i and j.

3. Expected profit for order quantity qi: E[f(qi,D)]

4. Compare E[f(qi,D)] to decide the best qi.

39
Building the Model
 Revenues: total income from selling the products;

 Total ordering cost. Depending on order quantity. Use vlookup


function to input the unit cost for each given order quantity

 Profit. Calculate the profit with the formula =Revenue-Cost

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;

 Optimal order quantity corresponds to the largest expected


profit: the largest of the expected profits, $12,250, corresponds
to an order quantity of 2000.

 Does this guarantee that Sam’s will make a profit of $12,250 ?

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?

c) Is the model an accurate representation of reality?

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

with a = 5,871,064 and b = -1.908 to predict demand from price.

 Profit = Demand *(Price – Cost)= axb(x-250)

53
The Profit Model
a) Optimal price when unit cost is $250:

Create an one-way data table to see how profit depends on price 


optimal price

b) How optimal price depends on unit cost:

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.

 Most models are not perfect, but we have to start somewhere!

55
Exercises for Chapter 2

 Problems
- 5, 7, 20, 21, 22, 23, 28, 37, 38

 Exercise with all in-class examples.


 Make sure you understand everything in the “Summary of Key
Excel terms” on page 60-61
 Read the Appendix on Page 64-65: Tips for editing and
documenting Spreadsheet

56

You might also like