# Bayesian estimation of weighted proportion

Having bayesian estimates of a proportion is relatively easy. You model that proportion as a binomial variable, you choose a beta-binomial prior and by using the likelihood you obtain a beta-binomial posterior.

I have problems providing bayesian estimates of a weighted proportion. That is, I wont to compute estimates of the variable: $$p' = (\sum w*success)/\sum w$$ instead of $$p = (\sum success)/n$$ I don't even know if I need to provide a distribution of the weighting variable, but if I had to I would choose a normal distribution.

Is there a way to use bayesian inference to estimate the distribution of p'?

• Could you give us more details on what is your actual data? What is the meaning of the weights? – Tim Jun 14 '19 at 11:09
• Weights are shopping carts of my customers and successes happen when a customer actually buys. So it's like a conversion metric weighted towards the amount of the shopping cart – David Masip Jun 14 '19 at 11:15
• Attempting to state an auxiliary variable as a weight doesn't seem to be optimal. I'd like to see a fully specified model with parameters for each quantity of interest. Then standard Bayesian modeling should be possible. – Frank Harrell Jun 14 '19 at 12:05
• As described $p$ is the transform of observations, not a parameter. To run Bayesian analysis for this case, you need to specify the distribution of $p$, or of the observations behind. – Xi'an Jun 14 '19 at 12:39