# Counterintuitive result for random sample

Say that you're making a political research, and you want to know how many people vote to Party A and how many vote to Party B. (There are only two choices.)

You make a random survey of 10 people, and find that 1 out of your 10 votes A, while the other 9 vote B.

What would you conclude is the average expected ratio of A voters in the general population?

Most people's intuition would say 0.1. But I calculated it and it came out as 0.0909090, i.e. 1/11. It's definitely possible I made a mistake in my calculation. Can you tell me whether my result makes sense?

-
It would make answering easier if you specified how did you do your calculations. – nico Aug 12 '11 at 11:55
When you say the "average expected ratio" do you mean the proportion in the population that votes for A? If so, 0.1 would be the correct estimate. If you mean the ratio of A votes to B voters, it would be 1/9. I'm not exactly sure what 1/11 would be reflecting. – Macro Aug 12 '11 at 13:11
You seem to already have an account here, "cool-RR". Do you want me to merge? – mbq Aug 12 '11 at 14:25
@mbq: Sure, thanks. (I changed OpenID to ram.rachum.com.) – Ram Rachum Aug 12 '11 at 15:55

Call the probability of voting A as $\theta$, and assume you have no other information for it. You then observe out of 10, 1 votes for A. The posterior probability density function for $\theta$ then becomes $$p(\theta) = \frac{\theta^1(1-\theta)^9}{\int_0^1x^1(1-x)^9dx}$$ or, $$p(\theta) = \frac{\theta^1(1-\theta)^9}{B(2,10)}=2/12$$
This is the beta distribution. Why are we getting a counter-intuitive result? Well, that is because we assumed a uniform prior on $\theta$, basically saying that we believe the value of $\theta$ is equally likely to be anywhere between 0 and 1. i,e., $p_{\text{Prior}}(\theta) = 1 \forall\{\theta \in R ,0\le\theta\le1\}$. If you have some other prior on $\theta$, you will get a different result. I don't know what prior you assumed for your answer, but this is how you should do the calculation in a Bayesian framework.
The idea's right although the equations make no sense. (The second equation is true when $\theta = 0.471566$, but where did that come from?) 2/12 is the Bayes estimate using a Beta(1,1) prior. Similarly, 1/11 is the Bayes estimate using a Beta(0,1) prior. In effect, that's just a fancy way of saying you can get 1/11 as the answer if you assume you previously had sampled one person and they voted for Party B. Captain Statistics to the rescue! – whuber Aug 12 '11 at 15:25
The O.P. is asking us to guess how he made a mistake: until he provides additional information, any answer is merely speculation. That's why I haven't weighed in on the original question. A Beta(0,1) prior corresponds to a one-person sample in the sense that the Bayes estimate (for observing $k$ successes out of $n$) of $k/(n+1)$ is identical to the standard estimate (a mean) obtained when observing $k$ successes in a sample of $n+1$. That's exactly what would happen if we started with $0$ successes out of $1$ and supplemented that dataset with $k$ out of $n$ additional observations. – whuber Aug 12 '11 at 16:03
@Ram Then highBandWidth has identified the cause of the mistake, and you should fully credit this answer: the uniform is Beta(1,1), so the correct estimate when observing $k=1$ successes out of $n=10$ observations is $(k+1)/(n+1)$ = $2/12$, not $1/11$. – whuber Aug 12 '11 at 20:05