I am pretty new to bayesian statistics and PyMC3. I am doing a hierarchical model where the output variable I am trying to predict is a percentage with a maximum of 100%. My problem is that my posterior distribution includes values greater than 100% which is impossible in my situation. I configured my Y values as being Normally distributed. Here is some part of my code, not including the prior definitions to make it briefer.
a = pm.Normal('alpha', mu=mu_a, sd=sigma_a, shape=len(uniqueStores)) b = pm.Normal('Shift1Score', mu=mu_b, sd=sigma_b, shape=len(uniqueStores)) score_est = a[storeIDX] + (b[storeIDX] * audits.Shift1Score.values)
y_like = pm.Normal('y_like', mu=score_est, sd=eps, observed=audits.FinalScore)
I get posterior distributions like thoses:
I was wondering if there some other distribution I could use to force a maximum of 100%. Maybe use a HalfNormal somehow. The problem with Half Normal is that I can't control the mean, it is at 0.
I was thinking that I could maybe us 1 - audits.FinalScore which would make the scores start from 0 but then I still can't change the mean of that distribution.
Thank you!