I need to find a formula for exponential distribution of probability, but I don´t know how to find it. This formula has to have powerful statistical properties (it can´t throw away any result from random to keep indistructed seek of random instance).
I am trying to find formula, which will work in a method like this:
rand.getNextDoubleExpDistrib();
I have this code for now, but according to "input analyser", it doesn´t work correctly
public double getNext() {
return -lampda * Math.log(rand.nextDouble());
}
What is Exponential Distribution? In Probability theory and statistics, the exponential distribution is a continuous probability distribution that often concerns the amount of time until some specific event happens. It is a process in which events happen continuously and independently at a constant average rate.
Details. The CDF function for the exponential distribution returns the probability that an observation from an exponential distribution, with the scale parameter λ, is less than or equal to x.
An exponential distribution will plot as a straight line against −ln(1−plotting position) where plotting position is (rank −a)/(n−2a+1), rank is 1 for lowest value, n is sample size, and popular choices for a include 1/2.
You can see this answer : Pseudorandom Number Generator - Exponential Distribution
Here the java code
public double getNext() {
return Math.log(1-rand.nextDouble())/(-lambda);
}
Have a nice day
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With