sample := proc( n ) local data; data := Sample( Uniform(0,1), n ); printf( "Mean: %.4f\nStandard Deviation: %.4f", Statistics:-Mean( data ), Statistics:-StandardDeviation( data ) ); return Statistics:-Histogram( data ); end proc: sample( 1000 );