Perhaps I am doing something wrong while z-normalizing my array. Can someone take a look at this and suggest what\'s going on?
In R:
The reason you're getting different results has to do with how the standard deviation/variance is calculated. R calculates using denominator N-1, while numpy calculates using denominator N. You can get a numpy result equal to the R result by using data.std(ddof=1), which tells numpy to use N-1 as the denominator when calculating the variance.