2

I have a cumulative distribution function $\displaystyle{% F(x) = \left\lbrace% \begin{array}{ll} 0\,, & \mbox{for}\ x<1 \\[1mm] {1 \over 2}\,\left(x^{2} - 2x + 2\right)\,, & \mbox{for}\ 1 \leq x < 2 \\[1mm] 1\,, & \mbox{for}\ x \geq 2 \end{array}\right.}$

and I'm asked to find the variance for $X$. So when I took the derivative of the CDF I found that $f(x)=\begin{cases}\frac12 \quad \text{for $x=1$}\\ x-1\quad \text{for $1\lt x\lt 2$}\end{cases}$. I understand where the $x-1$ and it's bounds come from, but how does one go about solving for that "jump" at the lower bound where $f(1)=\frac12$. After playing around with the solutions I finally figured it out but I'm not sure how I would have realized that right away. Would I simply just integrate $x-1$ over it's bounds to see if it equals one? I've seen this kind of problem before and I'm trying to avoid making the mistake of leaving the "jump" out. Should I always just integrate over the bounds of a pdf to make sure it equals one everytime? Or is there a way to tell there is a "jump"?

Felix Marin
  • 89,464
  • This question is, in functional form, at least, a duplicate of this one: http://math.stackexchange.com/questions/544690/variance-for-mixed-distribution-continuous-discrete ... though the discussion is more interesting here. – wolfies Nov 04 '13 at 15:27

1 Answers1

0

I don't know where you're getting that $1/2$ for $x=1$. The derivative is $0$ for $x < 1$ and for $x > 2$, and $x-1$ for $1 < x < 2$. Since $(x^2 - 2 x + 2)/2$ is $1/2$ at $x = 1$, your CDF is discontinuous there. The conclusion should be that this is not a continuous distribution and therefore does not have a PDF.

Robert Israel
  • 448,999
  • That's what I thought, I'm studying for SOA/CAS exam P and this was one of the practice problems I had and the solution states that this is the pdf. But when I integrate $x-1$ over it's bounds it does only equal $\frac12$. So I would be missing half of the distribution somewhere. I just don't know why at $1$ is where the rest of it is. – TheHopefulActuary Nov 03 '13 at 23:13
  • @TheHopefulActuary Your description of the density as $f(x)=\begin{cases}\frac12 \quad \text{for $x=1$}\ x-1\quad \text{for $1\lt x\lt 2$}\end{cases}$ is correct. It is a mixed discrete / continuous density. – wolfies Nov 04 '13 at 04:46
  • @wolfies: it is completely incorrect. What this has at $x=1$ is a point mass, not a density. A way to indicate a point mass might be with a Dirac delta, but certainly not a density value of $1/2$ at a point. – Robert Israel Nov 04 '13 at 05:38
  • Yes - there is a discrete mass at x = 1/2, just like any discrete pmf. It is perfectly valid to construct a discrete / continuous mixture, which is exactly what is happening here. If your objection is a semantic one ... to the use of the term 'density' to describe a discrete mass, well ... there are countless books, papers and authors that go further and use the term pdf not only for the continuous case, but for the discrete case as well. – wolfies Nov 04 '13 at 05:48
  • The problem is the use of the same notation $f(x)$ for the discrete part as for the continuous part. How does this indicate that $f(1) = 1/2$ means anything different from $f(3/2) = 1/2$? – Robert Israel Nov 04 '13 at 07:42
  • The issue you raise is common, for instance, to any censored random variable, which has both discrete and continuous components. Of course, there is no 'issue' whatsoever, because the context clearly defines whether it is discrete or continuous. Computer algebra systems don't seem to like such heuristics, perhaps because they are not very good at understanding such norms, or because they are open to user abuse. But that is easily fixed by adding {Discrete} or {Continuous} tags to each line of input. Certainly better than expressing discrete masses as Dirac delta funcs. What does Maple do? – wolfies Nov 04 '13 at 14:55
  • @wolfies Thanks for the clarification. When I did this problem initially, I missed the mass at $x=1$, and I'm wondering if there is something I should do or notice to recognize that a density will have a mass like that? Also how should I be able to tell where the mass is? – TheHopefulActuary Nov 04 '13 at 15:08
  • 1
    @TheHopefulActuary Just plot the cdf ... and look for any point where it jumps. – wolfies Nov 04 '13 at 15:11