SoatDev IT Consulting
SoatDev IT Consulting
  • About us
  • Expertise
  • Services
  • How it works
  • Contact Us
  • News
  • June 21, 2025
  • Rss Fetcher

Suppose you have a list of positive data points y1, y2, …, yn and you wanted to find a value α that minimizes the squared distances to each of the y‘s.

sum_{i=1}^n (y_i - alpha)^2

Then the solution is to take α to be the mean of the y‘s:

alpha = frac{1}{n} sum_{i=1}^n y_i

This result is well known [1]. The following variation is not well known.

Suppose now that you want to choose α to minimize the squared relative distances to each of the y‘s. That is, you want to minimize the following.

sum_{i=1}^n left( frac{y_i - alpha}{alpha} right)^2

The value of alpha this expression is the contraharmonic mean of the y‘s [2].

alpha = frac{sum_{i=1}^n y_i^2}{sum_{i=1}^n y_i}

Related posts

  • Minimize relative error
  • Where to wait for an elevator
  • Contraharmonic mean quirk

[1] Aristotle says in the Nichomachean Ethics “The mean is in a sense an extreme.” This is literally true: the mean minimizes the sum of the squared errors.

[2] E. F. Beckenbach. A Class of Mean Value Functions. The American Mathematical Monthly. Vol. 57, No. 1 (Jan., 1950), pp. 1–6

The post Minimize squared relative error first appeared on John D. Cook.

Previous Post
Next Post

Recent Posts

  • European leaders worry they’re too reliant on U.S. tech
  • Cartoonist Paul Pope is more worried about killer robots than AI plagiarism
  • Week in Review:  Meta reveals its Oakley smart glasses
  • 2 days left to save up to $210 on your TechCrunch All Stage pass
  • Minimize squared relative error

Categories

  • Industry News
  • Programming
  • RSS Fetched Articles
  • Uncategorized

Archives

  • June 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Tap into the power of Microservices, MVC Architecture, Cloud, Containers, UML, and Scrum methodologies to bolster your project planning, execution, and application development processes.

Solutions

  • IT Consultation
  • Agile Transformation
  • Software Development
  • DevOps & CI/CD

Regions Covered

  • Montreal
  • New York
  • Paris
  • Mauritius
  • Abidjan
  • Dakar

Subscribe to Newsletter

Join our monthly newsletter subscribers to get the latest news and insights.

© Copyright 2023. All Rights Reserved by Soatdev IT Consulting Inc.