Anonymous defined distance

Some function-first programming right here! Defining the Chi-squared
distance using the formula and returning the value.