statistical analysis in ruby dsl