Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6092 > unrolled thread

Re: plotting cdf of a piece-wise continuous distribution

Started byBill Rowe <readnews@sbcglobal.net>
First post2011-11-01 05:06 +0000
Last post2011-11-01 05:06 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: plotting cdf of a piece-wise continuous distribution Bill Rowe <readnews@sbcglobal.net> - 2011-11-01 05:06 +0000

#6092 — Re: plotting cdf of a piece-wise continuous distribution

FromBill Rowe <readnews@sbcglobal.net>
Date2011-11-01 05:06 +0000
SubjectRe: plotting cdf of a piece-wise continuous distribution
Message-ID<j8nuop$ege$1@smc.vnet.net>
On 10/31/11 at 6:53 AM, partensky@gmail.com (michael partensky)
wrote:

>pdf1[x_] :=   Piecewise[{{4/Sqrt[\[Pi]] x ^(1/2) Exp[- x]/2, x >>0}, {0, x < 0}}];

>prob1 = ProbabilityDistribution[pdf1[x], {x, -\[Infinity],
>\[Infinity]}];

>(* 1 *) Plot[Evaluate[PDF[prob1, x]], {x, -1, 5}, Filling -> Axis]
>(* returns a nice plot *)

>(* 2 *) Plot[Evaluate[CDF[prob1, x]], {x, -1, 6}] (* plot only
>x <0*) (* 3 *) Plot[Evaluate[CDF[prob1, x]], {x, 0, 5}, Filling
>-> Axis]
>(* plots correctly *)

>*Question*: Why does not  (* 2 *) work?

It seems to work fine here. That is I see the expected curve.
But, perhaps you meant something a bit different.

That is you did not include the Filling->Axis directive. So, the
portion below the curve is not shaded as in the other plots.
Also, your comment implies you wanted a plot for x<0, yet you
specified the x range to be -1 to 6. Additionally, you specified
the density function to be 0 for x < 0. So, what is it that you want?

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web