weighted.mean() — Weighted average

An average where some numbers count more than others.

weighted.mean(x, w)

Key idea

Definition

each value
its weight (importance)
add up

Where you'd use it

Frequently asked questions

Do the weights need to sum to 1?
No — they’re normalized automatically; they just need to be non-negative and aligned with the values.