Chapter 3 Martingales and random walks