<jupyter_start><jupyter_text>**Uniform Distribution**<jupyter_code>plt.hist(stats.uniform.rvs(size = 10000), edgecolor = 'black', color = 'lightgreen')
plt.title('Uniform Distribution $U \sim (0,1)$')
plt.ylabel('Number of Observations');<jupyter_output><empty_output><jupyter_text>**Poisson Distribution**<jupyter_code>fig, axs = plt.subplots(4)
fig.suptitle('Poisson Distributions')
fig.tight_layout(rect=[0, 0, 1.05, 0.95])
color_list = ['r', 'g', 'b', 'purple']
bins = np.arange(11) - .5

for i,j in zip(range(4), color_list):
  axs[i].hist(stats.poisson.rvs(mu = i +1, size = 100), bins = bins, color = j, edgecolor = 'black', label = f'$\lambda = {i + 1}$')

fig.legend(bbox_to_anchor=(1, .92));<jupyter_output><empty_output><jupyter_text>**Normal Distribution**<jupyter_code>mean = 0
variance = 1
st_dev = variance**.5
norm_samples = np.random.normal(size = 10000)

plt.hist(norm_samples, density = True, color = 'lightblue', edgecolor = 'black', label = '$\overline{x} =$' + f' {np.mean(norm_samples):.3f}' + '\n$s =$' + f' {np.std(norm_samples):.3f}')
xmin, xmax = plt.xlim()
x = np.linspace(mean - 4*st_dev, mean + 4*st_dev, 10000)
p = stats.norm.pdf(x, mean, st_dev)
plt.plot(x, p, linewidth = 2, color = 'purple', label = 'Standard Normal\nDistribution')
plt.legend();<jupyter_output><empty_output><jupyter_text>**Identifying a Distribution from Observed Data**<jupyter_code>data_df = pd.read_csv('bball.csv', names = ['Final Scores for Basketball Games'], header = None)
data_df.hist('Final Scores for Basketball Games', bins = 125)
plt.ylabel('Number of Observations');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1853211009174312, 'fraction_numerical': 0.02996941896024465, 'mean_word_length': 5.9914529914529915, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '20003', 'license': 'MIT', 'n_tokens_mistral': 679, 'n_tokens_neox': 633, 'n_words': 124, 'path': 'Python YouTube Tutorials/Statistical plotting with Matplotlib/Statistical_plotting_with_Matplotlib!.ipynb', 'repo_name': 'tudev/Workshops-2020-2021', 'size': '1635'}