Random variable having density proportional to a function

192 Views Asked by At

Let $X$ be a random variable with density proportional to a function $g(x)$, where $g$ is a function $g(x):=\left\{\begin{matrix} |x|^{-n};|x|\geq 1\\ 0; |x|<1 \end{matrix}\right.$ that depends on a positive integer $n\geq 2$.

  • Write thorougly the density of $X$ for a generic value $n\geq 2$.
  • Draw the density for $n=3$ and $n=10$.
  • Determine for which values of $n$ exists $\mathbb{E}[X]$.
  • Determine for which values of $n$ exists $\mathbb{Var}[X]$.

I've never seen an exercise like this. I'm having a trouble understanding how approach the problem with a random variable that depends on a function (especially a function with module). Could you give me some hints on how to start?

Thanks in advance for any help!

1

There are 1 best solutions below

7
On BEST ANSWER

EDIT: As the comments pointed out, I misread the question, and thought that $g(x)$ was the density. However, the density $p(x)$ is in fact $Cg(x)$, where $C$ is a constant to be determined. I have edited the answer appropriately.

As $\int_{-\infty}^{\infty} p(x)dx = 1$ and $g(x)$ is even, we see that \begin{align} 1 &= \int_{-\infty}^{\infty}Cg(x)dx \\ &= 2C\int_1^{\infty}|x|^{-n}dx \\ &= 2C\frac{x^{1-n}}{1-n}\biggr|_1^{\infty} \\ &= \frac{2C}{n-1}\\ \end{align}

(the last step is valid as $n>2$)

So, $C = \frac{n-1}{2}$, and so $p(x) = \frac{n-1}{2}g(x)$.

Now, we have

\begin{align} \mathbb{E}[X] &= \int_{-\infty}^{\infty}xp(x)dx \\ &=\frac{n-1}{2}\int_{-\infty}^{\infty}xg(x)dx \end{align}

As $g(x)$ is even, $xg(x)$ is odd.

So, $$\int_{-a}^{a}xg(x)dx = 0$$ for all $a\in \mathbb{R}$, and hence we get $\mathbb{E}[X] = 0$.

Thus, we also get $\mathbb{Var}[X] = \mathbb{E}[(X-E[X])^2] = \mathbb{E}[X^2]$

Now, as $g(x)$ is even, so is $x^2g(x)$.

Thus

\begin{align} \mathbb{Var}[X] &= \int_{-\infty}^{\infty}x^2p(x)dx \\ &= 2\frac{n-1}{2}\int_0^{\infty}x^2g(x)dx \\ &= (n-1)\int_1^{\infty}x^2|x|^{-n}dx \\ &= (n-1)\int_1^{\infty}x^{2-n}dx \\ & = (n-1)\frac{x^{3-n}}{3-n}\biggr|_1^{\infty} \\ \end{align}

The last term exists only when the power of $x<0$.

So, $\mathbb{Var}[X]$ exists when $n>3$, and $\mathbb{Var}[X]=\frac{n-1}{n-3}$