# Update beta distributed prior with data that is a probability

In my experience with Bayesian statistics, beta distributions are typically used to estimate the posterior for parameter, $$p$$, of a binomial distribution that has been used to generate some data. But my question is, how should a posterior for data that is generated by sampling probabilities themselves rather than probabilistic outcomes be calculated?

To explain, say each piece of my data is randomly drawn from a beta distribution:

$$x \sim Beta(70, 30)$$

My goal is to use this data to calculate the posterior distribution for the most likely probability (i.e., $$\frac{a}{(a+b)}$$), which is $$0.7$$ in this example.

The approach I've taken so far is to start with a prior that is an uninformative beta distribution: $$prior \sim Beta(1,1)$$. I then update this prior with each new piece of data as follows: $$Beta(a+x, b+(1-x))$$. While this approach seems to do what I want, it's not clear to me how much each piece of new data should reduce the uncertainty in the prior. That is, if I know I'm sampling from a relatively noiseless distribution, then I should gain confidence rapidly with each new piece of data, but I should be more cautious if the incoming data is noisy. I can control the learning rate, $$r$$, by changing how I update the prior to: $$Beta(r\cdot(a+x), r\cdot(b+(1-x)))$$. But this means setting an arbitrary learning rate.

What is the proper Bayesian learning rate to use in this case? Alternatively, is my approach totally off and should I not be using a beta distribution for the prior in this situation?

• In the probabilities you are sampling, do you know the numerator and denominator or the ratio p = a/b, or do you only have access to p.
– JTH
Commented Nov 12, 2020 at 14:15
• @JTH -- I have knowledge of how noisy my samples will be. So let's say I only have access to the sum of a and b of the distribution I'm sampling from, but not their ratio.
– YTD
Commented Nov 12, 2020 at 15:17
• Can you think about your outcomes a Binomial, where the number of 'success' is p(a+b) and the number of 'trials' is a+b? This would make bayesian updating easier.
– JTH
Commented Nov 12, 2020 at 16:05
• @JTH -- Can you clarify what you mean by p(a+b)? Because the a and b parameters in a beta distribution are the number of each outcome, by p(a+b) do you mean the probability of having sampled some total number of outcomes? What distribution would I get this value from?
– YTD
Commented Nov 13, 2020 at 13:50
• sorry, p(a+b) = a. I'm just trying to understand why the beta distribution is necessary over a binomial
– JTH
Commented Nov 13, 2020 at 14:33

## 1 Answer

Building on the comments from @JTH, I've realized the answer that still allows for sampling from a beta distribution.

$$p$$ = true probability

$$n$$ = sampling precision

Draw sample: $$x \sim Beta(1 + p \cdot n, 1 + (n - p \cdot n))$$

Update prior: $$Beta(a + x \cdot n, b + (n - x \cdot n))$$