1. ## Stats problem

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

Find the pdf function of $\displaystyle X$.

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

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

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

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

Using the fact that if $\displaystyle Y = aX+b$ then $\displaystyle M_y{(t)} = e^{bt}M_x{(at)}$,
It turns out that $\displaystyle M_y{(t)} = e^{\frac{-t\mu}{\sigma}} \int^{\infty}_{-\infty} e^{\frac{tx}{\sigma}} f(x) dx.$
Using $\displaystyle dx = -\frac{\sigma dz}{z}$ and $\displaystyle (z e^{\frac{-\mu}{\sigma}})^{-t} = e^{\frac{tx}{\sigma}}$
We then have $\displaystyle 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 $\displaystyle \pi csc(\pi t) t$.
But then I end up with dividing by zero errors when trying to calculate $\displaystyle 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 $\displaystyle X$ has cdf of the form $\displaystyle F(x) = \frac{1}{1+e^{-\frac{x-\mu}{\sigma}}}$, $\displaystyle x$ is real, $\displaystyle \mu$ is real and $\displaystyle \sigma > 0$.

Find the pdf function of $\displaystyle X$.

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

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

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

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

Using the fact that if $\displaystyle Y = aX+b$ then $\displaystyle M_y{(t)} = e^{bt}M_x{(at)}$,
It turns out that $\displaystyle M_y{(t)} = e^{\frac{-t\mu}{\sigma}} \int^{\infty}_{-\infty} e^{\frac{tx}{\sigma}} f(x) dx.$
Using $\displaystyle dx = -\frac{\sigma dz}{z}$ and $\displaystyle (z e^{\frac{-\mu}{\sigma}})^{-t} = e^{\frac{tx}{\sigma}}$
We then have $\displaystyle 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 $\displaystyle \pi csc(\pi t) t$.
But then I end up with dividing by zero errors when trying to calculate $\displaystyle 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 $\displaystyle m_Y(t) = \frac{\pi \, t}{\sin (\pi t)}$.

Note that $\displaystyle \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 $\displaystyle m_Y(t)$ at t = 1 ......

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

And the fact that above I said $\displaystyle \lim_{t \rightarrow 0} m_Y(t) = 1$ and not $\displaystyle 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 $\displaystyle m_Y(t)$ as $\displaystyle t \rightarrow 0$.

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