title: SAS Proc Ttest finding differences and where statement
body: <pre><code>DATA OZONE;
  INPUT MONTH $ STMF YKRS @@;
  CARDS;
      A 80 66   A 68 82    A 24 47    A 24 28    A 82 44    A 100 55
      A 55 34   A 91 60    A 87 70    A 64 41    A . 67     A . 127     A       170 96   A . 56
  
      JN 215 93 JN 230 106 JN . 49    JN 69 64   JN 98 83   JN 125 97   
      JN 72 51  JN 125 75  JN 143 104 JN 192 107 JN . 56    JN 122 68  
      JN 32 20  JN 23 35   JN 71 30   JN 38 31   JN 136 81  JN 169 119
      JL 152 76 JL 201 108 JL 134 85  JL 206 96  JL 92 48   JL 101 60   
      JL 133 .  JL 83 50   JL . 27    JL 60 37   JL  124 47 JL 142 71 
      JL 75 49  JL 103 59  JL . 53    JL 46 25   JL 68 45   JL .  78
      S 38 23   S 80 50    S 80 34    S 99 58    S 71 35    S 42 24       S 52 27    S 33 17     
  ;
  run;
  Proc Ttest data=Ozone PLOT=NONE ALPHA=0.01;
  Where MONTH='JN';
  Paired STMF*YKRS;
  Run;
  
  Question 2
  Data Baseball;
  Input ba league;
  Datalines;
  276 National League
  288 National League
  281 National League
  290 National League
  303 National League
  257 American League
  254 American League
  263 American League
  261 American League
  Run;
  Proc Ttest data=Baseball ALPHA=0.02 ;
  Question 3 
  Proc Ttest data=ozone ALPHA=0.01 Plot=NONE;
  Where Month='A'-'S';
  Paired STMF*YKRS;
  Run;
  </code></pre>
  
  <p>Question 2 Test to see if both leagues have different batting averages. Use a alpha = 0.02 in your conclusions and compute a 98% confidence interval for the means. 
  Question 3 From the first question test to see the differences the A and S average ozone values. Use alpha = 0.01 in your conclusions. Include a 99% confidence interval for the difference. </p>
  
  <p>So my questions are for Question 2 kind of a stupid question but for whatever reason I am confused as to what you are suppose to do. </p>
  
  <p>For question 3 (my main question) how do I use one proc ttest to check and see the differences between months A and S? I tried using a Where statement as you can see above, but of course that does not work I’m abit stomped on where to go from here. Also I omited a good bit of the month data in the ozone portion as I couldn't properly format all of the data without it looking extremely confusing. </p>
  
  <p>Thanks for your help in advance! </p>