1. ## Stats problem

A random variable $X$ has cdf of the form $F(x) = \frac{1}{1+e^{-\frac{x-\mu}{\sigma}}}$, $x$ is real, $\mu$ is real and $\sigma > 0$.

Find the pdf function of $X$.

Find the form of the moment generating function $Y = \frac{X-\mu}{\sigma}$ and hence calculate the variance of $X$

[Note : the gamma function, $\Gamma{(t)}$ is such that $\Gamma''{(1)} - \Gamma'{(1)} = \frac{\pi^2}{6}$.

Letting $z = {e^{-\frac{x-\mu}{\sigma}}}$.

The pdf turns out to be $f(x) = \frac{d}{dx}F(x) = \frac{z}{\sigma (1+z)^2}$.

Using the fact that if $Y = aX+b$ then $M_y{(t)} = e^{bt}M_x{(at)}$,
It turns out that $M_y{(t)} = e^{\frac{-t\mu}{\sigma}} \int^{\infty}_{-\infty} e^{\frac{tx}{\sigma}} f(x) dx.$
Using $dx = -\frac{\sigma dz}{z}$ and $(z e^{\frac{-\mu}{\sigma}})^{-t} = e^{\frac{tx}{\sigma}}$
We then have $M_y{(t)} = \int^{\infty}_{-\infty}\frac{z^{-t}z}{\sigma (1+z)^2}dx = \int^{\infty}_{0} \frac{z^{-t}}{(1+z)^2}dz$ which, according to Maple, is equal to $\pi csc(\pi t) t$.
But then I end up with dividing by zero errors when trying to calculate $M'_y{(1)}$.
Plus I don't see how nor where to use the note given in the exercice.

Any help would be much appreciated. Thank you.

2. Originally Posted by Simply82358
A random variable $X$ has cdf of the form $F(x) = \frac{1}{1+e^{-\frac{x-\mu}{\sigma}}}$, $x$ is real, $\mu$ is real and $\sigma > 0$.

Find the pdf function of $X$.

Find the form of the moment generating function $Y = \frac{X-\mu}{\sigma}$ and hence calculate the variance of $X$

[Note : the gamma function, $\Gamma{(t)}$ is such that $\Gamma''{(1)} - \Gamma'{(1)} = \frac{\pi^2}{6}$.

Letting $z = {e^{-\frac{x-\mu}{\sigma}}}$.

The pdf turns out to be $f(x) = \frac{d}{dx}F(x) = \frac{z}{\sigma (1+z)^2}$.

Using the fact that if $Y = aX+b$ then $M_y{(t)} = e^{bt}M_x{(at)}$,
It turns out that $M_y{(t)} = e^{\frac{-t\mu}{\sigma}} \int^{\infty}_{-\infty} e^{\frac{tx}{\sigma}} f(x) dx.$
Using $dx = -\frac{\sigma dz}{z}$ and $(z e^{\frac{-\mu}{\sigma}})^{-t} = e^{\frac{tx}{\sigma}}$
We then have $M_y{(t)} = \int^{\infty}_{-\infty}\frac{z^{-t}z}{\sigma (1+z)^2}dx = \int^{\infty}_{0} \frac{z^{-t}}{(1+z)^2}dz$ which, according to Maple, is equal to $\pi csc(\pi t) t$.
But then I end up with dividing by zero errors when trying to calculate $M'_y{(1)}$.
Plus I don't see how nor where to use the note given in the exercice.

Any help would be much appreciated. Thank you.
Your calculations look OK and you got $m_Y(t) = \frac{\pi \, t}{\sin (\pi t)}$.

Note that $\lim_{t \rightarrow 0} m_Y(t) = 1$ which is a good sign.

But I don't know why you're trying to calculate the derivative of $m_Y(t)$ at t = 1 ......

To get $E(Y)$ and $E(Y^2)$ (and hence Var(Y) and hence Var(X)) you need to calculate the derivatives of $m_Y(t)$ at t = 0 .....

And the fact that above I said $\lim_{t \rightarrow 0} m_Y(t) = 1$ and not $m_Y(0) = 1$ should give you the clue to what has to be done .....

You need to calculate the limiting values of the derivatives of $m_Y(t)$ as $t \rightarrow 0$.

3. Sorry I meant 0, this was a typo.
Thank you for the help.