## F values and t values, tabulated and probabilities

Often we find that we wish/need to obtain critical F values for a given probability and numerator and denominator degrees of freedom, or critical t values for a given probability and denomonator degrees of freedom. Obviously, for a limited range of degrees of freedom and probability levels we can simply use the tabulated values that are given in most statistics books. However, often the tables do not give the values we need. We can use SAS (the datastep or IML) to obtain F-values, or t values, which we can use to accept/reject a hypothesis. Conversely, with a given calculated F or t value and the the associated numerator and denominator degrees of freedom we can obtain the probability associated with this.

The first case, find a F value corresponding to a certain probability and d.f., uses the SAS function finv(). The second case, finding the probability associated to a given calculated F value and d.f., uses the SAS function probf(). These functions are described in the SAS Online Documentation, under Base SAS, Language Reference, Functions.

#### Critical F values

If we want to obtain the F value for a certain probability and ndf and ddf, we can use the finv() function. Suppose that we want to obtain the F value for a probability of 0.05 (5%), and ndf = 2 and ddf = 27, and the F-value for a probability of 0.01 (1%) and ndf = 1 and df = 26. We can use the following data step.

```
data ftabs;
input  prob   ndf   ddf;
fvalue = finv(1-prob,ndf,ddf);
cards;
0.05  2  27
0.01  1  26
;

proc print data=ftabs;
var  prob  ndf  ddf  fvalue;
run;

```

This will compute the F-value for both cases, producing a SAS dataset with 2 records and 4 variables per record.

### Determining a tabulated t value

Suppose that we wish to determine the cut-off t-value for a probability level of 5% and ddf (denominator degrees of freedom) = 14, then we can use the TINV function:

```
data crittvals;
input  pr  ddf;
tvalue = tinv(1-(pr/2),ddf);
cards;
0.05  14
;

proc print data=crittvals;
var pr  ddf   tvalue;
run;

```

We would obtain the following output from PROC PRINT:

```
obs    pr     ddf    tvalue
1     0.05   14     2.14479

```

Which agrees with the tabulated values in STD!