Decisions and Models¶
This reading follows the Week 1 lecture. It explains what a business decision is, how a model supports it, and why our own judgment needs that support. Every idea comes with code you can run: open the notebook in Colab with the button above and run the cells from top to bottom.
After this reading you can:
tell a decision apart from a question about data;
name the six elements of a decision and apply them to a case;
write a small model as a Python function and use it for what-if analysis;
explain how anchoring and framing distort judgment.
Textbook: Albright & Winston, Business Analytics: Data Analysis and Decision Making, Chapter 1.
1. From data to decisions¶
A company collects data about everything: sales, customers, stock, staff. Data answers questions such as what was our revenue in March? Each question has one right answer, already in the data.
A decision is different. It is a choice between alternatives, made before we know how things will turn out, by someone who is accountable for it. Should we run a promotion during Ramadan? has no answer in the data; it needs a model that connects each alternative to its likely outcome, and a criterion for choosing.
Decision analytics is the use of data and models to choose better, and to explain the choice. The field is usually described as a continuum of four kinds of question:
| Kind | Question | Example at a café chain | Weeks |
|---|---|---|---|
| Descriptive | What happened? | Revenue by branch in 2025 | 1–4 |
| Predictive | What will happen? | Latte demand next week | 5–8 |
| Prescriptive | What should we do? | The barista schedule with the lowest cost | 9–12 |
| Under uncertainty | What if we are wrong? | Promotion or not, given uncertain demand | 13–15 |
Each kind builds on the one before: you cannot recommend an action without predicting its effect, and you cannot predict well without first describing the data.
2. The anatomy of a decision¶
Every decision, from pricing a latte to opening a branch, has the same six elements:
Decision maker: who chooses, and is accountable for the choice.
Alternatives: the options, always including “do nothing”.
Objective: what “better” means: profit, cost, time, risk, or several at once.
Constraints: what any acceptable choice must respect: budget, capacity, regulations.
Uncertainties: what we do not control or do not know yet.
Information: the data we have, or could collect before deciding.
The running case: Qahwa House¶
Qahwa House is a fictional café chain with four branches: Olaya (Riyadh), Corniche (Jeddah), Al Faisaliyah (Dammam) and University (Al-Kharj). In 2025 it ran a second cup half price promotion on about one day a week, chosen at random. The regional manager must decide whether to run it again.
| Element | The promotion decision |
|---|---|
| Decision maker | The regional manager |
| Alternatives | Run it on all items, on drinks only, or not at all |
| Objective | Daily profit, not revenue or units sold |
| Constraints | Marketing budget, counter staff on busy days |
| Uncertainties | How many extra customers the promotion brings |
| Information | A year of daily sales, with promotion days marked |
The objective is the element people most often get wrong. A promotion that raises revenue can still lower profit, because every unit is sold at a lower margin. You will test exactly this in Lab 1.
Good decisions and good outcomes¶
Under uncertainty, a good decision can end badly (bad luck) and a careless one can end well (dumb luck). We judge a decision by how it was made: whether it used the information available, a sound model and a clear objective. Over many decisions, a good process wins.
3. Models¶
A model is a simplified representation of a real problem that keeps the features that matter for the decision and leaves out the rest. We build models because experimenting on the real business is costly, slow, sometimes impossible, and teaches us little about why things happen.
A model can be written in four ways, and in this course a model often goes through all four, in this order:
In words: profit is what we earn from sales minus what the goods cost us.
As a diagram: an influence diagram shows what affects what (below).
In algebra: .
In code: a Python function we can run, test and share.
Every model separates three kinds of quantity:
decision variables, which we choose (the price , promotion yes or no);
inputs, which are given or uncertain (the unit cost , the demand);
outputs, which we evaluate (the profit).
An influence diagram¶
The diagram below shows the promotion decision. Rectangles are decisions, ovals are uncertain quantities, rounded boxes are calculated, and the objective sits at the end. An arrow means “influences”.
The promotion pulls profit in two directions: more units, but a lower price on each one. Which effect wins is an empirical question, and data can answer it.
A model in code: pricing a latte¶
Suppose daily demand for a Spanish latte at one branch falls as its price rises, following the line
where is the price in SAR. Each latte costs SAR to make. Daily profit is then
The demand line is invented for teaching. In Week 6 you will estimate one from data with regression. Here is the model as code:
def demand(price):
"""Lattes sold per day at this price (SAR)."""
return 400 - 12 * price
def profit(price, unit_cost=5):
"""Daily profit in SAR."""
return (price - unit_cost) * demand(price)
for p in [14, 16, 18, 20, 22]:
print(f"price {p:>2} SAR -> {demand(p):>3} lattes, profit {profit(p):>6,.0f} SAR")price 14 SAR -> 232 lattes, profit 2,088 SAR
price 16 SAR -> 208 lattes, profit 2,288 SAR
price 18 SAR -> 184 lattes, profit 2,392 SAR
price 20 SAR -> 160 lattes, profit 2,400 SAR
price 22 SAR -> 136 lattes, profit 2,312 SAR
What-if analysis¶
A model lets us ask what if? before the market answers. Let us try every price between 5 and 33 SAR, to the nearest halala, and keep the best:
import numpy as np
import matplotlib.pyplot as plt
prices = np.arange(5, 33.34, 0.01)
profits = profit(prices)
best = prices[profits.argmax()]
print(f"today: 16.00 SAR -> {profit(16):,.0f} SAR a day")
print(f"best: {best:.2f} SAR -> {profits.max():,.0f} SAR a day")
print(f"gain: {profits.max() - profit(16):,.0f} SAR a day, about {365 * (profits.max() - profit(16)):,.0f} SAR a year")
fig, ax = plt.subplots(figsize=(7, 3.5))
ax.plot(prices, profits, lw=2)
ax.scatter([16, best], [profit(16), profits.max()], color=["tab:orange", "tab:green"], zorder=3)
ax.annotate("today", (16, profit(16)), xytext=(-40, -25), textcoords="offset points")
ax.annotate("best", (best, profits.max()), xytext=(10, -25), textcoords="offset points")
ax.set_xlabel("Price (SAR)")
ax.set_ylabel("Daily profit (SAR)")
ax.set_title("Profit rises with price until lost customers outweigh the margin")
ax.grid(alpha=0.3)
plt.show()today: 16.00 SAR -> 2,288 SAR a day
best: 19.17 SAR -> 2,408 SAR a day
gain: 120 SAR a day, about 43,922 SAR a year

