Calculate coefficient w*
Just looked into the book. It was an example of the data that is presented in Fig 1.4. Numpy is a good package to derive the sum of squares fit to the data. This is an optimization problem. Look at the notes section of numpy.polynomial.polynomial.polyfit. I think the data is not given (you can digitize it!). The book is showing some qualitative behavior to give some intuition.