Exercise 1

This exercise requires you to plot a few functions in Python.

  1. Plot any three functions of your choosing of the form $y=f(x)$. $x$ should be an array of equally spaced numbers generated using the numpy linspace command (see numpy.linspace()). Be sure to include a legend and label the $x$ and $y$ axes.
  2. Use numpy to draw $N$ samples (you choose $N$) from a probability distribution of your choosing. See Random sampling for a bunch of numpy functions that draw random samples for you. See Statistical functions for an alternative to numpy. Plot a histogram of the data you generated.