public static void main (String[] args) 
    {
        int meanGoal = 5; //arrival interval of people
        int m = 10; //15; //amount of numbers needed
        
	int n = m; //3000;
	
        Random tmpRnd = new Random();
	
	Exponential p0 = new Exponential(meanGoal, tmpRnd);

	System.out.println("First " + m + " of " + n + 
			   " samples from an Exponential distribution\n" +
			   "with mean " + meanGoal);
	double total = 0;
	double totalSquares = 0;
	for (int i=0; i < n; i++) {
	    int next = p0.next();
	    if ( i < m ) {
		System.out.println(next);
	    }
	    total        += next;
	    totalSquares += next*next;
	}
	double mean      = total/n;
	double variance  = totalSquares/n - mean*mean;
	System.out.println("mean goal:          " + meanGoal + 
		         "\nachieved:           " + mean +
			 "\nstandard deviation: " + Math.sqrt(variance));


	
    }