# Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.
BUILT-IN WOLFRAM LANGUAGE SYMBOL

# SmoothKernelDistribution

SmoothKernelDistribution[{x1,x2,}]
represents a smooth kernel distribution based on the data values xi.

SmoothKernelDistribution[{{x1,y1,},{x2,y2,},}]
represents a multivariate smooth kernel distribution based on the data values {xi,yi,}.

SmoothKernelDistribution[,bw]
represents a smooth kernel distribution with bandwidth bw.

SmoothKernelDistribution[,bw,ker]
represents a smooth kernel distribution with bandwidth bw and smoothing kernel ker.

## Details and OptionsDetails and Options

• SmoothKernelDistribution returns a DataDistribution object that can be used like any other probability distribution.
• The probability density function for SmoothKernelDistribution for a value is given by a linearly interpolated version of for a smoothing kernel and bandwidth parameter .
• The following bandwidth specifications bw can be given:
•  h bandwidth to use {"Standardized",h} bandwidth in units of standard deviations {"Adaptive",h,s} adaptive with initial bandwidth h and sensitivity s Automatic automatically 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" use the method of least-squares cross-validation "Oversmooth" 1.08 times wider than the standard Gaussian "Scott" use Scott's rule to determine bandwidth "SheatherJones" use the Sheather–Jones plugin estimator "Silverman" use Silverman's rule to determine bandwidth "StandardDeviation" use the standard deviation as bandwidth "StandardGaussian" optimal bandwidth for standard normal data
• By default, the "Silverman" 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" func
• In order for SmoothKernelDistribution to generate a true density estimate, the function fn should be a valid probability density function.
• By default, the "Gaussian" kernel is used.
• The kernel function ker can be specified to account for known bounding on the underlying density using {"Bounded",c,ker}, where c can be any real number, a list {c1,c2} such that c1<c2, or a list {{c11,c12},{c21,c22},}, with length equal to the dimension of data.
• For multivariate densities, the kernel function ker can be specified as product and radial types using {"Product",ker} and {"Radial",ker}, 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:
•  InterpolationPoints Automatic initial number of interpolation points to use MaxMixtureKernels Automatic max number of kernels to use MaxRecursion Automatic number of recursive subdivisions to allow PerformanceGoal Automatic optimize for speed or quality MaxExtraBandwidths Automatic max bandwidths beyond data to use
• SmoothKernelDistribution can be used with such functions as Mean, CDF, and RandomVariate.

## ExamplesExamplesopen allclose all

### Basic Examples  (2)Basic Examples  (2)

Create an interpolated version of a kernel density estimate for some univariate data:

 In[1]:=
 In[2]:=

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

 In[3]:=
 Out[3]=

Compute moments and quantiles:

 In[4]:=
 Out[4]=
 In[5]:=
 Out[5]=

Create an interpolated version of a kernel density estimate of some bivariate data:

 In[1]:=
 In[2]:=

Visualize the estimated PDF and CDF:

 In[3]:=
 Out[3]=

Compute covariance and general moments:

 In[4]:=
 Out[4]//MatrixForm=
 In[5]:=
 Out[5]=