[Thread Prev][Thread Next][Index]

[ferret_users] Query regarding the 95% significant level by using student t test



Dear ferret users
 I have precipitation data for the period 1979-2010 from GPCP

 I have make the camposit of JJAS for EL Nini Modoki years. (from the anomaly)

 I want to check 95% signifinat from the JJAS camposit for the El Nino modoki by using significant at 90% confidence level from a 2-tailed Student’s t-test. i have tried like this

use "/home/abhishek/gpcp_precipitation_1979_2010.nc"
set region/x=30E:60W/y=-50:50
set mem/size=900
SET WINDOW/ASPECT=0.55
! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<  Calculation for 95% confidencde level<<<<<<<
!let alpha = 0.025     ! alpha= 1%-95% = 5% = 0.05, alpha/2=0.025
let alpha = 0.01     ! alpha= 1%-90% = 10% = 0.01, alpha/2=0.005

! <<<<<<<<<<<<<< calculation for degree of freedom <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
let df = 384-1   ! total number of points-1, n=384 in my case

!<<<<<<<<<<<<<Now we see the t table for the t(1-alpha,n-1)

let t_sta = 2.330  !from the student t table alpha=0.01

!<<<<<<<<<<<<<<<<<Calculation for standatd error <<<<<<<<<<<<<<<<<<<<<<<<<<<<
let p = t[gt=precip]                  ! before doing i have  detrended the data
let q = precip

go regresst

let myline=p*slope+intercep     ! Here myline=qhat
let precip_detrend = precip-myline
let var_detrend=precip_detrend[l=@var]
let sd_detrend=var_detrend^0.5

let S_E=(sd_detrend/df^0.5)   ! calculation for standard error  S.E= standard_deviation/n^.05

!<<<<<<<<Calulation for critical value <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let t_crit = t_sta*S_E        ! calculation for critical value Standard_error*t_sta

!<<<<<<<<<<<<<calculation for 90% of significant level <<<<<<<<<<<<<<<<<<<<<<<<<<<!

!<<<<<<<<<<<<<Calculation for mean<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
use climatological_axes
cancel data climatological_axes
let precip_detr_cli=precip_detrend[gt=month_`precip_detrend,return=cal`@mod]
let precip_detr_anm=precip_detrend-precip_detr_cli[gt=precip_detrend]

!<<<<<<<<<<<<Calculation for confidence interval <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let precip_90_u = precip_detr_cli[gt=t_crit] + t_crit  ! (mean+t_crit)
let precip_90_l = precip_detr_cli[gt=t_crit] - t_crit  ! (mean-t_crit)

!<<<<<<<<<<<<<<<<<<Calculation for precipitation 95 signifivant <<<<<<<<<<<<<<<<<<

let var_sig = if precip_detr_anm ge precip_95_l and precip_detr_anm le precip_95_u then 1

let pre_95 = var_sig*precip_detr_anm

!<<<<<<<<<<<<<<<<<Camposit for JJAS during the canonical years <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<!
let var1=pre_95[t=15-jun-1986:15-sep-1986]
let var2 =pre_95[t=15-jun-1990:15-sep-1990]
let var3= pre_95 [t=15-jun-1991:15-sep-1991]
let var4= pre_95 [t=15-jun-1992:15-sep-1992]
let var5= pre_95 [t=15-jun-1994:15-sep-1994]
let var6= pre_95 [t=15-jun-2002:15-sep-2002]
let var7= pre_95 [t=15-jun-2004:15-sep-2004]
let precip_summer_jjas=(var1+var2+var3+var4+var5+var6+var7)/7

fill precip_summer_jja[l=@ave]


Thanks in advance

--
Regards

Abhishek Savita

Research Scholar (Earth System Science Technology)
Center For Oceans, Revers, Atmoshphere & Land Science Technology
Indian Institute of Technology, Kharagpur
+91-8609704619

 

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement