## Finding the critical value of the upper confidence interval value?

Occasional Learner
Posts: 1

# Finding the critical value of the upper confidence interval value?

I'm only just starting to learn SAS, so I am truely sorry if this question seems stupid, but I am working on homework for the Stats with SAS class, and I cannot figure this out.

My professor asked me to find the 95% confidence interval for the mean of a data set (which I did manage to do) and then he asked that I find the critical value of the upper limit fo that 95% confidence interval. How should I go about doing this?

PS- a word file containing my data and what code I have already completed is attached

Super User
Posts: 20,735

## Re: Finding the critical value of the upper confidence interval value?

You can use proc means with UCLM/LCLM to get the CI.

The Critical Value is related to the t-Score?  Assuming my definition is correct, you could take your UCLM and then convert it to at-Score using the standard formula (value-u/sd/n) where all values can be derived from your proc means output.

You could also use the values within a data step and the TINV() function.

SAS Super FREQ
Posts: 3,839

## Re: Finding the critical value of the upper confidence interval value?

Assuming you are using the standard formula, your CI is of the form

[ xbar - dx, xbar + dx]

where

dx = t(1-alpha/2, n-1) * stderr / sqrt(n).

If you know the CI and you know the standard error and you known n, you can use algebra to find the t statistic.

This same statistic appears in a lot of procedure output, so you might also see it in a table.

Super User
Posts: 10,213

## Re: Finding the critical value of the upper confidence interval value?

```You mean Standard Error of Mean ?

proc univariate data=sashelp.class cibasic;
var weight;
run;

The UNIVARIATE Procedure
Variable: Weight
Moments
N	19	Sum Weights	19
Mean	100.026316	Sum Observations	1900.5
Std Deviation	22.7739335	Variance	518.652047
Skewness	0.18335097	Kurtosis	0.68336484
Uncorrected SS	199435.75	Corrected SS	9335.73684
Coeff Variation	22.7679419	Std Error Mean	5.22469867   <------------ = Std Deviation/sqrt(n)
Basic Statistical Measures
Location	Variability
Mean	100.0263	Std Deviation	22.77393
Median	99.5000	Variance	518.65205
Mode	84.0000	Range	99.50000
Interquartile Range	28.50000
Note: The mode displayed is the smallest of 4 modes with a count of 2.
Basic Confidence Limits Assuming Normality
Parameter	Estimate	95% Confidence Limits
Mean	100.02632	89.04963	111.00300   <-------------------
Std Deviation	22.77393	17.20827	33.67865
Variance	518.65205	296.12462	1134

```
Posts: 5,052

## Re: Finding the critical value of the upper confidence interval value?

[ Edited ]

"the critical value of the upper limit fo that 95% confidence interval" could be interpreted in many ways. It could simply mean the upper critical value of the mean given the null hypothesis (which is silly, given the nature of the data, but hey, this is academic).

``````proc univariate data= income;
var dollars;
output out=out mean=mean stderr=stderr n=n;
run;

data _null_;
set out;
val95 = quantile("T", 1-0.05/2, n-2) * stderr;
put mean= val95=;
run;``````
PG
Super User
Posts: 10,213

## Re: Finding the critical value of the upper confidence interval value?

```PG,
You should use stderr=  instead of std= . They are different thing.

```