Generate empirical/user defined distribution with desired mean and std

243 Views Asked by At

I have generated a demand distribution based on the actual demand data of one year. This distribution is non-normal or similar to any theoretical distributions. I use this empirical demand distribution for a simulation study.

In current empirical distribution:
mean = 1000
std = 600
Coefficient of variation (CV) = 0.6

I want to base on the current empirical distribution pattern/shape as the base case to generate four additional distributions.

dist1: Low volume, low variation   -> mean:500, std:150, CV:0.3
dist2: Low volume, high variation  -> mean:500, std:665, CV:1.33
dist3: High volume, low variation  -> mean:2000, std:600, CV:0.3
dist4: High volume, high variation -> mean:2000, std:2660, CV:1.33

the key purpose for doing it is to investigate how the changes in demand volume and demand variation can impact the simulated system. Is it statistically feasible to create such distributions (dist1-4 above), or I have to change to the normal distribution?

1

There are 1 best solutions below

2
On

Your problem is under-specified, but it might suffice to apply an appropriate linear function to your given distribution.

Since E(aX+b) = aE(X) + b and StDev(aX+b) = |a|StDev(X), you can pick a and b so that you get the given target parameters.

Suppose that you have a function f() which generates values with mean 1000 and standard deviation 600. The following definition will generate random numbers with mean m and standard deviation s:

g(m,s) =  (s/600)*f()+m-5*s/3

A quick test in R:

> f <- function() rnorm(1,1000,600) #mock empirical f()
> g <- function(m,s) (s/600)*f()+m-5*s/3
> x <- replicate(1000,g(2000,300))
> mean(x)
[1] 1988.719
> sd(x)
[1] 300.7044