# Weighted mean and mix

> Σwx/Σw, why a pooled rate is not the mean of rates, mix-adjusted rates, pooled variance and pooled p̄, the cost of capital, PERT estimates and weighted scoring.

- Course: [Math for Statistics and Unit Economics](https://productovi.com/courses/math-basics.md)
- Module: Averages and shares of shares
- Lesson 10/36, ~27 min
- Source: https://productovi.com/courses/math-basics/weighted-mean-and-mix

## When some values count more

**Alex Tutor:** Still on Klasna's product team. Today's numbers come from the school's trial lessons.

**Sofia:** Two channels bring trial lessons. Ads: 40 of 1,000 trials paid, 4%. Referrals: 30 of 200 paid, 15%. So overall conversion is (4% + 15%) ÷ 2 = 9.5%?

**Alex Tutor:** Count it directly: 40 + 30 = 70 payers out of 1,200 trials, which is **5.83%**. Averaging the two rates treats 200 people as if they were as many as 1,000. That's the **mean of rates**; 5.83% is the **pooled rate**.

**Alex Tutor:** The pooled rate is a **weighted mean**: each rate counts in proportion to its weight, here the number of trials.

$$
\bar{x}_w = \frac{\sum w_i x_i}{\sum w_i} = \frac{1000 \times 0.04 + 200 \times 0.15}{1000 + 200} = \frac{70}{1200} = 5.83\%
$$

*wᵢ: the weight of each group (here trials); xᵢ: its value (here the conversion rate). With equal weights it becomes the plain mean.*

![On a scale from 0 to 16%, a big group of 1,000 at 4% and a small group of 200 at 15%: the mean of rates sits at 9.5%, the pooled rate at 5.83%, close to the big group.](https://productovi.com/courses/math-basics/diagrams/m3-l2-pooled-vs-mean.png)

*The pooled rate leans toward the bigger group.*

**Alex Tutor:** Check the first guess against the counts.

> **Exercise:** Ads: 40 of 1,000 trials paid (4%). Referrals: 30 of 200 paid (15%). Overall trial conversion is (4% + 15%) ÷ 2 = 9.5%.

**Sofia:** That's the average price trick from the Σ lesson: Σqp ÷ Σq.

**Alex Tutor:** The same formula. In the conversion test the pooled p̄ = (x₁ + x₂)/(n₁ + n₂) is exactly this: all successes over all people.

**Sofia:** Is the mean of rates ever the right number?

**Alex Tutor:** When each group itself is what you care about: "how does a typical channel convert?" For "how does a typical trial convert?", pool. Most business questions are about people or money, so pool by default.

> **Exercise:** In March Klasna delivered 2,000 lessons at 600 UAH and 500 lessons at 700 UAH. What was the average price per lesson, weighted by lessons, in UAH?

> **Exercise:** Channel A: 25 of 500 trials paid. Channel B: 36 of 300 trials paid. What is the pooled conversion rate, in percent?

## Mix: same rates, different weights

**Alex Tutor:** Weights matter even more over time. In July ads converted at 5% and referrals at 16%, each up 1 pp from May. But July had 600 trials from each: pooled (30 + 96) ÷ 1,200 = **10.5%**, against 5.83% in May.

**Sofia:** So conversion almost doubled?

**Alex Tutor:** Mostly the **mix** changed: more trials came from the better channel. To separate it, compute **July at May's mix**: July's rates with May's weights. (1,000 × 5% + 200 × 16%) ÷ 1,200 = 82 ÷ 1,200 = **6.83%**.

**Alex Tutor:** So of the +4.67 pp, about +1 pp is real improvement in the channels (5.83% → 6.83%) and +3.67 pp is mix (6.83% → 10.5%).

**Sofia:** Could the mix push the total up even if every channel got worse?

**Alex Tutor:** Yes, that's **Simpson's paradox**. Say July's ads fell to 3.5% and referrals to 14%, with the same 600 and 600 trials: (21 + 84) ÷ 1,200 = 8.75%, above May's 5.83%. Both channels got worse, the total got better.

![May 5.83%, July at May's mix 6.83%, July 10.5%: the channels improved by 1 pp, and the shift of trials toward referrals added 3.67 pp.](https://productovi.com/courses/math-basics/diagrams/m3-l2-mix.png)

*Fix the weights to see what the rates alone did.*

> **Exercise:** In May there were 800 web trials and 200 app trials. In July web converted at 6% and the app at 20%. What is July's conversion at May's mix, in percent?

**Alex Tutor:** And the strange case: both channels get worse.

> **Exercise:** May: ads 1,000 trials at 4%, referrals 200 at 15% (pooled 5.83%). In July ads fall to 3.5% and referrals to 14%, but trials are 600 from each. What happens to the pooled rate?

## Weights you'll meet elsewhere

**Alex Tutor:** The t-test pools two variances: s_p² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²) ÷ (n₁ + n₂ − 2). It's a weighted mean of s₁² and s₂² with weights n − 1. With n₁ = 11, s₁² = 16, n₂ = 21, s₂² = 25: (160 + 500) ÷ 30 = **22**.

**Alex Tutor:** Compute one pooled variance before we weigh money.

> **Exercise:** Group 1: n₁ = 9, s₁² = 12. Group 2: n₂ = 13, s₂² = 20. What is the pooled variance s_p² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²) ÷ (n₁ + n₂ − 2)?

**Alex Tutor:** Finance weighs money. A company funded by 4 million of debt at 18% and 6 million of equity at 25% has a cost of capital of (4 × 18% + 6 × 25%) ÷ 10 = **22.2%**.

**Alex Tutor:** Try it with other amounts.

> **Exercise:** A company is funded by 3 million UAH of debt at 16% and 5 million UAH of equity at 24%. What is its cost of capital, weighted by money, in percent?

**Sofia:** And project estimates?

**Alex Tutor:** **PERT** weighs three guesses 1 : 4 : 1: E = (O + 4M + P) ÷ 6. Optimistic 4 weeks, most likely 6, pessimistic 14: (4 + 24 + 14) ÷ 6 = **7 weeks**. A long pessimistic tail pulls the estimate above the most likely value.

**Alex Tutor:** Scoring options for a roadmap works the same way. Give each criterion a weight, the weights adding to 1, then score = Σwᵢsᵢ. Scores 4, 3 and 5 under weights 0.5, 0.3 and 0.2 give 2.0 + 0.9 + 1.0 = **3.9**.

> **Exercise:** A task is estimated at O = 3 days, M = 5 days and P = 13 days. What is the PERT estimate E = (O + 4M + P) ÷ 6, in days?

## Your turn: explain the July jump

**Alex Tutor:** Leo saw "trial conversion: 5.83% in May, 10.5% in July" and wants to celebrate a doubled funnel. Write him a short reply.

**Sofia:** Friendly, but with the mix split.

> **Exercise:** May: ads 1,000 trials at 4%, referrals 200 at 15% (pooled 5.83%). July: ads 600 at 5%, referrals 600 at 16% (pooled 10.5%). Leo, Klasna's CEO, thinks the funnel doubled. In three or four sentences, explain how much of the change comes from better channels and how much from the mix, with the numbers.

## Where you will meet this

> **In short**
>
> - **Weighted mean** x̄_w = Σwᵢxᵢ ÷ Σwᵢ. Equal weights give the plain mean.
> - A **pooled rate** (all successes ÷ all people, like p̄) is a weighted mean of rates; the **mean of rates** ignores group sizes.
> - **Mix-adjusted rate**: new rates with old weights. It splits a change into a rate effect and a mix effect.
> - **s_p²** weighs variances by n − 1; the **cost of capital** weighs rates by money; **PERT** weighs O, M, P as 1 : 4 : 1; a **weighted score** is Σwᵢsᵢ with weights adding to 1.
> - When the mix shifts, the total can move against every group: **Simpson's paradox**.

> **These lessons use it**
>
> - [Two-sample t-test](/courses/statistics-for-pm-and-marketers/t-test): the pooled variance s_p².
> - [Conversion rates and the two-proportion z-test](/courses/statistics-for-pm-and-marketers/conversion-rate-tests): the pooled p̄.
> - [Volume, quality and Simpson's paradox](/courses/product-analytics/volume-vs-quality-metrics): "July at May's mix".
> - [Traffic mix and seasonality](/courses/product-analytics/traffic-and-seasons): a rate re-weighted to last month's traffic.
> - [Hurdle rate and cost of capital](/courses/finance-for-product/hurdle-rate): the cost of capital as a weighted mean.
> - [Diversification and index funds](/courses/personal-finance/diversification-and-index-funds): a portfolio's mix.

**Alex Tutor:** Next time: products of shares, where funnels and metric trees live.

- Previous lesson: [Typical value and position: mean, median, quartiles](https://productovi.com/courses/math-basics/mean-median-trimmed-mean.md)
- Next lesson: [Products of shares: funnels and metric trees](https://productovi.com/courses/math-basics/products-of-shares.md)

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