Created
June 12, 2018 10:48
-
-
Save vb100/2562783bce02256b3ed7e693053da6ef to your computer and use it in GitHub Desktop.
Comparing percentiles to ECDF To see how the percentiles relate to the ECDF, you will plot the percentiles of Iris versicolor petal lengths you calculated in the last exercise on the ECDF plot you generated in chapter 1. The percentile variables from the previous exercise are available in the workspace as ptiles_vers and percentiles. Note that t…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Plot the ECDF | |
_ = plt.plot(x_vers, y_vers, '.') | |
plt.margins(0.02) | |
_ = plt.xlabel('petal length (cm)') | |
_ = plt.ylabel('ECDF') | |
# Overlay percentiles as red diamonds. | |
_ = plt.plot(ptiles_vers, percentiles/100, marker='D', color='red', | |
linestyle='none') | |
# Show the plot | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment