# The square function, nature's preferred function?

**URL:** <https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987>\
**Category:** Factual Questions\
**Created:** [October 27, 2017, 2:04pm UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987 "2017-10-27T14:04:38Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [October 28, 2017, 9:44pm UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/21 "2017-10-28T21:44:38Z")

</div>

Sure, you you can make an argument for all sorts of error metrics. But consider just the simplest possible situation: what’s the best fit number for samples of 0 and 1? Intuitively, we’d expect 0.5, and that’s what least squares gives us. But least-abs could be _any_ number between 0 and 1, which doesn’t seem right (of course, there are situations where it is, such as “where should two friends meet on a road between them if we want to minimize total driving time”, but even then least-squares seems to better capture notions of fairness).

---

<div class="post-metadata">

**Author:** ![truthSeeker2](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@truthSeeker2](https://boards.straightdope.com/u/truthSeeker2)\
**Post date:** [October 29, 2017, 3:39am UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/22 "2017-10-29T03:39:02Z")

</div>

> [@Chronos](#):
>
> In general, lower-powered functions show up more often than higher-powered functions. The OP correctly notes that squares show up more often than cubes, and cubes more often than fourth powers, and so on. But the pattern continues at least one step further: Linear functions also show up more often than squares. The OP probably just didn’t notice this because linear functions seem uninteresting compared to square functions.
> 
> (I say “at least one step further” because constants, that is, zeroth-power functions, arguably show up more often even than linear functions, but there, it’s tough to even say whether something should be considered a “function”, or how many there are.)

I had not thought just about the integer exponents (squares, cubes…) but rational numbers like 2.5 . We also don’t see powers 2.5, 1.5 etc.

Perhaps how humans are able to perceive the world,  
the quantities we are interested in (or we have the capability to be interested in) are related by the square function or maybe the relations we are interested in (or relations whose derivation comes naturally to us human beings) are where the quantities are related by square function.

---

<div class="post-metadata">

**Author:** ![jtur88](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jtur88](https://boards.straightdope.com/u/jtur88)\
**Post date:** [October 29, 2017, 7:51am UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/23 "2017-10-29T07:51:09Z")

</div>

> [@Stranger\_On\_A\_Train](#):
>
> The golden ratio is, as **Quartz** notes, a quantity that shows up in many natural features and structures for reasons that are not fully understood, and is also aethetically appealing in art, architecture and music. r

I call this the “Bluenose effect”. The Bluenose was a Nova Scotia schooner that was widely held to be the most beautiful of ships, and not coincidentally, she was the fastest. The human eye detects what works best and sees it as beauty. Humans evolved in a world in which recognition of utility had survival value.

There is aesthetic attraction to many things that work well, from arrows to cheetahs. Perfection of design in the geometric universe came first, and the human eye followed through Darwinian selection.

---

<div class="post-metadata">

**Author:** ![jtur88](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jtur88](https://boards.straightdope.com/u/jtur88)\
**Post date:** [October 29, 2017, 9:21am UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/24 "2017-10-29T09:21:29Z")

</div>

I’m inclined to answer the OPs question by observing that the cube is the only polyhedron that packs uniformly in space. Which locks us into the simplicity of parallelism and perpendicularism. It is unimaginable that space would be a matrix of dimensions that are at odds with squarism.

I have wondered about the geometry of honeybees, which might have some dimensionality that we cannot grasp, since their livelihood depends so heavily on hexagons.

But it’s interesting to consider a species of philosophical fish, inhabiting a two-mile deep stratum in a four mile deep ocean, and who never venture beyond. They have never experienced he surface nor the seabed, and live in zero gravity. So how do they know up from down? They essentially occupy a universe made of an infinite number of intersecting planes, with no fixed points of reference. How would they reckon geometry?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 29, 2017, 10:15am UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/25 "2017-10-29T10:15:03Z")

</div>

> [@Chronos](#):
>
> Actually, some would argue that least-absolute-value does have better properties for curve-fitting, in that it’s less influenced by outliers…

Minimizing squared-error (with its linear derivative) is often preferred for reasons of _tractability_ rather than efficacy! This criterion gives a simple solution to the linear regression problem. As another example, the proofs that the Discrete Sine and Cosine Transforms are optimal for certain signal compression problems rely on simplifying assumptions _including the squared-error criterion_. AFAIK there are no similar proofs for an absolute-error criterion.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [October 29, 2017, 12:33pm UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/26 "2017-10-29T12:33:52Z")

</div>

> [@](#):
>
> Quoth **jtur88** :
> 
> I’m inclined to answer the OPs question by observing that the cube is the only polyhedron that packs uniformly in space.

It’s a good thing that you didn’t follow that inclination, then, because you’d be wrong. There are plenty of polyhedra that pack uniformly in space, including the extrusion of any polygon which packs uniformly in the plane, plus some 3d-specific ones like the rhombic dodecahedron.

And while least-absolute-value fits do have some wiggle to them, the wiggle is much reduced for data sets of significant size (the sort you’d usually be fitting lines to in the first place). And if the proofs that certain transforms are optimal depends on assuming the squared-error criterion, then maybe that just means that some other transforms are optimal for the least-absolute-value criterion.

Least-squares fitting is based on a number of assumptions which are _usually_ good approximations to the real world, and so _usually_ give good results, but those assumptions aren’t always good, and so it’s important to understand those assumptions and limitations, so that when they do fail, you understand why, and can use something more appropriate there. In particular, a great many real-world probability distributions have fatter tails than the Gaussian distribution, and so have more frequent outliers, and while those outliers won’t usually show up (hence what makes them outliers), when they do, they can totally wreck an analysis based on Gaussian assumptions.

---

<div class="post-metadata">

**Author:** ![truthSeeker2](https://avatars.discourse-cdn.com/v4/letter/t/7cd45c/32.png) [@truthSeeker2](https://boards.straightdope.com/u/truthSeeker2)\
**Post date:** [October 29, 2017, 1:27pm UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/27 "2017-10-29T13:27:31Z")

</div>

1. I think least-square method isn’t worthy of getting too much attention here, because it is only one of the many methods which can be used. It is used because it is simpler to use. The basis of all machine learning is directional derivative and the direction of steepest accent/decent.

2. Of course, all of us would agree why we use perpendicular axes is because distance travelled along one axis has no contribution to distance travelled along the other axis. Resultant displacement in such a system is a^2+b^2…  
I was thinking can there be another axes system where resultant displacement (or any other quantity of interest) be something which is got using something other than exponent 2.

---

<div class="post-metadata">

**Author:** ![Stranger\_On\_A\_Train](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@Stranger\_On\_A\_Train](https://boards.straightdope.com/u/Stranger_On_A_Train)\
**Post date:** [October 29, 2017, 3:46pm UTC](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987/28 "2017-10-29T15:46:04Z")

</div>

> [@jtur88](#):
>
> There is aesthetic attraction to many things that work well, from arrows to cheetahs. Perfection of design in the geometric universe came first, and the human eye followed through Darwinian selection.

Sorry, but this is mystical nonsense. From a purely geometric standpoint we have a preference for things that are symmetrical and in certain supposedly ideal proportions (hence the Golden and Silver Ratios), but when that extends to functionality independent of geometry, “Darwinian selection” of aesthetics offers nothing in terms of optimal performance. The unprecedented performance of the _Bluenose_ was almost entirely an accident of modifications forced by changes in racing rules during her construction, and in general, beauty, even when universally agreed upon, is not a great indicator of optimal performance or strength.

> [@truthSeeker2](#):
>
> 1. Of course, all of us would agree why we use perpendicular axes is because distance travelled along one axis has no contribution to distance travelled along the other axis. Resultant displacement in such a system is a^2+b^2…  
> I was thinking can there be another axes system where resultant displacement (or any other quantity of interest) be something which is got using something other than exponent 2.

I’m not sure what you mean here and I don’t think you do, either. In any system of orthogonal Cartesian axes of any multiple degree of dimensions, the distance between two points is the root sum of squares. You could have axes which are not orthogonal, or a metric space that is not linear (Cartesian) in which case the distance would vary with respect to the underlying geometry, but the distance being a function of squared quantities is a basic result of the coordinate transformation from the default coordinate system to one with the line connecting the two points laying coincident to one of the axes.

Stranger

[Previous page](https://boards.straightdope.com/t/the-square-function-natures-preferred-function/799987.md?page=1)
