BRAGA

02 Writing02-02 Notes02-02-004

Change Delta

Published 16 Apr 20265 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
  3. 03Real-world use
  4. 04The formula, piece by piece
  5. 05The formula in words
  6. 06Critical Concepts
  7. 07Step-by-step calculation (tiny example)
  8. 08Code examples
Δ\Delta
(1)

Deep Breakdown

What it tells me (Situation Awareness): Δ\Delta (uppercase Greek letter delta) means change or difference. It is the standard symbol for "how much did this quantity move?" In DA/DS you encounter it constantly: week-over-week revenue change, gradient descent (weights are updated by Δw\Delta w), time series differencing, feature engineering (lagged differences), and financial deltas. Any time a stakeholder asks "compared to last period," the answer is a Δ\Delta.

Flowchart

PositiveZeroNegativeIdentify thequantity xRecord the initialvalue: x_oldRecord the finalvalue: x_newCompute:delta_x = x_new- x_oldSign of delta_x?x increased(growth)x did not changex decreased(decline)Report delta andpercentagechange ifneeded

Real-world use

Where it is used

Measuring KPI movement (revenue, active users, churn rate) between periods, gradient-based optimization in ML, time series first-differencing to remove trends, and any situation where the change in a variable is more informative than its absolute value.

Problem it solves

Reporting "revenue is 500k500k" is less useful than "revenue grew by $\Delta = +\$80k(+19(+19%) compared to last month." The stakeholder needs the change, not just the current state. Additionally, in ML, the optimizer does not jump directly to the minimum: it moves in small steps of\Delta w$ determined by the gradient.

How it solves the problem

Δx=xnew−xold\Delta x = x_{\text{new}} - x_{\text{old}} provides a signed, interpretable measure of movement. Positive means growth, negative means decline, zero means no change. The sign carries information that absolute values would destroy.

Example in a business

A weekly sales dashboard shows ΔRevenue=Revenuethis week−Revenuelast week\Delta \text{Revenue} = \text{Revenue}_{\text{this week}} - \text{Revenue}_{\text{last week}}. If this week's revenue is $\$480kandlastweek′swasand last week's was$500k$, then $\Delta \text{Revenue} = -$20k$. The negative sign immediately signals a decline. The dashboard color codes it red.

The formula, piece by piece

Breaking the notation:

  • Δ\Delta: uppercase Greek letter delta. In Greek, delta (δ\delta/Δ\Delta) represents the letter "D." In mathematics, it conventionally means "difference" or "change."
  • xx: any variable (revenue, weight, position, temperature, probability).
  • Core formula: Δx=xnew−xold\Delta x = x_{\text{new}} - x_{\text{old}}, equivalently Δx=x2−x1\Delta x = x_2 - x_1.

Related uses of Δ\Delta:

  • Gradient descent weight update: Δw=−η⋅∇wL\Delta w = -\eta \cdot \nabla_w L (where η\eta is the learning rate and ∇wL\nabla_w L is the gradient of the loss)
  • Finite difference approximation of a derivative: ΔyΔx=y2−y1x2−x1\frac{\Delta y}{\Delta x} = \frac{y_2 - y_1}{x_2 - x_1} (slope of a secant line, precursor to the derivative)
  • Time series differencing: Δyt=yt−yt−1\Delta y_t = y_t - y_{t-1} (first difference, used to achieve stationarity) Lowercase δ\delta is used for infinitesimally small changes (calculus), while uppercase Δ\Delta is used for finite, measurable changes.

The formula in words

"Delta-x equals the new value of xx minus the old value of xx. It is the signed change: how much xx moved, and in which direction. Positive means it went up. Negative means it went down." Percentage change (the relative version): Δxxold×100%\frac{\Delta x}{x_{\text{old}}} \times 100\%. This normalizes the delta by the starting value so you can compare changes across different scales.

