Computing the conditional distribution of the hidden state given the observations