SSJ  3.3.1 Stochastic Simulation in Java
Package umontreal.ssj.stat.density

Univariate density estimation. More...

## Classes

class  DEDerivativeGaussian
This class implements a density derivative estimator (DDE) with a Gaussian ( i.e., standard normal) kernel function. More...

class  DEHistogram
Histogram density estimator for a univariate density. More...

class  DEKernelDensity
This class provides methods to construct a kernel density estimator (KDE) for univariate densities from a set of $$n$$ individual observations $$x_0,\dots, x_{n-1}$$, and to evaluate it at a single point or at a set of selected evaluation points. More...

class  DensityDerivativeEstimator
This class implements a density derivative estimator (DDE) based on a kernel density estimator (KDE) with a sufficiently smooth kernel function $$k$$, see umontreal.ssj.stat.density.DEKernelDensity. More...

class  DensityEstimator
This abstract class represents a univariate density estimator (DE). More...

## Detailed Description

Univariate density estimation.

This package provides tools for univariate density estimation from a set of real-valued observations $$x_0,x_1,\dots,x_{n-1}$$ which may come from real-life data or may have been generated by simulation. The goal is to construct an estimator $$\hat{f}_n$$ of the unknown density $$f$$ of a random variable $$X$$ over a finite interval $$[a,b]$$, based on $$n$$ realizations of $$X$$. One standard way of measuring the performance of the density estimator (DE)
is the mean integrated square error (MISE), which can be decomposed as the sum of the integrated variance (IV) and the integrated square bias (ISB), as follows:

$\textrm{MISE} = \int_a^b\mathbb{E} [\hat{f}(x) - f(x)]^2\mathrm{d}x = \int_a^b\textrm{Var}[\hat{f}(x)]\mathrm{d}x + \int_a^b \left( \mathbb{E}[\hat{f}(x)] - f(x) \right)^2\mathrm{d}x = \textrm{IV} + \textrm{ISB}.$

The abstract class umontreal.ssj.stat.density.DensityEstimator represents an estimator $$\hat{f}_n$$ of an unknown density $$f$$. The actual density estimators are implemented in subclasses, which must provide methods to evaluate $$\hat{f}_n$$ either at a single point or at a finite set of evaluation points. The abstract class provides generic tools to plot estimated densities, compute the empirical integrated variance (IV) when several independent replicates of the estimator are available, and investigate its convergence behavior as a function of n.

Current implementations of this abstract class include histograms in umontreal.ssj.stat.density.DEHistogram and kernel density estimators (KDEs) in umontreal.ssj.stat.density.DEKernelDensity. Some tools are provided to select the kernel bandwidth for the KDEs.

One further subclass of DensityEstimator is the abstract class umontreal.ssj.stat.density.DensityDerivativeEstimator. This class allows to estimate the derivative of an unknown density from the $$n$$ observations. Even though it is strictly speaking not a density estimator, it is structured very similarly and the class provides the same methods as for common density estimators.