while( my ( $distrib_type, $href ) = each %{ $distributions } ) { my $regobj = Statistics::LSNoHistory->new( points => [ %{ $href->{distribution} } ] ); print "\nData for $distrib_type:\n"; printf("Slope: %.2f\n", $regobj->slope); printf("Intercept %.2f\n", $regobj->intercept); printf("Correlation Coefficient: %.2f\n", $regobj->pearson_r); printf("Variance (y): %.2f\n", $regobj->variance_y); } #### Data for fast_increase: Slope: 0.72 Intercept 1.05 Correlation Coefficient: 0.89 Variance (y): 22.78 Data for slow_increase: Slope: 0.36 Intercept 0.53 Correlation Coefficient: 0.89 Variance (y): 5.69 Data for random: Slope: 0.12 Intercept 2.77 Correlation Coefficient: 0.28 Variance (y): 6.11