# Finding λ in an exponential distribution

When $λ$ is given with a given probablity of $X$, it's a simple program, where for example I can do

f[x_] := 7*Exp[-7 x]
Probability[x > 2, x ≈ ExponentialDistribution[7]] // N


but what if $X$ is exponentially distributed random variable with some parameter $λ$. How would you find possible values of $λ$, if you are only given the probability with its range of $X$ and its probability of getting these ranges $(eg: Pr(0.2≤X≤1.7) = 0.14 )$

Just use λ instead of 7 in your Probability expression, and solve:

Solve[
Probability[.2 ≤ x ≤ 1.7, Distributed[x, ExponentialDistribution[λ]]] == .14,
λ,
Reals
]


Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result.

{{λ -> 0.102807}, {λ -> 9.83056}}

• NSolve works best – mastud89 Apr 11 '18 at 3:59