Conditional probability - sequence

67 Views Asked by At

I'm trying to come up with a simple calculation of a conditional entropy on a sequence $X = [1,0,0,0,1,0,0,1]$.

In particular, I would like to estimate the following quantity:

$$P(x_{i+1} = 1|x_i = 0)$$

I know that this quantity can be written as:

$$\frac{P(x_{i+1} = 1,x_i = 0)}{P(x_i = 0)}$$

But I have a doubt about the term in the denominator: do I have to calculate the probability on the whole X sequence ($P(x_i = 0) = 0.625$) or not considering the last term of the sequance ($P(x_i = 0) = 0.714$ using the sequence $[1,0,0,0,1,0,0]$)?

This doubt is related to the RTransferEntropy package where they seem to use the second "resolution" but it is in contrast with another study that I'm reading.

Thanks