1
$\begingroup$

I'm studying a particular class of random variables.

In order to find the CDF $F(x)$ of my variable, I should solve the following Cauchy problem:

$$ \begin{cases} F(x)=e^{-\lambda F'(x)} \\ F(0)=0 \end{cases} $$ where $\lambda>0$.

I solved the ODE, using the equivalent form

$$logF(x)=-\lambda F'(x)$$

The solution is

$$li^{-1}\Bigl(c-\frac{x}{\lambda}\Bigr)$$

where $c$ is the constant and $li$ is the logarithmic integral function.

In order to find the value of the constant $c$, I followed the steps below:

$$ F(0)=li^{-1}(c)=\frac{1}{li(c)}=0 \Leftrightarrow li(c)=\infty \Leftrightarrow c=1$$

So the resulting CDF should be

$$F(x)=li^{-1}\Bigl(1-\frac{x}{\lambda}\Bigr)$$

If I plot the aforementioned $F(x)$ it doesn't look like a valid CDF.

Are my reasonings right? Is there another way to solve the ODE $F(x)=e^{-\lambda F'(x)}$?

$\endgroup$
7
  • $\begingroup$ WolframAlpha gives me c=0: wolframalpha.com/input/… $\endgroup$
    – Annika
    Commented Aug 21, 2021 at 17:09
  • $\begingroup$ @Bey I've already tried to solve it using WolframAplha and it gives me c=0 too, but I don't feel like that result is correct. However, the F(x) with c=0 doesn't seem to be a valid CDF for a random variable as well. $\endgroup$
    – met.91
    Commented Aug 22, 2021 at 0:39
  • 1
    $\begingroup$ $c=0$ is what you want to use. If you include your plot of $F(x)$ and mention the code and software used, the answer might become apparent (especially if you used Mathematica). $\endgroup$
    – JimB
    Commented Aug 24, 2021 at 2:19
  • 2
    $\begingroup$ Also, $li^{-1}$ means the inverse and not the reciprocal. $\endgroup$
    – JimB
    Commented Aug 24, 2021 at 2:55
  • 1
    $\begingroup$ @met.91 Jim.B gave a great answer — nothing to add $\endgroup$
    – Annika
    Commented Aug 29, 2021 at 18:28

1 Answer 1

2
$\begingroup$

I think the steps you want are the following:

$$F(0)=li^{-1}(c)$$ $$li(F(0))=c$$ $$li(0)=c$$ $$0=c$$

$F(x)$ for various values can be plotted with Mathematica in the following manner:

plotCDF[λ_, color_] := ParametricPlot[{-λ LogIntegral[p], p}, {p, 0, 1},       
  PlotStyle -> color, Frame -> True, PlotLegends -> {"λ = " <> ToString[λ]}];
Show[{plotCDF[3, Red], plotCDF[2, Green], plotCDF[1, Blue]},
 PlotRangePadding -> None, AspectRatio -> 1/2, PlotLegends -> Automatic]

CDF for various values of lambda

Using R one can evaluate the cdf and pdf using the pracma package:

# Load library
  library(pracma)

# Set lambda
  lambda <- 0.5

# Generate x values based on the cdf
  cdf <- (1:9999)/10000
  x <- -as.numeric(li(p)) * lambda

# Plot of CDF
  plot(x, cdf, type="l", las=1, xlab="x", ylab="", lwd=3, main=paste("lambda =", lambda))

# Add in pdf
  lines(x,-log(p)/lambda)
  
# Legend
  legend(min(x)+0.75*(max(x)-min(x)),0.8, c("PDF", "CDF"), lwd=c(1,3))

cdf and pdf for lambda = 0.5

Both the Mathematica and R code avoid the direct calculation of the inverse of the logarithmic integral (which can be problematic).

$\endgroup$
7
  • $\begingroup$ Thanks for this exhaustive answer. So the right value for $c$ is $0$ and $$F(x)=li^{-1}(-\frac{x}{\lambda})$$ is a valid CDF for a random variable (and the plot is the one in the pic). $\endgroup$
    – met.91
    Commented Aug 24, 2021 at 8:39
  • $\begingroup$ Sadly I don't have the software $Mathematica$ because my university doesn't give me the license, even if I'm doing a research on something new. $\endgroup$
    – met.91
    Commented Aug 24, 2021 at 8:43
  • $\begingroup$ Another question: is there a way to calculate the PDF (so the derivative of $F(x)$) and to plot it? $\endgroup$
    – met.91
    Commented Aug 24, 2021 at 10:20
  • $\begingroup$ I've just found out in a paper (De Reyna, Toulisse - The n-th prime asymptotically) that the derivative of $li^{-1}(x)$ is equal to $log(li^{.1}(x))$. So, for the particular case that I'm studying, it's true that $$F(x)=li^{-1}\Bigl(-\frac{x}{\lambda}\Bigr)$$ and $$f(x)=\frac{d}{dx}F(x)=log\Bigl(li^{-1}\Bigl(-\frac{x}{\lambda}\Bigr)\Bigr).$$. Is this correct? How to plot it? $\endgroup$
    – met.91
    Commented Aug 24, 2021 at 11:00
  • 1
    $\begingroup$ Both approaches avoid the direct calculation of $li^{-1}$. But if that is what is needed, then you'd really need to specify what software package you use. Take a look at math.stackexchange.com/questions/853178/…. $\endgroup$
    – JimB
    Commented Aug 24, 2021 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .