Lehmer Mean Calculator workspace
Lehmer mean
Details and comparison
- Order p
- 1
- Σxᵢᵖ
- 15
- Σxᵢᵖ⁻¹
- 4
- Count
- 4
Calculation steps
- Raise each positive input xᵢ to p = 1 and add: Σxᵢᵖ = 15.
- Raise each input to p − 1 = 0 and add: Σxᵢᵖ⁻¹ = 4.
- Divide the two sums: Lₚ = 15 / 4 = 3.75.
- For these positive data, the result is between the minimum 1 and maximum 8. At p = 0 it is the harmonic mean (2.133333333333333333333333333333333); at p = 1 it is the arithmetic mean (3.75).
What is a lehmer mean calculator?
The Lehmer mean is a parameterized mean of positive values. Each input contributes a power to the numerator and a one-lower power to the denominator. Changing the order p changes how strongly larger observations influence the result. The harmonic mean occurs at p=0, and the arithmetic mean occurs at p=1.
Important terms
- Order p
- The real parameter that sets the powers used in the numerator and denominator.
- Power sum
- A sum such as Σxᵢᵖ formed by raising each data value to the same exponent.
- Lehmer mean
- The ratio Σxᵢᵖ / Σxᵢᵖ⁻¹ for positive data.
When this method is useful
- Explore a family of means using a tunable order parameter.
- Recover harmonic and arithmetic means as special cases.
- Compare how changing p shifts influence toward larger or smaller values.
- Inspect each input’s numerator and denominator power contribution.
Formula and variables
- xᵢ
- the ith strictly positive input
- n
- the number of inputs, from 1 to 50
- p
- the order parameter, from −20 to 20
Raise each positive input to p and sum those powers. Divide by the sum of the same inputs raised to p−1. Strictly positive inputs keep every real power defined, including negative orders.
Domain note: Enter 1–50 strictly positive finite values and a finite order p between −20 and 20. The calculator limits p to protect numerical range and readability.
How to use this calculator
- 1
Enter 1–50 positive values and choose a real order p.
- 2
Calculate each xᵢᵖ and add them to form the numerator.
- 3
Calculate each xᵢᵖ⁻¹ and add them to form the denominator.
- 4
Divide the numerator by the denominator; the answer stays between the minimum and maximum input.
Step-by-step examples
Example 1
Problem: Find the Lehmer mean of 1, 2, and 4 when p=1.
Substitution: (1+2+4)/(1+1+1) = 7/3
Result: 7/3 ≈ 2.333333333
At p=1, the Lehmer mean is the arithmetic mean.
Example 2
Problem: Find the Lehmer mean of 1, 2, and 4 when p=0.
Substitution: 3/(1+1/2+1/4)
Result: 12/7 ≈ 1.714285714
At p=0, the formula is the harmonic mean.
Example 3
Problem: Find the Lehmer mean of 1, 2, and 4 when p=2.
Substitution: (1+4+16)/(1+2+4)
Result: 3
A higher order gives larger inputs more influence.
Rules, edge cases, and related ideas
Order changes the weighting
The parameter p changes the powers in both sums and therefore shifts the contribution pattern.
Useful special cases
p=0 gives the harmonic mean; p=1 gives the arithmetic mean; p=2 gives the contraharmonic mean.
Positive inputs
Strict positivity keeps all real powers in the formula finite and real for the supported range.
Edge cases and limitations
- A single positive value returns itself for any supported p.
- p=0 is evaluated as the harmonic mean.
- p=1 is evaluated as the arithmetic mean.
- Zero or negative data are rejected because arbitrary real powers may be undefined or non-finite.
How this differs from a related concept
The power mean and Lehmer mean are different parameterized families. Their formulas and special cases differ; for example, at p=1 the Lehmer mean is arithmetic, while the power mean at p=1 is also arithmetic but other corresponding orders do not generally match.
Understand the result
For positive data, the Lehmer mean is between the smallest and largest observations. Increasing p generally places more weight on larger values; decreasing p places more influence on smaller values. The parameter changes the measure, so report p whenever you report a Lehmer mean.
Common mistakes
- Omitting the p−1 exponent in the denominator.
- Assuming p is a count rather than a real order parameter.
- Comparing values from different orders without reporting p.
- Entering zero or negative values with a negative exponent.
Frequently asked questions
What is the Lehmer mean formula?
For positive xᵢ, Lₚ=Σxᵢᵖ/Σxᵢᵖ⁻¹.
Which order gives the arithmetic mean?
p=1 gives Σxᵢ/ n.
Which order gives the harmonic mean?
p=0 gives n/Σ(1/xᵢ), the harmonic mean.
Why must values be positive?
Positive values keep every real power defined, including negative powers.