ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Exponential Distribution
An easy one.
Is location and scale in the exponential distribuion referd to Location = Mean and Scale = Std Deviation. I couldn't find anything about it in the help menu and read something about location and scale family of univariate probability distributions saying the above. I just need to confirm. Thanks |
#2
|
||||
|
||||
See http://www.itl.nist.gov/div898/handbook/eda/section3/eda364.htm
For the normal distribution, the location and scale parameters correspond to the mean and standard deviation, respectively. However, this is not necessarily true for other distributions. In fact, it is not true for most distributions. See http://en.wikipedia.org/wiki/Exponential_distribution For exponential location and scale parameters.
__________________
Best, Alan Last edited by AlanZhang; 05-01-2008 at 11:38 PM. |
#3
|
||||
|
||||
Guillermo, if you want to view distributions you give in Flexsim you can use Expertfit. It is in the menu under Statistics. The parameters you give in Expertfit are exactly the same as you give in Flexsim.
Martijn |
#4
|
||||
|
||||
Also, to give you a better idea of what the location and scale parameters do, generally the location parameter will "translate" the distribution to the left or right, like addition. For example:
exponential(10, 5) will give you the same distribution as: exponential(0, 5) + 10. The scale parameter will generally scale the distribution. For example: exponential(0, 8) will give you the same distribution as: exponential(0, 1) * 8 The shape parameter, if used, is usually a parameter that defines further the shape of the distribution. For example, in a lognormal, I think the shape parameter will let you specify how long or short the right tail of the lognormal should be. For the exponential distribution, it happens that, if you give a location of 0, then the mean of the distribution is the same as the scale parameter of the exponential, although as Alan said, this does not apply for other distributions. If you don't have any data on your distributions, but have a general idea of what it probably looks like, and don't want do go through the extra work of doing a time study, then you can use the triangular distribution, where you specify a min, max and most likely, or you can use the lognormalmeanstdev command. With this command you can just pass in the mean and standard deviation that you want, and it will figure out the right location, scale, and shape factors to pass to the lognormal distribution (which is a pretty good distribution for simulating things like processing times). Note that with lognormalmeanstdev, flexsim picks the shape or "skewness" for you, namely a reasonably long right tail, so it's not as flexible. |
The Following User Says Thank You to Anthony Johnson For This Useful Post: | ||
Cliff King (05-02-2008) |
#5
|
||||
|
||||
Hey, the exponential command is actually one of the distributions I had time to document in the last release. I didn't include an image for it like I did for some of the other ones, but I did show what the location and scale are, and the fact that the mean is the sum of the two and the variance is the scale squared. At this point I've only gotten to about half of them, and expect to finish the rest (plus add detail to a lot more commands) before the 4.5 release at the Flexsimposium in October. In the mean time, there is information in the ExpertFit help regarding the distributions and as Martijn pointed out, ExpertFit uses the same parameters as Flexsim. After openiing ExpertFit, click on User's Guide... in the Help menu. It'll open a pdf file, then scroll to the bottom of it to see the distributions.
|
#7
|
||||
|
||||
Truncating a distribution
To truncate a distribution, you can do something like this:
Code:
double truncated_value = minof(15, maxof(5, exponential(0,10,1))); Code:
double truncated_value = exponential(0,10,1); while(truncated_value > 15 || truncated_value < 5)truncated_value = exponential(0,10,1); There is a definite difference between these two approaches, so make sure you study them closely... By the way, some of the distributions are naturally bounded such as the uniform distribution and the beta distribution (see Flexsim Users Manual v4.32 for more information). |
#9
|
|||
|
|||
Hi,
I'm used to parametrize a lognormal distribution with the mean and standart deviation values of a normal distribution. Can anyone give me a hint how to translate thes two parameters into the flexsim parameters location, scale and shape. And what does stream mean? Thanks! Congshi |
#10
|
||||
|
||||
Hi,
stream is simple the random stream of numbers executed in the distribution. Maybe you take a look at the manual or look for other posts in the community forum. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Congshi Wang (12-13-2010) |
#12
|
||||
|
||||
If you examine a plot of a distribution, the scale value affects the vertikal size. The shape value affects the horizontal size. The location value moves the hole form simply to the left or the right. There is no effect to the form. It is constant.
This is the result we discovered so far, maybe it is right?. Jörg |
The Following User Says Thank You to Jörg Vogel For This Useful Post: | ||
Congshi Wang (12-16-2010) |
#13
|
|||
|
|||
Have you looked at the function lognormalmeanstdev() ?
If you're using lognormal2, then the scale should be exp(normalmean) and the shape should just be the normal standard deviation (normal parameters found by looking at the log of the samples) This gives the same distribution as lognormal with scale as the normalmean and shape as the standard deviation. Last edited by Jason Lightfoot; 12-13-2010 at 01:43 PM. |
The Following User Says Thank You to Jason Lightfoot For This Useful Post: | ||
Congshi Wang (12-16-2010) |
#14
|
|||
|
|||
Hi,
I vote that, in the next Flexsim release, there will be a command for lognormal distribution with location, mean and stdev as input parameters!
__________________
Vincent Béchard, Eng., MASc. Discrete Event Simulation Designer SNC-Lavalin, Industrial Division ca.linkedin.com/in/vincentbechard/ |
The Following User Says Thank You to Vincent Bechard For This Useful Post: | ||
Congshi Wang (12-16-2010) |
#15
|
|||
|
|||
This is something that I encountered on a recent project, the statistical terminology used in expertfit does not match up with that used by a large number of Stats people. These are the same sort of people who get very suspicious when asked to just believe the output of a software package they have not used or heard of.
Giving the Mean/Mode/SD parameters would be good |
#16
|
||||
|
||||
There is already a command that takes location, mean, and stdev as parameters. It's lognormal(). Unfortunately the documentation's parameters are not named intuitively. For the next release we'll change the documentation so that it's:
lognormal(num location, num normalmean, num normalstdev) I think that the terms normalmean and normalstdev should be used instead of just mean and stdev so that non-experts will know that these parameters do not represent the mean and standard deviation of the lognormal distribution. Rather they represent the mean and standard deviation of the normal curve that the lognormal curve is based on. Yes, I agree that expertfit is a little weird there. In its latest version, it decided that the scale parameter should be redefined so that the distribution scales linearly with the scale parameter. That's why we had to add the lognormal2() command, to be compatible with expertfit's parameter definitions. Flexsim's command help is pretty clear on this, though (although the characters are all weird. Is that a Windows 7 thing?). |