# -*- coding: utf-8 -*-
"""
Created on Fri Jun 25 10:52:00 2021

@author: Sim
"""
from scipy.stats import uniform
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

x = np.linspace(0,1, num=5)
pdf = uniform.pdf(x, 0, 1)
cdf = uniform.cdf(x, 0, 1)
quantile = uniform.ppf([0.005, 0.01, 0.025, 0.5, .95, .975, .99, .995])
moments = uniform.stats(0, 1,moments='mvsk')
median = uniform.median(0,1)
stdev = uniform.std(0,1)


xx = uniform.rvs(0,1, size=1000)
xx2 = pd.Series(xx)
xx2.hist(density=True)
plt.plot(x,pdf, 'r-')
plt.show()

xx = uniform.rvs(0,1, size=1000)
xx2 = pd.Series(xx)
xx2.hist(density=True, cumulative=True)
plt.plot(x,cdf, 'r-')
plt.show()

