Calculate Standard Deviation for a value within a List / Entity

0
Do any of you smart folks know if it's possible to perform advanced maths calculations within a microflow (or any other way for that matter in Mendix) I have a filtered list of objects that each have an associated value. Within this dataset, I want to remove outliers using Normal Distribution and Standard Deviation. Ultimately I want to present the min max and avg of the modified dataset to the User, but I'm comfortable putting this together. (Basically I have a set of deliverables with a cost, but these can be skewed with expensive or very low cost resources. I want to present a normalised recommendation on cost for that type of deliverable) Thank you Tim
asked
1 answers
1

Hi Tim,

Average is a built in function as you know.  To calculate mean:

  1. for each number, subtract the mean.  square the resulting number.
  2. determine the avg of all of the squared numbers generated in step 1
  3. take the square root of the average calculated in step 2

The result of step 3 is the standard deviation.

I am sure you could include a custom Java action to do this.  However, creating a microflow to do this shouldn't take more than a few minutes, so you can pick your poison.

Hope that helps,

Mike

**EDIT**

I just did a quick perusal of Java docs and there doesn't seem to be a native StdDev function in Java.  I could have missed something, though, so maybe someone with more Java expertise than me could correct me.

answered