Solved
New Contributor
Posts: 3

# interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

i'm doing a Ttest on a dataset with the following hypothesis.

H0: mu_inc95(senior)<=mu_inc95(new)

H1: mu_inc95(senior)>mu_inc95(new)

was the senior mean income in 1995 higher then the new's?

my code is this:

`proc ttest data=c2 ;

var inc95;

class seniority;

run;`

0=new

1=senior

and i get the following results: http://srv1.jpg.co.il/2/52c2c92d39500.png

i can see that for the F test for VAR, the p.v. is 0.5320 so they are equal.

but the p.v. for the Ttest is 0.66 which means i approve the null hypothesis. but it is obviously wrong.

am i looking on the p.v. wrong?

Accepted Solutions
Solution
‎12-31-2013 12:17 PM
Posts: 2,655

## Re: interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

SIDES=U will give what you are looking for.

Steve Denham

All Replies
Posts: 1,137

## Re: interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

As per the image , i confer that there are two groups senior and new and the ttest is a two sample.The population of new is 26 subjects and senior is 24 with

respective means.

if we check the  equality of variance (F value) is 0.5320 which is greater than 0.05 so the variance is equal,

we have to consider Method "Pooled" with P value 0.6622 which also suggests that there is no difference in variance between

new and senior.

If the F value was less than 0.05 then we need to consider that the variance are unequal, so the method to look would be "Satterthwaite"

Hope this helps.

Thanks,

Jag

Thanks,
Jag
New Contributor
Posts: 3

## Re: interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

thank you Jag, but as i stated. i understand the F test. my problem is with Ttest for the hypothesis for mean

Posts: 2,655

## Re: interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

What makes you feel that the p value is wrong?  The difference between groups is less than half the standard error and there is tremendous overlap in the confidence interval on each mean.  Just because you reject a null hypothesis, it does not mean that the alternative is true.  It may be that your sample size is such that you do not have enough power to call the observed difference significant.

Also, the p value reported is a two tailed value, and you are interested in a one tailed test.  Thus given that the difference is negative, it should be reported that the probability associated with the one tailed test is half that reported, or 0.3311, which still "nonsignificant".  The effect size of -0.44 should be an indicator that nothing of importance can be concluded from these data.

Steve Denham

New Contributor
Posts: 3

## Re: interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

thank you Steve.

as i understand. the PROC Ttest is a two-tailed test with default alpha=0.05

which means the correct hypothesis for the Ttest are:

H0: mu_inc95(senior) == mu_inc95(new)

H1: mu_inc95(senior) =/ mu_inc95(new)

and i got p.v.=0.6622 so i approve the null hypothesis BUT:

if i need a one-tailed test with alpha=0.05

with the hypothesis

H0: mu_inc95(senior)<=mu_inc95(new)

H1: mu_inc95(senior)>mu_inc95(new)

can i just cut in half the p.v. of the Ttest or do i need to add "SIDES=U | L" to the PROC TTEST?

and if i need to add SIDES, i need to add U or L?

Solution
‎12-31-2013 12:17 PM
Posts: 2,655

## Re: interepting the proc Ttest in SAS for inequality of 2 means (not VAR)

SIDES=U will give what you are looking for.

Steve Denham

🔒 This topic is solved and locked.