MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plot InverseSurvivalFunction

  • To: mathgroup at
  • Subject: [mg132012] Re: Plot InverseSurvivalFunction
  • From: Bill Rowe <readnews at>
  • Date: Fri, 15 Nov 2013 18:36:24 -0500 (EST)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:

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

>FRatioDistribution[2,2 2],v\[Distributed]FRatioDistribution[2,2 2]}]





>All above commands return the results I expect but when I try

>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]


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: Is Mathematica V.8.01 fully supported by Windows
  • Next by Date: Re: Plot InverseSurvivalFunction
  • Previous by thread: Re: Plot InverseSurvivalFunction
  • Next by thread: Re: Plot InverseSurvivalFunction