Kernel Density Plot
Kernel Density Plot is a graphical tool that visually represents data distribution. By smoothing data points, it creates a continuous probability density function, helping users better understand the data distribution. SPSSAU supports the following functions:
Batch add 'titles' for plotting.
Add categorical variables (e.g., gender) to generate kernel density plots for different categories.
Users can choose different kernel functions.
The system automatically sets the bandwidth , but users can also customize one.

Data Format

The dataset includes one Category and the analysis data. Category can be omitted during analysis if not needed.
Calculation Steps
1.Data Preparation
Collect a sample dataset: x1, x2, ..., xn.
2.Select a Kernel Function
Choose an appropriate kernel function that satisfies . SPSSAU provides the following kernel functions: Uniform, Triangular, Epanechnikov, Quartic, Gaussian, and Cosine. Gaussian is the default function.
Kernel Function | Formula |
---|---|
Uniform | |
Triangular | |
Epanechnikov | |
Quartic | |
Gaussian [default] | |
Cosine |
3.Choose Bandwidth
Select an appropriate bandwidth (h > 0) to control the smoothness of the kernel function. The smaller the bandwidth, the less smooth the estimation. SPSSAU uses 'Silverman's Rule of Thumb' by default to calculate h:
- s represents the sample standard deviation.
- IQR represents the interquartile range.
- n represents the sample size.
- min selects the smaller value between the two.
4.Calculate Kernel Density Estimation
For any given x, is defined as:
5.Plot the Kernel Density Plot
Plot to generate the kernel density plot.