Calculus gives the same answer: the derivative is zero at SAR. You do not need calculus in this course; scanning the options with code works for any model, including ones with no formula for the derivative.
The answer depends on the inputs¶
The best price came from a demand line we assumed. What if customers are more or less sensitive to price than we thought? A model makes it cheap to check:
def profit_with(price, slope, unit_cost=5):
"""Daily profit when demand is 400 - slope * price."""
return (price - unit_cost) * (400 - slope * price)
fig, ax = plt.subplots(figsize=(7, 3.5))
for slope in [10, 12, 14]:
pr = np.arange(5, 400 / slope, 0.01)
pf = profit_with(pr, slope)
best_p = pr[pf.argmax()]
ax.plot(pr, pf, lw=2, label=f"slope {slope}: best price {best_p:.2f} SAR")
ax.set_xlabel("Price (SAR)")
ax.set_ylabel("Daily profit (SAR)")
ax.legend()
ax.grid(alpha=0.3)
plt.show()
If customers are less sensitive (slope 10) the best price is about 22.50 SAR; if they are more sensitive (slope 14) it drops to about 16.79 SAR. The decision is only as good as our estimate of demand, which is why weeks 5–8 are about predicting carefully and measuring the error of our predictions. This kind of check is called sensitivity analysis, and it returns in every module.
Kinds of models¶
| Model | Purpose | Examples in this course |
|---|---|---|
| Descriptive | Summarise what happened | Tables, charts, pivot tables |
| Predictive | Estimate an unknown or future value | Regression, classification, forecasting |
| Prescriptive | Find the best action under constraints | Linear and integer programming |
| Risk and choice | Compare actions when the future is uncertain | Decision trees, simulation, AHP |
Real decisions chain them: a demand forecast (predictive) feeds a staffing plan (prescriptive), which is then tested against bad weeks with simulation.
4. The modeling process¶
Building a model is a loop, not a straight line:
Define the problem: who decides, what the alternatives and objective are.
Collect and summarise data: what do we know, and how reliable is it?
Build the model: in words, then a diagram, algebra and code.
Verify and validate it: does the code do what we meant? Does the model reproduce the past?
Select a decision: use the model to compare the alternatives.
Present the results: to people who do not read code.
Implement, monitor and update: the decision creates new data and new questions.
A failed check in step 4 sends you back to step 3, and step 7 sends you back to step 1. Beginners underestimate step 1, yet a precise answer to the wrong question is worthless. Steps 6 and 7 decide whether the work changes anything; your capstone is graded on them too.
5. Judgment and its traps¶
Some parts of a decision cannot be modeled: which alternatives to consider, which risks matter, what the organisation values. These need judgment, and human judgment is not always rational. Two effects are especially common in business.
Anchoring¶
In a classic study, one group estimated in five seconds and another estimated . The median estimates were 512 and 2,250. The true value is:
import math
print(f"8! = {math.factorial(8):,}")8! = 40,320
Both groups started from the first numbers they saw, the anchor, and adjusted too little. In business, anchors are last year’s budget, the first offer in a negotiation, or a competitor’s price. (Tversky & Kahneman, Judgment under Uncertainty: Heuristics and Biases, Science, 1974.)
Framing¶
Consider two versions of the same choice:
Version 1. You were given 1,000 SAR. Choose (A) receive 500 SAR more for sure, or (B) flip a coin: 1,000 SAR more on heads, nothing on tails.
Version 2. You were given 2,000 SAR. Choose (A) give back 500 SAR for sure, or (B) flip a coin: give back nothing on heads, 1,000 SAR on tails.
Most people choose A in version 1, a sure gain, and B in version 2, to avoid a sure loss. Writing each option as final wealth shows the two versions are identical:
versions = {
"Version 1": {"start": 1000, "A": [+500], "B": [+1000, 0]},
"Version 2": {"start": 2000, "A": [-500], "B": [0, -1000]},
}
for name, v in versions.items():
for option in ["A", "B"]:
outcomes = sorted(v["start"] + change for change in v[option])
print(f"{name}, option {option}: final wealth {outcomes} SAR")Version 1, option A: final wealth [1500] SAR
Version 1, option B: final wealth [1000, 2000] SAR
Version 2, option A: final wealth [1500] SAR
Version 2, option B: final wealth [1000, 2000] SAR
The frame (gain or loss) changed the choice, not the outcomes. Writing the outcomes down, as the code does, removes the frame. This is one of the quiet benefits of building a model: it forces us to state the objective, list the outcomes and expose every assumption to challenge.
Other common traps are overconfidence (giving ranges that are too narrow) and confirmation bias (looking for data that agrees with what we already believe). An AI assistant can anchor you too: treat its first answer as a hypothesis to test, not a conclusion.
Check your understanding¶
Classify each as a question about data or a decision: (a) Which branch sold the most date cake in June? (b) Should the Al-Kharj branch open at 6 a.m. during exams? (c) How many iced lattes will Jeddah sell next week?
For the decision “open a fifth branch in Abha”, name one alternative, the objective, one constraint and one uncertainty.
In the latte model, which quantities are decision variables, which are inputs and which are outputs?
The manager says: “The promotion was a success: revenue went up 12%.” What is wrong with this argument?
Give an example of anchoring in a salary negotiation.
Answers. 1. (a) data, (b) decision, (c) a prediction that will inform a decision. 2. One answer: alternatives open in Abha / open in Taif / do not expand; objective profit over five years; constraint a budget for the fit-out; uncertainty footfall at the new location. 3. Decision: the price . Inputs: the unit cost and the demand line. Output: daily profit. 4. The objective should be profit, not revenue: a promotion sells more units at a lower margin, so revenue can rise while profit falls. 5. The first salary figure mentioned, by either side, pulls the final agreement towards it.