[Date Index]
[Thread Index]
[Author Index]
Re: Plot InverseSurvivalFunction
*To*: mathgroup at smc.vnet.net
*Subject*: [mg132017] Re: Plot InverseSurvivalFunction
*From*: "Eduardo M. A. M. Mendes" <emammendes at gmail.com>
*Date*: Sun, 17 Nov 2013 18:21:35 -0500 (EST)
*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com
*Delivered-to*: l-mathgroup@wolfram.com
*Delivered-to*: mathgroup-outx@smc.vnet.net
*Delivered-to*: mathgroup-newsendx@smc.vnet.net
*References*: <20131115233624.983E16A45@smc.vnet.net>
Hello
Many thanks for the clearing several points and for the alternative functions to plot the survival function.
Cheers
Ed
On Nov 15, 2013, at 9:36 PM, Bill Rowe <readnews at sbcglobal.net> wrote:
> On 11/15/13 at 6:41 AM, emammendes at gmail.com (Eduardo M. A. M.
> Mendes) wrote:
>
>> Is there any way to evaluate (or even plot) the inverse survival
>> function of a sum of two Fs?
>
>> Here is what I have so far
>
>> \[ScriptCapitalD]=TransformedDistribution[u+v,{u\[Distributed]
>> FRatioDistribution[2,2 2],v\[Distributed]FRatioDistribution[2,2 2]}]
>
>> PDF[\[ScriptCapitalD],x]
>
>> Plot[PDF[\[ScriptCapitalD],x],{x,0,10},Filling->Axis]
>
>> CDF[\[ScriptCapitalD],x]
>
>> Plot[CDF[\[ScriptCapitalD],x],{x,0,10},Filling->Axis]
>
>> All above commands return the results I expect but when I try
>
>> Plot[InverseSurvivalFunction[\[ScriptCapitalD],x],{x,0,1},Filling->
>> Axis,PlotRange-> Full]
>
>> Mathematica won't show any curve. Does it mean that Mathematica
>> could not find an expression for it?
>
> When you say Mathematica didn't show a curve exactly what do you
> mean? Do you mean you got the result
>
> Plot[I, {x, 0, 1}]
>
> will give, i.e., a graphic showing an axis with no curve? Or do
> you mean simply you didn't get anything in the time you were
> willing to wait?
>
> If it is the latter, then there is a way to get the desired
> plot. First, note the difference in the amount of time to
> produce a plot between
>
> d = TransformedDistribution[
> u + v, {u \[Distributed] FRatioDistribution[2, 2 2],
> v \[Distributed] FRatioDistribution[2, 2 2]}];
>
> pdf = PDF[d, x];
> Plot[pdf, {x, 0, 10}, Filling -> Axis]
>
> and
>
> Plot[PDF[d, x], {x, 0, 10}, Filling -> Axis]
>
> When you do Plot[PDF[d,x] ... Mathematica substitutes a
> numerical value for x then finds the density function of your
> distribution with that value. That is, Mathematica repeats the
> computation of the density function for every numerical value
> used for x.
>
> By doing pdf=PDF[d,x];Plot[pdf ... the computation of the
> density function is done once rather than many times. This way,
> Mathematica does far less computation and gets the end result
> much faster.
>
> Now, this won't completely solve the problem since
>
> InverseSurvivalFunction[d, x]
>
> returns unevaluated which means Mathematica will have to do a
> lot of computation to make a plot with
>
> Plot[InverseSurvivalFunction[d,x], ...
>
> But notice
>
> SurvivalFunction[d,x] does evaluate to closed form expression.
> So, a quick way to get the desired plot would be:
>
> sf = SurvivalFunction[d, x];
> ParametricPlot[{sf, x}, {x, 0, 10}, AspectRatio -> 1/GoldenRatio]
>
>
>
Prev by Date:
**Re: Plot InverseSurvivalFunction**
Next by Date:
**Re: Plot InverseSurvivalFunction**
Previous by thread:
**Re: Plot InverseSurvivalFunction**
Next by thread:
**Implementation of Discrete Spherical Harmonic Transforms with Mathematica?**
| |