Bayesian updating based on the observed sum of bernouilli variables I am struggling with the following problem, and i am wondering what the best way to tackle it is. 
Imagine we have a population of a 100 patients, of which 30 have a prior estimated probability of 20% to be "infected", 30 have a 50% estimated probability, and the remaining 40 have an estimated probability of 70% to be infected. These probabilities are our prior best estimate at the moment. unfortunately, we do not know which individual patients fall into which category. We take a sample of the population (e.g. 10 patients), and notice that 7 are infected. 
What is the best methodology or framework to update our probabilities to account for this new information?  
 A: Your problem may seem complicated at first, but it may be easily simplified to something more familiar.
As I understand, you have $N$ patients in three groups of sizes $n_1 = 30, n_2 = 30, n_3 = 40$ and based on your best knowledge you can assume a priori susceptibility for the disease in those groups to be $\mu_1 = 0.2, \mu_2 = 0.5, \mu_3 = 0.7$. You sample without replacement $m = 10$ patients from the whole population and observe that $k = 7$ are infected.
First thing to notice is that a priori you can assume that the probability of seeing infected patient from the $i$-th group is $\pi_i = n_i/N \times \mu_i$, since it is probability of sampling a patient from the $i$-th group $n_i/N$ times the prior probability of getting infected $\mu_i$. We multiply those probabilities since the two events are independent. Next thing to notice is that, a patient can belong to either of the groups, so the probability of getting infected in the total sample is $\pi = \pi_1 + \pi_2 + \pi_3$, and so, the expected number of infected patients in the whole population is $\pi N$.
Since you do not have the group labels for the patients in your sample and you have only aggregate data, you need to focus on the estimates for the whole population rather then on the groups. What you can assume a priori is that the population-wide risk of infection is $\pi$. The probability of finding an infected patient in your sample can be approximated using binomial distribution parametrized by sample size $m$ and and probability of infection $p$ (the fact that $m/N\le0.1$ also justifies such approximation of hypergeometric distribution). The parameter $p$ is unknown and is to be estimated, but a priori we can assume that $E(p) = \pi$ and that it follows a beta distribution with some parameters $\alpha$ and $\beta$ such that $\pi = \tfrac{\alpha}{\alpha+\beta}$. Since the parameters of beta distribution can be thought as "pseudocounts" of successes and failures and we have pretty clear idea of what we are expecting to see in our experiment, we cen set them to the expected counts $\alpha = m\pi$ and $\beta = m(1-\pi)$. Updating the prior is easy since beta is a conjugate prior for binomial, so the posterior parameters become $\alpha' = m\pi + k$ and $\beta' = m(1-\pi) + (m-k)$, and the posterior expected probability of infection is
$$ E(p) = \frac{m\pi + k}{ m\pi + m(1-\pi) + m } $$
This leads to the posterior distribution as illustrated bellow, that falls nicely somewhere in-between your prior and likelihood.

As about splitting the probabilities among groups, nothing has changed after seeing the data as compared to your prior knowledge since you don't know what groups did the patients come from. So if you need to split, then I guess the best you can do is to act according to your prior knowledge and split the probabilities proportionally to how the infected patients would be splitted a priori, i.e. proportionally to $\pi_i/\pi$ for $i$-th group.
