Technically, the flag you see here is the mode of the world's national flags, calculated by first reducing the amount of colors to match heraldic norms. The mean average flag is more subtly detailed, but also just a blur; the median average flag is a bland gray box. Check out the rest, for each continent.
Means were calculated by first converting from sRGB to linear RGB.
Modes were calculated by first quantizing to the following heraldic colors: Or, Argent, Azure, Gules, Purpure, Sable, Vert, Tenné, Orange and Bleu Celeste. Omitted heraldic colors include Murrey and Sanguine (as they are very similar to Gules and Purpure) and Cendrée and Carnation (as they are barely used).
Medians were calculated by first converting to greyscale using BT.601 luma transform.