# Find and plot cumulative distribution function

We toss a fair coin.

If a head appears then $X\sim N(0,1)$.

If a tail appears then $X=1$ with probability $1$.

Find the unconditional CDF of $X$ and plot it.

• This is a standard question as might be found in a textbook, and should be tagged as self-study. As I was already editing your question for clarity, I've taken the liberty of adding it. Please check the self-study tag wiki info. In light of that, what do you already understand about the question, and what have you tried? When your question says 'plot it', are you supposed to use software (and if so, which), or - more likely - draw it by hand? Commented Jun 11, 2013 at 12:11
– MSD
Commented Jun 11, 2013 at 12:17
• Do you know the definition of the cdf? Commented Jun 11, 2013 at 12:35
• yes.I have studied that but I do not know how to find the unconditional cdf for a random variable with 2 outcomes
– MSD
Commented Jun 11, 2013 at 12:40
• The problem defines a finite mixture distribution - the link explains how to compute the cdf of the mixture. Your answer will be a mixture of a continuous and a discrete distribution (see the image to the right) - the image shows an example of how one such mixture looks. There's another example here Commented Jun 11, 2013 at 12:42

$$F(x) = \sum_{i=1}^n \, w_i \, P_i(x)\,,$$ where $n=2$ and $w_1 = w_2 = \frac{1}{2}$, $P_1$ is the standard normal cdf and $P_2$ is the cdf for a value that is always 1.

You have to draw $F$. I suggest you notice what $F$ is for values of $x$ below 1 (what is $P_1$ there? What is $P_2$ there?), and what it is for values of $x$ above 1, and think about what it must do at 1 ... and see that everything matches up. You should just work with the cdfs. (If you find yourself trying to do any integrals, you're making your life difficult.)

Links to examples of the appearance of the cdf of such finite mixtures is given in comments.

Edit: Since the OP appears satisfied, and is presumably finished with this question, I think it's reasonable to put this up now:

• If this sufficiently answers your question, you should consider accepting it, as discussed in the help. Commented Jun 11, 2013 at 13:55
• +1 An illustration of this procedure appears at the very bottom of quantdec.com/envstats/notes/class_05/distributions.htm; it is preceded by extensive explanations of CDFs.
– whuber
Commented Jun 11, 2013 at 14:09
• @whuber - that's a reasonably clear explanation, thanks. Commented Jun 11, 2013 at 14:16