Implement a utility class named Distribution, which contains the following two static methods. a) The exponential method
Question:
Implement a utility class named Distribution, which contains the following two static methods.
a) The exponential method returns an exponential distribution value calculated with this formula, where mean is a double parameter which holds the distribution’s mean:
-Math.log(Math.random()) * mean
b) The normal method returns a normal distribution value calculated with this formula, where mean and deviation are double parameters that hold the distribution’s mean and standard deviation, respectively:
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction To Programming With Java A Problem Solving Approach
ISBN: 9781260575248
3rd International Edition
Authors: John Dean
Question Posted: