# [Matlab] - Kernel Density Estimation

#### poovich

##### New Member
How does the parameter 'support' in ksdensity from MATLAB work? Does it mean that when I want to estimate distributions I have to set it as 'positive'?

#### Dason

Re: Kernel Density Estimation

The support of a distribution is the set of possible values it can take. Some distributions only have a support on the positive real line (think of the exponential distribution) and some have support on the entire real line (such as the normal distribution).

I don't use matlab but the first result from a google search for 'ksdensity matlab' gave that the support parameter for ksdensity takes the following values:

'unbounded' allows the density to extend over the whole real line (default).
'positive' restricts the density to positive values.
A two-element vector gives finite lower and upper bounds for the support of the density.

So if you know the thing you want a density estimate has to be positive then you would tell it 'positive'. If it could take negative values as well you would probably go with unbounded. If you knew the exact limits of the distribution and they're both finite then you would probably specify that.