What is the cdf for a partially non-continuous pdf?

681 Views Asked by At

Suppose there is a pdf/pmf (?!) which places an atom of size 0.5 on x = 0 and randomizes uniformly with probability 0.5 over the interval [0.5,1].

Such that...

\begin{equation} f(x)= \begin{cases} 0.5, & \text{if}\ x=0 \\ {1\over (1-0.5)}, & \text{if}\ 0.5 ≤ x ≤ 1 \\ 0, & \text{otherwise} \end{cases} \end{equation}

Does the corresponding cdf then look like the following?

\begin{equation} F(x)= \begin{cases} 0.5, & \text{if}\ x < 0.5 \\ 0.5+0.5\cdot{(x-0.5)\over (1-0.5)}, & \text{if}\ 0.5 ≤ x ≤ 1 \\ 1, & \text{if}\ x > 1 \end{cases} \end{equation}

And how to calculate the expected value of this cdf formally? I suppose that \begin{equation} E(x)={3\over 8} \end{equation} ...but I dont know exactly how to formally deal with the intervalls as f(x) is not continuous.

Thank you in advance!

2

There are 2 best solutions below

4
On BEST ANSWER

In what sense this is a density function will bear examination. Normally one says $f$ is a probability density function for the distribution of a random variable $X$ if $$ \Pr(a<X<b) = \int_a^b f(x) \, dx $$ for all values of $a,b.$ But $\displaystyle \int_a^b \cdots\cdots\,dx$ means an integral with respect to Lebesgue measure, which is the measure that assigns to every interval $(c,d),$ for $c<d,$ its length $d-c.$ That measure assigns $0$ to an interval that is only a point, so the integral of any function over that point is $0.$

However, suppose one integrates with respect to a measure that assigns measure $1$ to the one-point set $\{0\}$ and assigns the length of every interval to that interval if $0$ is not a member of the interval. Then what you've got is a density.

But there's no need to go into that in order to answer your question about the expected value. The c.d.f. is $$ F(x) = \Pr(X\le x) = \begin{cases} 0 & \text{if } x<0, \\ 1/2 & \text{if } 0\le x \le 1/2, \\ x & \text{if } 1/2<x\le 1, \\ 1 & \text{if } x\ge1. \end{cases} $$ The expected value is $$ \operatorname E(X) = 0 \cdot\Pr(X=0) + \int_{1/2}^1 x\cdot\left(\frac 1 2 \, dx\right) = \frac 3 8. $$

Suppose $m$ is the measure described above, assigning measure $1/2$ to $\{0\}$ and the length of each interval to the interval if it does not contain $0.$ Then one can write $$ \operatorname E(X) = \int_{-\infty}^\infty xf(x)\,dm(x) $$ and its value will be $3/8.$

4
On

You can describe the probability density of this using the Dirac delta, viz. $\int_\mathbb{R}\delta(x)g(x)dx=g(0)$. In your case, $f(x)=\frac{1}{2}\delta(x)+1_{[\frac{1}{2},\,1]}(x)$. The second term is an indicator function, and integrates to the half of the probability the delta term doesn't cover; your $\frac{1}{1-0.5}$ factor is unnecessary. Notice I said probability density, not probability density function, because no function has the defining properties of $\delta$. (If you want some terminology, it's a measure. The popular name "Dirac delta function", used in the above link, is misleading.)

Integrating gives the CDF $\frac{1}{2}\Theta(x)+(x-\frac{1}{2})(\Theta(x-\frac{1}{2})-\Theta(x-1))$, where $\Theta(y):=\int_{-\infty}^y\delta(z)dz$ is called the Heaviside step function, which really is a function. (Wikipedia denotes it $H$, but I've often seen people use $\Theta$ or $\theta$.) Equivalently, $\Theta\left(z\right):=\left\{ \begin{array}{cc} 0 & z<0\\ 1 & z\ge0 \end{array}\right.$. The CDF is $$\left\{ \begin{array}{cc} 0 & x<0\\ \tfrac{1}{2} & x\in\left[0,\,\tfrac{1}{2}\right)\\ x & x\in\left[\tfrac{1}{2},\,1\right)\\ 1 & x\ge1 \end{array}\right..$$