Time series probability and mutual information There is a time series of say $100$ data points. I wish to assign symbols of $0, 1, 2$ for each unique data point. The issue is I have tried but got stuck since no matter I specify the symbols, the program just outputs probability of $1$'s and $0$'s. The following are the questions:


How to find probability or correct my code so that it outputs probablities when number of symbols size > 2?
How to calculate entropy annd mutual information for this case. I don't know although I have read Matlab's entropy calculation Mutual Information &amp; Entropy but alas cannot follow how to apply in this case.
Entropy is, in your case

probs = [p_0 p_1 p_2];
logProb = log(probs);
entropy = -1 * dot(probs, logProb);


You'll have to let us know what two random variables you want to calculate the mutual information of, but with your library it looks like you just need to call mutualinfo(vec1,vec2).