<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Will Gilpin on Medium]]></title>
        <description><![CDATA[Stories by Will Gilpin on Medium]]></description>
        <link>https://medium.com/@wgilpin?source=rss-1ca5afe93a51------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WSuMwqkhdferz05o1m_zVg.png</url>
            <title>Stories by Will Gilpin on Medium</title>
            <link>https://medium.com/@wgilpin?source=rss-1ca5afe93a51------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:31:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wgilpin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stereotypes, meet data]]></title>
            <link>https://medium.com/@wgilpin/stereotypes-meet-data-933ff18ed30?source=rss-1ca5afe93a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/933ff18ed30</guid>
            <category><![CDATA[society]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Will Gilpin]]></dc:creator>
            <pubDate>Wed, 14 Nov 2018 12:08:11 GMT</pubDate>
            <atom:updated>2018-11-16T13:02:33.578Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zd8D04M-dtLnISYHo2_PXw.png" /></figure><p>In my rather over-long career I’ve probably met every type of national stereotype. Mostly these are in the form of a fun conversation about national quirks, and we are all happy to point out the attributes of our own nationality and I think most of us are amused when others point them out — it’s better to be talked about than ignored! There is a second class of stereotypes which is the unspoken ones, the ones that are assumed but never tested. This is where danger lies, in firstly making assumptions without data about an entire population, and more so if these generalities were then assumed of individuals, irrespective of their personal attributes, on the basis of their nationality. The Brits are cold, Product Managers need to be people persons, so Will isn’t going to make a good PM; this would hurt.</p><p>Where to start? With the CIA of course, like any good analyst. Well, actually the CIA World Factbook, a public reference of statistical data about the countries of the world, which I’m going to use with the results of the 2018 Stack Overflow Developer Survey, a large annual survey asking devs about various topics related to work.</p><p>The CIA Factbook immediately gives us the relative sizes of the national economies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H_jqhBfc6dJVNoY0SNLwWQ.png" /></figure><p>So the stereotypes (prejudices) to be considered are presented here:</p><ul><li>poor countries are less ethical</li><li>more men work in tech than women</li><li>developers in poor countries work harder</li><li>the developing world is younger</li><li>immigrants hurt the wages of the local population.</li></ul><p>These will be tested in relation to the software industry by considering the comparison, per country, of the average salary of Stack Overflow respondents with the following metrics:</p><ul><li>EthicsReport<br><em>Do you report or otherwise call out the unethical code in question?<br></em>This is used as a proxy for national ethical culture.</li><li>SkipMeals<br><em>In a typical week, how many times do you skip a meal in order to be more productive?<br></em>This is a proxy for working hard</li><li>HoursComputer<br><em>On a typical day, how much time do you spend on a desktop or laptop computer?<br></em>Another proxy for working hard</li><li>Gender<br>Includes Male, Female and many other common options. Used to derive the gender balance</li><li>Age</li></ul><p><strong>Cleaning up the data</strong></p><p>There were a lot of outliers — people with salaries many times the national average. These are hard to deal with as it could reflect an inequality in the country, it could represent chance, it could simply be incorrect data. I chose to limit the results I looked at to within +/- 4 standard deviations from the mean — this means over 99.9% of the results are still included, and only the wildest numbers ignored.</p><p>I then calculated a measure of the ability of the average national salary for each country to predict the average of the answer to each of the questions above. For example, how well does the gender balance in a country predict the average salary? If having a more gender-diverse team helps the business, one might expect that a high gender balance would predict a higher average salary.</p><p><strong>Questions</strong></p><p>I had a look at a few of these stereotypes, and then</p><ol><li>Are poor nations less ethical? Specifically does national self-reported ethics predict average national salary?</li><li>Do people work harder in poor nations? Specifically does the rate of skipping meals for work predict average national salary?</li><li>Another variant on “do people work harder in poor nations?”, specifically does the time spent working predict average national salary?</li><li>Are more diverse workforces more profitable. Specifically does the Male/Female ratio of the developers in a country predict the average national salary?</li><li>Are younger workforces more profitable. Specifically does the average age of the developers in a country predict the average national salary?</li><li>Does a better education pay? Specifically does the average spent on education by the developers in a country predict the average national salary?</li></ol><p><strong>Method</strong></p><p>I used two approaches to answer the questions: a mathematical tool called linear regression, and charts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/0*hNP2jCaV-d727dd7.png" /><figcaption>Linear regression visualised[4]</figcaption></figure><p>Linear regression is basically a technique for working out the best line that goes through all the data points — or as near to them as possible. The line is then used to predict values from new data. What I did was split up the data so I kept about a third of it away from the linear regression tool, and then after plotting the line I used that third to test the accuracy of the line as a prediction tool.</p><p><strong>r2 values</strong></p><p>This approach gives us a score, called r-squared, which is a clue as to how good the predictions will be. You’ll see the r-squared score on each of my charts below, called “r2”. You’ll also see the r2 values are all pretty low — more in the next section!</p><p>The other approach I used in simply graphing the data out. Per country, my charts show the average salary for each country as (turquoise) bars, and overlaying that is the (red) line showing the other variable — gender ratio per country, meal skipped, etc. If the two variables, salary and, say, gender ratio, were both sloping in the same direction, this would suggest a strong connection. If they sloped in the opposite direction to each other, this would be a strong negative effect — equally interesting. If on the other hand the line is all over the place an apparently unrelated to the salary, this would tell us the variables are probably not connected, and might suggest the answer to the question is “No”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*CcuU6HCNgIz_DBoxe5J7gw.png" /><figcaption>A poor correlation — the red line seems unconnected to the turquoise bars</figcaption></figure><p><strong>Results</strong></p><p>TL;DR — none of these metrics seems to correlate strongly with average national income. The r2 scores are all around zero, showing the national average salary is a poor predictor of all of the question variables. That said, graphing them out shows some interesting points on a few, which are more apparent to the human eye that to a simple linear regression.</p><p>We’ll look at these questions one by one, but the most interesting results are first.</p><p><em>Q6: Does a better education pay? Specifically does the average spent on education by the developers in a country predict the average national salary?</em></p><p>Average salary vs education spends shows a lot of variability in poorer countries, but the richer countries seem to show a correlation — higher salaries increases with higher spending on education. This might be an artefact of the data, but probably is related to the fact that in most developed countries education is paid for, or at least subsidised by, general taxation, and it might be expected that countries with a higher tax base have more to spend. It might alternatively suggest that education is more expensive in richer countries simply because wages are higher, and not the other way round!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MM9fSeUwZ-poSdqC_aHUjw.png" /><figcaption>Salary compared to education spend. r2 = -0.03</figcaption></figure><p><em>Q5. Are younger workforces more profitable. Specifically does the average age of the developers in a country predict the average national salary?<br></em>A low r2 score, but a slight visible trend is that age seems related to salary — older populations earn more. Why? Perhaps richer countries are richer because they have been developing tech longer, so they have as a side effect more experienced staff. Or perhaps it’s just that less-developed nations tend to have younger populations anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dkxygqfIIUltcDqT-IXAA.png" /><figcaption>Salary compared to age range. r2 = -0.01</figcaption></figure><p><em>Q2. Do people work harder in poor nations? Specifically does the rate of skipping meals for work predict average national salary?</em><br>The r2 score is low, suggesting “No”, but what caught my attention is a slight trend for the richer nations to skip fewer meals. Is this the laziness of the decadent, or a reflection of the security people feel in richer countries?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yhCgCHZzigWLYx6gzCvnyQ.png" /><figcaption>Salary compared to meals skipped. r2 = -0.01</figcaption></figure><p><strong>Conclusion</strong></p><p>My analysis, while fun to do, seems to have raised as many questions as it tried to answer, but it certainly seems clear that the stereotypes I chose to consider are not supported by the evidence, at least as far as Stack Overflow users are concerned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/0*jSk7aYo0zkvbvQcB.png" /><figcaption>Credit: xkcd.com [3]</figcaption></figure><p><strong>Appendix — the other results</strong></p><p><em>Q1: Are poor nations less ethical? Specifically does national self-reported ethics predict average national salary? </em><br>The chart and r2 score show little if any correlation, so I conclude the answer is No</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UeVLDSeA0QiUrsWP8wWlAg.png" /><figcaption>Salary vs Reported Ethics. r2 = 0.13</figcaption></figure><p><em>Q3: Another variant on “do people work harder in poor nations?”, specifically does the time spent working predict average national salary?<br></em>The chart and r2 score show little if any correlation, so “No”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*on0jdkRSxiFDrC-WXoVUUQ.png" /><figcaption>Salary vs hours worked. r2 = 0.01</figcaption></figure><p><em>Q4: Are more diverse workforces more profitable. Specifically does the Male/Female ratio of the developers in a country predict the average national salary?<br></em>A low r2 score, and no visible correlation on the chart, so “No” for this dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o2MGoDxtvwMFH_5KoZB1SA.png" /><figcaption>Salary compared to gender ratio. r2 = -0.05</figcaption></figure><p>Other variables, both with low r2 and low visible correlation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*msc9T4otY6VnssIz6YooKw.png" /><figcaption>Salary compared to migration rate. r2 = 0.15</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CcuU6HCNgIz_DBoxe5J7gw.png" /><figcaption>Salary compared to youth unemployment. r2 = -0.05</figcaption></figure><p><strong>References</strong></p><p>[1] <em>CIA World Factbook</em>, <a href="https://www.cia.gov/library/publications/the-world-factbook/">https://www.cia.gov/library/publications/the-world-factbook/</a></p><p>[2] <em>Stackoverflow Developer Survey</em>, 2018, <a href="https://insights.stackoverflow.com/survey">https://insights.stackoverflow.com/survey</a></p><p>[3] <em>xkcd</em>, image taken from <a href="https://xkcd.com/552/">https://xkcd.com/552/</a> , license at <a href="https://xkcd.com/license.html">https://xkcd.com/license.html</a></p><p>[4] <em>Linear Regression</em>, image from <a href="https://en.wikipedia.org/wiki/Linear_regression">https://en.wikipedia.org/wiki/Linear_regression</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=933ff18ed30" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>