Update correlation how-to-guide

The idea here is that I wanted to use these functions multiple times and keep their meaning simple.  Moving to one function may end up adding complexity to the code and so decrease readability.