Critical Concepts

  1. Order matters: Δx=xnew−xold\Delta x = x_{\text{new}} - x_{\text{old}}, not the reverse. Getting this backward flips the sign and the interpretation.
  2. Signed quantity: Δ\Delta can be positive, negative, or zero. Never take the absolute value of a delta unless you explicitly want magnitude without direction.
  3. Finite vs. infinitesimal: Δx\Delta x is a measurable finite change. When it shrinks to an infinitesimally small amount, it becomes dxdx in calculus notation. The derivative dy/dxdy/dx is the limit of Δy/Δx\Delta y / \Delta x as Δx→0\Delta x \to 0.
  4. Percentage change: Δ%=(Δx/xold)×100%\Delta\% = (\Delta x / x_{\text{old}}) \times 100\%. Always divide by the old value, not the new one.
  5. In ML (gradient descent): Δw\Delta w is the update step.

The learning rate η\eta controls how large each Δw\Delta w is. Too large: overshoot. Too small: slow convergence.

Step-by-step calculation (tiny example)

Input: last month revenue = 500500, this month revenue = 580580.

Step 1: Identify old and new values xold=500x_{\text{old}} = 500, xnew=580x_{\text{new}} = 580.

Step 2: Compute the absolute change Δx=xnew−xold=580−500=+80\Delta x = x_{\text{new}} - x_{\text{old}} = 580 - 500 = +80. The positive sign confirms this is growth.

Step 3: Compute the percentage change Δ%=Δxxold×100%=80500×100%=16%\Delta\% = \frac{\Delta x}{x_{\text{old}}} \times 100\% = \frac{80}{500} \times 100\% = 16\%. Report: "Revenue increased by Δ=+80\Delta = +80 units, a +16%+16\% growth month over month."

Code examples

Beginner example (Python)

python
# Simple delta calculation
revenue_last_month = 500
revenue_this_month = 580
delta = revenue_this_month - revenue_last_month
pct_change = (delta / revenue_last_month) * 100
print(f"Delta revenue: {delta:+}")   # +80 (the + format shows sign explicitly)
print(f"Percentage change: {pct_change:+.1f}%")   # +16.0%

Beginner example (R)

r
revenue_last_month <- 500
revenue_this_month <- 580
delta <- revenue_this_month - revenue_last_month
pct_change <- (delta / revenue_last_month) * 100
cat("Delta revenue: ", delta, "\n")  # 80
cat("Percentage change: ", pct_change, "%\n")  # 16 %

Professional example (Python)

python
import pandas as pd
import numpy as np   # Time series: compute week-over-week deltas and percentage changes for a KPI dashboard
data = { "week": ["2024-W01", "2024-W02", "2024-W03", "2024-W04", "2024-W05"], "revenue": [480_000, 500_000, 475_000, 530_000, 558_000],
}
df = pd.DataFrame(data)   # First difference (delta)
df["delta_revenue"] = df["revenue"].diff()   # NaN for first row (no prior period) # Percentage change
df["pct_change"] = df["revenue"].pct_change() * 100   # Direction indicator
df["direction"] = np.where( df["delta_revenue"] > 0, "up", np.where(df["delta_revenue"] < 0, "down", "flat") )
print(df.to_string(index=False))   # Output (approx):
# week revenue delta_revenue pct_change direction
# 2024-W01 480000 NaN NaN flat
# 2024-W02 500000 20000.0 4.166667 up
# 2024-W03 475000 -25000.0 -5.000000 down
# 2024-W04 530000 55000.0 15.789474 up
# 2024-W05 558000 28000.0 5.283019 up

Professional example (R)

r
# Time series: week-over-week deltas and percentage changes for a KPI dashboard
df <- data.frame( week = c("2024-W01", "2024-W02", "2024-W03", "2024-W04", "2024-W05"), revenue = c(480000, 500000, 475000, 530000, 558000), stringsAsFactors = FALSE
)  # First difference (delta)
df$delta_revenue <- c(NA, diff(df$revenue))  # Percentage change
df$pct_change <- c(NA, round(100 * diff(df$revenue) / df$revenue[-nrow(df)], 6))  # Direction indicator
df$direction <- ifelse(df$delta_revenue > 0, "up", ifelse(df$delta_revenue < 0, "down", "flat"))
print(df)

Source: 1300 p. 21

#foundations#maths-symbols#algebra

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close