I'm tackling the following problem:
Your cell phone is constantly trying to keep track of where you are. At any given point in time, for all nearby locations, your phone stores a probability that you are in that location. Right now your phone believes that you are in one of 16 different locations arranged in a grid with the following probabilities (see the figure on the left):
Your phone connects to a known cell tower and records two bars of signal. For each grid location $L_i$ you know the probability of observing two bars from this particular tower, given that the cell phone is in location $L_i$ (see the figure on the right).
Example: the highlighted cell on the left figure means that you believed there was a $0.05$ probability that the user was in the bottom right grid cell prior to observing the cell tower signal. The highlighted cell on the right figure means that you think the probability of observing two bars, given the user was in the bottom right grid cell, is $0.75$.
For each of the $16$ location positions, calculate the new probability that the user is in each location given the cell tower observation. Write a program to calculate the probabilities.
My approach of tackling this as of now: let $B$ represent the event of observing two bars. Then for the first location, the posterior probability would be
$$P(L_i\ |\ B) = \frac{P(B\ |\ L_i)P(L_i)}{\sum_{j=1}^{16}P(B\ |\ L_j)P(L_j)}$$
But suppose that I do this for the first tower and calculate $P(L_1\ |\ B)$. That'll become the new prior for location $L_1$. I'm a bit confused on how to approach, say, calculating the posterior for $L_2$. I know I'll use this equation:
$$P(L_2\ |\ B) = \frac{P(B\ |\ L_2)P(L_2)}{\sum_{j=1}^{16}P(B\ |\ L_j)P(L_j)}$$
but the denominator includes $P(L_1)$. One way is to just use the value of $P(L_1)$ given in the grid, i.e., $0.05$, but I think the "new prior" value of $P(L_1)$ (i.e. $P(L_1\ |\ B)$ that we calculated in the first step) should be used.
This is well and good, but won't the order of calculating the posterior probabilities of different locations determine the final set of values of posteriors, provided we're updating the priors in each step? Am I overthinking or does the question further need to specify in which order we're calculating the probabilities for the locations?