{"id":13427,"date":"2024-09-17T11:59:44","date_gmt":"2024-09-17T10:59:44","guid":{"rendered":"https:\/\/emilkirkegaard.dk\/en\/?p=13427"},"modified":"2024-09-17T11:59:44","modified_gmt":"2024-09-17T10:59:44","slug":"explaining-global-variation-in-internet-speed","status":"publish","type":"post","link":"https:\/\/emilkirkegaard.dk\/en\/2024\/09\/explaining-global-variation-in-internet-speed\/","title":{"rendered":"Explaining global variation in internet speed"},"content":{"rendered":"<p><a href=\"https:\/\/x.com\/MichaelAArouet\/status\/1835572094702108992\">I saw this on Twitter earlier today<\/a>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13428\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map.png\" alt=\"\" width=\"1556\" height=\"2050\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map.png 1556w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map-228x300.png 228w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map-777x1024.png 777w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map-768x1012.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map-1166x1536.png 1166w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/internet-speed-map-1554x2048.png 1554w\" sizes=\"auto, (max-width: 1556px) 100vw, 1556px\" \/><\/p>\n<p>The narrative seemed right, so at first I retweeted. But then I looked closer at the map and realized it couldn&#8217;t be right. Denmark 50 Mbps? <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_sovereign_states_by_Internet_connection_speeds\">Checking Wikipedia<\/a>, we find this dual table:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13429\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table.png\" alt=\"\" width=\"1528\" height=\"2098\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table.png 1528w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table-218x300.png 218w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table-746x1024.png 746w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table-768x1054.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table-1119x1536.png 1119w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/wikipedia-table-1492x2048.png 1492w\" sizes=\"auto, (max-width: 1528px) 100vw, 1528px\" \/><\/p>\n<p>Sure enough, Denmark is listed at 50 Mbps. But it can&#8217;t be right, so I checked the source, which shows this top list:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13430\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20.png\" alt=\"\" width=\"4810\" height=\"1204\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20.png 4810w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20-300x75.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20-1024x256.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20-768x192.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20-1536x384.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-laps-top-20-2048x513.png 2048w\" sizes=\"auto, (max-width: 4810px) 100vw, 4810px\" \/><\/p>\n<p>Notice the abrupt changes for Denmark. Are we to believe that in 2018 Denmark had the 3rd fastest internet worldwide, then dropped to world rank 71 in 2023, and then in 2024 magically went back to world rank 5? It doesn&#8217;t make sense. If anything, it looks like a COVID-related anomaly.<\/p>\n<p>But this got me interested in what does actually explain global variation in internet speed. So I downloaded another dataset for comparison from speedtest.net (the one in the Wikipedia table above). Plotting them together, we find they agree pretty well:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13431\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-vs.-speedtest-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>Google&#8217;s M labs data is more comprehensive, covering 229 units versus 161 for speedtest&#8217;s data. I checked <a href=\"https:\/\/www.cable.co.uk\/broadband\/worldwide-speed-league\/2024\/worldwide_speed_league_methodology.pdf\">the methodology<\/a> and it seems sound enough, even for small units (small countries with potentially small sample sizes). Here&#8217;s the full map of Google&#8217;s data:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13446\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>And here&#8217;s a zoom on Europe:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13447\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/M-labs-broadband-speed_europe-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>What explains the variation? We can note a few things. First, and most obvious, good countries have better internet speed, whether we consider wealth or average intelligence as our measure. Second, densely populated countries have better internet, as UAE, Singapore, and Iceland above. So let&#8217;s try some ideas based on population density. Though I discussed this issue in <a href=\"https:\/\/emilkirkegaard.dk\/en\/2023\/12\/fertility-questions-the-role-of-population-density\/\">my prior post on population density and fertility rates<\/a>, there are severe issues with using the ordinary population \/ land area metric. We can plot the map to see this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13432\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>Can you see anything? Neither can anyone else. That&#8217;s because the variable has an absurd distribution with a few tiny city states having extreme density (Monaco has 21000, median is 97). The usual economist trick of taking the log value helps:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13433\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_log_map-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>But perhaps an easier way is to group countries into classes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13434\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/pop_density_map_ordinal-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>Here the yellow group are the 32 countries (1\/7 of countries) with the highest density. We can now finally get some clarity. However, we also know this metric doesn&#8217;t make too much sense. USA and Canada have very low density, but not because people live far apart in general, but because they have <a href=\"http:\/\/www.cec.org\/north-american-environmental-atlas\/population-density-2020\/\">large areas of land that are largely uninhabited<\/a>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13435\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page.jpg\" alt=\"\" width=\"1200\" height=\"1200\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page.jpg 1200w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page-300x300.jpg 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page-1024x1024.jpg 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page-150x150.jpg 150w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page-768x768.jpg 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/Population_Density_2020_landing_page-600x600.jpg 600w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>&#8220;90% of Canadians live within 100 miles (160 km) of the U.S. border.&#8221; is a factoid often repeated for a reason.<\/p>\n<p><a href=\"https:\/\/www.worldpop.org\/methods\/pwd\/\">There are various other alternative metrics of population density<\/a>, but I couldn&#8217;t find a nice dataset. Instead, I will use another proxy, urbanization %, the percentage of people living in cities:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13436\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/urbanization_map-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>Now north America is no longer an outlier due to their empty land, as most people don&#8217;t live there anyway. For good measure, how&#8217;s how they correlate:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13437\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/density_vs_urbanization.png\" alt=\"\" width=\"3000\" height=\"1950\" \/><\/p>\n<p>Surprisingly, these two metrics don&#8217;t even correlate when we use the log value of density, and correlate a measly 0.15 before due to extreme outliers.<\/p>\n<p>So what better predicts internet speeds? Let&#8217;s compare all our variables first. I&#8217;ve added wealth and a spatial lag (average of 3 nearest neighboring countries) as well:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13440\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/correlation_matrix-1.png\" alt=\"\" width=\"3000\" height=\"1950\" \/><\/p>\n<p>We see that Google&#8217;s internet speed metric correlates the strongest with the explanatory variables, perhaps because it covers a broader set of countries and thus suffers less restriction of range bias. Notice also that urban % is a much better predictor of internet speeds than the ordinary population density metrics. The reason here is simple enough: it&#8217;s a lot easier to upgrade the internet speed when everybody lives close to each other in cities rather than 10 km apart in the country side. Starlink will probably change this pattern as we move to wireless internet in the future, but for now it is true.<\/p>\n<p>Here&#8217;s some models comparing the 4 main predictors:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13444\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_google-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>The blue lines and dots show the models with just a single variable (same as the correlation), and the red ones show the joint model. We see that each variable can predict internet speed by itself, but urbanization does not actually predict above chance levels when they are combined. Note that national IQ and median income continue to predict internet speed even when we account for spatial autocorrelation in the data using the spatial lag of the outcome variable. From a causal perspective, it is interesting that intelligence still predicts internet speed even when the most obvious causal mechanisms are controlled for (intelligence causes urbanization and income).<\/p>\n<p>For good measure, here&#8217;s the same models using speedtest&#8217;s broadband data instead:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13445\" src=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest.png\" alt=\"\" width=\"3000\" height=\"1950\" srcset=\"https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest.png 3000w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest-300x195.png 300w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest-1024x666.png 1024w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest-768x499.png 768w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest-1536x998.png 1536w, https:\/\/emilkirkegaard.dk\/en\/wp-content\/uploads\/compare_models_speedtest-2048x1331.png 2048w\" sizes=\"auto, (max-width: 3000px) 100vw, 3000px\" \/><\/p>\n<p>The results are materially the same in terms of relative size of coefficients, but NIQ is no longer beyond chance, probably due to the decreased sample size (from 157 to 137).<\/p>\n<p>It would appear then that though urbanization has an obvious causal mechanism for explaining average internet speed, it doesn&#8217;t actually work in practice when we control for the most obvious other causes.<\/p>\n<p>Also let this post serve as a reminder not to put too much faith in seemingly credible maps seen on Twitter. In this case, the data were correctly reproduced from the source, but the source had faulty data for the year of data Wikipedia happens to list. Who knows how many other misleading plots of this nature exist out there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I saw this on Twitter earlier today: The narrative seemed right, so at first I retweeted. But then I looked closer at the map and realized it couldn&#8217;t be right. Denmark 50 Mbps? Checking Wikipedia, we find this dual table: Sure enough, Denmark is listed at 50 Mbps. But it can&#8217;t be right, so I [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":13446,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1898,2591],"tags":[3551,2996,2606,2958],"class_list":["post-13427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-economics","category-intelligence-iq-cognitive-ability","tag-internet","tag-national-intelligence","tag-national-iq","tag-population-density","entry","has-media"],"_links":{"self":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/13427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/comments?post=13427"}],"version-history":[{"count":3,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/13427\/revisions"}],"predecessor-version":[{"id":13448,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/posts\/13427\/revisions\/13448"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/media\/13446"}],"wp:attachment":[{"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/media?parent=13427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/categories?post=13427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/emilkirkegaard.dk\/en\/wp-json\/wp\/v2\/tags?post=13427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}