1

I have a lognormal distribution with known parameters mu, sigma, lower and upper bound, and I have the following code:

public class Generate_Random_vairate_test1 {
public static double mu = 4.09, sigma = 0.04, P;
public static void main(String[] args) {
        LogNormalDistribution logNormal = newLogNormalDistribution(mu,sigma);
            P = logNormal.simulate();
            System.out.print(P);
        }
    }
}

My question is how can I use Java to generate a random number from the lognormal distribution with a specifice lower and upper bound? For example, if I have mu = 4.09, sigma = 0.04, LP = 53.3 and UP = 64.9 How to use Java in such a case?

Cettt
  • 11,460
  • 7
  • 35
  • 58
John
  • 107
  • 1
  • 14
  • Read [this](http://stackoverflow.com/questions/363681/generating-random-integers-in-a-specific-range)To generate Random numbers in Java within a specific range. – Kasun Siyambalapitiya Jan 26 '16 at 13:38
  • I need to use it for Log-normal distribution, while this is for normal distribution. – John Jan 27 '16 at 00:05

0 Answers0