Sublinear Algorithms for Statistical, Markov Chain, and Binpacking Problems