Bimodal distributions

1. Apr 11, 2010

Lobotomy

i have some values that seems to have 2 modes and i dont know how to fit a distribution to them in matlab. Does matlab have any function for fitting bimodal/unimodal distributions?

edit: it seems like the function gmdistribution have something to do with it but this only concerns gaussian distributions with 2 modes. is there a generalized version or more specifically lognormal version of this?

Last edited: Apr 11, 2010
2. Apr 16, 2010

SW VandeCarr

My gmdistribution is for bivariate Gaussian distributions. A strongly bimodal distribution may result from data from two overlapping Gaussian populations, in which case they should be disaggregated and described separately. For this, it's best to go back to the original data.

If the data is naturally strongly bimodal, then it can't (and shouldn't) be normalized. What are you trying to do? You can fit any odd distribution with polynomial regression. However, you have to be careful not to enter too many terms in the equation, or it will be too sensitive to the specific data to be meaningful.

EDIT: If you want to use gmdistribution, it seems you need the parameters of the individual components of the Gaussian mixture to begin with, but I don't know for sure. I haven't used it.

Last edited: Apr 16, 2010
3. Apr 16, 2010

Lobotomy

im trying to find a distribution that fits a worker operation. It is a worker doing a task for instance sewing a pocket on a jacket and every n:th jacket he has sewn he batches them and moves them. n is not a fixed number i.e. batch sizes vary a bit.

so there will be one mode for the mean time of sewing one pocket, and a smaller mode for the mean time of batching.

the pocket sewing operation is lognormally distributed, i think the batching process is as well. and i want to describe the entire process with a distribution which will be used in a computer simulation

4. Apr 16, 2010

SW VandeCarr

If your parameter is mean time for each operation, then it seems you have two distinct unmixed distributions. However if your time line is for total throughput, you would probably have some overlap at some point after zero time in a region where some pockets are being sewed, while others are being batched. This seems to be the kind of bivariate mixed Gaussian distribution for which gmdistribution is useful since you have the parameters for both the sewing and batching distributions.

As for additional modes, you could probably iterate the process forward between the second mode and a third mode, etc.

Again, I remind you, I haven't actually used this application.

Last edited: Apr 16, 2010
5. Apr 16, 2010

Lobotomy

what i measure is the time between output. So the time between output could be

10 11 12 9 11 11 8 13 34 10 9 etc etc

where the 34 is when a batching occurs.

so do you think a better idea is to take one distribution for the operation and using that for simulation of time. and for every n:th element you add another time taken from the batch distribution??

this will be more complicated to program i guess. the best solution for me would be to simulate the time for the operation and batching as taken from one bimodal distribution

6. Apr 17, 2010

SW VandeCarr

Well, the latter seemed to be what you were aiming for. Both would provide useful information for an operations manager.

7. Apr 17, 2010

Lobotomy

yes, so how can i fit a bimodal distribution to the above measurements?

i can fit a mixed gaussian distribution to my measurements with the gmdistribution, but this is not so correct since the distributions are not gaussian. i would assume that a bimodal lognormal distribution would fit better, and the question is therefore is there a way in matlab to fit measurements to a bimodal lognormal distribution.

8. Apr 17, 2010

SW VandeCarr

It shouldn't be a problem if they're lognormal. You'll be fitting the curve to a log scale on the x axis. All stat packages can do that. You've already got the parameters.

9. Apr 17, 2010

Lobotomy

well it sounds simple when you say it but i dont know how to (im no master at matlab either by the way)

so if x is your vector with measurements. which matlab commands would you use to fit a distribution and get the parameters for it to be more specific?

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook