# Calculating probability

I have the density of a mixed r.v $X$. $$f(x)=\begin{cases} x/2 & 0\leq x <1 \\ 1/4 & x=1 \\1/4 & x=3 \\ 0 & \text{otherwise}, \end{cases}$$

How do I and calculate $P(X=2)$ and $P(X=3)$? I was thinking that $P(X=2)=F_X(2)-F_X(1)$? If this is the case, should I include the probability of the continuos part in $0\leq x <1$ by integrating or what?

• By integration. You just need to expand to allow for distributions. This is also exactly the same as another question just some week ago which makes me suspect it is a homework question. Sep 14, 2017 at 18:44
• Like which one? Sep 14, 2017 at 18:53
• en.wikipedia.org/wiki/Distribution_(mathematics) Sep 14, 2017 at 19:36

Your $f$ is not a PDF, since $\int_{-\infty}^\infty f(x)\>dx={1\over4}\ne1$. Maybe you had the intention that the random variable $X$ in addition has "point masses" ${1\over4}$ at $x=1$ and at $x=2$. But this would still make the total mass only ${3\over4}$.
In any case such a "mixed" random variable does not have a Lebesgue integrable PDF $f$.
• Ok is this how I calculate $P(X=2)=F_X(2)-F_X(1)=( 1/4 + \int_0^1 x/2) - (1/4 + \int_0^1 x/2 )=0$ Sep 14, 2017 at 18:52