# [ncl-talk] Query regarding ttest and pdfx function

Dennis Shea shea at ucar.edu
Mon Feb 24 20:03:20 MST 2020

```I forgot. Please see:
*gsn_histogram*
<https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_histogram.shtml>

*https://www.ncl.ucar.edu/Applications/histo.shtm
<https://www.ncl.ucar.edu/Applications/histo.shtm>l*

<https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_histogram.shtml>

On Mon, Feb 24, 2020 at 7:38 PM Dennis Shea <shea at ucar.edu> wrote:

> Good questions. I'm not a statistician so I'm not sure if I have good
> answers. I think it is best to consult a statistician. A few random
> thoughts:
>
> [1.1] ave1, ave2: averages of the 2002 JJAS season [122 days]
> [1.2] var1, var2: variances " ...."
> [1.3] s1, s2: Typically, in* mid-latitudes*, the time between independent
> estimates [aka: the characteristic time: T0] for 'continuous' quantities
> like temperature and (say) sea-level-pressure is 4-to-7 days. These are
> derived by assuming an autoregressive process. Regions of frequent
> cyclogenesis have the smaller values. These estimates could be derived for
> every grid-point. However, for simplicity and convenience and  being
> somewhat conservative [T0=6]:  s1=N/T0=122/6 = 20 is a good estimate for
> *each* seasonal time series.
> ====
> PDF: If you have a region: latS:latN,  lonE:lonE
>
> I guess it depends on what you are looking for.
>
> PDF_all  = *pdfx*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml>(bias(:,{latS:latN},{lonW:lowE}),
> nbin, opt)   ; over all time and region
> PDF_specific_time = *pdfx*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml>(bias(nt,{latS:latN},{lonW:lowE}),
> nbin, opt)   ; specific time [nt] for a region
> PDF_specific_grid_point: *pdfx*
> <https://www.ncl.ucar.edu/Document/Functions/Contributed/pdfx.shtml>(bias(:,{LAT},{LON}),
> nbin, opt)  ; all time for a specific location
>
> ===
> Good luck
>
> On Sun, Feb 23, 2020 at 6:59 AM Dr. Suman Maity via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Dear all
>> I am new for ncl and recently started using it. However, I have the
>> following queries:
>> 1. I have temperature data from the model (time,lat,lon) and observation
>> (time,lat,lon) with time=122 days (JJAS), lon=692 grid-points and lat=466
>> grid-points. I want to plot JJAS bias (model-observation) over-layed with
>> 95% significant bias gridpoints as dots.  I took the help of "ttest"
>> function in ncl. My script is attached herewith. I would like to request
>> you to check the script and modify if needed. However, general syntax of
>> ttest is like the following:
>> prob = ttest(ave1,var1,s1,ave2,var2,s2,iflag,tval_opt)
>> What is this "s1" and "s2" ? it is mentioned the they gives no. of
>> statistically independent observation. Am I need to calculate that using
>> "equiv_sample_size" function? or any constant value will be fine? if yes
>> what will be the approximate values?
>>
>> 2. I want to generate probability density function of temperature bias
>> over a region. I have bias data(time,lat,lon). My query is:
>> 1) pdfx function is generally applied on which dimension? I mean time or
>> space?
>> 2) Is the rand_normal is required in case of my data?
>> 3) In my case bias (model-obs) is a time(122 days) X lon X lat dimension
>> data. How pdfx function will be applied on that? Will it directly go to the
>> pdfx function like:
>> ap = pdfx(bias,0,True)
>> or
>> I need to average the bias w.r.t time and then apply  ap =
>> pdfx(bias,0,True)
>> Any sort of suggestion will be highly appreciated.
>> Best
>> Suman
>> ++++++++++++++++++++++++++++++++++++++++++
>> Dr. Suman Maity
>> Research Associate
>> School of Atmospheric Science
>> Sun Yat-sen University, Zhuhai campus,Tangjiawan Town
>> Zhuhai, Guangdong, Postcode-519082,China.
>> Phone:+86-13543861045 (China), +91-9732636778 (India)
>> skype: reach2suman
>> https://www.researchgate.net/profile/Suman_Maity
>> ++++++++++++++++++++++++++++++++++++++++++
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200224/2195c186/attachment.html>
```