How does Germany compare to the USA in terms of median income?

May 13th, 2016

Article with the surprising claim that the median income in Germany is lower than that in most US states, when PPP adjusted –

Conclusion: I would say the weak points that bear more looking at are whether the household adjustment (the square root mentioned above) is significant, and also whether if there are net transfer payments that it’s really not an expense, but rather a form of savings, in which case it would be inaccurate to subtract net savings from the disposable income.


The original data linked to is where the income number that was used was the “median disposable income”, which was in 2012,

  1. 20857 EUR for Germany
  2. 30355 USD for the USA

The “Purchasing Power Parities for GDP and related indicators table” has National currency per US dollar as

  1. 0.786 EUR for Germany
  2. 1.000 USD for USA (by definition)

The exchange rate for the EUR, as obtained from ( was between 0.755436 and 0.813635, so not significantly different.

Dividing by PPP, then, we get

  1. 26536 for Germany
  2. 30355 for the USA


The definitions are in

The income unit is an individual, and there is this adjustment they make for household size which divides the income by the square root of the household size, instead of just dividing by household size. This has the effect of adjusting incomes up when households are larger. This is for the purposes of accounting for economies of scale.

The components of disposable income are

E: employee income, including wages and salaries, cash bonuses and gratuities, commissions and tips, directors’ fees, profit sharing bonuses and other forms of profit-related pay, shares offered as part of employee remuneration, free and subsidised goods and services from an employer, severance and termination pay.1 Sick pay paid by social security should also be included.

KI: capital and property income, including income from financial assets (net of expenses), income from non-financial assets (net of expenses) and royalties. Regular receipts from voluntary individual private pension plans and life insurance schemes should also be included in this income component.

SEI: income from self-employment, including profits and losses from unincorporated enterprises, as well as goods produced for own consumption (net of the costs of inputs). [The inclusion of this latter variable aims to adjust the OECD income concept to the realities of middle-income countries (such as Brazil, South Africa and others), where subsistence agriculture represents a significant income source for people at the bottom of the distribution. Countries that do not collect information on this income item should indicate so in the metadata sheet of the OECD questionnaire].

TRR: current transfers received, including transfers from social security (including accident and disability benefits, old-age cash benefits, unemployment benefits, maternity allowances, child and/or family allowances, all income-tested and means-tested benefits that are part of social assistance), transfers from employment related social insurance, as well as cash transfers from both non-profit institutions and other households

TRP: current transfers paid, including direct taxes on income and wealth, social security contributions paid by households, contributions to employment-related social insurance, current transfers paid to both other households and non-profit institutions. [Values for transfers paid should be reported in the OECD questionnaire with a negative sign].

which certainly looks like social welfare has been accounted for.

Conclusion: I would say the weak points that bear more looking at are whether the household adjustment (the square root mentioned above) is significant, and also whether if there are net transfer payments that it’s really not an expense, but rather a form of savings, in which case it would be inaccurate to subtract net savings from the disposable income.

The Grammar of Graphics

March 8th, 2016

R’s ggplot2 has the most elegant graph API that I know. This article by Hadley Wickham himself is a great introduction to some of the ideas underlying The Grammar of Graphics that he implemented. I think it contains a lot of great ideas for API design.

Passive investing is cheap, but not free

March 5th, 2016

Excellent article by Matt Levine

Passive investing is a way to make different fund managers compete with each other by forcing them to offer the same product. That competition lowers management fees for the customer. Unfortunately, the predictability of passive funds also makes them targets for other players in the market.

On one hand you have actively managed funds that are opaque and difficult for the consumer to monitor, and that charge high management fees which have to be balanced against their difficult-to-monitor performance. On the other hand, you have a low management fee passive fund which loses money to other market participants in an open market.

Seen this way, passive funds are still a better deal for consumers because it’s difficult to imagine anyone making an outsized profit without facing competition and having those profits be competed away / shared with the consumer.

NetSurveillance Web RTSP URL

February 27th, 2016

Spent way too long discovering this.


Was the 2015-2016 flu vaccine spot-on?

February 18th, 2016

The 2015-2016 trivalent flu vaccine protected against:

  • an A/California/7/2009 (H1N1)pdm09-like virus
  • an A/Switzerland/9715293/2013 (H3N2)-like virus
  • a B/Phuket/3073/2013-like virus. (This is a B/Yamagata lineage virus)

According to the latest Flu Express publication from the Taiwan CDC, the prevalent flus so far this season are:

  • A H1N1 (36.8%)
  • A H3N2 (63.2%)
  • B (25.2%)

Does this mean they got it completely right this year (for Taiwan at least)?

Do Critical Topics always bring Abrasive Conversations?

December 18th, 2015

The first rule of Improvisional Comedy the Yes, And rule, compels one to

accept what the other person has created (“Yes”) and then add something to it (“And”)

This is something that a skilled conversationist is good at. It poses trouble for the discussion of critical analyses however, because such discussions involve acts of disagreement (“No” – the negation of something the other person said) and of refocusing the discussion are to reduce incidental and nonessential complexity.

Being able to disagree productively and reach consensus regarding topic definitions is difficult, and something I’ve only managed to achieve with a handful of people who are all much more emotionally mature than I am. That’s really mostly other people figuring that I care much more about the topic than they do, however, and hardly an ideal resolution to the issue.

Ideally, in the face of disagreement, you would simply go up one layer in the abstraction stack, agree on the approach, and then figure out the specific bit of disagreement. By social convention, you start with the premise that both parties are rational, after which the search for the mistaken logic (which will be clear when identified) or for the differing premise can commence.

Hardly ever happens that way. Usually there’s too much ego involved, and enough entanglement with social status happens that it’s difficult to talk about the topic in isolation.

Where does Taiwanese air pollution come from?

December 16th, 2015

Conclusion: The pollution now (December) is from China, the pollution in November was locally generated.

Earlier this year, there was a bout of posts about whether the air pollution in Taiwan came from China. The air is apparently pretty bad right now, and this time I think it’s clear that it’s from China. I just pulled this screenshot from


Screen Shot 2015-12-16 at 2.02.24 PM

Observe that the pollution in Yilan Country, southeast of Taipei, is not that different from Taipei itself. This is what you would expect if the pollution came from far away. Compare this to the map from November (



Notice the huge disparity in homogeneity. Also, if I remember correctly, back then the wind was also unusually still. I think based on these facts, I would conclude that the pollution in November was locally generated and the pollution now is from a far away source, probably China. (Disregard the low pollution directly to the West, the wind doesn’t come from there. Also, there could be a time lag, so even the pollution levels in the direction of the wind source at the same point in time are not immediately relevant.)

If I had all the historical data in a csv, could probably do a better analysis than two snapshots, if anyone could point me to a source I’d be happy to do that.

What parts of Deep Learning are modern?

December 14th, 2015

Conclusion: outside of a very brief period in which pre-training with Unsupervised Learning was shown to be helpful, Deep Learning has largely been about hardware brute force, and learning how to use brute force to solve problems.

Terms I need to learn more about

  • Pattern Deformations

  • Hessian-free learning

  • Batch Normalisation (Thanks A Breitman)

  • Competing Units

Read the rest of this entry »

Deep Learning with Small Data

December 12th, 2015

I looked into the topic a bit more, and found this exchange, which I think makes sense to me.

The essence of the argument is that because Google etc. have a lot of data, they develop techniques that can make use of that data. However, if you do not have a lot of data, there are other, maybe less developed, techniques to use.

Neal Stephenson on The Problem with Personalised News Feeds

November 3rd, 2015

From The Diamond Age:

That the highest levels of the society received news written with ink on paper said much about the steps New Atlantis had taken to distinguish itself from other phyles.

Now nanotechnology had made nearly anything possible, and so the cultural role in deciding what should be done with it had become far more important than imagining what could be done with it. One of the insights of the Victorian Revival was that it was not necessarily a good thing for everyone to read a completely different newspaper in the morning; so the higher one rose in the society, the more similar one’s Times became to one’s peers’.

News has an important social function, and it’s often more important to read the same news as your peers than it is to read the news that is the most interesting to you.