# Determining probability mass function (PMF) using Bayesian approach

For instance, a person is trying to determine the light intensity (unit: Candela) from a source that he knows must be coming from one of the 3 mediums (A, B, and C). From his experience he have assigned the following probabilities for each possibility.

To determine the light intensity the person performed an experiment. The experiment is not good enough, therefore from his experience again he have assigned the medium from which light is coming as ‘i’ given that the true medium is ‘j’ as the following table shows.

What will be the probability mass function (PMF) of light intensity if the experiment indicates that the source of light is medium A?

To solve this I followed the Bayesian principle. Given the prior estimate for A which is 0.2, I was trying to use the true medium probability to get posterior estimates, but the discrete probabilities I get don't sum to 1. Does the PMFs has to sum up to 1 in this case?

• @Xi'an - could you please improve your helpful comment into an answer with an example from the table? – ToNoY Dec 18 '14 at 19:53

The posterior probability over the set of true media (A,B,C) is a true probability distribution, conditional on the observed medium, A in your case. You only have to apply Bayes' theorem $$P(A\text{ true}|A\text{ observed})=P(A\text{ observed}|A\text{ true})P(A\text{ true})/P(A\text{ observed})$$ The first term on the left $P(A\text{ observed}|A\text{ true})$ comes from the second table, i.e., $$P(A\text{ observed}|A\text{ true})=0.2$$ the second $P(A\text{ true})$ from the first table, i.e. $$P(A\text{ true})=0.2$$ and the last one $P(A\text{ observed})$ is the normalisation that makes the whole thing sums up to one, i.e. $$P(A\text{ observed})=P(A\text{ observed}|A\text{ true})P(A\text{ true})+P(A\text{ observed}|B\text{ true})P(B\text{ true})+P(A\text{ observed}|C\text{ true})P(C\text{ true})=0.2\times0.2+0.5\times0.5+0\times0.3=0.29\,.$$ Therefore $$P(A\text{ true}|A\text{ observed})=0.04/0.29=0.14\,.$$