# Splitting a total

> Split a total into parts that add up exactly: sums of squares and R², plan vs actual as volume + mix + price, and a change in savings as contributions + growth.

- Course: [Math for Statistics and Unit Economics](https://productovi.com/courses/math-basics.md)
- Module: Lines and models
- Lesson 20/36, ~35 min
- Source: https://productovi.com/courses/math-basics/splitting-a-total

## Parts that add up

**Alex Tutor:** Back at Klasna, where the month closed with 16,000 UAH more contribution than planned. Leo asks the obvious question: why? Today's tool answers it by splitting a total into parts that add up **exactly**.

**Sofia:** Exactly matters because then each part gets a share of the total, and nothing is left unexplained?

**Alex Tutor:** Yes. Statistics does it with spread first. Six learners took 4, 6, 8, 10, 12 and 14 lessons in a month: the first three study English, the other three exam maths. The mean is 9.

**Alex Tutor:** The **total sum of squares** is Σ(x − 9)² = 25 + 9 + 1 + 1 + 9 + 25 = 70. It splits into two parts: how far group means sit from 9, and how far learners sit from their own group's mean.

$$
SS_{total} = SS_{between} + SS_{within} \qquad R^2 = 1 - \frac{SS_{res}}{SS_{total}}
$$

*SS: sum of squares. SS_res: the part a model leaves unexplained (here, within groups). R²: the share of the total spread the model explains.*

**Sofia:** Group means are 6 and 12. Between: 3 × 9 + 3 × 9 = 54. Within: 4 + 0 + 4 + 4 + 0 + 4 = 16. And 54 + 16 = 70.

**Alex Tutor:** So the subject explains 54 of 70, and R² = 1 − 16 ÷ 70 ≈ 0.77. A regression's R² is the same idea: the share of the spread the line explains.

![Six learners take 4 to 14 lessons; the total sum of squares 70 splits into 54 between the English and maths groups and 16 within them, so R² is about 0.77.](https://productovi.com/courses/math-basics/diagrams/m5-l4-sum-of-squares.png)

*The same 70, split by where the distance comes from.*

**Alex Tutor:** First check the splitting rule on other numbers.

> **Exercise:** A dataset split into groups has a total sum of squares of 90, and the part between the groups is 65. Then the part within the groups is 25.

> **Exercise:** A regression of weekly sign-ups on ad spend has SS_total = 120 and leaves SS_res = 30 unexplained. What is R²?

**Alex Tutor:** And one common misreading of R² to check.

> **Exercise:** A model of weekly sign-ups has R² = 0.77. So each week's prediction is accurate to within 23%.

## Plan vs actual: volume and rate

**Alex Tutor:** Now Leo's month. The plan: 8,000 lessons at 180 UAH of contribution each, 1,440,000. The actual: 8,400 lessons at an average of 173.33, 1,456,000.

**Alex Tutor:** Two things changed: how many lessons and what each one earned. The **volume effect** values the extra lessons at the plan rate: (8,400 − 8,000) × 180 = +72,000.

**Sofia:** And the rest is the **rate effect**: the actual lessons times the change per lesson, 8,400 × (173.33 − 180) ≈ −56,000. And 72,000 − 56,000 = 16,000.

**Alex Tutor:** Notice the convention: volume at the plan rate, rate at the actual volume. That pairing makes the parts add up with nothing left over.

> **Exercise:** Another month: plan 8,000 lessons at 180 UAH of contribution each; actual 8,600 lessons. What is the volume effect, in UAH?

**Alex Tutor:** Now the other half of the gap for that month.

> **Exercise:** Plan: 8,000 lessons at 180 UAH of contribution each. Actual: 8,600 lessons at an average of 175 UAH. What is the rate effect, actual lessons × (actual rate − plan rate), in UAH?

## Inside the rate: mix and price

**Sofia:** But why did each lesson earn less? No price went down that much.

**Alex Tutor:** Split by subject. The plan had 6,000 English lessons at 190 and 2,000 maths at 150. The actual: 5,600 English and 2,800 maths. More of the thinner subject.

**Alex Tutor:** The **mix effect** values the actual lessons at each subject's plan rate, minus the same lessons at the plan average: 5,600 × 190 + 2,800 × 150 − 8,400 × 180 = 1,484,000 − 1,512,000 = −28,000.

**Alex Tutor:** The **price effect** is what's left: English earned 185 instead of 190 after a promotion, so 5,600 × (185 − 190) = −28,000. Exchange-rate effects work the same way, through the dollar cost per lesson.

![Plan contribution 1,440,000 UAH rises by 72,000 from volume, falls 28,000 from mix and 28,000 from price, reaching the actual 1,456,000.](https://productovi.com/courses/math-basics/diagrams/m5-l4-plan-vs-actual.png)

*Each bar is one cause; together they bridge plan and actual.*

> **Exercise:** Klasna sold exactly the planned number of lessons at planned prices, but more maths and less English than planned. Which effect is non-zero?

**Alex Tutor:** Compute a mix effect yourself, for a month with the shift the other way.

> **Exercise:** Plan: 6,000 English lessons at 190 UAH of contribution and 2,000 maths at 150 (8,000 lessons, average 180). Actual: 6,300 English and 1,700 maths, each subject at its plan rate. What is the mix effect, in UAH?

## The same idea at home

**Alex Tutor:** Personal finance splits a change in savings the same way. Savings went from 200,000 to 236,000 in a year. How much came from new money and how much from growth?

**Sofia:** If 30,000 of new money went in during the year, growth is 36,000 − 30,000 = 6,000. Most of the progress came from saving, not from the market.

**Alex Tutor:** Right, and it keeps you honest: a good year in the market and a good year of saving look the same on the total.

![A cat sorts a big pile of kibble into three neat bowls of different sizes that together hold the whole pile.](https://productovi.com/courses/math-basics/inline/m5-l4-i1.webp)

*Split a total into parts that add back up to it.*

> **Exercise:** Savings grew from 200,000 to 236,000 UAH in a year, and 30,000 of new money was added during the year. How much was growth, in UAH?

## Your turn: why each lesson earned less

**Alex Tutor:** Hanna has a question about a month with no promotion at all: the plan average was 180 per lesson, the actual average 176.67, and no price changed. Leo suspects a pricing error.

**Sofia:** 5,600 English at 190 and 2,800 maths at 150 gives 1,484,000 over 8,400 lessons. That's 176.67.

**Alex Tutor:** Explain it to Leo so he stops hunting for a pricing bug.

> **Exercise:** Explain to Leo, Klasna's CEO, in 3–4 sentences why the average contribution per lesson fell from 180 to 176.67 UAH although no price changed. Plan: 6,000 English at 190 and 2,000 maths at 150; actual: 5,600 English and 2,800 maths.

## Case: November against plan

**Alex Tutor:** One last job for this module. November has closed, and Hanna wants the gap explained before the monthly review, in the same three parts.

**Sofia:** Volume at the plan average, mix at plan rates, price at actual lessons. Then check they add up.

**Alex Tutor:** And then say what each number means for the school. Numbers without a reading are only half a note.

> **Exercise:** Split the gap between plan and actual into volume, mix and price, and write Hanna, Klasna's head of finance, a short note.

## Where you will meet this

> **In short**
>
> - A good **decomposition** splits a total into parts that add up exactly, so each part has a clear share.
> - **SS_total = SS_between + SS_within**; **R² = 1 − SS_res ÷ SS_total**, the share of the spread a model explains.
> - Plan vs actual: **volume** = (L_actual − L_plan) × plan average; **mix** = actual lessons at plan rates − L_actual × plan average; **price** = actual lessons × (actual − plan rate). They add up to the gap.
> - A change in savings = **contributions + growth**.

> **These lessons use it**
>
> - [One-way ANOVA: comparing many groups](/courses/statistics-for-pm-and-marketers/anova): SS_between against SS_within.
> - [Repeated measures ANOVA](/courses/statistics-for-pm-and-marketers/repeated-measures): SS_total = SS_subjects + SS_time + SS_error.
> - [Simple linear regression](/courses/statistics-for-pm-and-marketers/linear-regression): R² = 1 − SS_res ÷ SS_tot.
> - [Case: plan vs actual](/courses/finance-for-product/plan-vs-actual-case): volume, mix, price and FX for a real month.
> - [Case: a one-page money plan and the yearly review](/courses/personal-finance/money-plan-case): what changed net worth over the year.

**Alex Tutor:** That closes lines and models. Next module: growth and time, starting with why −50% and then +50% doesn't bring you back.

- Previous lesson: [Several variables](https://productovi.com/courses/math-basics/several-variables.md)
- Next lesson: [Compounding](https://productovi.com/courses/math-basics/compounding.md)

---
Productovi Learning. Free, no sign-up needed to read.
