text_plain_output_1.png image_output_1.png
from scipy.stats import uniform

import seaborn as sns

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(color_codes=True)
sns.set(rc={'figure.figsize': (9.5, 5)})

from scipy.stats import uniform
sample_size = 10000
param_loc = 5
param_scale = 10
data_uniform = uniform.rvs(size=sample_size, loc=param_loc, scale=param_scale)
print('The first 5 values from this distribution:')
print(data_uniform[0:5])
ax = sns.distplot(data_uniform, bins=100, kde_kws={'label': 'KDE'}, hist_kws={'label': 'Histogram'})
ax.set(xlabel='x ', ylabel='Frequency', title=f'Uniform Distribution: Sample Size = {sample_size}. loc={param_loc}, scale={param_scale}')