Aan de slagGa gratis aan de slag

The Normal CDF

Now that you have a feel for how the Normal PDF looks, let's consider its CDF. Using the samples you generated in the last exercise (in your namespace as samples_std1, samples_std3, and samples_std10), generate and plot the CDFs.

Deze oefening maakt deel uit van de cursus

Statistical Thinking in Python (Part 1)

Cursus bekijken

Oefeninstructies

  • Use your ecdf() function to generate x and y values for CDFs: x_std1, y_std1, x_std3, y_std3 and x_std10, y_std10, respectively.
  • Plot all three CDFs as dots (do not forget the marker and linestyle keyword arguments!).
  • Hit submit to make a legend, showing which standard deviations you used, and to show your plot. There is no need to label the axes because we have not defined what is being described by the Normal distribution; we are just looking at shapes of CDFs.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Generate CDFs




# Plot CDFs



# Make a legend and show the plot
_ = plt.legend(('std = 1', 'std = 3', 'std = 10'), loc='lower right')
plt.show()
Code bewerken en uitvoeren