CCR logo

Nelson Home | UW Home | My UW | Map

click to support CCR

Get the latest on UW-Madison's COVID-19 Response
View updates to campus operations, information, and planning: Learn more

ABOUT
  • About CCR
  • Mission
  • Bryson Scholarship
  • Support CCR
  • Affiliated Institutions
  • Contact
PEOPLE
  • Meet the Director
  • Faculty, Scientists and Researchers
  • Administrators
  • Postdoctoral Scientists
  • Students
  • Affiliates
  • Climate Change Experts
  • Emeritus
NEWS
  • News Archive
  • Research Spotlight
EVENTS
  • CPEP Seminars
  • Climate Change Symposium
  • AOS Colloquium Series
  • Weston Roundtable Series
  • Past Events
CPEP
  • CPEP Seminars
  • Bryson Professors
  • Postdoctoral Fellows and Students
  • Seed Grants
RESEARCH
  • Publications
  • Carbon Cycling
  • Climate Impacts and Vulnerability
  • Climate Dynamics
  • Oceanography and Limnology
  • Past Climates
  • Surface-Atmosphere Feedbacks
RESOURCES
  • Visualization and Tools
  • Data
  • Scripts
  • Facilities and Equipment
  • Climate Jobs
click to toggle subnavRELATED LINKS
RESOURCES
Visualizations and Tools »
Data »
Scripts »
Facilities and Equipment »
Climate Jobs »

GrADS

Significance Scripts

Maps and Graphs | Significance Scripts | Managing Output | Using XDFOPEN | Creating Multiple Maps

These statistical significance scripts calculate the t-test statistic for a two-sample difference of means test and shade the grid cells that are significant at a chosen level. There are two different forms of the test: one in which we assume the population variances are equal, and one in we assume the population variances are unequal. You can determine which form of the test to use by conducting a F-test that compares the variances of the two samples. Step-by-step instructions for running the scripts are listed below.

The graphic below shows the results of a t-test for for DJF for FOAM GCM data, comparing model-predicted surface temperatures from 6K B.P. to current surface temperatures. The areas that are shaded gray are signficant at the 99% level.

contour map

Assume Population Variances are Equal

  1. Calculate your degrees of freedom: df = n1 + n2 -2, where n1 is the size of the first sample and n2 is the size of the second sample.
  2. Decide on the significance level: .01 (99%), .05 (95%), .10 (90%)
  3. EXAMPLE: say we have two samples of sizes n1=120 and  n2=120. The degrees of freedom = n1+n2-2 = 120+120-2 = 238
  4. Say we choose a significance level of 0.01. When we enter this information in the appropriate boxes, we find that our cutoff t is 2.597.
  5. Now, we move on to GrADS. The script to use is ttest.equal_variances.gs. Put in open statements for your data files (e.g., sdfopen /grove4/selin/foam_indyr/ha.F1.0k.djfi486605.TS1.nc)
  6. Set n1 and n2 to the size of the respective samples
  7. In the formulas for x1, x2, s1, and s2, you must set the time increment for each of the formulas according to the sample size. For example, if n1 is 120, then set x1 = ave(ts1.1,t=1,t=120)
  8. Set the contour interval equal to the cutoff t you determined from the web page: set clevs  2.597
  9. Now, run the script. Enter GrADS, and type exec ttest.equal_variances.gs. The areas that are significant will be shaded gray and the difference between the two means will be contoured.

Assume Population Variances Are Unequal

  1. Calculate your degrees of freedom. In this case, df = min (n1-1, n2-1), where n1 is the size of the first sample and n2 is the size of the second sample.
  2. Decide on the significance level: .01 (99%), .05 (95%), .10 (90%)
  3. EXAMPLE: say we have two samples of sizes n1=120 and n2=10. Then degrees of freedom = min (n1-1, n2-1) = min (120-1, 10-1) = min(119, 9) = 9. This is a conservative estimate of the degrees of freedom. Say we choose a significance level of  0.05. cutoff t is 2.262.
  4. Now, we move on to GrADS. The script to use is ttest.unequal_variances.gs. Put in open statements for your data files. In this example, we used the xdfopen option to open our data files because the time indices do not match. Here are the xdfopen files used in this script: xdf6kFixdjf and xdf0kdjf.
  5. Set n1 and n2 to the size of the respective samples
  6. In the formulas for x1, x2, s1, and s2, you must set the time increment for each of the formulas according to the sample size. For example, if n1 is 10, then set x1 = ave(ts1.1,t=1,t=10).
  7. Set the contour interval equal to the cutoff t you determined from the web page: set clevs 2.262
  8. Now, run the script. Enter GrADS, and type exec ttest.equal_variances.gs. The areas that are significant will be shaded gray and the difference bewteen the two means will be contoured on top.
click to visit the Nelson website
click to visit Nelson on Facebook click to visit Nelson on Twitter

CONTACT US:


Nelson Institute Center for Climatic Research
University of Wisconsin-Madison
1225 W. Dayton St.
Madison, WI 53706 USA
(608) 262-2839
(608) 263-4190 (FAX)

PARTNERSHIPS



  • Support CCR
  • CCR affiliates
University of Wisconsin Madison logo
Copyright © 2021 The Board of Regents of the University of Wisconsin System. Feedback, questions or accessibility issues: