import numpy as npimport matplotlib.pyplot as plt def sample_data(size,length=100): data=[] for i in range(size): data.append(sorted(np.random.normal(4,1.5,length))) return np.array(data) data=np.random.normal(4,1.5,300) fig,(ax1,ax2)=plt.subplots(1,…