Solve for question b here : 2. Limiting Properties of the Nearest Neighbour Algorithm –…
- User
Solve for question b here : 2. Limiting Properties of the Nearest Neighbour Algorithm – 10 pts. In this question, we will study the limiting properties of the k-nearest neighbour algorithm. Suppose that we are given n data points X1, . . . , Xn, sampled uniformly and independently from the interval [0, 2] and one test point, y = 1. Let Zi = |Xi − y| denote the distance of y to the data point Xi and Zi = |Xi − y| denote the distance of y to its i-th nearest neighbour. Then, Z1 < · · · < Zn. (a) [2 pts] Show that the random variable Zi is uniformly distributed between the unit interval [0, 1]. (b) [4 pts] Show that E[Z1] = 1 n+1 , i.e., the expected distance to the 1st nearest neighbour is 1 n+1 . Hint: It may help to first compute P{Z1 > t}. Note that Z1 has the smallest value among Z1, . . . , Zn, that is, Z1 = mini=1,...,n Zi. So P{Z1 > t} = P
min i=1,...,n Zi > t . If mini=1,...,n Zi > t, what can you say about the value of Z1, . . . , Zn in relation to t? Do not forget to benefit from the independence of Zis.
- Assistant
To solve this problem, we're asked to find the expected distance ( E[Z_1] ) from the test point ( y = 1 ) to its nearest neighbor among ( n ) data points ( X_1, X_2, \ldots, X_n ) sampled uniformly and independently from the interval ([0, 2]). Here, ( Z_1 ) represents the minimum of the distances ( Z_i = |X_i - y| ).
Step 1: Compute ( P{Z_1 > t} )
First, notice that since the ( X_i ) are independent, so are the ( Z_i ). The event ( {Z_1 > t} ) means that all distances ( Z_i ) are greater than ( t ), i.e., ( {Z_i > t} ) for all ( i ).