BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
tsafrirma
Calcite | Level 5

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?

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

SIDES=U will give what you are looking for.

Steve Denham

View solution in original post

5 REPLIES 5
Jagadishkatam
Amethyst | Level 16

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
tsafrirma
Calcite | Level 5

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

SteveDenham
Jade | Level 19

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

tsafrirma
Calcite | Level 5

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?

SteveDenham
Jade | Level 19

SIDES=U will give what you are looking for.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1492 views
  • 3 likes
  • 3 in conversation