Question: Add a method (exp ()) to StdRandom that takes an argument (lambda) and returns a random number drawn from the exponential distribution with rate (lambda).
Add a method \(\exp ()\) to StdRandom that takes an argument \(\lambda\) and returns a random number drawn from the exponential distribution with rate \(\lambda\). If \(x\) is a random number uniformly distributed between 0 and 1 , then \(-\ln x / \lambda\) is a random number from the exponential distribution with rate \(\lambda\).
Step by Step Solution
3.36 Rating (152 Votes )
There are 3 Steps involved in it
Sure heres a stepbystep way to add that method to the StdRandom class in Java 1 Import the required ... View full answer
Get step-by-step solutions from verified subject matter experts
