# [ncl-talk] computing confidence interval from ttest

Dennis Shea shea at ucar.edu
Tue Apr 4 14:26:50 MDT 2017

```I would say so ... However, to be upfront, I am not sure of he original
question.

Note that correlations are bounded [-1 to +1]. Hence, not 'normally
distributed.' Usually, the correlations are put into a normal distribution
via the Fischer z-transform. Means and std dev are in 'z-space'; the
results are transformed back

Look at the example for
https://www.ncl.ucar.edu/Document/Functions/Built-in/escorc.shtml

It uses the large sample size z-value1.96 ... you can use the tvalue since
tval ==> zval for large sample size

zlow = z - 1.96*se                ; 95%  (2.58 for 99%)
zhi  = z + 1.96*se

On Tue, Apr 4, 2017 at 2:07 PM, Andrew Kren - NOAA Affiliate <
andrew.kren at noaa.gov> wrote:

> Thanks Dennis,
> In general, can the ttest be run on anomaly correlations?
>
> On Tue, Apr 4, 2017 at 2:01 PM, Dennis Shea <shea at ucar.edu> wrote:
>
>>
>> http://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm
>> See the definition of the confidene interval.
>>
>>    tval_opt =True                                 ; p & t-value
>>    pt          = ttest(aveX,varX,sX, aveY,varY,sY, iflag, tval_opt)
>>    print(pt)
>>
>> The 2nd element is the t-value
>>
>> HTH
>>
>>
>>
>>
>>
>> On Fri, Mar 31, 2017 at 3:49 PM, Andrew Kren - NOAA Affiliate <
>> andrew.kren at noaa.gov> wrote:
>>
>>> Dear ncl-talk,
>>>
>>> I'm using the function ttest in NCL to compute the two-tailed
>>> significance of a set of correlations. I plot the correlations (anomaly) as
>>> a time series as most people do. I compute the difference between the two
>>> and want to also plot an envelope that encompasses the 95% confidence range
>>> for the range of values. Is there a way to determine this from the ttest?
>>>
>>> --
>>> Andrew Kren, PhD
>>> Research Scientist I, Global Observing Systems Analysis (GOSA) Group
>>> NOAA ESRL Global Systems Division (Rm 3C515)
>>> 325 Broadway, Boulder, CO 80305
>>> (303) 497-5418
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
>
> --
> Andrew Kren, PhD
> Research Scientist I, Global Observing Systems Analysis (GOSA) Group
> NOAA ESRL Global Systems Division (Rm 3C515)
> 325 Broadway, Boulder, CO 80305
> (303) 497-5418
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170404/f09c918c/attachment.html
```