sub compare_bell_curves my ($self,$m1,$sd1,$m2,$sd2) = @_; my $upperbound = sprintf("%.1f", ($m1 + (1.75 * $sd1))); my $lowerbound = sprintf("%.1f", ($m1 - (1.75 * $sd1))); my $area = 10000; my $data; for (my $x=$lowerbound; $x < $upperbound; $x = $x + 1) { $x = sprintf("%.0f", $x); my $posarg = $self->int_gen_curve($x,$m1,$sd1); $data->[$x] = int($area*$posarg); } # do the above again for the $m2 and $sd2 # then subtract $data1 from $data, any $data->[x] # that remains positive is a point of difference