The random variable $X$ has probability density function $g(x) = \frac{1}{2} \sin x \cdot y \to \text{ , with } y = 1 \text{ for: } x \in (0, \pi)$ and $y = 0$ elsewhere.
Find:
- $\mathbb{P} (\sin^2X \leq \frac{1}{2})$
- distribution of a random variable: max{ $\sin X, \frac{1}{2}$}
Now, I think know how to find distribution function (CDF) for $X$, but I don't know how to derive $\mathbb{P} (\sin^2X \leq \frac{1}{2})$ form that. Also, I have no idea how to determine the distribution function for max{ $\sin X, \frac{1}{2}$}.
Starting with the thing I suppose I know how to do - distribution function (CDF) for $X$:
$\mathbb{P} ( X \leq 0) = \int_{- \infty}^0 g(x) dx = 0$
$\mathbb{P} ( X \geq 0) = \int_{\pi}^{\infty} g(x) dx = 0$
for $t \in [0, \pi]$ we get that: $$\mathbb{P} ( X \leq t) = \int_{- \infty}^{t} g(x) dx = \int_{0}^{t} g(x) dx = \int_{0}^{t} \frac{1}{2} \sin x = -\frac{1}{2} \cos x \Big|_{0}^{t} = -\frac{1}{2} \cos t$$
But then I get a function $\mathbb{P}$ that is monotonically increasing for $t \in (0, \pi)$ from value $- \frac{1}{2}$ to value $\frac{1}{2}$. And that seans off - that should be all posivie - am I right?
For the first: $$P\left(\sin^2(X)\leq 1/2\right)=P\left(\sin(X)\leq 1/\sqrt{2}\right)=2P\left(X\leq \arcsin(1/\sqrt{2})\right)\\ =\int_0^{\arcsin(1/\sqrt{2})} \sin(x) \, {\rm d}x = 1-1/\sqrt{2} \, .$$
For the second you are looking for a distribution function $f(y)$ for the random variable $Y=\max\{\sin(X),1/2\}$. That is, the probability to obtain the value $y$ in an interval ${\rm d}y$ about $y$ is given by $f(y) \, {\rm d}y$. On the other hand you can think of the expression $\delta(y-Y){\rm d}y$ as being $1$ whenever $y=Y$ and $0$ otherwise ($\delta$ being the Dirac delta-function). Then you sum over all $x$ the expression $g(x)\delta(y-Y){\rm d}y$, which gives a contribution to the prob. $f(y){\rm d}y$ whenever $y=Y$ and no contribution otherwise, which is (again) the probability to obtain $y$ within the interval ${\rm d}y$, thus $$f(y)=\int_{-\infty}^\infty g(x) \delta(y-Y) \, {\rm d}x=\frac12\int_{0}^\pi \sin(x) \delta\left(y-\max\{\sin(x),1/2\}\right) \, {\rm d}x \\ =\int_{0}^{\pi/2} \sin(x) \delta\left(y-\max\{\sin(x),1/2\}\right) \, {\rm d}x \\ =\int_{0}^{\pi/6} \sin(x) \delta\left(y-1/2\right) \, {\rm d}x + \int_{\pi/6}^{\pi/2} \sin(x) \delta\left(y-\sin(x)\right) \, {\rm d}x \\ = \left(1-\sqrt{3}/2\right)\delta(y-1/2) + \left[1/2 \leq y \leq 1\right] \tan(\arcsin(y)) \\ = \left(1-\sqrt{3}/2\right)\delta(y-1/2) + \left[1/2 \leq y \leq 1\right] \frac{y}{\sqrt{1-y^2}} \, .$$ Here $[\cdot]$ is the iversion bracket.
From $f(y)$ you get $P(Y\leq y)$ by integrating from $0$ to $1/2\leq y\leq 1$, i.e. $$P(Y\leq y)=\int_0^y f(t) \, {\rm d}t = 1-\sqrt{3}/2 + \sqrt{3}/2 - \sqrt{1-y^2}=1-\sqrt{1-y^2}\,.$$