Statistical inference for probabilistic functions of finite state Markov chains