Help for this page

Select Code to Download


  1. or download this
      for (@_) { @differences = (@differences, (($_-$mean)*($_-$mean))); }
  2. or download this
      foreach ( @_ ) {
          push @differences, $_ - $mean;
      }
    
  3. or download this
       my $standard = 0;
       for (@differences) { $standard = $standard + $_; }
       $standard = sqrt($standard/$sample_size);
       return $standard;
    
  4. or download this
      my $sum_diff = 0;
      map { $sum_diff += $_ } @differences;
      return sqrt($sum_diff / $sample_size);