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

Simulation:

True color switch probability =
Missing biased to state-changes
Probability of missing data =
# samples per button click:
Simulate:        
Simulated data (n = 0):

Inferential stats:

n - 1 = 0 # observed transitions
nd = 0 number of color changes
ns = 0 # 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.