Exponential
Create a new Exponential distribution
Exponential X = Exponential(lambda); Distribution properties:
Property
Type/Return type
Description
Example
//Example: The average number of clients is 15 students per hour. What is the
//probability that you will have to wait not more than 3 minutes for a client
//to appear?
double lambda = 0.25; //15 students per hour -> 1 client per 4 minutes.
Exponential X = Exponential(lambda);
std::cout << X.P(3) << std::endl; //0.527633Exponential X = Exponential(0.125);
std::cout << X.P(-1) << std::endl; //Error: Number of events cannot be less than 0. Last updated