Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Plot InverseSurvivalFunction
Replies: 1   Last Post: Nov 17, 2013 4:23 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
emammendes@gmail.com

Posts: 143
Registered: 8/22/05
Re: Plot InverseSurvivalFunction
Posted: Nov 17, 2013 4:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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@sbcglobal.net> wrote:

> On 11/15/13 at 6:41 AM, emammendes@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]
>
>
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.