0
$\begingroup$

This may seem a trivial Question but I am confused and never come across this kind of expression where I need to simplify for a function of a random variable $R$.

I have an expression $E\bigg [\frac{{(\log(R^p)})^2}{N} \bigg]$ where N = number of data points and is a constant; R = is a random variable which is vector of distances from a data point $x$ to its closest neighbor (k nearest neighbor distances); $p$ is the dimension of the data set = 2 in my case.

The way I have solved and got stuck later on is as follows:

$E\bigg [\frac{{(\log(R^p)})^2}{N} \bigg]$

$ = E\bigg [\frac{{(p\log(R)})^2}{N} \bigg]$

$ = E\bigg [\frac{{p^2(\log(R)})^2}{N} \bigg]$

$ = p^2E\bigg [\frac{{(\log(R)})^2}{N} \bigg]$

Then how do I proceed further? Please help

$\endgroup$
1
  • $\begingroup$ One trick that sometimes might help with the expectation of a log of a random variable is to compute its MGF. $\endgroup$
    – Glen_b
    Commented Jan 30, 2015 at 16:53

1 Answer 1

2
$\begingroup$

There are no general formulas for the expected value of a non-linear function of a random variable. Sometimes it may happen that the non-linear function has a known distribution itself, in which case its expected value has been derived by some good people in the past.

In your case, you are looking at

$$\frac {p^2}{N}E\left[(\log(R))^2 \right]$$

So you have to consider: What is the distribution of $R$? If it is known, then perhaps the distribution of its natural logarithm is also known, say $X = \log R$, or you can derive it. If it is known or you derive it, then maybe its mean and variance become available, $\mu_x, \sigma^2_x$. But then, the expected value you face is the second moment of $X$, and you can calculate it by the relation

$$\sigma^2_x = E(X^2) - \mu_x^2 \implies E(X^2) = \sigma^2_x + \mu_x^2$$

If this approach is intractable, you can explore the possibility of approximating the non-linear function by a linear expansion, although here you should consider the quality of the approximation.

$\endgroup$
4
  • $\begingroup$ Thank you for your reply. You did mention that we can derive the distribution. Can you tell me how or point out to a good resource for a beginner in this area? $\endgroup$
    – SKM
    Commented Feb 2, 2015 at 20:48
  • 1
    $\begingroup$ If you know the distribution of $R$, then you can apply the "change-of-variables" formula to see what $log R$ looks like. Resources on the formula are all over the web -I tend to prefer something that comes from a university, because they have the educational aspect in mind. $\endgroup$ Commented Feb 2, 2015 at 21:16
  • $\begingroup$ Thank you. In my case the distribution of R is unknown. This complicates the issue. How to do that? $\endgroup$
    – SKM
    Commented Feb 3, 2015 at 17:44
  • 1
    $\begingroup$ If you cannot say something about the distribution of $R$ the you cannot say something about the distribution of a function of $R$, and that's that - you cannot derive theoretical results related to the expected value of interest. of course if there are data, or you can safely simulate the environment, then you can adopt an empirical / Monte Carlo estimation approach. $\endgroup$ Commented Feb 3, 2015 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.