Week 4 lecture notes