# TU Wien:Statistik und Wahrscheinlichkeitstheorie UE (Bura)/Übungen 2019W/2.6

Continuous random variable

Let X be a random variable whose cumulative distribution function (cdf) is of the form

${\displaystyle F(x)={\frac {e^{x}}{1+e^{x}}},\quad x\in \mathbb {R} }$

(a) Determine the associated probability density function (pdf) f (x).
(b) Use R function plot() to sketch the cdf F and pdf f .
(c) Find an expression for the p-quantile ${\displaystyle x_{p}}$ and then determine the three quartiles (25%, 50% and 75% quantiles) of the distribution.
Hint: Recall, ${\displaystyle x_{p}}$ is the p-quantile if it holds ${\displaystyle F(x_{p})=p}$.

## Lösungsvorschlag von Gittenburg

--Gittenburg 10:10, 22. Okt. 2019 (CEST)

(a) ${\displaystyle f(x)={\frac {e^{x}}{(1+e^{x})^{2}}}}$

(b)

cdf = function(x){exp(x)/(1 + exp(x))}
pdf = function(x){exp(x)/(1 + exp(x)^2)}
plot(cdf(seq(1,10,0.1)), type='l')
plot(pdf(seq(1,10,0.1)), type='l')


(c) ${\displaystyle p={\frac {e^{x}}{(1+e^{x})}}}$

   ${\displaystyle x=ln{\frac {p}{(1-p)}}}$


Note: Bei mir kommt ${\displaystyle y=ln-{\frac {x}{(1-x)}}}$

Es ist zwar ${\displaystyle y=ln(-{\frac {x}{(1-x)}})}$