Unit 5
Spreadsheet modelling and Analysis
BUSINESS ANALYTICS
B.Tech(CSE) IV Year - I Semester
Open Elective - III
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering, Andhra University
1
Unit 5
Spreadsheet modelling and Analysis
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering,
Andhra University 2
Strategies for predictive decision modelling
• Building decision models is more of an art than a science.
• Creating good decision models requires a solid understanding of basic
business principles in all functional areas, such as accounting,
finance, marketing, and operations, business practice and research
knowledge, and logical skills.
• Models often evolve from simple to complex and from deterministic to
stochastic, so it is generally best to start simple and enrich models as
necessary.
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering,
Andhra University 3
simple and enrich models
There are two basic simple and enriched models.
1. Building Models Using Simple Mathematics
2. Building Models Using Influence Diagrams
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering,
4
Andhra University
1. Building Models Using Simple Mathematics
Sometimes a simple “back-of-the-envelope” calculation can help managers make better
decisions and lead to the development of useful models. For example, The Economic Value
of a Customer is calculated as:
Few companies take the time to estimate the value of a good customer (and often spend
little effort to keep one).
• Suppose that a customer at a restaurant spends, on average, Rs.50 per visit and comes
six times each year.
• Assuming that the restaurant realizes a 40% margin on the average bill for food and
drinks, then their gross profit would be (50)X(6)X(.40) =120.
• If 30% of customers do not return each year, then the average lifetime of a customer is
1/0.3= 3.33 years.
• Therefore, the average non-discounted gross profit during a customer’s lifetime is
120X(3.33) =400
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering,
5
Andhra University
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering, Andhra University
6
2.Building Models Using Influence Diagrams
• Although it can be easy to develop a simple mathematics model, most model development requires a more
formal approach. Influence diagrams are a logical and visual representation of key model relationships,
which can be used as a basis for developing a mathematical decision model.
Prof. S.Adinarayana, Dept of CS&SE, AU
College of Engineering, Andhra University 7
Developing a Decision Model Using an Influence Diagram
• We will develop a decision model for predicting profit in the face of uncertain future demand.
• To help develop the model, we use the influence-diagram approach.
• We all know that profit revenue cost. Using a little “Business 101” logic, revenue depends on the unit price and the
quantity sold, and cost depends on the unit cost, quantity produced, and fixed production costs.
•
• However, if demand is uncertain, then the amount produced may be less than or greater than the actual demand. Thus,
the quantity sold depends on both the demand and the quantity produced. Putting these facts together, we can build
the influence diagrams
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 8
• The next step is to translate the influence diagram into a more formal model.
Define P as profit, R as revenue, C as cost, p as unit price, c as unit cost, F as fixed cost.
• S as quantity sold, Q as quantity produced and D as demand.
• Now cost C is calculated as C =F+(c*Q)
• Now revenue R is calculated as R=p*S // Revenue=unitprice*quantity produced
• quantity sold S= min{D, Q} // quantity sold= min{ Demand, Quantity produced}
• Now profit P= R-C // Profit= Revenue- Cost
• P ➔ p*min{D,Q} –(F+(c*Q))
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
9
Andhra University
Implementing models on spreadsheets
• Good spreadsheet analytic applications should also be user-friendly; that is, it
should be easy to input or change data and see key results, particularly for users
who may not be as proficient in using spreadsheets.
• Good design reduces the potential for errors and misinterpretation of information,
leading to more insightful decisions and better results.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 10
• The input data consists of the costs associated with manufacturing the product in-house or purchasing it from an outside
supplier and the production volume.
• The model calculates the total cost for manufacturing and outsourcing. The key outputs in the model are the difference
in these costs and the decision that results in the lowest cost.
• The data are separated from the model component of the spreadsheet.
• Observe how the IF function is used in cell B20 to identify the best decision. If the cost difference is negative or zero,
then the function returns “Manufacture” as the best decision; otherwise, it returns “Outsource.”
• Also observe the correspondence between the spreadsheet formulas and the mathematical model.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, 11
Andhra University
• Because decision models characterize the relationships between inputs and outputs, it
is useful to separate the data, model calculations, and model outputs clearly in
designing a spreadsheet.
• It is particularly important not to use input data in model formulas, but to reference
the spreadsheet cells that contain the data.
• In this way, if the data changes or you want to experiment with the model, you need
not change any of the formulas, which can easily result in errors.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
12
Andhra University
Spreadsheet applications in Business Analytics
• A wide variety of practical problems in business analytics can be modeled using spreadsheets.
• One thing to note is that a useful spreadsheet model need not be complex; often, simple models can
provide managers with the information they need to make good decisions.
Example: A Predictive Model for Staffing
• Staffing is an area of any business where making changes can be expensive and time-consuming.
Thus, it is quite important to understand staffing requirements well in advance.
• In many cases, the time to hire and train new employees can be 90 to 180 days, so it is not always
possible to react quickly to staffing needs.
• Hence, advance planning is vital so that managers can make good decisions about overtime or
reductions in work hours, or adding or reducing temporary or permanent staff.
• Planning for staffing requirements is an area where analytics can be of tremendous benefit.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 13
Example: A Predictive Model for Staffing continue…..
• Suppose that the manager of a loan-processing department wants to know how many employees will
be needed over the next several months to process a certain number of loan files per month so she can
better plan capacity.
• Let’s also suppose that there are different types of products that require processing. A product could be
a 30-year fixed-rate mortgage, A 7/1 ARM (Adjustable-Rate Mortgage), a Federal Housing
Administration (FHA) Loan, or a construction loan. Each of these loan types varies in their complexity and
requires different levels of documentation and, consequently, has different times to complete.
• Assume that the manager forecasts 700 loan applications in May, 750 in June, 800 in July, and 825 in
August.
• Each employee works productively for 6.5 hours each day, and there are 22 working days in May, 20 in
June, 22 in July, and 22 in August.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 14
• The manager also knows, based on historical loan data, the percentage of each product type and how long it takes
to process one loan of each type.
• These data are presented next:
• The manager would like to predict the number of full-time emplyees(FTE) needed each month to
ensure that all loans can be processed.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University
15
• The figure shows a simple predictive
model on a spreadsheet to calculate the
full-time emplyees(FTE) required.
• For each month, we take the desired
throughput and convert this to the
number of files for each product based
on the product mix percentages.
• By multiplying by the hours per file, we
then calculate the number of hours
required for each product.
• Finally, we divide the total number of
hours required each month by the
number of working hours each month
(hours worked per day * days in the For example May month
FTEs require= Total number of hours/ number of working hours
month).
= 2089.50/(6.5*22)
• This yields the number of full-time =2089.50/143
emplyees(FTE) required. =14.61
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University
16
• Files/month and Hours required calculation
0.22x700=154
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 17
Model assumptions, complexity, and realism
• Models cannot capture every detail of the real problem, and managers must understand the limitations of
models and their underlying assumptions.
• Validity refers to how well a model represents reality. One approach for judging the validity of a model is
to identify and examine the assumptions made in a model to see how they agree with our perception of
the real world; the closer the agreement, the higher the validity.
• Another approach is to compare model results to observed results; the closer the agreement, the more
valid the model.
• A “perfect” model corresponds to the real world in every respect; unfortunately, no such model has ever
existed and never will exist in the future, because it is impossible to include every detail of real life in one
model.
• To add more realism to a model generally requires more complexity and analysts have to know how to
balance these.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 18
Developing user-friendly applications
• Using business analytics requires good communication between analysts and the clients or
managers who use the tools. In many cases, users may not be as familiar with Excel.
• Thus, developing user-friendly spreadsheets is vital to gaining acceptance of the tools and making
them useful. Some of the useful tools in Excel for user-friendly applications:
1. Data validation-To define acceptable input values in a spreadsheet, and provide an error alert if
an invalid entry is made.
2. Use cell and range names to simplify formulas and make them more user-friendly.
3. Form Controls- are buttons, boxes, and other mechanisms for inputting or changing data on
spreadsheets easily that can be used to design user-friendly spreadsheets. Form control includes:
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 19
.
Outsourcing Decision Model Spreadsheet with Form
Data Validation Dialog
Controls
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 20
Format Control Dialog
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 21
Analyzing uncertainty and model assumptions
• Because predictive analytical models are based on assumptions about the
future and incorporate variables that most likely will not be known with certainty,
it is usually important to investigate how these assumptions and uncertainty
affect the model outputs.
• This is one of the most important and valuable activities for using predictive
models to gain insights and make good decisions. There are 4 investigating
models for analyzing uncertainty.
1. What-If analysis. 2. Data Tables 3. Scenario Manager 4.Goal Seek and
5. Tornado Charts
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 22
1. What-If analysis
• Spreadsheet models allow you to easily evaluate what-if questions—how specific
combinations of inputs that reflect key assumptions will affect model outputs.
• What-if analysis is as easy as changing values in a spreadsheet and recalculating the
outputs.
• However, systematic approaches make this process easier and more useful.
• In Example ,developed a profit model and suggested how a manager might use the
model to change inputs and evaluate different scenarios.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 23
• We stated that demand is uncertain. A manager might be interested in the following question: For any
fixed quantity produced, how will profit change as demand changes?
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University
24
• Created a table for varying levels of demand and computed the profit.
• This shows that a loss is incurred for low levels of demand, whereas profit is limited to
$240,000 whenever the demand exceeds the quantity produced, no matter how high
it is.
• Notice that the formula refers to cells in the model; thus, the user could change the
quantity produced or any of the other model inputs and still have a correct evaluation
of the profit for these values of demand.
• One of the advantages of evaluating what-if questions for a range of values rather
than one at a time is the ability to visualize the results in a chart, as shown in Figure.
• This clearly shows that profit increases as demand increases until it hits the value of
the quantity produced.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 25
2. Data Tables
• Data tables summarize the impact of one or two inputs on a specified output.
• Excel allows you to construct two types of data tables.
1. A one-way data table evaluates an output variable over a range of values for a
single input variable.
2. Two-way data tables evaluate an output variable over a range of values for two
different input variables.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 26
create a one-way data table
• To create a one-way data table, first create a range of values for some input cells in your model that you wish to vary.
The input values must be listed either down a column (column-oriented) or across a row (row-oriented).
• If the input values are column-oriented, enter the cell reference for the output variable in your model that you wish to
evaluate in the row above the first value and one cell to the right of the column of input values.
• If the input values are listed across a row, enter the cell reference of the output variable in the column to the left of
the first value and one cell below the row of values. Type any additional output cell references below the first one.
Next, select the range of cells that contains both the formulas and values you want to substitute.
• From the Data tab in Excel, select Data Table under the What-If Analysis menu.
• if the input range is column oriented, type the cell reference for the input cell in your model in the Column input cell
box. If the input range is row oriented, type the cell reference for the input cell in the Row input cell box.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University
27
Example: a One-Way Data Table for Uncertain Demand
Create a one-way data table for profit for
varying levels of demand.
1. First, create a column of demand values in
column E. Then in cell F3, enter the formula
C22.
2. This simply references the output of the
profit model. Highlight the range E3:F11
(note that this range includes both the
column of demand as well as the cell
reference to profit), and select Data Table
from the What-If Analysis menu.
3. In the Column input cell field, enter B8; this
tells the tool that the values in column E are
different values of demand in the model.
When you click OK, the tool produces the
results (which we formatted as currency)
shown in Figure.
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering, Andhra University 28
3. Scenario Manager
• The Excel Scenario Manager tool allows you to create scenarios—sets of values that are saved and can be
substituted automatically on your worksheet.
• Scenarios are useful for conducting what-if analyses when you have more than two output variables.
• The Excel Scenario Manager is found under the What-If Analysis menu in the Data Tools group on the Data tab.
When the tool is started, click the Add button to open the Add Scenario dialog and define a scenario
• Enter the name of the scenario in the Scenario name box. In the Changing cells box, enter the references,
separated by commas, for the cells in your model that you want to include in the scenario (or hold down the Ctrl
key and click on the cells).
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 29
• In the Scenario Values dialog that appears next, enter values for each of the changing cells.
• If you have put these into your spreadsheet, you can simply reference them.
• After all scenarios are added, they can be selected by clicking on the name of the scenario and then the Show
button.
• Excel will change all values of the cells in your spreadsheet to correspond to those defined by the scenario for you to
see the results within the model.
• When you click the Summary button on the Scenario Manager dialog, you will be prompted to enter the result cells
and choose either a summary or a PivotTable report. The Scenario Manager can handle up to 32 variables.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University 30
4. Goal Seek
• If you know the result that you want from a formula but are not sure what input value
the formula needs to get that result, use the Goal Seek feature in Excel.
• Goal Seek works only with one variable input value.
• If you want to consider more than one input value or wish to maximize or minimize
some objective, you must use the Solver add-in.
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering, Andhra University
31
Break-Even Analysis Using Goal Seek
• On the Data tab, in the Data Tools group,
click What-If Analysis, and then click Goal
Seek. The dialog is shown in Figure. will
appear.
• In the Set cell box, enter the reference for
the cell that contains the formula that you
want to resolve.
• In the To value box, type the formula result
that you want.
• In the By changing cell box, enter the
reference for the cell that contains the value
that you want to adjust.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University
32
Model analysis using analytics solver platform
• Analytic Solver Platform provides sensitivity analysis
capabilities to explore a spreadsheet model and identify
and visualize the key input parameters that have the
greatest impact on model results.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 33
Parametric Sensitivity analysis
• Parametric sensitivity analysis is the term used by Analytic Solver
Platform for systematic methods of what-if analysis.
• A parameter is simply a piece of input data in a model.
• With the Analytic Solver Platform, you can easily create one- and two-
way data tables and a special type of chart called a tornado chart, that
provides useful what-if information.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering,
Andhra University 34
Creating Data Tables with Analytic Solver Platform
• Suppose that we wish to create a one-way data table to evaluate the profit as the unit price in cell B5
varies between $35 and $45 in the profit model .
• First, define this cell as a parameter in the Analytic Solver Platform.
• Select cell B5 and then click the Parameters button in the ribbon (Figure 11.30), and select Sensitivity.
Prof. S.Adinarayana, Dept of CS&SE, AU College of Engineering, Andhra University 35
• This opens a Function Arguments dialog (Figure 11.31),
in which you specify a set of values or a range.
• To create the data table, select the result cell that
corresponds to the model output—in this case, cell
C22.
• Then click the Reports button and click on Parameter
Analysis from the Sensitivity menu.
• This displays a Sensitivity Report dialog (Figure 11.32).
• You may use the arrows to move cells into the panes
on the right; this is useful if you have defined multiple
input parameters and want to conduct differ ent
sensitivity analyses.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University
36
Prof. S.Adinarayana, Dept of CS&SE, 37
5. Tornado Charts
• A tornado chart graphically shows the impact that variation in a model input has on
some output while holding all other inputs constant.
• Typically, we choose a base case and then vary the inputs by some percentage, say
plus or minus 10% or 20%.
• As each input is varied, we record the values of the output and chart the ranges of the
output in a bar chart in descending order.
• This usually results in a funnel shape, hence the name.
Prof. S.Adinarayana, Dept of CS&SE, College of
Engineering, Andhra University
38
• A tornado chart shows which inputs are the most influential on the output and
which are the least influential.
• If these inputs are uncertain, then you would probably want to study the more
influential ones to reduce uncertainty and its effect on the output.
• If the effects are small, you might ignore any uncertainty or eliminate those effects
from the model.
• They are also useful in helping you select the inputs that you would want to analyze
further with data tables or scenarios.
• Creating a tornado chart in the Analytic
Solver Platform is extremely easy to
do.
• Analytic Solver Platform automatically
identifies all the data input cells on
which the output cell depends and
creates the chart.
Prof. S.Adinarayana, Dept of CS&SE, College of Engineering, Andhra University
39