Pattern Recognition - Kernel Density estimators 2.5.1
Pls. refer the equations above. In case of eq 2.248 (left box image) we're calculating density at point $x$, only. There are total of 3 points, only 2 qualify as per kernel function and hence probability at $x$, $p(x) = \frac{2}{3}$.

The right box diagram shows that we take the points, one by one, and calculate the probability at each point using kernel function. Thus we get probability at each of point of data set. And effectively, we get a probability distribution for the entire data set.

The bar chart shows the PMF for 2 cases - left: probability based on (eq 2.248) and right: for (eq. 2.249). I use PMF to easily communicate the understanding.



*Note:

1- With x_1 centered cube 2 points: x_1 &amp; x_2 lie inside the cube; same for x_2 centered cube. However for x_1 only one point x_1 lies in the cube - out of total of 3 points.

2- d|a, b| gives distance between points a, b. 

3- for a large collection of data points and cubes of small sides (h), we get a PDF distribution curve.