See discrete-time-and-state-Markov.pdf for notes and background information. See the non-missing data form here.

True color switch probability =

Missing biased to state-changes
Probability of missing data =

# samples per button click:

Simulate:

Simulated data (*n = * 0):

n - 1 = 0 |
# observed transitions |

n0_{d} = |
number of color changes |

n0_{s} = |
# adjacent samples with same color |

ŝ = ? |
estimate of the switch probability |

**Ln Likelihood**

Blue trace is full likelihood. Red trace just uses information from adjacent non-missing entries.