# Distribution cdf calculation

**URL:** <https://discourse.julialang.org/t/distribution-cdf-calculation/58252>\
**Category:** Statistics\
**Created:** [March 30, 2021, 6:03pm UTC](https://discourse.julialang.org/t/distribution-cdf-calculation/58252 "2021-03-30T18:03:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![statspy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statspy/32/26630_2.png) [@statspy](https://discourse.julialang.org/u/statspy)\
**Post date:** [March 30, 2021, 6:03pm UTC](https://discourse.julialang.org/t/distribution-cdf-calculation/58252/1 "2021-03-30T18:03:02Z")

</div>

i have the following code that i am using and its working:

```
using Distributions

d=Exponential(1000)
    for i in collect(100:100:1000)
       print(i,"->",cdf(d,i)
    end

```

The code it working properly.

What i need now is to pass the probability and get as a return the time t. I mean, i want to pass the cumulative function(cdf),as for example, 50% and then get the time(t) that is about 690.

How can i code this?  
Thanks

---

<div class="post-metadata">

**Author:** ![mapclyps](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mapclyps/32/6309_2.png) [@mapclyps](https://discourse.julialang.org/u/mapclyps)\
**Post date:** [March 30, 2021, 6:12pm UTC](https://discourse.julialang.org/t/distribution-cdf-calculation/58252/2 "2021-03-30T18:12:38Z")

</div>

you could try

```julia
quantile(d, 0.5)

```

does that what you need?

---

<div class="post-metadata">

**Author:** ![statspy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statspy/32/26630_2.png) [@statspy](https://discourse.julialang.org/u/statspy)\
**Post date:** [March 30, 2021, 6:20pm UTC](https://discourse.julialang.org/t/distribution-cdf-calculation/58252/3 "2021-03-30T18:20:15Z")

</div>

yes! Thank you very much !
