<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danloeb</id>
		<title>explain xkcd - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Danloeb"/>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php/Special:Contributions/Danloeb"/>
		<updated>2026-04-16T17:35:48Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:3174:_Bridge_Clearance&amp;diff=401218</id>
		<title>Talk:3174: Bridge Clearance</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:3174:_Bridge_Clearance&amp;diff=401218"/>
				<updated>2025-12-10T00:03:05Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- Please sign your posts with ~~~~ and don't delete this text. New comments should be added at the bottom. --&amp;gt;&lt;br /&gt;
But when the moon is directly overhead they also have to edit the contents of the sign [[User:Mathmaster|Mathmaster]] ([[User talk:Mathmaster|talk]])&lt;br /&gt;
:The Moon being overhead only applies to places in latitudes roughly between 28.5 degrees N and S, at its absolute most extreme inclinations. So, for the contiiguous US, that potentially affects only roads in some bits of Florida and Texas.&lt;br /&gt;
:Louisiana's most southern point is ''very'' close to that, such that the 'upper limb' of our satellite would 'overhead' an additional quarter of a degree of latitude, taking in this spot and a bit more. But that location is also an island. {{w|Port Fourchon, Louisiana}}, seems to be the most southerly stretch of regular (mainland) road in that state, and that's still just too far north to be affected. [[Special:Contributions/78.144.255.82|78.144.255.82]] 23:10, 28 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Note how the second sign extends off the panel, presumably with a warning further up for any vehicles under clearance. That’s quite the space elevator. [[User:KelOfTheStars!|KelOfTheStars!]] ([[User talk:KelOfTheStars!|talk]]) 01:21, 29 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Also note that in latitudes where the moon could possibly be directly overhead, the sun could also be directly overhead. This would also necessitate a change to the sign [[Special:Contributions/24.210.252.188|24.210.252.188]] 02:56, 29 November 2025 (UTC)&lt;br /&gt;
:(Moon tilt on top of Earth tilt makes the all-seasons &amp;quot;Sun overhead&amp;quot; a narrower band than the potential &amp;quot;Moon-overhead&amp;quot;, i.e. Tropic Of Capricorn to Tropic Of Cancer).&lt;br /&gt;
:For an even greater range, and lower clearance, consider the ISS. Then there's the Starlink/etc constellation 'mesh' of orbits that deliberately stretches further out. Or indeed polar-(/near-polar-)orbits for Earth Observation (Sun-synchronous orbits, slightly off polar, typically can be directly above anything up to 82-ish° N/S, being 98° and retrograde.&lt;br /&gt;
:And clearances of GSOs (there will be locations where sufficiently geo''stationary'' satellites are pretty much perpetual, though mere geo''synchronous'' ones may have daily (or twice-daily, on the crux of the figure-of-8 ground track) 'exposure') are so much greater than what the LEO ones would.&lt;br /&gt;
:A particular favourite of the Russian civil/military programmes are ''highly'' eccentric (and oblique) to service the kind of latitudes they want more loiter (slow, and far away) ''or'' passage (near, but rapid) over, often in teams of craft spread across the track to pass coverage over to another when one of them zooms on out of the desired 'sweet spot'... &amp;quot;Tundra Orbits&amp;quot;, I think it is? So accounting for them might involve vastly varying heights (though usually similar, overhead to overhead, barring any ascending-/descending-track differences) over a greater-than-average spread of latitudes (but still less than pure 90°-polar would, which is potentially over everywhere at some time or another). [[Special:Contributions/82.132.237.174|82.132.237.174]] 14:06, 29 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
While all of the Tropics are potentially directly under the Moon, note that at any given moment the patch of Earth directly under the moon is a circle about 27.86 km (17.29 miles) in radius. (Proof: Consider the point on earth directly underneath the center of the moon and go 27.86 km in any direction. Your plumb line will then be moved 1/4 of a degree, and so it will miss the moon has a visual diameter of 0.5 degrees.) The same is true for the sun which has have an angular size of 0.5 degrees. Thus on any given day only a strip of the tropics about 55.4 km wide is underneath the moon in this sense and a similar strip exists for points under the sun. Note that it is only under the moon or sun for at most 2 minutes so the sign update must be done quickly. &lt;br /&gt;
&lt;br /&gt;
ISS also has an angular diameter of 0.5 degrees but it is much closer and moves quickly across the field of view so that it is passing over a path about 100 meters wide at a speed of about 8 km/s, leaving insufficient time to update the sign. [[citation needed]] &lt;br /&gt;
[[User:DanLoeb|Dan Loeb]]  ([[User talk:DanLoeb|talk]]) 19:02 December 2025 EST&lt;br /&gt;
&lt;br /&gt;
When I first read the title text I thought it was talking about the tide's effect on the height of the bridge. [[User:Barmar|Barmar]] ([[User talk:Barmar|talk]]) 03:55, 29 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
How old is the sign that needs to he updated every day? These days they have automated signs for things like travel time to important exits, that type of system could easily be used to keep the clearance up-to-date. [[User:Barmar|Barmar]] ([[User talk:Barmar|talk]]) 03:59, 29 November 2025 (UTC)&lt;br /&gt;
:It'll cost more to at least ''maintain'' a changable sign. Perhaps power connection (unless solar+battery is enough), probably data connection (push- or pull- reconfiguration, unless relying upon continually internally calculated via RTC and the appropriate ephemera). It might not need to be visited each day, but periodic checks are going to be more than checking it hasn't been overly pierced by buckshot (or being told it's been flattened by a carelessly driven vehicle), and other charges will apply. Especially if you're covering every few yards (even hundreds of yards) of road with individually personalised warnings for that particular stretch. [[Special:Contributions/82.132.237.174|82.132.237.174]] 14:06, 29 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;gt; ''clearance of 10 feet and 6 inches, which is a realistic clearance''..... Anything less than 13'6&amp;quot; (in the US) will get hit frequently. Yes, we know some bridges that get hit frequently.  --[[User:PRR|PRR]] ([[User talk:PRR|talk]]) 06:42, 29 November 2025 (UTC)&lt;br /&gt;
: It says realistic, not common. {{w|Storrow Drive}}, which should be very familiar to Randall, has a clearance of just 10 feet. --[[User:Coconut Galaxy|Coconut Galaxy]] ([[User talk:Coconut Galaxy|talk]]) 07:08, 29 November 2025 (UTC)&lt;br /&gt;
:: Memorial Drive, at the so-called Harvard Bridge, right near MIT, has a clearance of 9 feet 0 inches. Large commercial traffic is not allowed on those two roads. Somehow big trucks go there regardless. MIT students sleeping in the nearby dorm, occasionally awaken to a loud noise. They phone MIT Campus Patrol, say, &amp;quot;Truck trap,&amp;quot; and return to slumber. [[Special:Contributions/173.188.194.233|173.188.194.233]] 15:10, 29 November 2025 (UTC)&lt;br /&gt;
: The current standard for bridge heights was established in 1956, when the US Interstate Highway system came into being. The minimum height was originally 14 feet (4.3 m), it was promptly (by 1960) raised to 16 feet (4.9 m); the &amp;lt;del&amp;gt;War&amp;lt;/del&amp;gt; Defense Department had demanded 17 feet (5.2 m). Highways built before the Interstate highway system set the standard (such as Storrow Drive, 1950) had lower clearances. The Merritt Parkway in Connecticut, a pioneering controlled-access highway built in the late 1930s, had a minimum bridge height of 11 feet (3.4 m); some of those clearances today are, or approach, 10 feet six inches (3.2 m). Surviving low-clearance bridges tend to be covered bridges over streams, and railway bridges over secondary roads, all built in the 19th and early 20th centuries. Trucks designed specifically (as they were, IIRC) to haul goods over the Interstate system will struggle on these older constructs. [[Special:Contributions/2605:59C8:160:DB08:E8F0:A309:4673:6AEF|2605:59C8:160:DB08:E8F0:A309:4673:6AEF]] 16:04, 29 November 2025 (UTC)&lt;br /&gt;
:Plenty of bridges in the UK get Bridge Strikes from trucks (despite copious warnings), and even the occasional double-decker bus that the driver gets wrong (wrong route, perhaps on a Not In Service drive to/from the depot, and forgotten what he's driving, hopefully nobody's riding above). Almost any city (and many rural locations) will probably know at least one local railway (or canal!) bridge that has massive amounts of face-protection (painted with warning stripes, words and height details, all the round warning signs, probably a 'jangly chain-bar' roof scraper and/or photoelectric warning-sign illuminator in the last stretch before it - and ''still'' visible scraping/denting on the add-on face-protection).&lt;br /&gt;
:Not sure if it's the lowest, vehiclewise, but for the UK I found https://www.youtube.com/watch?v=Vy9PmSRwG-k (going by the video thumbnail only) as a bridge that (non-SUV!) cars can just about use. But most people couldn't even walk or ride a bike under it, without ducking. Though at least you'd be high enough in any lorry cab to ''know'' it's a barrier to your vehicle. (Well, you'd have missed/disbelieved the signage, but basically be heading at a more obvious 'wall'.) [[Special:Contributions/82.132.237.174|82.132.237.174]] 16:16, 29 November 2025 (UTC)&lt;br /&gt;
:: Try [https://www.google.co.uk/maps/@55.9486871,-4.1246238,3a,15y,159.97h,91.04t/data=!3m7!1e1!3m5!1sTzKuejjwGJ6h-bbUb5rVbg!2e0!6shttps:%2F%2Fstreetviewpixels-pa.googleapis.com%2Fv1%2Fthumbnail%3Fcb_client%3Dmaps_sv.tactile%26w%3D900%26h%3D600%26pitch%3D-1.037973936125013%26panoid%3DTzKuejjwGJ6h-bbUb5rVbg%26yaw%3D159.96810709182384!7i13312!8i6656?hl=en&amp;amp;entry=ttu&amp;amp;g_ep=EgoyMDI1MTEyMy4xIKXMDSoASAFQAw%3D%3D this one] in Scotland, at 4 feet 9 inches (3.2 m). [[Special:Contributions/2605:59C8:160:DB08:E8F0:A309:4673:6AEF|2605:59C8:160:DB08:E8F0:A309:4673:6AEF]] 19:48, 29 November 2025 (UTC)&lt;br /&gt;
:::I don't know what that sign says, or how smalle Scotttish feet are, but 4`9 is slightly under 1.5m. :D --[[Special:Contributions/88.65.244.212|88.65.244.212]] 22:17, 29 November 2025 (UTC)&lt;br /&gt;
:::Depending on which Stretview shots (varied examples, seemingly, by time), you also get it as 4'6&amp;quot; and 1.3m warnings (if exactly that in Ft+In, which it might not be, should basically be 1m 37⅙cm, so probably was rounded down to 1.3m, even if the true value was also rounded down to get 4'6&amp;quot;, which is better than being rounded ''up''). The 4'9&amp;quot; might therefore have been a typo/thinko/printo on that version of the non-metric signage, or an inadvertant round-''up'' from the real measurement.&lt;br /&gt;
:::It looks like the signs on the bridge itself are accurate enough (in a downward-rounding direction), at least in the various versions I've discerned that are not either blurred by the StreetView process or obscured by the vegetation trailing down from above. [[Special:Contributions/78.144.255.82|78.144.255.82]] 22:52, 29 November 2025 (UTC)&lt;br /&gt;
:::: It was 1.4 m, not 3.2. I erred. [[Special:Contributions/205.175.118.102|205.175.118.102]] 00:23, 30 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Would expect that those in charge of the airspace would object to vehicles passing through. [[Special:Contributions/64.114.211.61|64.114.211.61]] 17:57, 29 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hello, If I may, I was thinking that there is an implied sacrificial bar on the ~46b light year sign, as the sign post does not stop at the sign, but continues on out of the panel. This could also add context as to why it is so expensive for the moon to cross over the road, as the highway department would need to very quickly replace the sacrificial bar with a much lower one, only to put the taller one back up a couple minutes or even seconds later. [[User:Nvidietha|Nvidietha]] ([[User talk:Nvidietha|talk]]) 19:04, 29 November 2025 (UTC)&lt;br /&gt;
: What would happen to a 45-million light-year bar attached to a rotating surface such as earth? Given that points further from the centre would be rotating quicker, wouldn't the points near the end be at and above the speed of light? Would the act of extending it and expending earth's momentum on rotating it and spend all of the speed which allows the end to approach C? What if it materialised instead of extended? As far as i can tell, the Federal Road Body does not have the budget to break the laws of the universe. [[Special:Contributions/92.40.216.156|92.40.216.156]] 21:25, 29 November 2025 (UTC)&lt;br /&gt;
:: Just taking Earth's rotation into account, the tip would be traveling (length of pole)×2pi per day. Assuming I didn't mess up some units with my napkin math, the tip will be going the speed of light at a length of about 25 AU, which is effectively microscopic on any scale worth measuring in light years. [[Special:Contributions/209.188.63.98|209.188.63.98]] 05:23, 30 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
Would the presence of stuff deeper in space like stars and asteroids not warrant a constantly-changing number as the earth rotates such that the road intersects different ones?  Currently, if a car with a 10-thousand light-year thing atop following the rotation of earth would likely be constantly hitting various space things as it rotates to follow the earth. [[Special:Contributions/92.40.216.156|92.40.216.156]] 21:17, 29 November 2025 (UTC)&lt;br /&gt;
: My thought is that, if one maintains a maximally-strict definition of &amp;quot;directly overhead&amp;quot;, the need for such changes would, in actuality, be vanishingly small. Without attempting to crunch numbers, I imagine that, in the context of deep space (and assuming that deep space is finite), a cylinder 2 m in diameter, stretching from the earth's surface, would disappear into the void and hit almost nothing. [[Special:Contributions/205.175.118.102|205.175.118.102]] 22:29, 29 November 2025 (UTC)&lt;br /&gt;
:: Has anyone yet estimated the average height of overhead cosmic whatever above the Earth's surface? Seems like a topic that someone would have already looked into, and could be used here. I agree though, I think it'd be more likely for a 2m cross-section to hit a &amp;quot;ceiling&amp;quot; at the edge of the observable universe rather than a star or planet. That being said, there are a lot of stars and planets. [[User:R128|R128]] ([[User talk:R128|talk]]) 16:28, 1 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
This ignores the relativistic limits.  At a height of 1/(2 pi cos(latitude)) light days, the top of your vehicle would be traveling at  light speed.  And that is just from the rotation of the earth.  In the Boston area, that works out to about 18.3 trillion feet.  --[[User:Divad27182|Divad27182]] ([[User talk:Divad27182|talk]]) 11:56, 30 November 2025 (UTC)&lt;br /&gt;
:Prior to the relativistic effects, I'm confident that the forces (tension; and, not to mention, if ever originally considered stationary, the attempt to apply lateral/angular momentum) would exceed any possible material's structural strength. I'll leave it up to someone else to work out where this theoretical maximum (thoroughly triple-bonded covalent monomolecular chain of neutronium-close but hydrogen-dense material?) might actually break down.&lt;br /&gt;
:That aside, superluminal movement/communication ''could'' be achieved by carefully coordinated 'predictive' temporary connectivity, a whole universe-spanning disc of free-floating components that link/unlink as required to 'at that moment' (by any given frame-of-reference) the vehicle/barrier-support-pole is as actually as high as it is expected to be.&lt;br /&gt;
:Already, we need to have had the normal 'upper limit bar' variously applied/unapplied ''more than 14 billion years ago'', in synch with how our planet's road infrastructure ''and'' its moon are precisely to be positioned, when even the latter won't actually start to exist (to eventually cause such a headache to the former) for almost 10 billion years. So you've already got to have worked that little problem out ahead of time, and thus increasingly less prescient installations perhaps all across half the cosmos. Which is a good trick, if you can do it! [[Special:Contributions/78.144.255.82|78.144.255.82]] 18:32, 30 November 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
I added height that would require permit. But wasn't able to find at which height permit will definitely never be granted, maybe because no government actually ever made such statements, but not sure. --[[User:Trimutius|Trimutius]] ([[User talk:Trimutius|talk]]) 13:08, 1 December 2025 (UTC)&lt;br /&gt;
&lt;br /&gt;
There's a website with videos of crashes under 11' 8&amp;quot; bridges:  https://11foot8.com/.  [[User:Dbwiddis|Dbwiddis]] ([[User talk:Dbwiddis|talk]]) 18:22, 1 December 2025 (UTC)&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:2882:_Net_Rotations&amp;diff=333155</id>
		<title>Talk:2882: Net Rotations</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:2882:_Net_Rotations&amp;diff=333155"/>
				<updated>2024-01-18T13:54:12Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Please sign your posts with ~~~~ and don't delete this text. New comments should be added at the bottom.--&amp;gt;&lt;br /&gt;
Wait, so I'm not the only one who thinks about this? [[Special:Contributions/172.71.167.177|172.71.167.177]] 23:28, 17 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Second! Still, I'm surprised that there are no edits yet. [[Special:Contributions/172.70.210.160|172.70.210.160]] 23:58, 17 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
This sounds like the premise of the 1966 sci-fi story The Revolving Boy by Gertrude Friedberg. I recall reading it sometime in the 1960s or ’70s. I wonder whether Randall has read the book too — https://solarbridge.wordpress.com/2011/05/19/the-revolving-boy-gertrude-friedberg/&lt;br /&gt;
I'm drawing a blank. [[Special:Contributions/162.158.158.68|162.158.158.68]] 01:05, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
I feel like the &amp;quot;worldline torsion&amp;quot; line needs to be explained moreso than the OCD thing, since &amp;quot;worldline&amp;quot; is a word people might not know and it's the crux of the joke. [[Special:Contributions/162.158.62.50|162.158.62.50]] 02:47, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:A worldline is a relativistic concept, the track of a particle (or anything, by extension) through 4D spacetime. Randall is imagining it as a physical object (not a mathematical abstraction) and thus whenever the actual object rotates, its worldline is twisted. Presumably these physical worldlines would build up torsional potential energy as they twisted, and could eventually be damaged if too many twists/year were present.[[User:Nitpicking|Nitpicking]] ([[User talk:Nitpicking|talk]]) 02:57, 18 January 2024 (UTC)&lt;br /&gt;
:: Yeah - something like that needs to go in the explanation.[[Special:Contributions/172.70.85.47|172.70.85.47]] 09:44, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
I would love to know what my net rotations is. Not enough to actually keep track, mind you. [[Special:Contributions/172.70.178.126|172.70.178.126]] 02:53, 18 January 2024 (UTC)&lt;br /&gt;
:I had a season pass to an amusement park a few years ago, and the time I spent on the Scrambler would probably make mine quite difficult to calculate, even if I knew how many times I rode it. [[Special:Contributions/172.69.247.57|172.69.247.57]] 04:41, 18 January 2024 (UTC)&lt;br /&gt;
: Probably depends a lot on whether you suffer from Zoolander's Syndrome. [[Special:Contributions/172.70.91.62|172.70.91.62]] 09:48, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
isn't this a refernce to spacetime torsion and the einstien-cartan theory? https://en.wikipedia.org/wiki/Einstein%E2%80%93Cartan_theory&lt;br /&gt;
&lt;br /&gt;
When I used to do plasma donations (they draw blood, centrifuge it, extract the plasma/platelet fraction and return the red and white cells) I would, when telling someone about it, jokingly say that the only side effect was, then I would jump and spin. [[User:RIIW - Ponder it|RIIW - Ponder it]] ([[User talk:RIIW - Ponder it|talk]]) 08:17, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
This comic makes sense in 2D because the space of rotations has fundamental group ℤ, but in 3D wouldn't you have at most ℤ/2ℤ corrections to make, since SU(2) double-covers SO(3)? cf. https://en.wikipedia.org/wiki/Plate_trick [[User:Ncf|Ncf]] ([[User talk:Ncf|talk]]) 09:27, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Is it worth mentioning the real medical conditions of torsion, e. . a torsion fracture (https://en.wikipedia.org/wiki/Torsion_fracture)? [[User:Nitpicking|Nitpicking]] ([[User talk:Nitpicking|talk]]) 12:43, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Remember that, to do it properly, any turns made in your car also have to be reversed in your car, to account for the rotation of the car's atoms. Go do a full loop through a counterclockwise cloverleaf! (Finding one is left as an exercise to the reader.) [[Special:Contributions/108.162.238.82|108.162.238.82]] 13:05, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Don't think it’s worth adding to the article but thought I would mention it here, anyone who has experience spending a long time in a VR headset will almost certainly have had to do this at some point to untwist the tether. To the point that there are apps you can run that show you how much your rotation has changed from the set 0 orientation. [[User:TomW1605|TomW1605]] ([[User talk:TomW1605|talk]]) 13:13, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
The CPSC recommends merry-go-rounds be limited to 13 ft/sec. https://www.sportsplayinc.com/images/cpsc.pdf For a 10 ft radius, that would be one rotation every 4.8 sec. Over &amp;quot;one long afternoon&amp;quot; (which I'll take as 6 hours) that would amount to 4,469 rotations. If you compensated for this with a mere one rotation per day, the excess rotation would be completely offset in 12 years and 3 months, so &amp;quot;decades&amp;quot; is quite an exageration. [[User:Loeb]]&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:2882:_Net_Rotations&amp;diff=333154</id>
		<title>Talk:2882: Net Rotations</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:2882:_Net_Rotations&amp;diff=333154"/>
				<updated>2024-01-18T13:51:15Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: Noted exageration in the title text.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Please sign your posts with ~~~~ and don't delete this text. New comments should be added at the bottom.--&amp;gt;&lt;br /&gt;
Wait, so I'm not the only one who thinks about this? [[Special:Contributions/172.71.167.177|172.71.167.177]] 23:28, 17 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Second! Still, I'm surprised that there are no edits yet. [[Special:Contributions/172.70.210.160|172.70.210.160]] 23:58, 17 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
This sounds like the premise of the 1966 sci-fi story The Revolving Boy by Gertrude Friedberg. I recall reading it sometime in the 1960s or ’70s. I wonder whether Randall has read the book too — https://solarbridge.wordpress.com/2011/05/19/the-revolving-boy-gertrude-friedberg/&lt;br /&gt;
I'm drawing a blank. [[Special:Contributions/162.158.158.68|162.158.158.68]] 01:05, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
I feel like the &amp;quot;worldline torsion&amp;quot; line needs to be explained moreso than the OCD thing, since &amp;quot;worldline&amp;quot; is a word people might not know and it's the crux of the joke. [[Special:Contributions/162.158.62.50|162.158.62.50]] 02:47, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
:A worldline is a relativistic concept, the track of a particle (or anything, by extension) through 4D spacetime. Randall is imagining it as a physical object (not a mathematical abstraction) and thus whenever the actual object rotates, its worldline is twisted. Presumably these physical worldlines would build up torsional potential energy as they twisted, and could eventually be damaged if too many twists/year were present.[[User:Nitpicking|Nitpicking]] ([[User talk:Nitpicking|talk]]) 02:57, 18 January 2024 (UTC)&lt;br /&gt;
:: Yeah - something like that needs to go in the explanation.[[Special:Contributions/172.70.85.47|172.70.85.47]] 09:44, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
I would love to know what my net rotations is. Not enough to actually keep track, mind you. [[Special:Contributions/172.70.178.126|172.70.178.126]] 02:53, 18 January 2024 (UTC)&lt;br /&gt;
:I had a season pass to an amusement park a few years ago, and the time I spent on the Scrambler would probably make mine quite difficult to calculate, even if I knew how many times I rode it. [[Special:Contributions/172.69.247.57|172.69.247.57]] 04:41, 18 January 2024 (UTC)&lt;br /&gt;
: Probably depends a lot on whether you suffer from Zoolander's Syndrome. [[Special:Contributions/172.70.91.62|172.70.91.62]] 09:48, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
isn't this a refernce to spacetime torsion and the einstien-cartan theory? https://en.wikipedia.org/wiki/Einstein%E2%80%93Cartan_theory&lt;br /&gt;
&lt;br /&gt;
When I used to do plasma donations (they draw blood, centrifuge it, extract the plasma/platelet fraction and return the red and white cells) I would, when telling someone about it, jokingly say that the only side effect was, then I would jump and spin. [[User:RIIW - Ponder it|RIIW - Ponder it]] ([[User talk:RIIW - Ponder it|talk]]) 08:17, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
This comic makes sense in 2D because the space of rotations has fundamental group ℤ, but in 3D wouldn't you have at most ℤ/2ℤ corrections to make, since SU(2) double-covers SO(3)? cf. https://en.wikipedia.org/wiki/Plate_trick [[User:Ncf|Ncf]] ([[User talk:Ncf|talk]]) 09:27, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Is it worth mentioning the real medical conditions of torsion, e. . a torsion fracture (https://en.wikipedia.org/wiki/Torsion_fracture)? [[User:Nitpicking|Nitpicking]] ([[User talk:Nitpicking|talk]]) 12:43, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Remember that, to do it properly, any turns made in your car also have to be reversed in your car, to account for the rotation of the car's atoms. Go do a full loop through a counterclockwise cloverleaf! (Finding one is left as an exercise to the reader.) [[Special:Contributions/108.162.238.82|108.162.238.82]] 13:05, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
Don't think it’s worth adding to the article but thought I would mention it here, anyone who has experience spending a long time in a VR headset will almost certainly have had to do this at some point to untwist the tether. To the point that there are apps you can run that show you how much your rotation has changed from the set 0 orientation. [[User:TomW1605|TomW1605]] ([[User talk:TomW1605|talk]]) 13:13, 18 January 2024 (UTC)&lt;br /&gt;
&lt;br /&gt;
The CPSC recommends merry-go-rounds be limited to [13 ft/sec|https://www.sportsplayinc.com/images/cpsc.pdf]. For a 10 ft radius, that would be one rotation every 4.8 sec. Over &amp;quot;one long afternoon&amp;quot; (which I'll take as 6 hours) that would amount to 4,469 rotations. If you compensated for this with a mere one rotation per day, the excess rotation would be completely offset in 12 years and 3 months, so &amp;quot;decades&amp;quot; is quite an exageration.&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:2701:_Change_in_Slope&amp;diff=299662</id>
		<title>Talk:2701: Change in Slope</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:2701:_Change_in_Slope&amp;diff=299662"/>
				<updated>2022-11-22T16:52:46Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: /* Raw Data */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Please sign your posts with ~~~~ and don't delete this text. New comments should be added at the bottom.--&amp;gt;&lt;br /&gt;
I am an occasional data scientist, and I can confirm this is why we have monitor stands that tilt. [[Special:Contributions/172.71.94.50|172.71.94.50]] 16:33, 21 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
The third e in &amp;quot;neeed&amp;quot; in the title text seems to be a typo&lt;br /&gt;
[[User:Victor|Victor]] ([[User talk:Victor|talk]]) 16:41, 21 November 2022 (UTC)&lt;br /&gt;
:I think Randall may have added it to represent that the speaker prolongs the &amp;quot;e&amp;quot; sound for emphasis, although that's usually done with 4-5 e's. [[User:Barmar|Barmar]] ([[User talk:Barmar|talk]]) 16:53, 21 November 2022 (UTC)&lt;br /&gt;
::I had to double-check this, myself (presumed the 'Bot created the lage faithfully, but went straight to source to see if I needed to find a vandalism post to revert). May need a comment (to prevent hypercorrection, if not to note the implied emphisis) and certainly will if it turns out to be a typo and gets corrected (for which I'm sure a future checker will discover Randall's revisiting, but then worth a note to that effect). [[Special:Contributions/172.70.90.2|172.70.90.2]] 17:42, 21 November 2022 (UTC)&lt;br /&gt;
:::I guess Randall fixed it, because I'm only seeing 2 'e's in the title text. Just updated it on the wiki. [[User:Zman350x|Zman350x]] ([[User talk:Zman350x|talk]]) 01:26, 22 November 2022 (UTC)&lt;br /&gt;
Bender Bot was one of the main characters in Futurama. [[User:Barmar|Barmar]] ([[User talk:Barmar|talk]]) 16:54, 21 November 2022 (UTC)&lt;br /&gt;
:Just donning my unnecessary pedantry hat for a moment: his name is Bender Bending Rodriguez --[[User:192·168·0·1|192·168·0·1]] ([[User talk:192·168·0·1|talk]]) 23:02, 21 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
A couple(?) of authors used the word(s) &amp;quot;(point of) inflection&amp;quot;, which is {{w|Inflection point|not really suitable}} for a join between two straight segments. Was tempted to talk about &amp;quot;discontinuity&amp;quot;, but that really only applies to the meta-slope (derivatives, to one degree or other) where it suddenly jumps (at a point), or the derivative's derivative has jumps (as it enters and leaves the smoothly linking curve). Hope it works well enough how I left it, though. [[Special:Contributions/162.158.142.176|162.158.142.176]] 21:28, 21 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
For anyone curious, I used an image editor to turn the entire comic sideways and [https://cdn.discordapp.com/attachments/525939879805190154/1044395695525875712/xkcd_sideways.png it actually does seem to work,] to some degree anyway. [[User:SuperSupermario24|&amp;lt;span style=&amp;quot;color: #b000ff;&amp;quot;&amp;gt;SSM24&amp;lt;/span&amp;gt;]] 23:37, 21 November 2022 (UTC)&lt;br /&gt;
:Added; thanks! [[Special:Contributions/172.71.158.230|172.71.158.230]] 00:14, 22 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
This one shows the beauty of Explainxkcd: people reading the explanation are likely to learn accessible methods of substantial practical utility. [[Special:Contributions/162.158.166.173|162.158.166.173]] 00:38, 22 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
Hey, if it works for picking out lumber at Lowe’s, why not for graphs, too? - MadMarie&lt;br /&gt;
:There was an old bit of explanation that related it to examining physical objects (for dent/bend-removal in metalwork, I think it was) that got wiped out by a later edit. Though I'm considering my own version, now generalised to cover your experience, as it seems quite relevant/analogous to me. [[Special:Contributions/172.70.90.2|172.70.90.2]] 14:37, 22 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
Whoever wrote the 1st explanation needs to go touch grass and learn how real people talk, pissed me off so much I just effectively rewrote the whole thing from scratch [[Special:Contributions/172.71.202.46|172.71.202.46]] 06:34, 22 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
Going in a different direction than &amp;quot;this is silly&amp;quot; - if we ignore the &amp;quot;viewing point/parallax&amp;quot; issue, doing a change of basis like this is similar to linear methods like [SVD https://hadrienj.github.io/assets/images/ch12_svd/ch11_SVD_geometry.png] &amp;amp; [https://jakevdp.github.io/PythonDataScienceHandbook/figures/05.09-PCA-rotation.png PCA], and considering the graph as a mappingg in a &amp;quot;higher dimension&amp;quot; is similar to the &amp;quot;kernel trick&amp;quot; popularized by [https://i.ytimg.com/vi/wqSTBCguVyU/maxresdefault.jpg Support] [https://miro.medium.com/max/4800/1*gtF6KeL7b9zNHd7pXtC1Nw.png Vector] [https://dinhanhthi.com/img/post/ML/support-vector-machine/svm-3.jpg Machines] 11:31, 22 November 2022 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Raw Data ==&lt;br /&gt;
&lt;br /&gt;
I love this cartoon. This is definitely something that was relevant in my work! &lt;br /&gt;
&lt;br /&gt;
At my old job I had some commercial or public-domain software for extracting the raw data behind a scatter plot. If anyone has something like that handy, I would love to see someone extract the data behind the graph on the left, so that we can:&lt;br /&gt;
   1. Apply the affine transformation which generates the image on the right with the tilted paper.&lt;br /&gt;
   2. Apply the statistical tests which Randall Munroe is alluding to.&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208109</id>
		<title>2435: Geothmetic Meandian</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208109"/>
				<updated>2021-03-14T19:35:32Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: added links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 2435&lt;br /&gt;
| date      = March 10, 2021&lt;br /&gt;
| title     = Geothmetic Meandian&lt;br /&gt;
| image     = geothmetic_meandian.png&lt;br /&gt;
| titletext = Pythagorean means are nice and all, but throwing the median in the pot is really what turns this into random forest statistics: applying every function you can think of, and then gradually dropping the ones that make the result worse.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways to identify the '{{w|average}}' value of a series of values, the most common unweighted methods being the {{w|median}} (take the central value from the ordered list of values if there are an odd number - or the value half-way between the two that straddle the divide between two halves if there are an even number) and the {{w|arithmetic mean}} (add all the numbers up, divide by the number of numbers). The {{w|geometric mean}} is less well-known but works similarly to the arithmetic mean. The geometric mean of 'n' positive numbers is the 'n'th root of the product of those numbers. If all of the numbers in a sequence of identical, then its arithmetic mean, geometric mean and median will be identical, since they would all be equal to the common value of the terms of the sequence. However, if the sequence is not constant, then {{w|Inequality_of_arithmetic_and_geometric_means#Geometric_interpretation|the arithmetic mean will be greater than the geometric mean}}, and the median may be different than either of those means.&lt;br /&gt;
&lt;br /&gt;
The geometric mean, arithmetic mean and {{w|harmonic mean}} (not shown) are collectively known as the {{w|Pythagorean means}}, as specific modes of a greater and more generalized mean formula that extends arbitrarily to various other possible nuances of mean-value rationisations (cubic, etc.).&lt;br /&gt;
&lt;br /&gt;
{{w|Outlier}}s and internal biases within the original sample can make boiling down a set of values into a single 'average' sometimes overly biased by flaws in the data, with your choice of which method to use perhaps resulting in a value that is misleading, exaggerating or suppressing the significance of any blips.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Either here or after the next paragraph, demonstrate how (1,1,2,3,5) resolves in each individual method, perhaps? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this depiction, the three named methods of averaging are embedded within a single function that produces a sequence of three values - one output for each of the methods. Being a series of values, Randall suggests that this is ideally suited to being ''itself'' subjected to the comparative 'averaging' method. Not just once, but as many times as it takes to narrow down to a sequence of three values that are very close to one another. &lt;br /&gt;
&lt;br /&gt;
It can be shown that the xkcd value of 2.089 for GMDN(1,1,2,3,5) is validated:&lt;br /&gt;
&lt;br /&gt;
{|-&lt;br /&gt;
 | F0 || 1 || 1 || 2 || 3 || 5 &lt;br /&gt;
 |-&lt;br /&gt;
 |    || Arithmetic mean || Geometric mean || Median ||&lt;br /&gt;
 |-&lt;br /&gt;
 | F1 || 2.4 || 1.974350486 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F2 || 2.124783495 ||	2.116192461 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F3 || '''2.080325319''' || 2.079536819 || 2.116192461		&lt;br /&gt;
 |-&lt;br /&gt;
 | F4 || 2.0920182 || 2.091948605 || '''2.080325319'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F5 || '''2.088097374''' || 2.088090133 || 2.091948605		&lt;br /&gt;
 |-&lt;br /&gt;
 | F6 || 2.089378704 ||	2.089377914 || '''2.088097374'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F7 || '''2.088951331''' ||	2.088951244 || 2.089377914		&lt;br /&gt;
 |-&lt;br /&gt;
 | F8 || 2.089093496 || 2.089093487 || '''2.088951331'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F9 || '''2.089046105''' || 2.089046103 || 2.089093487		&lt;br /&gt;
 |-&lt;br /&gt;
 | F10 || 2.089061898 || 2.089061898 || '''2.089046105'''		&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function GMDN in the comic is properly defined in the second row since F acts on a vector to produce another three vector, however GMDN in the last line is shown to produce a single real number rather than a vector and is thus missing a final operation of returning a single component. Each row in this table shows the set Fn(..) composed of the average, geomean and median computed on the previous row, with the sequence {1,1,2,3,5} as the initial F0. While GMDN is not differentiable, due to the median, this can be interpreted as somewhat similar to a heat equation which approaches equilibrium through averaging. Interestingly, the maximum value alternates between the average and the median (highlighted in bold in the table), while the minimum value alternates between the geomean and the median. This holds for many inputs thus providing the basis for a possible proof-by-induction of convergence on the range (see discussions).&lt;br /&gt;
&lt;br /&gt;
The comment in the title text about suggests that this will save you the trouble of committing to the 'wrong' analysis as it gradually shaves down any 'outlier average' that is unduly affected by anomalies in the original inputs. It is a method without any danger of divergence of values, since all three averaging methods stay within the interval covering the input values (and two of them will stay strictly within that interval).&lt;br /&gt;
&lt;br /&gt;
The title text may also be a sly reference to an actual mathematical theorem, namely that if one performs this procedure only using the arithmetic mean and the harmonic mean, the result will converge to the geometric mean. Randall suggests that the (non-Pythagorean) median, which does not have such good mathematical properties with relation to convergence, is, in fact, the secret sauce in his definition.&lt;br /&gt;
&lt;br /&gt;
The question of being unsure of which mean to use is especially relevant for the arithmetic and harmonic means in following example.&lt;br /&gt;
   * Cueball has some US Dollars and wishes to buy Euros. Suppose the bank will exchange US Dollars to Euros at a rate of €5 for $6 (about 0.83333€/$ or 1.20000$/€).&lt;br /&gt;
   * Megan   has some Euros and wishes to buy US Dollars. Suppose the bank will exchange Euros to US Dollars at a rate of $7 for €6 (about 0.85714€/$ or 1.16667$/€).&lt;br /&gt;
[[Cueball]] and [[Megan]] decide to complete the exchange between themselves in order to save the {{w|Bid-ask spread}} of the {{w|Exchange rate}} which is the cost the bank imposes on Cueball and Megan for its service as a {{w|Market maker}}. &lt;br /&gt;
   * Cueball offers to split the difference by averaging the rates €5:$6 and €6:$7 yielding a rate of €71:$84 (about 0.84524€/$ or 1.18310$/€).&lt;br /&gt;
   * Megan   offers to split the difference by averaging the rates $6:€5 and $7:€6 yielding a rate of €60:$71 (about 0.84507€/$ or 1.18333$/€).&lt;br /&gt;
In one direction (€/$), Cueball is using the arithmetic mean but Megan is using the geometric mean while in the other direction ($/€), Megan is using the arithmetic mean but Megan is using the geometric mean. This creates two new exchange rates which are closer than the orginal rates, but the new rates are still different for each other. Megan and Cueball can then iterate this process and the rates will converge to the geometric mean of the original rates namely:&lt;br /&gt;
   * sqrt((5/6)*(6/7)) = sqrt(5/7) = 0.84515€/$ or&lt;br /&gt;
   * sqrt((6/5)*(7/6)) = sqrt(7/5) = 1.18322$/€.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There does exist an {{w|arithmetic-geometric mean}}, which is defined identically to this except with the arithmetic and geometric means, and sees some use in calculus.  In some ways it's also philosophically similar to the {{w|truncated mean}} (extremities of the value range, e.g. the highest and lowest 10%s, are ignored as not acceptable and not counted) or {{w|Winsorized mean}} (instead of ignored, the values are readjusted to be the chosen floor/ceiling values that they lie beyond, to still effectively be counted as 'edge' conditions), only with a strange dilution-and-compromise method rather than one where quantities can be culled or neutered just for being unexpectedly different from most of the other data.&lt;br /&gt;
&lt;br /&gt;
The input sequence of numbers (1,1,2,3,5) chosen by Randall is also the opening of the {{w|Fibonacci sequence}}.  This may have been selected because the Fibonacci sequence also has a convergent property: the ratio of two adjacent numbers in the sequence approaches the [https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence golden ratio] as the length of the sequence approaches infinity.&lt;br /&gt;
&lt;br /&gt;
Here is a table of averages classified by the various methods referenced&lt;br /&gt;
&lt;br /&gt;
{|border =1 width=100% cellpadding=5 class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ averages using various methods&lt;br /&gt;
! Method &lt;br /&gt;
! Value&lt;br /&gt;
! Formula&lt;br /&gt;
|-&lt;br /&gt;
! Arithmetic&lt;br /&gt;
| 2.4 || &lt;br /&gt;
|-&lt;br /&gt;
! Geometric&lt;br /&gt;
| 1.9743504858348&lt;br /&gt;
| &amp;lt;math&amp;gt;\left(\prod_{i=1}^n x_i\right)^\frac{1}{n} = \sqrt[n]{x_1 x_2 \cdots x_n}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Median &lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
! GMDN &lt;br /&gt;
| 2.089 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
{{incomplete transcript|Do NOT delete this tag too soon.}}&lt;br /&gt;
&lt;br /&gt;
F(x1,x2,...xn)=({x1+x2+...+xn/n [bracket: arithmetic mean]},{nx,x2...xn, [bracket: geometric mean]} {x n+1/2 [bracket: median]})&lt;br /&gt;
&lt;br /&gt;
Gmdn(x1,x2,...xn)={F(F(F(...F(x1,x2,...xn)...)))[bracket: geothmetic meandian]}&lt;br /&gt;
&lt;br /&gt;
Gmdn(1,1,2,3,5) [equals about sign] 2.089&lt;br /&gt;
&lt;br /&gt;
Caption: Stats tip: If you aren't sure whether to use the mean, median, or geometric mean, just calculate all three, then repeat until it converges&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
Geothm means &amp;quot;counting earths&amp;quot; (From Ancient Greek γεω- (geō-), combining form of γῆ (gê, “earth”) and ἀριθμός arithmos, 'counting').  Geothmetic means &amp;quot;art of Geothming&amp;quot; based on the etymology of Arithmetic (from Ancient Greek ἀριθμητική (τέχνη) (arithmētikḗ (tékhnē), “(art of) counting”).  This is an exciting new terminology that is eminently suitable for modern cosmology &amp;amp; high energy physics - particularly when doing math on the multiverse.  However, it is unlikely this etymology is related to the term &amp;quot;geothmetic meandian&amp;quot; as coined by Randall, as it can be more simply explained as a portmanteau of the three averages in its construction: '''geo'''metric mean, ari'''thmetic mean''', and me'''dian'''.&lt;br /&gt;
&lt;br /&gt;
The following python code (inefficiently) implements the above algorithm:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from functools import reduce&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def f(*args):&lt;br /&gt;
    args = sorted(args)&lt;br /&gt;
    mean = sum(args) / len(args)&lt;br /&gt;
    gmean = reduce(lambda x, y: x * y, args) ** (1 / len(args))&lt;br /&gt;
    if len(args) % 2:&lt;br /&gt;
        median = args[len(args) // 2]&lt;br /&gt;
    else:&lt;br /&gt;
        median = (args[len(args) // 2] + args[len(args) // 2 - 1]) / 2&lt;br /&gt;
    return mean, gmean, median&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
max_iterations = 10&lt;br /&gt;
l = [1, 1, 2, 3, 5]&lt;br /&gt;
for iterations in range(max_iterations):&lt;br /&gt;
    fst, *rest = l&lt;br /&gt;
    if all((abs(r - fst) &amp;lt; 0.00000001 for r in rest)):&lt;br /&gt;
        break&lt;br /&gt;
    l = f(*l)&lt;br /&gt;
print(l[0], iterations)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a slightly more efficient version of the python code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from scipy.stats.mstats import gmean&lt;br /&gt;
import numpy as np&lt;br /&gt;
&lt;br /&gt;
def get_centers(a,tol=0.00001):&lt;br /&gt;
    a = np.array(a)&lt;br /&gt;
    result = False&lt;br /&gt;
    if len(a)==3:&lt;br /&gt;
        if np.abs(a[0]-a[1])&amp;lt;=tol and np.abs(a[0]-a[2])&amp;lt;=tol and np.abs(a[2]-a[1])&amp;lt;=tol:&lt;br /&gt;
            result=True&lt;br /&gt;
    print([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
    if result:&lt;br /&gt;
        return a[0]&lt;br /&gt;
    return get_centers([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here is an implementation of the Gmdn function in R:&lt;br /&gt;
&lt;br /&gt;
    Gmdn &amp;lt;- function (..., threshold = 1E-6) {&lt;br /&gt;
      # Function F(x) as defined in comic&lt;br /&gt;
      f &amp;lt;- function (x) {&lt;br /&gt;
        n &amp;lt;- length(x)&lt;br /&gt;
        return(c(mean(x), prod(x)^(1/n), median(x)))&lt;br /&gt;
      }&lt;br /&gt;
      # Extract input vector from ... argument&lt;br /&gt;
      x &amp;lt;- c(...)&lt;br /&gt;
      # Iterate until the standard deviation of f(x) reaches a threshold&lt;br /&gt;
      while (sd(x) &amp;gt; threshold) x &amp;lt;- f(x)&lt;br /&gt;
      # Return the mean of the final triplet&lt;br /&gt;
      return(mean(x))&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
For a start, there is a syntax error. After the first application of F, you get a 3-tuple. Subsequent iterations preserve the 3-tuple, and we need to analyze the resulting sequence.&lt;br /&gt;
Perhaps there is an implicit claim all three entries converge to the same result. In any case, lets see what we get:&lt;br /&gt;
&lt;br /&gt;
Wlog, we have three inputs (x_1,y_1,z_1), and want to understand the iterates of the map &lt;br /&gt;
F(x,y,z) = ( (x+y+z)/3, cube root of (xyz), median(x,y,z) ). Lets write F(x_n,y_n,z_n) = (x_{n+1},y_{n+1},z_{n+1}).&lt;br /&gt;
&lt;br /&gt;
The inequality of arithmetic and geometric means gives x_n \geq y_n, if n \geq 2,  and&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Math]]&lt;br /&gt;
[[Category:Statistics]]&lt;br /&gt;
[[Category:Portmanteau]]&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=Talk:2435:_Geothmetic_Meandian&amp;diff=208107</id>
		<title>Talk:2435: Geothmetic Meandian</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=Talk:2435:_Geothmetic_Meandian&amp;diff=208107"/>
				<updated>2021-03-14T19:31:43Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: /* Is the arithmetic-geometric mean connected to geometry? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--Please sign your posts with ~~~~ and don't delete this text. New comments should be added at the bottom.--&amp;gt;&lt;br /&gt;
Oh, this one's good. Just checked in (no, I wasn't hovering over the refresh button, my first visit today!) and one glance had me in paroxysms of laughter. But how to explain it? Gonna have to think about that. [[Special:Contributions/141.101.98.96|141.101.98.96]] 01:12, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
I made a really bad spreadsheet to understand better how it works: https://docs.google.com/spreadsheets/d/1fqmHwDmirJrsKPdf94PutFDw31DMAYxNeR7jef1jneE/edit?usp=sharing&lt;br /&gt;
&lt;br /&gt;
Someone fix my ''awful''  transcript edits please. --[[User:Char Latte49|Char Latte49]] ([[User talk:Char Latte49|talk]]) 02:31, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
Seeing the Python added to the Explanation, try this Perl (typed straight here, so not tested)... &lt;br /&gt;
 ## Your prefered variations of &amp;quot;#!/usr/bin/perl&amp;quot;, &amp;quot;use strict;&amp;quot; and &amp;quot;use warnings;&amp;quot; here! ##&lt;br /&gt;
 sub F { my (@vals)=@_; my $invVals=1/int(@vals);&lt;br /&gt;
  my ($geo,$arith,$med)=(1); # Only defining $geo, so first *= works correctly!&lt;br /&gt;
  while (@vals) { my($lo,$hi)=(shift @vals,pop @vals); # $hi may be undef - this is intended!&lt;br /&gt;
   $arith+=$lo; $geo*=$lo; unless (defined $hi) {  $med =  $lo;     last }&lt;br /&gt;
   $arith+=$hi; $geo*=$hi; unless (@vals)       { ($med)=F($lo,$hi)      }&lt;br /&gt;
  }&lt;br /&gt;
  return ($arith*$invVals, $geo**$invVals, $med);&lt;br /&gt;
 }&lt;br /&gt;
 sub GMDN { my (@vals)=sort @_; my $lim=10**(-5); # Adjust $lim to taste...&lt;br /&gt;
   return &amp;quot;Error: No vals!&amp;quot; unless  @vals; # Catch!&lt;br /&gt;
   return $vals[0]          unless ($vals[$#vals]-$vals[0]) &amp;gt; $lim;&lt;br /&gt;
   return GMDM(F(@vals));&lt;br /&gt;
 }&lt;br /&gt;
 my @test=(1,1,2,3,5);&lt;br /&gt;
 print &amp;quot;Values:              @test\nGeothmetic Meandian: &amp;quot;.GMDN(@test).&amp;quot;\n&amp;quot;;&lt;br /&gt;
...debugged in my head, so probably fatally flawed but easily fixed/adapted anyway. [[Special:Contributions/141.101.99.109|141.101.99.109]] 03:04, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
Why so complicated?&lt;br /&gt;
 perl -e 'use strict; use warnings; sub F { my ($s,$p) = (0,1); my @srt = sort {$a&amp;lt;=&amp;gt;$b} @_; for (@_) { $s += $_; $p *= $_; } return ($s/@_,$p**(1/@_),$srt[$#_/2]); } sub Gmdn { print join(&amp;quot;, &amp;quot;,@_=F(@_)),&amp;quot;\n&amp;quot; for 0..20; return @_; } print join(&amp;quot;, &amp;quot;,Gmdn(1,1,2,3,5)),&amp;quot;\n&amp;quot;;'&lt;br /&gt;
(With interim results) SCNR -- [[User:Xorg|Xorg]] ([[User talk:Xorg|talk]]) 03:18, 11 March 2021 (UTC)&lt;br /&gt;
:''I'' can read your version (and I see you do explicit {$a&amp;lt;=&amp;gt;$b}, which indeed ''may'' be necessary in mine for real use, along with additional sanity checks, I will check later) but I wanted to make mine neat, and ''slightly'' tricksy in implementation, but still not quite so entirely obfuscated to the more uninitiated. TIMTOWTDI, etc, so I like your (almost) bare-bones version too. ;)&lt;br /&gt;
:(Is 20 cycles enough to converge in sufficiently extreme cases? Won't give &amp;quot;Too deep&amp;quot; error, though, even  if it takes at least that long. There's a definite risk that mine might, as written.) [[Special:Contributions/141.101.99.229|141.101.99.229]] 03:45, 11 March 2021 (UTC)&lt;br /&gt;
::Given the lack of precision in Randall's example usage, I think 20 cycles ought to be enough for everyone ;-P. I'm trying to prove that the interval's size has to shrink by somewhat close to a factor of 1/2 every cycle, but it's tricky and it's late. If I can assume a factor of 1/2 in the long run, 64 iterations should pin down a 64-bit float.&lt;br /&gt;
::I actually didn't try to obfuscate, I was just too lazy to type more ;-). Otherwise I might have left out the &amp;quot;return&amp;quot;s and passing parameters at all. -- [[User:Xorg|Xorg]] ([[User talk:Xorg|talk]]) 04:21, 11 March 2021 (UTC)&lt;br /&gt;
:::I find the one-liner more readable: it's straightforward and pretty minimal. For what its worth, here's my version: &amp;lt;pre&amp;gt;perl -MList::Util=sum,product -E 'sub F { (sum @_)/@_, (product @_)**(1/@_), (sort { $a &amp;lt;=&amp;gt; $b } @_)[$#_/2] } $, = &amp;quot; &amp;quot;; say @v = @ARGV; say @v = F(@v) for 1..30' 1 1 2 3 5&amp;lt;/pre&amp;gt; 30 iterations is enough for the numbers to display identically on this system (to 14 decimal places). I think it's even cleaner in Raku (formerly Perl 6): &amp;lt;pre&amp;gt;raku -e 'sub F(@d) { @d.sum/@d, [*](@d)**(1/@d), @d.sort[@d/2] }; say my @v = +«@*ARGS; say @v = F(@v) for 1..33' 1 1 2 3 5&amp;lt;/pre&amp;gt; On this system, Rakudo yields an additional decimal place, which takes another 3 iterations to converge.  [[User:Smylers|Smylers]] ([[User talk:Smylers|talk]]) 06:53, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
Side-thought: is GMDN (nowhere near as logical an ETLA contraction of the title term as, say, 'GMMD' or 'GTMD') actually an oblique reference to the GNDNs as popularised/coined by Trek canon? Worth a citation/Trivia? [[Special:Contributions/162.158.158.97|162.158.158.97]] 04:12, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
Besides of nerdgasm is there some reason why the program code is relevant for the explanation? [[User:Elektrizikekswerk|Elektrizikekswerk]] ([[User talk:Elektrizikekswerk|talk]]) 08:55, 11 March 2021 (UTC)&lt;br /&gt;
:Apparently not. I moved it to the trivia section. [[User:Elektrizikekswerk|Elektrizikekswerk]] ([[User talk:Elektrizikekswerk|talk]]) 07:51, 12 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
I do not agree with the statement that &amp;quot;The title text may also be a sly reference to an actual mathematical theorem, namely that if one performs this procedure only using the arithmetic mean and the harmonic mean, the result will converge to the geometric mean.&amp;quot; Could one produce a reference to this result? A simple computer experiment does not show this &amp;quot;theorem&amp;quot; to be true, i.e. for the procedure to return the geometric mean of the original entry. [[User:Pointfivegully|Pointfivegully]] ([[User talk:Pointfivegully|talk]]) 15:04, 12 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Proof of convergence ==&lt;br /&gt;
&lt;br /&gt;
Can any of you come up with a mathematical proof that repeated application of F on a set of (say) positive real numbers is guaranteed to converge toward a single real number, i.e. that the GMDN of a set of positive real numbers is well-defined? &lt;br /&gt;
&lt;br /&gt;
One observation I've made is that if you consider that maximum and minimum numbers in the original set to be x1 and xn (without loss of generality), something we know for sure is that AM(x1, ..., xn), GM(x1, ..., xn) and Median(x1, ..., xn) are all at least x1 and at most xn that is to say...&lt;br /&gt;
&lt;br /&gt;
x1 &amp;lt;= AM(x1, ..., xn), GM(x1, ..., xn), Median(x1, ..., xn) &amp;lt;= xn&lt;br /&gt;
&lt;br /&gt;
So range(AM(x1, ..., xn), GM(x1, ..., xn), Median(x1, ..., xn)) is necessarily &amp;lt;= range(x1, ..., xn). &lt;br /&gt;
&lt;br /&gt;
And given that we know that unless x1, ..., xn are all equal, that x1 &amp;lt; AM(x1, ..., xn) &amp;lt; xn, we have an even stricter result (unless x1, ..., xn are all equal) that is &lt;br /&gt;
range(AM(x1, ..., xn), GM(x1, ..., xn), Median(x1, ..., xn)) &amp;lt; range(x1, ..., xn). &lt;br /&gt;
&lt;br /&gt;
So, it's clear that range(x1, ..., xn) &amp;gt; range(F(x1, ..., xn)) &amp;gt; range(F(F(x1, ..., xn))) &amp;gt; range(F(F(F(x1, ..., xn)))) &amp;gt; ... and it's also clear that all of these ranges are &amp;gt;= 0. There is a result in number theory that says that any infinite sequence of real numbers which monotonically decreases and is bounded from below converges.&lt;br /&gt;
&lt;br /&gt;
So we know for sure that range(F(F(...F(x1, ..., xn)...))) converges but we still have to show that it converges to 0 to show that the GMDN converges to a single real number.&lt;br /&gt;
&lt;br /&gt;
I'm not sure how to proceed. Does anyone have any ideas?&lt;br /&gt;
&lt;br /&gt;
EDIT:&lt;br /&gt;
I just noticed that unless x1, ..., xn are all equal, AM(x1, ..., xn) is at least ((n-1)/n) * range(x1, ..., xn) away from both x1 and xn. So not only do we have that range(x1, ..., xn) &amp;gt; range(F(x1, ..., xn)) from before, but we also have that ((n-1)/n) * range(x1, ..., xn) &amp;gt;= range(F(x1, ..., xn)). This guarantees that that the range falls exponentially on repeated applications of F. So it's certain that the the range ultimately converges to 0, and hence that the GMDN is well-defined.&lt;br /&gt;
&lt;br /&gt;
It might be a good idea for someone to concretely present this idea as a proof on Page.&lt;br /&gt;
&lt;br /&gt;
See my additional notes below. -Ramakarl&lt;br /&gt;
&lt;br /&gt;
[[Special:Contributions/172.69.135.44|172.69.135.44]] 05:07, 11 March 2021 (UTC) Anirudh Ajith&lt;br /&gt;
&lt;br /&gt;
:That doesn't quite work as it stands, since proving AM is that distance away does not say anything about the other two averages. I think it's true, but a little more rigour is required. [[Special:Contributions/141.101.98.120|141.101.98.120]] 09:17, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
When trying this myself I first arrived at 2.082, not 2.089. What threw me off was the incomplete formula for the median, which only works with sorted lists. The three values returned by F(...) aren't necessarily sorted.&lt;br /&gt;
[[Special:Contributions/141.101.76.194|141.101.76.194]] 09:49, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
First: almost all invocations are with exactly 3 arguments (The output of the previous invocation), so we don't have to deal with N inputs at all.&lt;br /&gt;
Notation: In iteration n we have the values min[n] &amp;lt;= mid[n] &amp;lt;= max[n] (in any order) and can compute AM[n], GM[n] (and median[n] = mid[n]).&lt;br /&gt;
Let Q[n] := max[n]/min[n] &amp;gt;= 1, R[n] := max[n]-min[n] = (Q[n]-1)*min[n].&lt;br /&gt;
We already established that R is decreasing and min is increasing, so Q is decreasing.&lt;br /&gt;
&lt;br /&gt;
Theorem: There is an n0 with R[n+1] &amp;lt;= R[n]*2/3 for all n &amp;gt; n0.&lt;br /&gt;
&lt;br /&gt;
Proof (by case discrimination for each n):&lt;br /&gt;
case 1: mid[n+1] != AM[n]:&lt;br /&gt;
    R[n+1] &amp;lt;= Max(max[n]-AM[n],AM[n]-min[n]) &lt;br /&gt;
            = Max(max[n]*3-(max[n]+mid[n]+min[n]),(max[n]+mid[n]+min[n])-min[n]*3)/3&lt;br /&gt;
            = Max(max[n]*2-(mid[n]+min[n]),(max[n]+mid[n])-min[n]*2)/3&lt;br /&gt;
           &amp;lt;= (max[n]-min[n])*2/3&lt;br /&gt;
            = R[n]*2/3&lt;br /&gt;
    Hence: R[n+1] &amp;lt;= R[n]*2/3&lt;br /&gt;
&lt;br /&gt;
case 2: mid[n+1] == AM[n]:&lt;br /&gt;
  because GM &amp;lt;= AM: min[n+1] = GM[n], max[n+1] = mid[n]&lt;br /&gt;
  Q[n+1] = mid[n]/GM[n]&lt;br /&gt;
         = (mid[n]^3/(max[n]*mid[n]*min[n]))^(1/3)&lt;br /&gt;
         = (mid[n]^2/(max[n]*min[n]))^(1/3)&lt;br /&gt;
        &amp;lt;= (mid[n]/min[n])^(1/3)&lt;br /&gt;
        &amp;lt;= Q[n]^(1/3)&lt;br /&gt;
  R[n+1] = (Q[n+1]-1)*min[n+1]&lt;br /&gt;
        &amp;lt;= (Q[n]^(1/3)-1)*GM[n]&lt;br /&gt;
        &amp;lt;= (Q[n]^(1/3)-1)*(max[n]^2*min[n])^(1/3)&lt;br /&gt;
         = (Q[n]^(1/3)-1)*Q[n]^(2/3)*min[n]&lt;br /&gt;
         = (Q[n]-Q[n]^(2/3))*min[n]&lt;br /&gt;
         = R[n]-(Q[n]^(2/3)-1)*min[n]&lt;br /&gt;
        &amp;lt;= R[n]-(Q[n]-1)*min[n]/(Q[n]^(1/3)+1))&lt;br /&gt;
         = R[n]-R[n]/(Q[n]^(1/3)+1)&lt;br /&gt;
         = R[n]*(1-1/(Q[n]^(1/3)+1))&lt;br /&gt;
  Now we can pick a q1 = Q(n1) with q1 &amp;gt; Q[n] &amp;gt;= 1 for n &amp;gt; n1 because Q is decreasing:&lt;br /&gt;
    R[n+1] &amp;lt;= R[n]*(1-1/(q1^(1/3)+1))&lt;br /&gt;
  &lt;br /&gt;
  Together with case 1, this gives R -&amp;gt; 0 and thus Q -&amp;gt; 1. So we can pick another q0 = Q(n0) with q0 &amp;lt;= 8:&lt;br /&gt;
    R[n+1] &amp;lt;= R[n]*(1-1/(q0^(1/3)+1)) &amp;lt;= R[n]*2/3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
-- [[User:Xorg|Xorg]] ([[User talk:Xorg|talk]]) 17:34, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Better Python implementations ==&lt;br /&gt;
&lt;br /&gt;
I'd like to add a somewhat more compact Python implementation based on the numpy module.&lt;br /&gt;
 import numpy as np&lt;br /&gt;
 &lt;br /&gt;
 def F(x):&lt;br /&gt;
    return np.mean(x), np.exp(np.log(x).mean()), np.median(x)&lt;br /&gt;
 &lt;br /&gt;
 def GMDN(x, tolerance=1e-6):&lt;br /&gt;
    while np.std(x) &amp;gt; tolerance:&lt;br /&gt;
        x = F(x)&lt;br /&gt;
    return x[0]&lt;br /&gt;
 &lt;br /&gt;
 gmdn = GMDN([1, 1, 2, 3, 5])&lt;br /&gt;
 print(gmdn)&lt;br /&gt;
--[[User:Lvdgraaff|Lvdgraaff]] ([[User talk:Lvdgraaff|talk]]) 10:42, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
No need for numpy, there's the statistics module in the stdlib&lt;br /&gt;
&lt;br /&gt;
 import math&lt;br /&gt;
 import statistics&lt;br /&gt;
 &lt;br /&gt;
 def F(*nums):&lt;br /&gt;
     return (&lt;br /&gt;
         statistics.mean(nums),&lt;br /&gt;
         statistics.geometric_mean(nums),&lt;br /&gt;
         statistics.median(nums),&lt;br /&gt;
     )&lt;br /&gt;
 &lt;br /&gt;
 def GMDN(*nums):&lt;br /&gt;
     while not math.isclose(max(nums), min(nums)):&lt;br /&gt;
         nums = F(*nums)&lt;br /&gt;
     return nums[0]&lt;br /&gt;
 &lt;br /&gt;
 gmdn = GMDN(1, 1, 2, 3, 5)&lt;br /&gt;
 print(gmdn)&lt;br /&gt;
&lt;br /&gt;
:For something as simple as this, I always find it cheating to use a package to abstract away the few actually necessary calculations. You might as well use a DWIM module and do 'result = DWIM(input)' as the sole command. But that's me for you. I'd write my own direct-to-memory screen RAM accesses, if silly things like OS HALs and GPU acceleration (once you find a way to message them as directly as possible) hadn't long since made that pretty much moot, if not actually verboten... [[Special:Contributions/141.101.99.109|141.101.99.109]] 17:53, 11 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I'd like to add my own implemetation:&lt;br /&gt;
from math import *&lt;br /&gt;
def getMeans(n=list):&lt;br /&gt;
    n.sort()&lt;br /&gt;
    mean=sum(n)/len(n)&lt;br /&gt;
    if len(n)%2==1:&lt;br /&gt;
        median=n[len(n)//2]&lt;br /&gt;
    else:&lt;br /&gt;
        median=(n[1+floor(len(n)/2)]-n[floor(len(n)/2)])/2&lt;br /&gt;
    prod=1&lt;br /&gt;
    for i in n:&lt;br /&gt;
        prod*=i&lt;br /&gt;
    gmean=prod**(1/len(n))&lt;br /&gt;
    return [mean,median,gmean]&lt;br /&gt;
def gmdn(tol,n=list):&lt;br /&gt;
    mList=n&lt;br /&gt;
    mList=getMeans(mList)&lt;br /&gt;
    while not (isclose(mList[0],mList[1],rel_tol=tol) and isclose(mList[1],mList[2],rel_tol=tol) and isclose(mList[0],mList[2],rel_tol=tol) ) :&lt;br /&gt;
        mList = getMeans(mList)&lt;br /&gt;
    return (mList[0]+mList[1]+mList[2])/3&lt;br /&gt;
print(gmdn(1e-15,[1,1,2,3,5]))&lt;br /&gt;
 &lt;br /&gt;
which gives me 2.089057949736859&lt;br /&gt;
&lt;br /&gt;
== Sloppy notation? ==&lt;br /&gt;
&lt;br /&gt;
As a mathematician, I immediately noticed a couple of annoying niggles. Firstly, it is only implied, but never clearly stated, that the input list is ordered - which means the median is wrong unless ordered. Now F outputs an ordered triple of real numbers, and in calculating G, this is fed in to F again directly. This will frequently give inputs that are not in order, and in subsequent iterations the &amp;quot;median&amp;quot; will always be the middle number - i.e. the geometric mean - regardless of the actual median. Secondly, Randall's final line gives the output of G as a single number, but as it is just the result of a repeated application of F, the output of G should be an ordered triple. I'm sure Randall is aware of both, and chose to cut out the implied ordering of the inputs and choosing one of the three values as the output of G as they aren't necessary for the joke, but maybe we should note something about this in the explanation.[[Special:Contributions/141.101.99.109|141.101.99.109]] 13:07, 11 March 2021 (UTC)&lt;br /&gt;
:First, I've never seen a definition of median which doesn't account for ordering itself, although I am a little annoyed at his definition for a different reason— that it doesn't account for even-length lists. Second, what I got from the comic initially is that G&amp;lt;sub&amp;gt;MDN&amp;lt;/sub&amp;gt; is supposed to be a single number, specifically that value for which all three of its elements would become equal if implemented infinitely many times (and it ''will'' converge, because if the three elements are all the same it already has converged, and if at least two are different, both means will necessarily become greater than the least value and smaller than the greatest value due to the definition of 'mean'). Another annoyance I noted is that G&amp;lt;sub&amp;gt;MDN&amp;lt;/sub&amp;gt; is real iff there are an even number of negative numbers and/or the length of the initial list is odd, but I suppose that can't be helped. Ooh, complex meandianing! [[User:BlackHat|BlackHat]] ([[User talk:BlackHat|talk]]) 15:15, 11 March 2021 (UTC)&lt;br /&gt;
::I guess it depends on whether we take x_{(n+1)/2} literally or not. If taken literally, the elements need to be sorted, and even-length lists don't work. If we assume the &amp;quot;median&amp;quot; is the literal part, and the notation is just a simplified sketch, then both are okay (median of even list is average of the two &amp;quot;middle&amp;quot; elements). [[Special:Contributions/172.68.143.160|172.68.143.160]] 22:00, 12 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Is the arithmetic-geometric mean connected to geometry? ==&lt;br /&gt;
&lt;br /&gt;
In the case that only the arithmetic and geometric mean are used the combined arithmetic-geometric mean can be interpreted as the radius R of a circle which has the same circumference as an ellipse with half axes a and b. &lt;br /&gt;
&lt;br /&gt;
R = M(a,b)&lt;br /&gt;
&lt;br /&gt;
Can the Geothmetic Meandian be interpreted are the radius R of a 3D sphere which has the same surface as an elliptic cylinder with half-axes a and b and length c ?&lt;br /&gt;
&lt;br /&gt;
R = GMDN(a,b,c)&lt;br /&gt;
&lt;br /&gt;
: Here is a geometric interpretation of the inequality between them: {{w|Inequality_of_arithmetic_and_geometric_means#Geometric_interpretation}}. [[User:Danloeb|DanLoeb]] ([[User talk:Danloeb|talk]]) 19:31, 14 March 2021 (UTC) D--[[User:Danloeb|DanLoeb]] ([[User talk:Danloeb|talk]]) 19:31, 14 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
=== The RandallMunroe Set ===&lt;br /&gt;
&lt;br /&gt;
Here is some MATLAB code (sorry) to generate an image showing the number of cycles required to converge, a' la' the Mandelbrot Set. &lt;br /&gt;
Not sure how to post an image here, but it is really cool.&lt;br /&gt;
&lt;br /&gt;
    % RandallMunroeSet.m&lt;br /&gt;
    % From a suggestion by Randall Munroe in XKCD #2435 Mar 10 2021&lt;br /&gt;
    % new statistic GMDN(x) = [mean(x), geomean(x), median(x)]&lt;br /&gt;
    % calculation is recursive, ending when converged&lt;br /&gt;
    % here we count the cycles required to converge and plot a' la' Madelbrot Set&lt;br /&gt;
    % the initial X input can be any length vector, but we restrict to 3 space&lt;br /&gt;
    % here for visualization, and fix Z so we get a 2D image&lt;br /&gt;
    % so far, for positive values, it converges in less than 40 or not at all&lt;br /&gt;
    % for negative x, set max cycles to something larger like 60&lt;br /&gt;
    % I haven't plotted it, but there is logically another set that plots the&lt;br /&gt;
    % resulting converged value.&lt;br /&gt;
    % Explore!&lt;br /&gt;
    % (c)2021 CC BY-NC 2.5 SBStevenson@uh.edu peace, love, trees&lt;br /&gt;
&lt;br /&gt;
    % here we answer the question, how many cycles does it take for GMDN to&lt;br /&gt;
    % converge?&lt;br /&gt;
    maxcycles = 40; stepsize = .0025;&lt;br /&gt;
    z = 1; % pick a Z, any Z&lt;br /&gt;
    x = stepsize:stepsize:(4-stepsize); % explore a range of x and y&lt;br /&gt;
    y = x; &lt;br /&gt;
    wbh = waitbar(0);&lt;br /&gt;
    RMS = zeros(numel(x),numel(y),numel(z)); % no, not root mean square, this is the Randall Munro Set!&lt;br /&gt;
&lt;br /&gt;
    for idx = 1: numel(x)&lt;br /&gt;
        waitbar(idx ./ numel(x)); % feedback on progress&lt;br /&gt;
        for jdx = idx:numel(y) % result is symmetric across the diagonal, so we save time by computing above the diagonal&lt;br /&gt;
&lt;br /&gt;
            for kdx = 1:numel(z)&lt;br /&gt;
                RMS(idx, jdx, kdx)  = gmdn([x(idx),y(jdx),z(kdx)], maxcycles);&lt;br /&gt;
                RMS(jdx, idx, kdx) = RMS(idx, jdx, kdx); % copy across the diagonal&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    close(wbh)&lt;br /&gt;
    RMS = min(maxcycles,RMS);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    if numel(z) == 1;&lt;br /&gt;
        figure(420);&lt;br /&gt;
        image(255*RMS./maxcycles);truesize; colormap(jet(256));&lt;br /&gt;
    end&lt;br /&gt;
    if numel(z) == 3; % allow for true color, but in practice it is so sensitive to initial z value it just gives three different sets unless the Zs are VERY CLOSE&lt;br /&gt;
        figure(420);image(RMS./maxcycles);truesize;&lt;br /&gt;
    end&lt;br /&gt;
    title(['RandallMunro Set Z = ' num2str(z)]);&lt;br /&gt;
&lt;br /&gt;
    figure(3);hist(RMS(:),0:maxcycles);&lt;br /&gt;
    %% How many cycles to converge?&lt;br /&gt;
    function ncycles = gmdn(x, maxcycles)&lt;br /&gt;
    ncycles = 0;&lt;br /&gt;
    while ncycles &amp;lt; maxcycles&lt;br /&gt;
        ncycles = ncycles + 1;&lt;br /&gt;
        x = [mean(x), geomean(x), median3(x)];&lt;br /&gt;
        if all(x(1) == x(2:3))&lt;br /&gt;
            break&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    %% Geometric Mean&lt;br /&gt;
    function result = geomean(x)&lt;br /&gt;
    result = prod(x) .^ (1/numel(x));&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    %% Slightly faster median than builtin MATLAB function&lt;br /&gt;
    function result = median3(x)&lt;br /&gt;
    y = sort(x);&lt;br /&gt;
    result = y(2);&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
My python program:&lt;br /&gt;
from math import *&lt;br /&gt;
def getMeans(n=list):&lt;br /&gt;
    n.sort()&lt;br /&gt;
    mean=sum(n)/len(n)&lt;br /&gt;
    if len(n)%2==1:&lt;br /&gt;
        median=n[len(n)//2]&lt;br /&gt;
    else:&lt;br /&gt;
        median=(n[1+floor(len(n)/2)]-n[floor(len(n)/2)])/2&lt;br /&gt;
    prod=1&lt;br /&gt;
    for i in n:&lt;br /&gt;
        prod*=i&lt;br /&gt;
    gmean=prod**(1/len(n))&lt;br /&gt;
    return [mean,median,gmean]&lt;br /&gt;
def gmdn(tol,n=list):&lt;br /&gt;
    mList=n&lt;br /&gt;
    mList=getMeans(mList)&lt;br /&gt;
    while not (isclose(mList[0],mList[1],rel_tol=tol) and isclose(mList[1],mList[2],rel_tol=tol) and isclose(mList[0],mList[2],rel_tol=tol) ) :&lt;br /&gt;
        mList = getMeans(mList)&lt;br /&gt;
    return mList[0]&lt;br /&gt;
print(gmdn(1e-15,[1,1,2,3,5]))&lt;br /&gt;
&lt;br /&gt;
It gave me 2.0890579497368584&lt;br /&gt;
&lt;br /&gt;
== Proof - Possibly by Induction ==&lt;br /&gt;
&lt;br /&gt;
Earlier question:&lt;br /&gt;
&amp;gt; Can any of you come up with a mathematical proof that repeated application of F on a set of (say) positive real numbers is guaranteed to converge toward a single real number&lt;br /&gt;
&lt;br /&gt;
Define: &amp;lt;br&amp;gt;&lt;br /&gt;
F(n) = {An,Bn,Cn}&amp;lt;br&amp;gt;&lt;br /&gt;
F(n+1) = {An+1, Bn+1, Cn+1} = {ave(An,Bn,Cn), geomean(An,Bn,Cn), median(An,Bn,Cn)}&amp;lt;br&amp;gt;&lt;br /&gt;
R(n) = range of F = max(An,Bn,Cn)-min(An,Bn,Cn), for iteration n&amp;lt;br&amp;gt;&lt;br /&gt;
We want to show that the range R(n) converges to 0.&amp;lt;br&amp;gt;&lt;br /&gt;
With the following notation: max(n) == max(An,Bn,Cn), ave(n)==ave(An,Bn,Cn), ..&amp;lt;br&amp;gt;&lt;br /&gt;
We observe the following emperically for many different inputs:&amp;lt;br&amp;gt;&lt;br /&gt;
R(n) = max(n)-min(n)&amp;lt;br&amp;gt;&lt;br /&gt;
CASE 1: max(n)=ave(n), THEN max(n+1)=median(n+1)=geomean(n) AND min(n+1)=geomean(n+1)&amp;lt;br&amp;gt;&lt;br /&gt;
In this case max(n+1) is fixed to a previous value, the geomean(n), and min(n+1) takes on the new geomean(n+1) which is guaranteed to reduce the range R(n) as min(n) &amp;lt; geomean(n+1) &amp;lt; max(n). It also implies case 2 must be invoked because min(n+1)=geomean(n+1) at n+1.&amp;lt;br&amp;gt;&lt;br /&gt;
CASE 2: min(n)=geomean(n), THEN max(n+1)=ave(n+1) AND min(n+1)=median(n+1)=ave(n)&amp;lt;br&amp;gt;&lt;br /&gt;
In this case min(n+1) is fixed to a previous value, the ave(n), and max(n+1) takes on the new ave(n+1) which is guaranteed to reduce the range R(n) as min(n) &amp;lt; ave(n+1) &amp;lt; max(n). It also implies case 1 must be invoked because max(n+1)=ave(n+1) at n+1.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Each case forces the range to be reduced while also forcing the alternate case on the next iteration.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In other words, the maximum at each iteration alternates between the average and the median, and the minimum alternates between the geomean and the median. Thus either the minimum or the maximum at n+1 are always converging away from the minimum and maximum at previous n.&amp;lt;br&amp;gt;&lt;br /&gt;
While this is not a formal proof, since the initial observations are emperical, I believe that a proof-by-induction can be built based on the oscillating convergence (without the need for F to be differentiable).&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:Ramakarl|Ramakarl]] ([[User talk:Ramakarl|talk]]) 00:00, 12 March 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:How can this be formulated as a PDE when F isn't even differentiable?&lt;br /&gt;
:Besides, R(Fn+1) &amp;lt; R(Fn) does not imply limit R(Fn) = 0 (Think R(n) := 1+1/n). -- [[User:Xorg|Xorg]] ([[User talk:Xorg|talk]]) 02:50, 12 March 2021 (UTC)&lt;br /&gt;
Agreed. F is not differentiable due to median. For arbitrary R(n) such as R(n)=1+1/n then limit R(Fn) != 0, however I do not define R(n) arbitrarily but define it as R(n)=max(An,Bn,Cn)-min(An,Bn,Cn) [[User:Ramakarl|Ramakarl]] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[User:snark]]&lt;br /&gt;
This has nothing to do with a PDE or the heat equation. It is an iterative map from R^3 to R^3 (after the first application of F). In&lt;br /&gt;
order to prove it converges you need to show that there is a fixed point and that the mapping takes you closer to it. The fixed points&lt;br /&gt;
are easy since F((x,x,x))=(x,x,x) so there is a line of fixed points. You can then calculate the perpendicular distance between the&lt;br /&gt;
starting point (x1,x2,x3) and the line given by (x(t),x(t),x(t)). Next you calculate the distance between f((x1,x2,x3)) and the line&lt;br /&gt;
and show that is is less than the first distance.&lt;br /&gt;
&lt;br /&gt;
Agreed. I've removed reference to PDE or Heat equation except for the indirect similarity. The new suggestion for proof, which is incomplete, is inductive based on the observed alternation of the min/max between the geomean and arithmean. I believe it can be shown that for some N, there exists F(N)=k, where k=min(N)=max(N)=arithmean(N)=geomean(N)=median(N) within some epsilon, and k is the fixed point. This is because the min(n+1), median(n+1) and max(n+1) alternate between arithmean(n) and geomean(n), which are strictly inside the open interval ( min(n), max(n) ). [[User:Ramakarl|Ramakarl]]&lt;br /&gt;
&lt;br /&gt;
I believe we can produce a simpler, rigorous proof. Assuming a set of three is given, we can show that after every 2 iterations, the range is reduced by at least 1/3 of its original value, and therefore it converges exponentially to 0. We use the fact that each iteration, none of the three values will lie outside the range of the previous iteration. In addition, it can be shown that the arithmean lies at least 1/3 of the previous range away from the highest and lowest values of the previous iteration.&lt;br /&gt;
&lt;br /&gt;
If the arithmean is the highest or lowest value on the first iteration, then the range will therefore already be small enough (and won't get bigger in the second iteration.) Otherwise, the only remaining option is that it is the middle (median) value. So on the second iteration, both the median and the arithmean are within the reduced 1/3 range, and at least one of them must be the highest or lowest value. The range will always be the required size.&lt;br /&gt;
&lt;br /&gt;
Edit: Note that this proof holds only assuming the values are nonnegative. Some sets of values including negative ones, such as gmdn(-4,-4,1), do not converge.&lt;br /&gt;
[[Special:Contributions/141.101.98.16|141.101.98.16]]&lt;br /&gt;
&lt;br /&gt;
== Why is this funny? ==&lt;br /&gt;
Wow, paragraphs and paragraphs of explanation, and calculations, and computer code describing everything about the XKCD comic.&lt;br /&gt;
I am impressed with how much people know. After all that explanation, can anyone tell me if there is anything comical about this comic?&lt;br /&gt;
Aside from the fact that Randal is combining formulas that don't usually get combined, is there anything here that strikes anyone as funny? The previous one about people asking absurd questions about what they could do after they are vaccinated had me laughing out loud. Can anyone tell me that they laughed at this comic and what was funny? Thanks. [[User:Rtanenbaum|Rtanenbaum]] ([[User talk:Rtanenbaum|talk]]) 01:56, 12 March 2021 (UTC)&lt;br /&gt;
:YMMV, but I found it funny because I just spent the last fortnight teaching how to find mean (and median, and quartiles for that matter) to 15/16yrolds. And they found that hard enough. I did not inform them of Geometric mean. I guess it's funny to me because it's such a long reach. [[User:Thisfox|Thisfox]] ([[User talk:Thisfox|talk]]) 02:48, 12 March 2021 (UTC)&lt;br /&gt;
::No, the joke is quite clearly explained in the text below the formula: &amp;quot;Pro Tip: If in doubt just mash them together&amp;quot;. [[User:Elektrizikekswerk|Elektrizikekswerk]] ([[User talk:Elektrizikekswerk|talk]]) 07:53, 12 March 2021 (UTC)&lt;br /&gt;
::As I'm currently supposed to be working someone else should please add this with a proper formulation. I just re-added the incomplete tag. [[User:Elektrizikekswerk|Elektrizikekswerk]] ([[User talk:Elektrizikekswerk|talk]]) 08:00, 12 March 2021 (UTC)&lt;br /&gt;
:: @Rtanenbaum funny you should give previous comic as example, as it is funny for exactly the same reason: using absurdity. The only difference is *most* people will get it why it is absurd to ride bicycle down the stairs in someones house (while it is OK to use bike outside, and it is OK to visit if you're vaccinated and thus use the stairs in someones house, BUT it is combining those unrelated activities that is absurd). Same thing here, only it requires some math background: using median has its uses, as does using geometric and arithmetic means, but it is combining them in this fashion that is absurd. And especially the recommendation to &amp;quot;mash mathematical functions you obviously don't understand as substitute to choosing correct one&amp;quot; is absurd. It is like you don't know you have to ADD prices of items on your receipt to calculate the total, so someone recommended you to use some random combination of mathematical operations to calculate the total. (with a added twist that suggested  combination would return some result which is not far off the calculation). In addition, the fact that some people do not understand why it is funny (so might take such absurd recommendation seriously) makes it even more funny.--[[Special:Contributions/172.68.221.46|172.68.221.46]] 09:49, 12 March 2021 (UTC)&lt;br /&gt;
::Apparantly someone deleted the tag again without giving a further explanation... I will undo this change. [[User:Elektrizikekswerk|Elektrizikekswerk]] ([[User talk:Elektrizikekswerk|talk]]) 09:58, 12 March 2021 (UTC)&lt;br /&gt;
:::'Twas not I, but note that this is 'explainxkcd' not 'explainwhyxkcdisfunny'. I think we both recognise that a cornucopia of details have been explained. It is even funnier to see someone insisting we continue to dissect the frog, but I'm not sure I need to fully explain that. ;) [[Special:Contributions/162.158.159.108|162.158.159.108]] 15:16, 12 March 2021 (UTC)&lt;br /&gt;
:Yes, here's a bit more on that.. I agree with [[User:Elektrizikekswerk|Elektrizikekswerk]] the joke is explained. The stat tip: &amp;quot;If you aren't sure whether to use the mean, median or geometric mean, just calculate all three, then repeat until it converges.&amp;quot; is funny because there are many situations in the physical sciences where the arthmean, geometric mean and median for some data are different values. It is perhaps common that scientists not well versed in statistics are unsure which to use. The funny bit is imagining this less-statistically-versed-scientist throwing up their hands and just accepting the fixed constant given by iterating GMDN as the 'answer' irrelevant of any physical meaning. Also the name &amp;quot;geothmetic meandian&amp;quot; is funny because the word meandian is similar to both median, which it uses, and to ''meander'' which is indicated by the alternate assignment of the median on each iteration -- informally, this function meanders. [[User:Ramakarl|Ramakarl]]&lt;br /&gt;
:Thanks to all who shared the absurdity so I could also enjoy the joke, and the joke is on me for needing to have a joke &amp;quot;explained&amp;quot;. Now where is the button for me to give credit to the best answer? I want to be sure you get points toward your next-level badge. ;-) [[User:Rtanenbaum|Rtanenbaum]] ([[User talk:Rtanenbaum|talk]]) 16:23, 13 March 2021 (UTC)&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208105</id>
		<title>2435: Geothmetic Meandian</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208105"/>
				<updated>2021-03-14T18:58:44Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: corrected spellings, and fact that median can sometimes equal the other means without sequence being constant.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 2435&lt;br /&gt;
| date      = March 10, 2021&lt;br /&gt;
| title     = Geothmetic Meandian&lt;br /&gt;
| image     = geothmetic_meandian.png&lt;br /&gt;
| titletext = Pythagorean means are nice and all, but throwing the median in the pot is really what turns this into random forest statistics: applying every function you can think of, and then gradually dropping the ones that make the result worse.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways to identify the '{{w|average}}' value of a series of values, the most common unweighted methods being the {{w|median}} (take the central value from the ordered list of values if there are an odd number - or the value half-way between the two that straddle the divide between two halves if there are an even number) and the {{w|arithmetic mean}} (add all the numbers up, divide by the number of numbers). The {{w|geometric mean}} is less well-known but works similarly to the arithmetic mean. The geometric mean of 'n' positive numbers is the 'n'th root of the product of those numbers. If all of the numbers in a sequence of identical, then its arithmetic mean, geometric mean and median will be identical, since they would all be equal to the common value of the terms of the sequence. However, if the sequence is not constant, then the arithmetic mean will be larger than the geometric mean, and the median may be different than either of those means.&lt;br /&gt;
&lt;br /&gt;
The geometric mean, arithmetic mean and {{w|harmonic mean}} (not shown) are collectively known as the {{w|Pythagorean means}}, as specific modes of a greater and more generalized mean formula that extends arbitrarily to various other possible nuances of mean-value rationisations (cubic, etc.).&lt;br /&gt;
&lt;br /&gt;
{{w|Outlier}}s and internal biases within the original sample can make boiling down a set of values into a single 'average' sometimes overly biased by flaws in the data, with your choice of which method to use perhaps resulting in a value that is misleading, exaggerating or suppressing the significance of any blips.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Either here or after the next paragraph, demonstrate how (1,1,2,3,5) resolves in each individual method, perhaps? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this depiction, the three named methods of averaging are embedded within a single function that produces a sequence of three values - one output for each of the methods. Being a series of values, Randall suggests that this is ideally suited to being ''itself'' subjected to the comparative 'averaging' method. Not just once, but as many times as it takes to narrow down to a sequence of three values that are very close to one another. &lt;br /&gt;
&lt;br /&gt;
It can be shown that the xkcd value of 2.089 for GMDN(1,1,2,3,5) is validated:&lt;br /&gt;
&lt;br /&gt;
{|-&lt;br /&gt;
 | F0 || 1 || 1 || 2 || 3 || 5 &lt;br /&gt;
 |-&lt;br /&gt;
 |    || Arithmetic mean || Geometric mean || Median ||&lt;br /&gt;
 |-&lt;br /&gt;
 | F1 || 2.4 || 1.974350486 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F2 || 2.124783495 ||	2.116192461 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F3 || '''2.080325319''' || 2.079536819 || 2.116192461		&lt;br /&gt;
 |-&lt;br /&gt;
 | F4 || 2.0920182 || 2.091948605 || '''2.080325319'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F5 || '''2.088097374''' || 2.088090133 || 2.091948605		&lt;br /&gt;
 |-&lt;br /&gt;
 | F6 || 2.089378704 ||	2.089377914 || '''2.088097374'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F7 || '''2.088951331''' ||	2.088951244 || 2.089377914		&lt;br /&gt;
 |-&lt;br /&gt;
 | F8 || 2.089093496 || 2.089093487 || '''2.088951331'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F9 || '''2.089046105''' || 2.089046103 || 2.089093487		&lt;br /&gt;
 |-&lt;br /&gt;
 | F10 || 2.089061898 || 2.089061898 || '''2.089046105'''		&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function GMDN in the comic is properly defined in the second row since F acts on a vector to produce another three vector, however GMDN in the last line is shown to produce a single real number rather than a vector and is thus missing a final operation of returning a single component. Each row in this table shows the set Fn(..) composed of the average, geomean and median computed on the previous row, with the sequence {1,1,2,3,5} as the initial F0. While GMDN is not differentiable, due to the median, this can be interpreted as somewhat similar to a heat equation which approaches equilibrium through averaging. Interestingly, the maximum value alternates between the average and the median (highlighted in bold in the table), while the minimum value alternates between the geomean and the median. This holds for many inputs thus providing the basis for a possible proof-by-induction of convergence on the range (see discussions).&lt;br /&gt;
&lt;br /&gt;
The comment in the title text about suggests that this will save you the trouble of committing to the 'wrong' analysis as it gradually shaves down any 'outlier average' that is unduly affected by anomalies in the original inputs. It is a method without any danger of divergence of values, since all three averaging methods stay within the interval covering the input values (and two of them will stay strictly within that interval).&lt;br /&gt;
&lt;br /&gt;
The title text may also be a sly reference to an actual mathematical theorem, namely that if one performs this procedure only using the arithmetic mean and the harmonic mean, the result will converge to the geometric mean. Randall suggests that the (non-Pythagorean) median, which does not have such good mathematical properties with relation to convergence, is, in fact, the secret sauce in his definition.&lt;br /&gt;
&lt;br /&gt;
The question of being unsure of which mean to use is especially relevant for the arithmetic and harmonic means in following example.&lt;br /&gt;
   * Cueball has some US Dollars and wishes to buy Euros. Suppose the bank will exchange US Dollars to Euros at a rate of €5 for $6 (about 0.83333€/$ or 1.20000$/€).&lt;br /&gt;
   * Megan   has some Euros and wishes to buy US Dollars. Suppose the bank will exchange Euros to US Dollars at a rate of $7 for €6 (about 0.85714€/$ or 1.16667$/€).&lt;br /&gt;
Cueball and Megan decide to complete the exchange between themselves in order to save the {{w|Bid-ask spread}} of the {{w|Exchange rate}} which is the cost the bank imposes on Cueball and Megan for its service as a {{w|Market maker}}. &lt;br /&gt;
   * Cueball offers to split the difference by averaging the rates €5:$6 and €6:$7 yielding a rate of €71:$84 (about 0.84524€/$ or 1.18310$/€).&lt;br /&gt;
   * Megan   offers to split the difference by averaging the rates $6:€5 and $7:€6 yielding a rate of €60:$71 (about 0.84507€/$ or 1.18333$/€).&lt;br /&gt;
In one direction (€/$), Cueball is using the arithmetic mean but Megan is using the geometric mean while in the other direction ($/€), Megan is using the arithmetic mean but Megan is using the geometric mean. This creates two new exchange rates which are closer than the orginal rates, but the new rates are still different for each other. Megan and Cueball can then iterate this process and the rates will converge to the geometric mean of the original rates namely:&lt;br /&gt;
   * sqrt((5/6)*(6/7)) = sqrt(5/7) = 0.84515€/$ or&lt;br /&gt;
   * sqrt((6/5)*(7/6)) = sqrt(7/5) = 1.18322$/€.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There does exist an {{w|arithmetic-geometric mean}}, which is defined identically to this except with the arithmetic and geometric means, and sees some use in calculus.  In some ways it's also philosophically similar to the {{w|truncated mean}} (extremities of the value range, e.g. the highest and lowest 10%s, are ignored as not acceptable and not counted) or {{w|Winsorized mean}} (instead of ignored, the values are readjusted to be the chosen floor/ceiling values that they lie beyond, to still effectively be counted as 'edge' conditions), only with a strange dilution-and-compromise method rather than one where quantities can be culled or neutered just for being unexpectedly different from most of the other data.&lt;br /&gt;
&lt;br /&gt;
The input sequence of numbers (1,1,2,3,5) chosen by Randall is also the opening of the {{w|Fibonacci sequence}}.  This may have been selected because the Fibonacci sequence also has a convergent property: the ratio of two adjacent numbers in the sequence approaches the [https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence golden ratio] as the length of the sequence approaches infinity.&lt;br /&gt;
&lt;br /&gt;
Here is a table of averages classified by the various methods referenced&lt;br /&gt;
&lt;br /&gt;
{|border =1 width=100% cellpadding=5 class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ averages using various methods&lt;br /&gt;
! Method &lt;br /&gt;
! Value&lt;br /&gt;
! Formula&lt;br /&gt;
|-&lt;br /&gt;
! Arithmetic&lt;br /&gt;
| 2.4 || &lt;br /&gt;
|-&lt;br /&gt;
! Geometric&lt;br /&gt;
| 1.9743504858348&lt;br /&gt;
| &amp;lt;math&amp;gt;\left(\prod_{i=1}^n x_i\right)^\frac{1}{n} = \sqrt[n]{x_1 x_2 \cdots x_n}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Median &lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
! GMDN &lt;br /&gt;
| 2.089 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
{{incomplete transcript|Do NOT delete this tag too soon.}}&lt;br /&gt;
&lt;br /&gt;
F(x1,x2,...xn)=({x1+x2+...+xn/n [bracket: arithmetic mean]},{nx,x2...xn, [bracket: geometric mean]} {x n+1/2 [bracket: median]})&lt;br /&gt;
&lt;br /&gt;
Gmdn(x1,x2,...xn)={F(F(F(...F(x1,x2,...xn)...)))[bracket: geothmetic meandian]}&lt;br /&gt;
&lt;br /&gt;
Gmdn(1,1,2,3,5) [equals about sign] 2.089&lt;br /&gt;
&lt;br /&gt;
Caption: Stats tip: If you aren't sure whether to use the mean, median, or geometric mean, just calculate all three, then repeat until it converges&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
Geothm means &amp;quot;counting earths&amp;quot; (From Ancient Greek γεω- (geō-), combining form of γῆ (gê, “earth”) and ἀριθμός arithmos, 'counting').  Geothmetic means &amp;quot;art of Geothming&amp;quot; based on the etymology of Arithmetic (from Ancient Greek ἀριθμητική (τέχνη) (arithmētikḗ (tékhnē), “(art of) counting”).  This is an exciting new terminology that is eminently suitable for modern cosmology &amp;amp; high energy physics - particularly when doing math on the multiverse.  However, it is unlikely this etymology is related to the term &amp;quot;geothmetic meandian&amp;quot; as coined by Randall, as it can be more simply explained as a portmanteau of the three averages in its construction: '''geo'''metric mean, ari'''thmetic mean''', and me'''dian'''.&lt;br /&gt;
&lt;br /&gt;
The following python code (inefficiently) implements the above algorithm:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from functools import reduce&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def f(*args):&lt;br /&gt;
    args = sorted(args)&lt;br /&gt;
    mean = sum(args) / len(args)&lt;br /&gt;
    gmean = reduce(lambda x, y: x * y, args) ** (1 / len(args))&lt;br /&gt;
    if len(args) % 2:&lt;br /&gt;
        median = args[len(args) // 2]&lt;br /&gt;
    else:&lt;br /&gt;
        median = (args[len(args) // 2] + args[len(args) // 2 - 1]) / 2&lt;br /&gt;
    return mean, gmean, median&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
max_iterations = 10&lt;br /&gt;
l = [1, 1, 2, 3, 5]&lt;br /&gt;
for iterations in range(max_iterations):&lt;br /&gt;
    fst, *rest = l&lt;br /&gt;
    if all((abs(r - fst) &amp;lt; 0.00000001 for r in rest)):&lt;br /&gt;
        break&lt;br /&gt;
    l = f(*l)&lt;br /&gt;
print(l[0], iterations)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a slightly more efficient version of the python code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from scipy.stats.mstats import gmean&lt;br /&gt;
import numpy as np&lt;br /&gt;
&lt;br /&gt;
def get_centers(a,tol=0.00001):&lt;br /&gt;
    a = np.array(a)&lt;br /&gt;
    result = False&lt;br /&gt;
    if len(a)==3:&lt;br /&gt;
        if np.abs(a[0]-a[1])&amp;lt;=tol and np.abs(a[0]-a[2])&amp;lt;=tol and np.abs(a[2]-a[1])&amp;lt;=tol:&lt;br /&gt;
            result=True&lt;br /&gt;
    print([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
    if result:&lt;br /&gt;
        return a[0]&lt;br /&gt;
    return get_centers([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here is an implementation of the Gmdn function in R:&lt;br /&gt;
&lt;br /&gt;
    Gmdn &amp;lt;- function (..., threshold = 1E-6) {&lt;br /&gt;
      # Function F(x) as defined in comic&lt;br /&gt;
      f &amp;lt;- function (x) {&lt;br /&gt;
        n &amp;lt;- length(x)&lt;br /&gt;
        return(c(mean(x), prod(x)^(1/n), median(x)))&lt;br /&gt;
      }&lt;br /&gt;
      # Extract input vector from ... argument&lt;br /&gt;
      x &amp;lt;- c(...)&lt;br /&gt;
      # Iterate until the standard deviation of f(x) reaches a threshold&lt;br /&gt;
      while (sd(x) &amp;gt; threshold) x &amp;lt;- f(x)&lt;br /&gt;
      # Return the mean of the final triplet&lt;br /&gt;
      return(mean(x))&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
For a start, there is a syntax error. After the first application of F, you get a 3-tuple. Subsequent iterations preserve the 3-tuple, and we need to analyze the resulting sequence.&lt;br /&gt;
Perhaps there is an implicit claim all three entries converge to the same result. In any case, lets see what we get:&lt;br /&gt;
&lt;br /&gt;
Wlog, we have three inputs (x_1,y_1,z_1), and want to understand the iterates of the map &lt;br /&gt;
F(x,y,z) = ( (x+y+z)/3, cube root of (xyz), median(x,y,z) ). Lets write F(x_n,y_n,z_n) = (x_{n+1},y_{n+1},z_{n+1}).&lt;br /&gt;
&lt;br /&gt;
The inequality of arithmetic and geometric means gives x_n \geq y_n, if n \geq 2,  and&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Math]]&lt;br /&gt;
[[Category:Statistics]]&lt;br /&gt;
[[Category:Portmanteau]]&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208103</id>
		<title>2435: Geothmetic Meandian</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208103"/>
				<updated>2021-03-14T18:32:40Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: Fixed spelling of classified and fixed euro symbol.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 2435&lt;br /&gt;
| date      = March 10, 2021&lt;br /&gt;
| title     = Geothmetic Meandian&lt;br /&gt;
| image     = geothmetic_meandian.png&lt;br /&gt;
| titletext = Pythagorean means are nice and all, but throwing the median in the pot is really what turns this into random forest statistics: applying every function you can think of, and then gradually dropping the ones that make the result worse.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways to identify the '{{w|average}}' value of a series of values, the most common unweighted methods being the {{w|median}} (take the central value from the ordered list of values if there are an odd number - or the value half-way between the two that straddle the divide between two halves if there are an even number) and the {{w|arithmetic mean}} (add all the numbers up, divide by the number of numbers). The {{w|geometric mean}} is less well-known but works similarly to the arithmetic mean. To take the geometric mean of 'n' values, they are multiplied and then the 'n'th root is taken. It will be seen that for purely identical values this returns the single value as the singular average, as would the arithmetic calculation with serial addition then re-division, but it reacts differently to any perturbed values. You might also consider operating arithmetically upon logarithms of the list, then re-exponate the result.&lt;br /&gt;
&lt;br /&gt;
The geometric mean, arithmetic mean and {{w|harmonic mean}} (not shown) are collectively known as the {{w|Pythagorean means}}, as specific modes of a greater and more generalised mean formula that extends arbitrarily to various other possible nuances of mean-value rationisations (cubic, etc).&lt;br /&gt;
&lt;br /&gt;
{{w|Outlier}}s and internal biases within the original sample can make boiling down a set of values into a single 'average' sometimes overly biased by flaws in the data, with your choice of which method to use perhaps resulting in a value that is misleading, exagerating or suppressing the significance of any blips.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Either here or after the next paragraph, demonstrate how (1,1,2,3,5) resolves in each individual method, perhaps? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this depiction, the three named methods of averaging are embedded within a single function that produces a sequence of three values - one output for each of the methods. Being a series of values, Randall suggests that this is ideally suited to being ''itself'' subjected to the comparative 'averaging' method. Not just once, but as many times as it takes to narrow down to a sequence of three values that are very close to one another. &lt;br /&gt;
&lt;br /&gt;
It can be shown that the xkcd value of 2.089 for GMDN(1,1,2,3,5) is validated:&lt;br /&gt;
&lt;br /&gt;
{|-&lt;br /&gt;
 | F0 || 1 || 1 || 2 || 3 || 5 &lt;br /&gt;
 |-&lt;br /&gt;
 |    || Arithmean || Geomean || Median ||&lt;br /&gt;
 |-&lt;br /&gt;
 | F1 || 2.4 || 1.974350486 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F2 || 2.124783495 ||	2.116192461 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F3 || '''2.080325319''' || 2.079536819 || 2.116192461		&lt;br /&gt;
 |-&lt;br /&gt;
 | F4 || 2.0920182 || 2.091948605 || '''2.080325319'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F5 || '''2.088097374''' || 2.088090133 || 2.091948605		&lt;br /&gt;
 |-&lt;br /&gt;
 | F6 || 2.089378704 ||	2.089377914 || '''2.088097374'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F7 || '''2.088951331''' ||	2.088951244 || 2.089377914		&lt;br /&gt;
 |-&lt;br /&gt;
 | F8 || 2.089093496 || 2.089093487 || '''2.088951331'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F9 || '''2.089046105''' || 2.089046103 || 2.089093487		&lt;br /&gt;
 |-&lt;br /&gt;
 | F10 || 2.089061898 || 2.089061898 || '''2.089046105'''		&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function GMDN in the comic is properly defined in the second row since F acts on a vector to produce another three vector, however GMDN in the last line is shown to produce a single real number rather than a vector and is thus missing a final operation of returning a single component. Each row in this table shows the set Fn(..) composed of the average, geomean and median computed on the previous row, with the sequence {1,1,2,3,5} as the initial F0. While GMDN is not differentiable, due to the median, this can be interpreted as somewhat similar to a heat equation which approaches equilibrium through averaging. Interestingly, the maximum value alternates between the average and the median (highlighted in bold in the table), while the minimum value alternates between the geomean and the median. This holds for many inputs thus providing the basis for a possible proof-by-induction of convergence on the range (see discussions).&lt;br /&gt;
&lt;br /&gt;
The comment in the title text about suggests that this will save you the trouble of committing to the 'wrong' analysis as it gradually shaves down any 'outlier average' that is unduly affected by anomalies in the original inputs. It is a method without any danger of divergence of values, since all three averaging methods stay within the interval covering the input values (and two of them will stay strictly within that interval).&lt;br /&gt;
&lt;br /&gt;
The title text may also be a sly reference to an actual mathematical theorem, namely that if one performs this procedure only using the arithmetic mean and the harmonic mean, the result will converge to the geometric mean. Randall suggests that the (non-Pythagorean) median, which does not have such good mathematical properties with relation to convergence, is, in fact, the secret sauce in his definition.&lt;br /&gt;
&lt;br /&gt;
The question of being unsure of which mean to use is especially relevant for the arithmetic and harmonic means. Suppose Cueball has some US Dollars and wishes to buy Euros, and Megan has some Euros and wishes to buy US Dollars. &lt;br /&gt;
   * The bank will exchange US Dollars to Euros at a rate of &amp;amp;#128;5 for $6 (about 0.83333€/$ or 1.20000$/€).&lt;br /&gt;
   * The bank will exchange Euros to US Dollars at a rate of $7 for &amp;amp;#128;6 (about 0.85714€/$ or 1.16667$/€).&lt;br /&gt;
Cueball and Megan decide to complete the exchange between themselves in order to save the difference from the rates which is the source of profits for the bank. &lt;br /&gt;
   * Cueball offers to split the difference by averaging the rates €5:$6 and €6:$7 yielding a rate of €71:$84 (about 0.84524€/$ or 1.18310$/€).&lt;br /&gt;
   * Megan   offers to split the difference by averaging the rates $6:€5 and $7:€6 yielding a rate of €60:$71 (about 0.84507€/$ or 1.18333$/€).&lt;br /&gt;
In one direction, Cueball is using the arithmetic mean but Megan is using the geometric mean while in the other direction, Megan is using the arithmetic mean but Megan is using the geometric mean. This creates two new exchange rates which will closer are still different. They can then iterate this process and the rates will converge to the geometric mean of the original rates namely sqrt((5/6)*(6/7) = sqrt(5/7) = 0.84515€/$ or sqrt((6/5)*(/7/6)) = sqrt(7/5) = 1.18322$/€.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There does exist an {{w|arithmetic-geometric mean}}, which is defined identically to this except with the arithmetic and geometric means, and sees some use in calculus.  In some ways it's also philosophically similar to the {{w|truncated mean}} (extremities of the value range, e.g. the highest and lowest 10%s, are ignored as not acceptable and not counted) or {{w|Winsorized mean}} (instead of ignored, the values are readjusted to be the chosen floor/ceiling values that they lie beyond, to still effectively be counted as 'edge' conditions), only with a strange dilution-and-compromise method rather than one where quantities can be culled or neutered just for being unexpectedly different from most of the other data.&lt;br /&gt;
&lt;br /&gt;
The input sequence of numbers (1,1,2,3,5) chosen by Randall is also the opening of the {{w|Fibonacci sequence}}.  This may have been selected because the Fibonacci sequence also has a convergent property: the ratio of two adjacent numbers in the sequence approaches the [https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence golden ratio] as the length of the sequence approaches infinity.&lt;br /&gt;
&lt;br /&gt;
Here is a table of averages classified by the various methods referenced&lt;br /&gt;
&lt;br /&gt;
{|border =1 width=100% cellpadding=5 class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ averages using various methods&lt;br /&gt;
! Method &lt;br /&gt;
! Value&lt;br /&gt;
! Formula&lt;br /&gt;
|-&lt;br /&gt;
! Arithmetic&lt;br /&gt;
| 2.4 || &lt;br /&gt;
|-&lt;br /&gt;
! Geometric&lt;br /&gt;
| 1.9743504858348&lt;br /&gt;
| &amp;lt;math&amp;gt;\left(\prod_{i=1}^n x_i\right)^\frac{1}{n} = \sqrt[n]{x_1 x_2 \cdots x_n}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Median &lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
! GMDN &lt;br /&gt;
| 2.089 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
{{incomplete transcript|Do NOT delete this tag too soon.}}&lt;br /&gt;
&lt;br /&gt;
F(x1,x2,...xn)=({x1+x2+...+xn/n [bracket: arithmetic mean]},{nx,x2...xn, [bracket: geometric mean]} {x n+1/2 [bracket: median]})&lt;br /&gt;
&lt;br /&gt;
Gmdn(x1,x2,...xn)={F(F(F(...F(x1,x2,...xn)...)))[bracket: geothmetic meandian]}&lt;br /&gt;
&lt;br /&gt;
Gmdn(1,1,2,3,5) [equals about sign] 2.089&lt;br /&gt;
&lt;br /&gt;
Caption: Stats tip: If you aren't sure whether to use the mean, median, or geometric mean, just calculate all three, then repeat until it converges&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
Geothm means &amp;quot;counting earths&amp;quot; (From Ancient Greek γεω- (geō-), combining form of γῆ (gê, “earth”) and ἀριθμός arithmos, 'counting').  Geothmetic means &amp;quot;art of Geothming&amp;quot; based on the etymology of Arithmetic (from Ancient Greek ἀριθμητική (τέχνη) (arithmētikḗ (tékhnē), “(art of) counting”).  This is an exciting new terminology that is eminently suitable for modern cosmology &amp;amp; high energy physics - particularly when doing math on the multiverse.  However, it is unlikely this etymology is related to the term &amp;quot;geothmetic meandian&amp;quot; as coined by Randall, as it can be more simply explained as a portmanteau of the three averages in its construction: '''geo'''metric mean, ari'''thmetic mean''', and me'''dian'''.&lt;br /&gt;
&lt;br /&gt;
The following python code (inefficiently) implements the above algorithm:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from functools import reduce&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def f(*args):&lt;br /&gt;
    args = sorted(args)&lt;br /&gt;
    mean = sum(args) / len(args)&lt;br /&gt;
    gmean = reduce(lambda x, y: x * y, args) ** (1 / len(args))&lt;br /&gt;
    if len(args) % 2:&lt;br /&gt;
        median = args[len(args) // 2]&lt;br /&gt;
    else:&lt;br /&gt;
        median = (args[len(args) // 2] + args[len(args) // 2 - 1]) / 2&lt;br /&gt;
    return mean, gmean, median&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
max_iterations = 10&lt;br /&gt;
l = [1, 1, 2, 3, 5]&lt;br /&gt;
for iterations in range(max_iterations):&lt;br /&gt;
    fst, *rest = l&lt;br /&gt;
    if all((abs(r - fst) &amp;lt; 0.00000001 for r in rest)):&lt;br /&gt;
        break&lt;br /&gt;
    l = f(*l)&lt;br /&gt;
print(l[0], iterations)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a slightly more efficient version of the python code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from scipy.stats.mstats import gmean&lt;br /&gt;
import numpy as np&lt;br /&gt;
&lt;br /&gt;
def get_centers(a,tol=0.00001):&lt;br /&gt;
    a = np.array(a)&lt;br /&gt;
    result = False&lt;br /&gt;
    if len(a)==3:&lt;br /&gt;
        if np.abs(a[0]-a[1])&amp;lt;=tol and np.abs(a[0]-a[2])&amp;lt;=tol and np.abs(a[2]-a[1])&amp;lt;=tol:&lt;br /&gt;
            result=True&lt;br /&gt;
    print([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
    if result:&lt;br /&gt;
        return a[0]&lt;br /&gt;
    return get_centers([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here is an implementation of the Gmdn function in R:&lt;br /&gt;
&lt;br /&gt;
    Gmdn &amp;lt;- function (..., threshold = 1E-6) {&lt;br /&gt;
      # Function F(x) as defined in comic&lt;br /&gt;
      f &amp;lt;- function (x) {&lt;br /&gt;
        n &amp;lt;- length(x)&lt;br /&gt;
        return(c(mean(x), prod(x)^(1/n), median(x)))&lt;br /&gt;
      }&lt;br /&gt;
      # Extract input vector from ... argument&lt;br /&gt;
      x &amp;lt;- c(...)&lt;br /&gt;
      # Iterate until the standard deviation of f(x) reaches a threshold&lt;br /&gt;
      while (sd(x) &amp;gt; threshold) x &amp;lt;- f(x)&lt;br /&gt;
      # Return the mean of the final triplet&lt;br /&gt;
      return(mean(x))&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
For a start, there is a syntax error. After the first application of F, you get a 3-tuple. Subsequent iterations preserve the 3-tuple, and we need to analyze the resulting sequence.&lt;br /&gt;
Perhaps there is an implicit claim all three entries converge to the same result. In any case, lets see what we get:&lt;br /&gt;
&lt;br /&gt;
Wlog, we have three inputs (x_1,y_1,z_1), and want to understand the iterates of the map &lt;br /&gt;
F(x,y,z) = ( (x+y+z)/3, cube root of (xyz), median(x,y,z) ). Lets write F(x_n,y_n,z_n) = (x_{n+1},y_{n+1},z_{n+1}).&lt;br /&gt;
&lt;br /&gt;
The inequality of arithmetic and geometric means gives x_n \geq y_n, if n \geq 2,  and&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Math]]&lt;br /&gt;
[[Category:Statistics]]&lt;br /&gt;
[[Category:Portmanteau]]&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	<entry>
		<id>https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208086</id>
		<title>2435: Geothmetic Meandian</title>
		<link rel="alternate" type="text/html" href="https://www.explainxkcd.com/wiki/index.php?title=2435:_Geothmetic_Meandian&amp;diff=208086"/>
				<updated>2021-03-14T15:43:43Z</updated>
		
		<summary type="html">&lt;p&gt;Danloeb: Explained deeper connection with Arithmetic / Harmonic iterated means&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{comic&lt;br /&gt;
| number    = 2435&lt;br /&gt;
| date      = March 10, 2021&lt;br /&gt;
| title     = Geothmetic Meandian&lt;br /&gt;
| image     = geothmetic_meandian.png&lt;br /&gt;
| titletext = Pythagorean means are nice and all, but throwing the median in the pot is really what turns this into random forest statistics: applying every function you can think of, and then gradually dropping the ones that make the result worse.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Explanation==&lt;br /&gt;
&lt;br /&gt;
There are a number of different ways to identify the '{{w|average}}' value of a series of values, the most common unweighted methods being the {{w|median}} (take the central value from the ordered list of values if there are an odd number - or the value half-way between the two that straddle the divide between two halves if there are an even number) and the {{w|arithmetic mean}} (add all the numbers up, divide by the number of numbers). The {{w|geometric mean}} is less well-known but works similarly to the arithmetic mean. To take the geometric mean of 'n' values, they are multiplied and then the 'n'th root is taken. It will be seen that for purely identical values this returns the single value as the singular average, as would the arithmetic calculation with serial addition then re-division, but it reacts differently to any perturbed values. You might also consider operating arithmetically upon logarithms of the list, then re-exponate the result.&lt;br /&gt;
&lt;br /&gt;
The geometric mean, arithmetic mean and {{w|harmonic mean}} (not shown) are collectively known as the {{w|Pythagorean means}}, as specific modes of a greater and more generalised mean formula that extends arbitrarily to various other possible nuances of mean-value rationisations (cubic, etc).&lt;br /&gt;
&lt;br /&gt;
{{w|Outlier}}s and internal biases within the original sample can make boiling down a set of values into a single 'average' sometimes overly biased by flaws in the data, with your choice of which method to use perhaps resulting in a value that is misleading, exagerating or suppressing the significance of any blips.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Either here or after the next paragraph, demonstrate how (1,1,2,3,5) resolves in each individual method, perhaps? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this depiction, the three named methods of averaging are embedded within a single function that produces a sequence of three values - one output for each of the methods. Being a series of values, Randall suggests that this is ideally suited to being ''itself'' subjected to the comparative 'averaging' method. Not just once, but as many times as it takes to narrow down to a sequence of three values that are very close to one another. &lt;br /&gt;
&lt;br /&gt;
It can be shown that the xkcd value of 2.089 for GMDN(1,1,2,3,5) is validated:&lt;br /&gt;
&lt;br /&gt;
{|-&lt;br /&gt;
 | F0 || 1 || 1 || 2 || 3 || 5 &lt;br /&gt;
 |-&lt;br /&gt;
 |    || Arithmean || Geomean || Median ||&lt;br /&gt;
 |-&lt;br /&gt;
 | F1 || 2.4 || 1.974350486 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F2 || 2.124783495 ||	2.116192461 || 2		&lt;br /&gt;
 |-&lt;br /&gt;
 | F3 || '''2.080325319''' || 2.079536819 || 2.116192461		&lt;br /&gt;
 |-&lt;br /&gt;
 | F4 || 2.0920182 || 2.091948605 || '''2.080325319'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F5 || '''2.088097374''' || 2.088090133 || 2.091948605		&lt;br /&gt;
 |-&lt;br /&gt;
 | F6 || 2.089378704 ||	2.089377914 || '''2.088097374'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F7 || '''2.088951331''' ||	2.088951244 || 2.089377914		&lt;br /&gt;
 |-&lt;br /&gt;
 | F8 || 2.089093496 || 2.089093487 || '''2.088951331'''		&lt;br /&gt;
 |-&lt;br /&gt;
 | F9 || '''2.089046105''' || 2.089046103 || 2.089093487		&lt;br /&gt;
 |-&lt;br /&gt;
 | F10 || 2.089061898 || 2.089061898 || '''2.089046105'''		&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
The function GMDN in the comic is properly defined in the second row since F acts on a vector to produce another three vector, however GMDN in the last line is shown to produce a single real number rather than a vector and is thus missing a final operation of returning a single component. Each row in this table shows the set Fn(..) composed of the average, geomean and median computed on the previous row, with the sequence {1,1,2,3,5} as the initial F0. While GMDN is not differentiable, due to the median, this can be interpreted as somewhat similar to a heat equation which approaches equilibrium through averaging. Interestingly, the maximum value alternates between the average and the median (highlighted in bold in the table), while the minimum value alternates between the geomean and the median. This holds for many inputs thus providing the basis for a possible proof-by-induction of convergence on the range (see discussions).&lt;br /&gt;
&lt;br /&gt;
The comment in the title text about suggests that this will save you the trouble of committing to the 'wrong' analysis as it gradually shaves down any 'outlier average' that is unduly affected by anomalies in the original inputs. It is a method without any danger of divergence of values, since all three averaging methods stay within the interval covering the input values (and two of them will stay strictly within that interval).&lt;br /&gt;
&lt;br /&gt;
The title text may also be a sly reference to an actual mathematical theorem, namely that if one performs this procedure only using the arithmetic mean and the harmonic mean, the result will converge to the geometric mean. Randall suggests that the (non-Pythagorean) median, which does not have such good mathematical properties with relation to convergence, is, in fact, the secret sauce in his definition.&lt;br /&gt;
&lt;br /&gt;
The question of being unsure of which mean to use is especially relevant for the arithmetic and harmonic means. Suppose Cueball has some US Dollars and wishes to buy Euros, and Megan has some Euros and wishes to buy US Dollars. &lt;br /&gt;
   * The bank will exchange US Dollars to Euros at a rate of &amp;amp;#128;5 for $6 (about 0.83333&amp;amp;#128;/$ or 1.20000$/&amp;amp;#128;).&lt;br /&gt;
   * The bank will exchange Euros to US Dollars at a rate of $7 for &amp;amp;#128;6 (about 0.85714&amp;amp;#128;/$ or 1.16667$/&amp;amp;#128;).&lt;br /&gt;
Cueball and Megan decide to complete the exchange between themselves in order to save the difference from the rates which is the source of profits for the bank. &lt;br /&gt;
   * Cueball offers to split the difference by averaging the rates &amp;amp;#128;5:$6 and &amp;amp;#128;6:$7 yielding a rate of &amp;amp;#128;71:$84 (about 0.84524&amp;amp;#128;/$ or 1.18310$/&amp;amp;#128;).&lt;br /&gt;
   * Megan   offers to split the difference by averaging the rates $6:&amp;amp;#128;5 and $7:&amp;amp;#128;6 yielding a rate of &amp;amp;#128;60:$71 (about 0.84507&amp;amp;#128;/$ or 1.18333$/&amp;amp;#128;).&lt;br /&gt;
In one direction, Cueball is using the arithmetic mean but Megan is using the geometric mean while in the other direction, Megan is using the arithmetic mean but Megan is using the geometric mean. This creates two new exchange rates which will closer are still different. They can then iterate this process and the rates will converge to the geometric mean of the original rates namely sqrt((5/6)*(6/7) = sqrt(5/7) = 0.84515&amp;amp;#128;/$ or sqrt((6/5)*(/7/6)) = sqrt(7/5) = 1.18322$/&amp;amp;#128;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There does exist an {{w|arithmetic-geometric mean}}, which is defined identically to this except with the arithmetic and geometric means, and sees some use in calculus.  In some ways it's also philosophically similar to the {{w|truncated mean}} (extremities of the value range, e.g. the highest and lowest 10%s, are ignored as not acceptable and not counted) or {{w|Winsorized mean}} (instead of ignored, the values are readjusted to be the chosen floor/ceiling values that they lie beyond, to still effectively be counted as 'edge' conditions), only with a strange dilution-and-compromise method rather than one where quantities can be culled or neutered just for being unexpectedly different from most of the other data.&lt;br /&gt;
&lt;br /&gt;
The input sequence of numbers (1,1,2,3,5) chosen by Randall is also the opening of the {{w|Fibonacci sequence}}.  This may have been selected because the Fibonacci sequence also has a convergent property: the ratio of two adjacent numbers in the sequence approaches the [https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence golden ratio] as the length of the sequence approaches infinity.&lt;br /&gt;
&lt;br /&gt;
Here is a table of averages calcified by the various methods referenced&lt;br /&gt;
&lt;br /&gt;
{|border =1 width=100% cellpadding=5 class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ averages using various methods&lt;br /&gt;
! Method &lt;br /&gt;
! Value&lt;br /&gt;
! Formula&lt;br /&gt;
|-&lt;br /&gt;
! Arithmetic&lt;br /&gt;
| 2.4 || &lt;br /&gt;
|-&lt;br /&gt;
! Geometric&lt;br /&gt;
| 1.9743504858348&lt;br /&gt;
| &amp;lt;math&amp;gt;\left(\prod_{i=1}^n x_i\right)^\frac{1}{n} = \sqrt[n]{x_1 x_2 \cdots x_n}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
! Median &lt;br /&gt;
| 2 || &lt;br /&gt;
|-&lt;br /&gt;
! GMDN &lt;br /&gt;
| 2.089 || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Transcript==&lt;br /&gt;
{{incomplete transcript|Do NOT delete this tag too soon.}}&lt;br /&gt;
&lt;br /&gt;
F(x1,x2,...xn)=({x1+x2+...+xn/n [bracket: arithmetic mean]},{nx,x2...xn, [bracket: geometric mean]} {x n+1/2 [bracket: median]})&lt;br /&gt;
&lt;br /&gt;
Gmdn(x1,x2,...xn)={F(F(F(...F(x1,x2,...xn)...)))[bracket: geothmetic meandian]}&lt;br /&gt;
&lt;br /&gt;
Gmdn(1,1,2,3,5) [equals about sign] 2.089&lt;br /&gt;
&lt;br /&gt;
Caption: Stats tip: If you aren't sure whether to use the mean, median, or geometric mean, just calculate all three, then repeat until it converges&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
Geothm means &amp;quot;counting earths&amp;quot; (From Ancient Greek γεω- (geō-), combining form of γῆ (gê, “earth”) and ἀριθμός arithmos, 'counting').  Geothmetic means &amp;quot;art of Geothming&amp;quot; based on the etymology of Arithmetic (from Ancient Greek ἀριθμητική (τέχνη) (arithmētikḗ (tékhnē), “(art of) counting”).  This is an exciting new terminology that is eminently suitable for modern cosmology &amp;amp; high energy physics - particularly when doing math on the multiverse.  However, it is unlikely this etymology is related to the term &amp;quot;geothmetic meandian&amp;quot; as coined by Randall, as it can be more simply explained as a portmanteau of the three averages in its construction: '''geo'''metric mean, ari'''thmetic mean''', and me'''dian'''.&lt;br /&gt;
&lt;br /&gt;
The following python code (inefficiently) implements the above algorithm:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from functools import reduce&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def f(*args):&lt;br /&gt;
    args = sorted(args)&lt;br /&gt;
    mean = sum(args) / len(args)&lt;br /&gt;
    gmean = reduce(lambda x, y: x * y, args) ** (1 / len(args))&lt;br /&gt;
    if len(args) % 2:&lt;br /&gt;
        median = args[len(args) // 2]&lt;br /&gt;
    else:&lt;br /&gt;
        median = (args[len(args) // 2] + args[len(args) // 2 - 1]) / 2&lt;br /&gt;
    return mean, gmean, median&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
max_iterations = 10&lt;br /&gt;
l = [1, 1, 2, 3, 5]&lt;br /&gt;
for iterations in range(max_iterations):&lt;br /&gt;
    fst, *rest = l&lt;br /&gt;
    if all((abs(r - fst) &amp;lt; 0.00000001 for r in rest)):&lt;br /&gt;
        break&lt;br /&gt;
    l = f(*l)&lt;br /&gt;
print(l[0], iterations)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a slightly more efficient version of the python code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
from scipy.stats.mstats import gmean&lt;br /&gt;
import numpy as np&lt;br /&gt;
&lt;br /&gt;
def get_centers(a,tol=0.00001):&lt;br /&gt;
    a = np.array(a)&lt;br /&gt;
    result = False&lt;br /&gt;
    if len(a)==3:&lt;br /&gt;
        if np.abs(a[0]-a[1])&amp;lt;=tol and np.abs(a[0]-a[2])&amp;lt;=tol and np.abs(a[2]-a[1])&amp;lt;=tol:&lt;br /&gt;
            result=True&lt;br /&gt;
    print([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
    if result:&lt;br /&gt;
        return a[0]&lt;br /&gt;
    return get_centers([np.mean(a),np.median(a),gmean(a)])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here is an implementation of the Gmdn function in R:&lt;br /&gt;
&lt;br /&gt;
    Gmdn &amp;lt;- function (..., threshold = 1E-6) {&lt;br /&gt;
      # Function F(x) as defined in comic&lt;br /&gt;
      f &amp;lt;- function (x) {&lt;br /&gt;
        n &amp;lt;- length(x)&lt;br /&gt;
        return(c(mean(x), prod(x)^(1/n), median(x)))&lt;br /&gt;
      }&lt;br /&gt;
      # Extract input vector from ... argument&lt;br /&gt;
      x &amp;lt;- c(...)&lt;br /&gt;
      # Iterate until the standard deviation of f(x) reaches a threshold&lt;br /&gt;
      while (sd(x) &amp;gt; threshold) x &amp;lt;- f(x)&lt;br /&gt;
      # Return the mean of the final triplet&lt;br /&gt;
      return(mean(x))&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{comic discussion}}&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
For a start, there is a syntax error. After the first application of F, you get a 3-tuple. Subsequent iterations preserve the 3-tuple, and we need to analyze the resulting sequence.&lt;br /&gt;
Perhaps there is an implicit claim all three entries converge to the same result. In any case, lets see what we get:&lt;br /&gt;
&lt;br /&gt;
Wlog, we have three inputs (x_1,y_1,z_1), and want to understand the iterates of the map &lt;br /&gt;
F(x,y,z) = ( (x+y+z)/3, cube root of (xyz), median(x,y,z) ). Lets write F(x_n,y_n,z_n) = (x_{n+1},y_{n+1},z_{n+1}).&lt;br /&gt;
&lt;br /&gt;
The inequality of arithmetic and geometric means gives x_n \geq y_n, if n \geq 2,  and&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Math]]&lt;br /&gt;
[[Category:Statistics]]&lt;br /&gt;
[[Category:Portmanteau]]&lt;/div&gt;</summary>
		<author><name>Danloeb</name></author>	</entry>

	</feed>