Question: draw the histogram for iris(python ) 2]: # graph the histogram and pdf of the alcohol feature of the wine_df data wine_df['alcohol'] wine_df['alcohol'].mean() sigma =
2]: # graph the histogram and pdf of the alcohol feature of the wine_df data wine_df['alcohol'] wine_df['alcohol'].mean() sigma = wine_df['alcohol'].std) mu X- plt.hist(data, bins=25, density=True, alpha=0.6, color='r') xmin, xmax - plt.xlim) np. linspace(xmin, xmax, len(data)) params stats.norm.pdf (x, loc=mu, scale-sigma) plt.plot(x, params, 'k', linewidth-2) plt.show() 0.6 0.5 0.4 03 02 0.1 0.0 12 13 14 15 NOTE That doesn't look much like a norm distribution and there are tests that we can use to determine if it is In [ ]: # your turn to graph the histogram and pdf of the sepal Length (cm) # data- iris_df ['sepal Length (cm)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
