1
$\begingroup$

In the R package distr there are two infix operators ^ and * that can be applied to random variables to generate new random variables. Example R code:

library(distr)
Norm()^2
Norm() * Norm()

However, these two operations do not produce the same thing. Let $X$ be a random variable; in our example $X \sim \operatorname{Norm}(0, 1)$. If I am interpreting the package maintainer correctly, the first is the image $\operatorname{Im}(X)$ of the map $X \to X^2$ and the second is the image of the map $X \times Y \to XY$.

I have two questions:

  1. What is the difference between the two definitions above? In particular, is the first equivalent to the transformation $f(x) = x^2$ on the pdf of $X$?

  2. Is it usual to use this notation? It's quite confusing that $X^2 \neq X*X$.

$\endgroup$
4
$\begingroup$

You are correct: The first is simply a univariate transformation of the random variable $X$. The second is the product of two independent random variables.

In fact, I would go so far as to say that it is incorrect to use the notation $X*X$ for this, since it suggests equivalence with $X^2$. A better notation would be to use $X_i*X_j$.

They are completely different objects.

$\endgroup$
  • 1
    $\begingroup$ So, if I write $X + X$ would you consider this to be the sum of two independent and identically distributed random variables, or would it be more precise to write $X_1 + X_2$ where $X_1, X_2 \sim \operatorname{Norm}(0,1)$. $\endgroup$ – Alex Jun 9 '16 at 1:12
  • 2
    $\begingroup$ @Alex yes, it would be more precise to indicate that they are two separate data points, observations, or draws. The "lazier" notation is still used quite a lot when the context is clear.. $\endgroup$ – user75138 Jun 9 '16 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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