Weighted Power Mean Calculator

Calculate the weighted generalized mean of positive values for a real order p, including its geometric-mean limit at p = 0.

Weighted Power Mean Calculator workspace

Input

Enter values and weights

Choose a real order p to control how the average responds to larger and smaller positive values.

Use the same order as the values. A zero weight excludes an observation; all weights cannot be zero.

p = −1 harmonic · p = 0 geometric · p = 1 arithmetic · p = 2 quadratic

Examples
Weighted power mean
2.5
M2,w=(∑wixi2∑wi)1/2≈2.5M_{2,w}=\left(\frac{\sum w_i x_i^{2}}{\sum w_i}\right)^{1/2}\approx2.5
Values
3
Total weight
4
Order p
2
Weighted result among the values◆ 2.5
124MeanCircle size reflects normalized weight; the diamond marks the mean.
Working

Step-by-step calculation

  1. 1

    Use Mₚ = (Σwᵢxᵢᵖ / Σwᵢ)^(1/p) with p = 2.

  2. 2

    Scale values by 4 before exponentiation to keep intermediate powers in range.

  3. 3

    The weighted scaled-power sum is 1.5625; dividing by total weight 4 gives 0.390625.

  4. 4

    Rescale and apply the reciprocal exponent: Mₚ = 2.5.

Inspect weighted contributions 3 rows
Weighted power mean calculation terms
iValue xᵢWeight wᵢWeight shareWeighted term
1110.250.0625
2220.50.5
3410.251
Totals411.5625
At a glance

Why use this calculator?

Choose the order

Explore negative, zero, and positive real orders with the correct zero-order limit.

Connected averages

Recover weighted harmonic, geometric, arithmetic, and quadratic means.

Stable computation

Scaled powers reduce overflow risk for large or small inputs.

Overview

What is a weighted power mean calculator?

The weighted power mean is a family of averages indexed by an order p. For nonzero p, it averages weighted pth powers and then applies the reciprocal power. Its zero-order limit is the weighted geometric mean. With identical weights, p = −1, 0, 1, and 2 correspond to harmonic, geometric, arithmetic, and quadratic means.

Important terms

Order p
A real parameter that controls how the mean responds to small and large observations.
Normalized weight
The share wᵢ/Σwᵢ assigned to the ith value.
Power mean
A mean formed from weighted powers xᵢᵖ, with a 1/p power applied to their weighted average.
Zero-order limit
The p = 0 case, defined by continuity and equal to the weighted geometric mean.

When this method is useful

  • Compare weighted means under different choices of order.
  • Study how positive measurements respond to emphasizing large versus small values.
  • Connect harmonic, geometric, arithmetic, and quadratic means within one family.
  • Choose an order that reflects the mathematical structure of a positive-data problem.
Formula

Formula and variables

Mp,w=(∑i=1nwixip∑i=1nwi)1/p,p≠0;M0,w=exp⁡(∑i=1nwiln⁡xi∑i=1nwi)M_{p,w}=\left(\frac{\sum_{i=1}^{n}w_i x_i^p}{\sum_{i=1}^{n}w_i}\right)^{1/p},\quad p\ne0;\qquad M_{0,w}=\exp\left(\frac{\sum_{i=1}^{n}w_i\ln x_i}{\sum_{i=1}^{n}w_i}\right)
Mₚ,ᵥ
weighted power mean of order p
xᵢ
ith positive observation
wᵢ
ith nonnegative weight
p
real order from −1000 through 1000

For p ≠ 0, form the weighted average of pth powers, then raise it to 1/p. At p = 0, use the continuous logarithmic limit instead of dividing by zero. The computation rescales values before powers to reduce numerical overflow.

Domain note: Values must be strictly positive and finite, weights finite and nonnegative with positive total, and the two lists must have the same length. The order p must be one finite real value between −1000 and 1000.

How it works

How to use this calculator

  1. 1

    Enter positive values, matching nonnegative weights, and a real order p.

  2. 2

    For p ≠ 0, scale the values and calculate each weighted pth-power contribution.

  3. 3

    Divide the weighted-power sum by total weight and apply the 1/p power, undoing the scale.

  4. 4

    For p = 0, calculate the weighted average of natural logarithms and exponentiate.

Worked examples

Step-by-step examples

Example 1

Problem: Find the weighted power mean of order 2 for values 1, 2, and 4 with weights 1, 2, and 1.

Substitution: M_{2,w} = sqrt((1·1² + 2·2² + 1·4²) / 4) = sqrt(25/4)

Result: 2.5

Order 2 gives the weighted quadratic mean; the observation 2 contributes twice as much as either other value.

Example 2

Problem: Use order p = 0 for values 2, 8, and 32 with weights 1, 2, and 1.

Substitution: M_{0,w} = exp((ln 2 + 2 ln 8 + ln 32) / 4)

Result: 8

The p = 0 limit is the weighted geometric mean.

Example 3

Problem: Use order p = 1 for values 1, 2, and 4 with weights 1, 2, and 1.

Substitution: M_{1,w} = (1·1 + 2·2 + 1·4) / 4

Result: 2.25

Order 1 is the weighted arithmetic mean.

Method knowledge

Rules, edge cases, and related ideas

Special orders

p = −1 is harmonic, p → 0 is geometric, p = 1 is arithmetic, and p = 2 is quadratic, using the same weights.

Order changes sensitivity

Larger positive orders put more influence on large values; negative orders make small values more influential.

Scaled evaluation

Rescaling before exponentiation reduces intermediate overflow and underflow while preserving the mathematical result.

Edge cases and limitations

  • When p = 0, use the logarithmic limit; do not substitute zero into the nonzero-order formula.
  • A zero weight excludes that value from the weighted sums.
  • A single positive value with positive weight returns itself for every order.
  • All values must be positive so arbitrary real powers and logarithms stay real.

How this differs from a related concept

The weighted power mean generalizes several common averages. Its interpretation depends on the order and weights, so report both rather than presenting the number without context.

Interpretation

Understand the result

For a fixed positive data set and fixed nonnegative weight shares, increasing p does not decrease the power mean. Positive orders emphasize larger values, negative orders emphasize smaller values, and p = 0 uses the geometric limit. Multiplying every weight by the same positive constant leaves the result unchanged.

Common mistakes

  • Confusing the order p with the number of observations.
  • Evaluating the p = 0 case by division by zero.
  • Using negative or zero values with arbitrary real orders.
  • Changing the order of one list but not the other, which pairs observations with the wrong weights.

Frequently asked questions

What is the weighted power mean formula?

For p ≠ 0, it is (Σwᵢxᵢᵖ/Σwᵢ)^(1/p). At p = 0, the limit is the weighted geometric mean.

What does p = 0 mean?

It is the continuous limit of the power mean and equals exp(Σwᵢ ln xᵢ/Σwᵢ).

Which order gives a weighted arithmetic mean?

p = 1 gives the weighted arithmetic mean.

Which order gives a weighted harmonic mean?

p = −1 gives the weighted harmonic mean.

Why do values need to be positive?

Strictly positive inputs keep arbitrary real powers and the logarithmic p = 0 limit real-valued.

References & technical sources

Keep calculating

Related calculators