The example doesn't need to be complicated. Your two 4-item sample sets are fine for demonstration purposes. You can clearly see that the median stays 2.5, even as the high end and the mean increase.
Comments
Log in with your Bluesky account to leave a comment
I'm not articulating this well but the main thing is that inferences are being drawn on the change of the median as the underlaying distribution changes. That is not nearly so simple and requires differential equations. Sometimes median moves faster and sometimes mean does.
One neat example is the Log-Normal distribution which is often used to model the income distribution. I solved two cases: constant mode and constant quantile. The relative rates of change of the median and the mean are kind of interesting.
For constant mode median grows faster until sigma = sqrt(2*ln(2))
For constant 1st quartile mean always grows faster
For constant 2nd quartile median is constant
For constant 3rd quartile median always grows faster
See the above for general solutions for any type of quantile.
If you want an example with more terms, consider the set of numbers 1-100. The median is 50.5. If you double the last ten numbers so the series jumps from 90 to 182, 184, 186, etc., the high end has jumped way up, the mean increases a bunch, but the median stays the same.
Comments
For constant 1st quartile mean always grows faster
For constant 2nd quartile median is constant
For constant 3rd quartile median always grows faster
See the above for general solutions for any type of quantile.
And honestly I didn't fully expect this particular outcome. It was a fun exercise though. I can provide derivations if needed.