Integral of KNN distribution

91 Views Asked by At

I encountered a question where I have to prove that the KNN density model does not define a proper distribution. Obviously I have to show that the integral of the function does not sum to $1$.

The KNN density function looks like this:

$p(x|C_k)=\frac{K_k}{N_kV}$

And the integral over all $x_i$'s would be:

$\int p(x)dx = \sum^{N}_{i=1} p(x_i) = \sum^{N}_{i=1} \frac{K}{NV_i}$

But I found online that there should be another coefficient $V_i$ in the sum:

$\int p(x)dx \approx \sum^{N}_{i=1} p(x_i) V_i= \sum^{N}_{i=1} \frac{K}{NV_i}V_i$

It's easy to continue from here to prove the improper distribution... We just remain with $K$ and if $K>1$ then we're done.

My question is where did that $V_i$ come from?

1

There are 1 best solutions below

0
On BEST ANSWER

You're approximating an integral as a sum with the trapezium rule (in this case with rectangles rather than general trapezia), so each term is proportional to the rectangle's width, i.e. the distance between consecutive $x_i$.