After some googling I first thought to use a sign-test but I cannot understand why to ignores ties on the proposed median value. From any data the median is the value for which at least 50% of the data is higher or equal and also at least 50% of the data is lower or equal. So I thought to test two hypothesis:

Test the 'at least 50% of the data is higher or equal':

H0: P(X >= Population Median) = 0.5

Ha: P(X >= Population Median) < 0.5

Using a binomial test in Excel: 1 - binom.dist(k = 8 - 1, n=20, p = 0.5, cumul. = true) = 0.8684

Test the 'at least 50% of the data is lower or equal':

H0: P(X <= Population Median) = 0.5

Ha: P(X <= Population Median) < 0.5

Using a binomial test in Excel: binom.dist(k = 14, n=20, p = 0.5, cumul. = true) = 0.9793.

Since both p-values are above my alpha of 0.05 the null hypothesis are not rejected. The conclusion then a bit liberal is that there is insufficient evidence based on the sample to reject the claim that the median in the population could be 2.

This approach is similar as the one described in this article (just above section 3), but there are a few differences.

My main questions:

1) Where does my reasoning go wrong? (I assume there is an error but just can't see it ).

2) If there is an error, what might be a better approach for this (non-Bayesian)? If there isn't what would be the name of this test (I assume I'm not the first to come up with this)?