This document discusses Markov chains and Hidden Markov Models. It defines key properties of Markov chains including the Markov property and transition matrices. It provides examples of Markov chains for weather prediction and DNA sequences. Hidden Markov Models are introduced as having hidden states that can only be observed through output tokens. The difference between Markov chains and HMMs is explained. The document shows an example HMM for correlating tree ring size to temperature. It finds the optimal state sequences for this HMM using dynamic programming and the HMM equations. R code examples are provided for Markov chain transition matrices for DNA sequences.