package probably; public class Probably { public static double [] make(int m){ double [] bubble = new double[m]; for(int i = 0; i < bubble.length; i++){ bubble[i] = Math.random(); } // for return bubble; } // make( int ) public static void print(double [] things){ for(int i = 0; i < things.length; i++){ System.out.println(things[i]); } // for } // print( double [] ) public static double sum(double [] oranges ){ double total = 0; for(int i = 0; i < oranges.length; i++){ total = total + oranges[i]; } // for return total; } // sum( double [] ) public static double [] pdf( double [] numbers ) { double [] result = new double[ numbers.length ]; double s = sum( numbers ); for( int i = 0; i < result.length; i++ ) { result[i] = numbers[i]/s; } // for return result; } // pdf( double [] ) public static int posOfFirstGreater( double [] data, double r ) { int index = 0; //System.out.println( "\t " + r + " data[index] ) { //System.out.println( "\t " + r + "