Statistical Significance in terms of Gaussian Sigma
Question: I'm working on an issue in my research where I would like to express my
statistical significance for a correlation peak in terms of sigma of a normal
distribution. For example, if my peak was at 95% significance it would be at
2sigma. Essentially what I'm asking is say I have an arbitrary peak
significance (e.g. 92%), how would I express this in terms of sigma of a
normal distribution? I realize this is a more general statistics question, so
any reading/background is encouraged. Or if Python as a straightforward
function to convert/compute this that works too. Thanks!


Answer: I'm not sure what you mean by "statistical significance of a correlation
peak," so I can't comment on whether the statistics you're talking about make
any sense. However it sounds like you'd like calculate the following: how many
standard deviations from the mean (say 1.96 sigma) cover a given fraction (in
this case, 0.95) of the normal distribution? If this is what you're asking,
you can use the SciPy statistics library to easily solve this. If you don't
have SciPy already, you'll need to [install it
first](http://scipy.org/install.html).

Once you have SciPy installed, you'll want to use the inverse survival
function (ISF) of the normal distribution. The ISF is the inverse of the
survival function, which itself is
1-[CDF](https://en.wikipedia.org/wiki/Cumulative_distribution_function).
Here's how you do it in python:

    
    
    In [1]: import scipy.stats as st
    In [2]: yourArea = 0.95
    In [3]: st.norm.isf((1-yourArea)/2.)
    Out[3]: 1.959963984540054
    

So that's how you calculate the number that I believe you want. The (1-A)/2
business just accounts for the fact the CDF integrates from -infinity, whereas
you're interested in values calculated from the center of the distribution.

