from scipy.stats import norm
from scipy.stats.mstats import mquantiles
from numpy.random import choice,seed
from numpy import array

seed(756)
Den=[ 0.08015092,  0.10789958,  0.12167541,  0.21219431,  0.07920235,  0.19467892,  0.5431346,   0.13779066]

MnWgt=norm(2.804086007439/2.2,0.02273154621778/2.2)

class BedArea():
 def __init__(self,mu,sigma):
     self.mu=mu
     self.sigma=sigma
     self.nsource=norm(0,1)
 def rvs(self,size=None):
      z=self.nsource.rvs(size=size)
      result=self.mu+self.sigma*z
      return(result)
BA=BedArea(26.902999877929*10000,26.902999877929*1000)
def RandDen(n):
    result=choice(array(Den),size=n,replace=True)
    return(result)

p=[.005,.025,.05,.125,.5,.875,.95,975,.995]
p=[.125,.5,.875]
n=10000

B=BA.rvs(size=n)*MnWgt.rvs(size=n)* RandDen(n)
#print(B)
print(mquantiles(B,p))

      
      

564da178e367fd93d75ef9dcdd0d63877bc48ccc
<mask token>


class BedArea:

    def __init__(self, mu, sigma):
        self.mu = mu
        self.sigma = sigma
        self.nsource = norm(0, 1)

    def rvs(self, size=None):
        z = self.nsource.rvs(size=size)
        result = self.mu + self.sigma * z
        return result


<mask token>


def RandDen(n):
    result = choice(array(Den), size=n, replace=True)
    return result


<mask token>

<mask token>
seed(756)
<mask token>


class BedArea:

    def __init__(self, mu, sigma):
        self.mu = mu
        self.sigma = sigma
        self.nsource = norm(0, 1)

    def rvs(self, size=None):
        z = self.nsource.rvs(size=size)
        result = self.mu + self.sigma * z
        return result


<mask token>


def RandDen(n):
    result = choice(array(Den), size=n, replace=True)
    return result


<mask token>
print(mquantiles(B, p))

<mask token>
seed(756)
Den = [0.08015092, 0.10789958, 0.12167541, 0.21219431, 0.07920235, 
    0.19467892, 0.5431346, 0.13779066]
MnWgt = norm(2.804086007439 / 2.2, 0.02273154621778 / 2.2)


class BedArea:

    def __init__(self, mu, sigma):
        self.mu = mu
        self.sigma = sigma
        self.nsource = norm(0, 1)

    def rvs(self, size=None):
        z = self.nsource.rvs(size=size)
        result = self.mu + self.sigma * z
        return result


BA = BedArea(26.902999877929 * 10000, 26.902999877929 * 1000)


def RandDen(n):
    result = choice(array(Den), size=n, replace=True)
    return result


p = [0.005, 0.025, 0.05, 0.125, 0.5, 0.875, 0.95, 975, 0.995]
p = [0.125, 0.5, 0.875]
n = 10000
B = BA.rvs(size=n) * MnWgt.rvs(size=n) * RandDen(n)
print(mquantiles(B, p))

from scipy.stats import norm
from scipy.stats.mstats import mquantiles
from numpy.random import choice, seed
from numpy import array
seed(756)
Den = [0.08015092, 0.10789958, 0.12167541, 0.21219431, 0.07920235, 
    0.19467892, 0.5431346, 0.13779066]
MnWgt = norm(2.804086007439 / 2.2, 0.02273154621778 / 2.2)


class BedArea:

    def __init__(self, mu, sigma):
        self.mu = mu
        self.sigma = sigma
        self.nsource = norm(0, 1)

    def rvs(self, size=None):
        z = self.nsource.rvs(size=size)
        result = self.mu + self.sigma * z
        return result


BA = BedArea(26.902999877929 * 10000, 26.902999877929 * 1000)


def RandDen(n):
    result = choice(array(Den), size=n, replace=True)
    return result


p = [0.005, 0.025, 0.05, 0.125, 0.5, 0.875, 0.95, 975, 0.995]
p = [0.125, 0.5, 0.875]
n = 10000
B = BA.rvs(size=n) * MnWgt.rvs(size=n) * RandDen(n)
print(mquantiles(B, p))

from scipy.stats import norm
from scipy.stats.mstats import mquantiles
from numpy.random import choice,seed
from numpy import array

seed(756)
Den=[ 0.08015092,  0.10789958,  0.12167541,  0.21219431,  0.07920235,  0.19467892,  0.5431346,   0.13779066]

MnWgt=norm(2.804086007439/2.2,0.02273154621778/2.2)

class BedArea():
 def __init__(self,mu,sigma):
     self.mu=mu
     self.sigma=sigma
     self.nsource=norm(0,1)
 def rvs(self,size=None):
      z=self.nsource.rvs(size=size)
      result=self.mu+self.sigma*z
      return(result)
BA=BedArea(26.902999877929*10000,26.902999877929*1000)
def RandDen(n):
    result=choice(array(Den),size=n,replace=True)
    return(result)

p=[.005,.025,.05,.125,.5,.875,.95,975,.995]
p=[.125,.5,.875]
n=10000

B=BA.rvs(size=n)*MnWgt.rvs(size=n)* RandDen(n)
#print(B)
print(mquantiles(B,p))

      
      
