Consider the channel model illustrated in Figure. The probability of error given that the channel is in the good state is 0 and the probability of error given that the channel is in the bad state is 1.
(a) Generate a 10,000-bit sequence with p = 0.01 and q = 0.99. Construct a histogram of the burst length and the inter-error gap (error-free run) distributions.
(b) Discuss how p and q can be estimated emperically from a histogram of (simulated) burst length and inter-error gap distributions. Estimate p and q.
(c) Use the Baum-Welch algorithm to estimate p and q. Compare with the empirical estimates obtained from the histograms.