Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6092
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: plotting cdf of a piece-wise continuous distribution |
| Date | 2011-11-01 05:06 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j8nuop$ege$1@smc.vnet.net> (permalink) |
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?
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: plotting cdf of a piece-wise continuous distribution Bill Rowe <readnews@sbcglobal.net> - 2011-11-01 05:06 +0000
csiph-web