Create an interpolated smooth density estimate for some data:
Compute probabilities from the distribution:
Increase the bandwidth for smoother estimates:
Allow the bandwidth to vary adaptively with local density:
Interpolate kernel density estimates in higher dimensions:
Plot the univariate marginal PDFs:
Plot the bivariate marginal PDFs:
Select from built-in kernel functions or build a custom one:
A custom kernel function:
Specify radial or product type kernels for multivariate estimates:
Estimate distribution functions:
Compute moments of the distribution:
Special moments:
General moments:
Quantile function:
Special quantile values:
Generate random numbers:
Compute probabilities and expectations:
Estimate bivariate distribution functions:
Compute moments of a bivariate distribution:
Special moments:
General moments:
Generate random numbers:
Show the point distribution:
Automatically select the bandwidth to use:
More data yields better approximations to the underlying distribution:
Explicitly specify the bandwidth to use:
Use bandwidths of

and

:
Larger bandwidths yield smoother estimates:
Specify bandwidths in units of standard deviation:
Use bandwidths of

and

the standard deviation:
Allow the bandwidth to vary adaptively with local density:
Vary the local sensitivity from

(none) to

(full):
Vary the initial bandwidth for an adaptive estimate:
Specify an initial bandwidth of

and

, respectively:
Use any of several automatic bandwidth selection methods:
Silverman's method is used by default:
The PDFs are equivalent:
By default, Silverman's method is used to independently select bandwidths in each dimension:
Any automated method can be used to independently select diagonal bandwidth elements:
Methods used to estimate the bandwidth diagonal need not be the same:
Use adaptive, oversmoothed, and constant bandwidths in the respective dimensions:
Plot the univariate marginal PDFs:
Give a scalar value to use the same bandwidth in all dimensions:
To use nonzero off-diagonal elements, give a fully specified bandwidth matrix:
Specify any one of several kernel functions:
Define the kernel function as a pure function:
By default, the Gaussian kernel is used:
This is equivalent to using the PDF of a
NormalDistribution
:
Shapes of some univariate kernel functions:
Specify any one of several kernel functions for multivariate data:
Choose between product and radial-type kernel functions for multivariate data: