Sanity Checks are missives on a specific math point in need of clarification. I try to do so using the fewest words possible. Usually, this is still quite a few words.
When I was back there in seminary school, there was a person there who put forth the proposition that you can petition the Lord with prayer.
Petition the Lord with prayer.
Petition the Lord with prayer.
YOU CANNOT PETITION THE LORD WITH PRAYER!!11!
Also, you cannot average correlation coefficients.
Imagine you and your laboratory helpmate Vasilli have been tasked to analyze the proclivity of gronkulation in the animal kingdom. So you measure the proclivity for gronkulation in cats and measure the proclivity for gronkulation in dogs and measure the proclivity for gronkulation in mule deer, each quantified as a correlation coefficient. It is a perfectly reasonable instinct to now report the proclivity for gronkulation in quadrupeds by averaging your three values, perhaps to compare with the proclivity for gronkulation in other phyla such as fish or undergraduates.
Unfortunately, correlation coefficients don't average like that.
It took me a long time to grok this, probably because I took statistics out of Zar and -- as I've now come to understand -- taking statistics out of Zar is the statistics equivalent to Abe Simpson telling stories that go nowhere.
An example is illustrative. Here's Zar 18.1a:
Do the math and you'll find r = corr(X,Y) = 0.870.
Now split the data in half, letting X1 & Y1 be, say, the odd entries and X2 & Y2 be the evens. You'll find r1 = corr(X1,Y1) = 0.766 and r2 = corr(X2,Y2) = 0.937. The average of r1 and r2 is 0.851, which isn't what we got for r.
The good news is there's a way to address this known as the Fisher Z Transform. Briefly, you FZT the correlation coefficients you wish to average, average the transformed values, then inverse transform the result. Boom! Beer time.
The FZT has a formula with logarithms and blah blah and you can look it up or you could just remember it's the inverse hyperbolic tangent (making the inverse transform the inverse inverse hyperbolic tangent, aka the hyperbolic tangent). These are usually written "atanh" and "tanh" on calculator buttons and Javascript libraries. (Fisher used logarithms and not hyperbolic tangents because slide rules do, which was the style at the time.)
Postscript
You may have noticed that r =/= tanh([atanh(r1) + atanh(r2)] / 2) in our example above. If I'm not mistaken (hey, that happens occasionally), it's because we're estimating a population parameter (i.e., ρ). If we repeated the experiment, we would get different data and all the numbers would change. So we shouldn't expect our averaged r (or any averaged r) to be equal to r, because both results are just estimates. Rather, all we can hope is that our estimates are "unbiased" (in the statistical sense). That's what the FZT offers, whereas ordinary averaging does not.
That being said, it'd be nice to cite a source on this. So I spent an afternoon combing through stats textbooks in our university library -- which is actually a pretty good library, all things considered (Berkeley of the Midwest, as they say in the recruiting brochures). I found exactly one that mentions averaging correlation coefficients (Snedecor's 1937 textbook on agricultural statistics, which includes a rousing application to steer hinders). Perhaps I should be thankful Zar mentioned the FZT at all. Long story short: Sheldon Snedecor gives you his blessing to arithmetically average correlation coefficients, as long as you transform them first.
That being said, be advised the FZT has detractors. Articles still appear from time to time debating better ways to combine correlation coefficients. As my stats professor often (and gleefully) told us: No matter what you do in statistics, it's wrong.
When all else fails, we can whip the horses eyes and make them sleep.
When I was back there in seminary school, there was a person there who put forth the proposition that you can petition the Lord with prayer.
Petition the Lord with prayer.
Petition the Lord with prayer.
YOU CANNOT PETITION THE LORD WITH PRAYER!!11!
Also, you cannot average correlation coefficients.
Imagine you and your laboratory helpmate Vasilli have been tasked to analyze the proclivity of gronkulation in the animal kingdom. So you measure the proclivity for gronkulation in cats and measure the proclivity for gronkulation in dogs and measure the proclivity for gronkulation in mule deer, each quantified as a correlation coefficient. It is a perfectly reasonable instinct to now report the proclivity for gronkulation in quadrupeds by averaging your three values, perhaps to compare with the proclivity for gronkulation in other phyla such as fish or undergraduates.
Unfortunately, correlation coefficients don't average like that.
It took me a long time to grok this, probably because I took statistics out of Zar and -- as I've now come to understand -- taking statistics out of Zar is the statistics equivalent to Abe Simpson telling stories that go nowhere.
An example is illustrative. Here's Zar 18.1a:
X = 10.4 10.8 11.1 10.2 10.3 10.2 10.7 10.5 10.8 11.2 10.6 11.4
Y = 7.4 7.6 7.9 7.2 7.4 7.1 7.4 7.2 7.8 7.7 7.8 8.3
Y = 7.4 7.6 7.9 7.2 7.4 7.1 7.4 7.2 7.8 7.7 7.8 8.3
Do the math and you'll find r = corr(X,Y) = 0.870.
Now split the data in half, letting X1 & Y1 be, say, the odd entries and X2 & Y2 be the evens. You'll find r1 = corr(X1,Y1) = 0.766 and r2 = corr(X2,Y2) = 0.937. The average of r1 and r2 is 0.851, which isn't what we got for r.
The good news is there's a way to address this known as the Fisher Z Transform. Briefly, you FZT the correlation coefficients you wish to average, average the transformed values, then inverse transform the result. Boom! Beer time.
The FZT has a formula with logarithms and blah blah and you can look it up or you could just remember it's the inverse hyperbolic tangent (making the inverse transform the inverse inverse hyperbolic tangent, aka the hyperbolic tangent). These are usually written "atanh" and "tanh" on calculator buttons and Javascript libraries. (Fisher used logarithms and not hyperbolic tangents because slide rules do, which was the style at the time.)
Postscript
You may have noticed that r =/= tanh([atanh(r1) + atanh(r2)] / 2) in our example above. If I'm not mistaken (hey, that happens occasionally), it's because we're estimating a population parameter (i.e., ρ). If we repeated the experiment, we would get different data and all the numbers would change. So we shouldn't expect our averaged r (or any averaged r) to be equal to r, because both results are just estimates. Rather, all we can hope is that our estimates are "unbiased" (in the statistical sense). That's what the FZT offers, whereas ordinary averaging does not.
That being said, it'd be nice to cite a source on this. So I spent an afternoon combing through stats textbooks in our university library -- which is actually a pretty good library, all things considered (Berkeley of the Midwest, as they say in the recruiting brochures). I found exactly one that mentions averaging correlation coefficients (Snedecor's 1937 textbook on agricultural statistics, which includes a rousing application to steer hinders). Perhaps I should be thankful Zar mentioned the FZT at all. Long story short: Sheldon Snedecor gives you his blessing to arithmetically average correlation coefficients, as long as you transform them first.
That being said, be advised the FZT has detractors. Articles still appear from time to time debating better ways to combine correlation coefficients. As my stats professor often (and gleefully) told us: No matter what you do in statistics, it's wrong.
When all else fails, we can whip the horses eyes and make them sleep.
Footnotes
1. A little reflection helps explain why averaging is bad. As you know, a correlation coefficient is bounded between 0 and 1. This skews the sampling distribution (i.e., what we can expect to obtain for an estimate obtained from data). Different sample estimates aren't equally likely but averaging implicitly assumes they are. To see this, rewrite a hypothetical average [ r1 + r2 + ... + rn ] / n as (1/n) r1 + (1/n) r2 + ... + (1/n) rn or, using expectation notation, Σ pi ri. The "equally likely" assumption is all the pi = 1/n, which -- as just mentioned -- is false because skew.
2. TBH, Fisher's correction is typically small but statisticos will snicker if you don't apply it.
3. The "Z-transform" you hear about in engineering is something completely different than the Fisher Z transform. Stay frosty.
1. A little reflection helps explain why averaging is bad. As you know, a correlation coefficient is bounded between 0 and 1. This skews the sampling distribution (i.e., what we can expect to obtain for an estimate obtained from data). Different sample estimates aren't equally likely but averaging implicitly assumes they are. To see this, rewrite a hypothetical average [ r1 + r2 + ... + rn ] / n as (1/n) r1 + (1/n) r2 + ... + (1/n) rn or, using expectation notation, Σ pi ri. The "equally likely" assumption is all the pi = 1/n, which -- as just mentioned -- is false because skew.
2. TBH, Fisher's correction is typically small but statisticos will snicker if you don't apply it.
3. The "Z-transform" you hear about in engineering is something completely different than the Fisher Z transform. Stay frosty.
No comments:
Post a Comment