How do I calculate the probability of a second order Markov event?

280 Views Asked by At

For example, in a text where I want to calculate the probability of the letter b after two 'a' P(b|aa), is it P(b|a)*P(a|a)? thanks

1

There are 1 best solutions below

0
On

If you're calculating the probabilities from the text and you want to find second order probabilities, then you identify all occurrences of 'aa' and see what proportion of them are followed by 'b'.

If you already have your probabilities, but they're all first order - i.e. you have the probability of one letter following another - then in your model the probability that 'aa' is followed by 'b' is exactly the same as the probability that 'a' is followed by 'b', because your model is working on the basis that what happened two letters ago has no bearing on the current one.