# I have a statistic, how do I calculate its distribution?

I am comparing images for correlation. The images are all correlated, but I would like to determine when one pair is much more highly correlated, relative to another pair. I am using as a statistic the difference in the logs of p-values produced by a Spearman rank correlation test. If this is difference is small, there is a normal degree of correlation. If this difference is big, there is a higher degree of correlation in one pair than the other pair.

Let $A$, $B$, and $C$ be images. I would like to determine a distribution and calculate a p-value for $x = \vert \log(\mbox{SpearmanRankCorr}(A,B)) - \log(\mbox{SpearmanRankCorr}(A,C)) \vert$

-

## 1 Answer

You might want to consult the theory about transformations of random variables, since a statistic is basically a function of a random variable which is the data.

http://math.arizona.edu/~jwatkins/f-transform.pdf

Also the best source is 'Statistical Inference' by George Casella.

-

Is this the only way to go about determining a distribution from a statistic? If I try to perform, $$f_{Y}(y) = f_{X}(g^{-1}(y)) \bigl\vert \dfrac{d}{dy}g^{-1}(y) \bigr\vert,$$ any statistic $Y = g(X)$ of the data, $X$, involving the Spearman rank correlation test will not be one-to-one. Assuming I had a statistic, $g(X)$, that was invertible, the underlying data, $X$, is image data that doesn't follow any simple distributions. (I guess I could model it as a complicated mixture of Gaussians, right?)  Is there any other way to describe a distribution of an arbitrary statistic? – cjohnson318 Apr 25 '12 at 22:09
as far as i know this is the only way, unless there is a known approximation or result that i'm not aware of about your specific problem. Also about the fact that it is not one to one, you can use the following result from casella, which says that in the formula move you have the sum of the right hand side above for g_{1}, g_{2}, etc, where the g's correspond to each interval where the distribution is defined.  for example in the case of the absolute value you have two components, one for (-\infty,0) plus other for (0,\infty). – raygozag Apr 26 '12 at 2:31
Whammy. I was hoping that there was some kind of boot-strapping solution. Thank you for pointing out the piece-wise inversion result, I did not know about that. – cjohnson318 Apr 26 '12 at 14:11
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 8, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9376311898231506, "perplexity_flag": "head"}