# Heaviside Step Function of a Random Variable

I have a random variable $X$ and I want to find the probability density function from transforming it through the Heaviside step function. So

$Y = H(X)$

where the $H$ is the Heaviside step function with

$H(0) = 1$

Given the cumulative distribution function of $X$ as $F_X$, then I have the pdf of $Y$ as

$f_Y(y) = (1-F_X(0))\delta(y-1) + F_X(0) \delta(y)$

However, I think this pdf is for the case when the step function is defined at $0$ as $H(0) = 0$. Do I need to incorporate the point probability

$F_X(0) - \lim_{(x \rightarrow 0^-)}F_X(x)$

into $f_Y$ to account for the case where $H(0)=1$, or is there a better/nicer way to do it?

-

Let $G_X(x)=\mathbb{P}(X <x)=\lim_{(t\rightarrow x^-)}F_X(t)$; then $$f_Y(y)=(1-G_X(0))\delta(y-1)+G_X(0)\delta(y)$$
or change the random variable. Since $$\mathbb P(X<x)=1-\mathbb P(X\ge x)=1-\mathbb P(-X\le -x)=1-F_{-X}(-x),$$ we have
$$f_Y(y)=F_{-X}(0)\delta(y-1)+(1-F_{-X}(0))\delta(y).$$