KernelMixtureDistribution

KernelMixtureDistribution[{x1,x2,}]
represents a kernel mixture distribution based on the data values .

KernelMixtureDistribution[{{x1,y1,},{x2,y2,},}]
represents a multivariate kernel mixture distribution based on data values .

KernelMixtureDistribution[,bw]
represents a kernel mixture distribution with bandwidth bw.

KernelMixtureDistribution[,bw,ker]
represents a kernel mixture distribution with bandwidth bw and smoothing kernel ker.

Details and OptionsDetails and Options

  • KernelMixtureDistribution returns a DataDistribution object that can be used like any other probability distribution.
  • The probability density function for KernelMixtureDistribution for a value is given by for a smoothing kernel and bandwidth parameter .
  • The following bandwidth specifications bw can be given:
  • hbandwidth to use
    {"Standardized",h}bandwidth in units of standard deviation
    {"Adaptive",h,s}adaptive bandwidth with initial bandwidth h and sensitivity s
    Automaticautomatically computed bandwidth
    "name"use a named bandwidth selection method
    {bwx,bwy,}separate bandwidth specifications for x, y, etc.
  • For multivariate densities, h can be a positive definite symmetric matrix.
  • For adaptive bandwidths the sensitivity s must be a real number between 0 and 1 or Automatic. If Automatic is used, s is set to , where is the dimensionality of the data.
  • Possible named bandwidth selection methods include:
  • "LeastSquaresCrossValidation"uses the method of least-squares cross-validation
    "Oversmooth"1.08 times wider than the standard Gaussian
    "Scott"uses Scott's rule to determine bandwidth
    "SheatherJones"uses the SheatherJones plugin estimator
    "Silverman"uses Silverman's rule to determine bandwidth
    "StandardDeviation"uses the standard deviation as bandwidth
    "StandardGaussian"optimal bandwidth for standard normal data
  • By default the method is used.
  • For automatic bandwidth computation, constant arrays are assumed to have unit variance.
  • The following kernel specifications ker can be given:
  • "Biweight"
    "Cosine"
    "Epanechnikov"
    "Gaussian"
    "Rectangular"
    "SemiCircle"
    "Triangular"
    "Triweight"
    funcf_nu in R
  • In order for KernelMixtureDistribution to generate a true density estimate, the function fn should be a valid univariate probability density function.
  • By default the kernel is used.
  • For multivariate densities, the kernel function ker can be specified as product and radial types using and respectively. Product-type kernels are used if no type is specified.
  • The precision used for density estimation is the minimum precision given in the bw and data.
  • The following options can be given:
  • MaxMixtureKernelsAutomaticmax number of kernels to use
  • KernelMixtureDistribution can be used with such functions as Mean, CDF, and RandomVariate.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Create a kernel density estimate of univariate data:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input

Use the resulting distribution to perform analysis, including visualizing distribution functions:

In[4]:=
Click for copyable input
Out[4]=

Compute moments and quantiles:

In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

Create a kernel density estimate of some bivariate data:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Visualize the estimated PDF and CDF:

In[3]:=
Click for copyable input
Out[3]=

Compute covariance and general moments:

In[4]:=
Click for copyable input
Out[4]//MatrixForm=
In[5]:=
Click for copyable input
Out[5]=

Create symbolic representations of kernel density estimates:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

Investigate symbolic properties:

In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
Introduced in 2010
(8.0)