BookmarkSubscribeRSS Feed
avalenzuela6
Calcite | Level 5

I am trying to compare two different versions of the same product. Since they are independent of each other, I decided that I should do an independent sample t-test. When I go to do a two-sample test on SAS OnDemand for Academics, the results don't make any sense. When I do a paired test however, it generates perfect results. Have I decided to run the wrong test or am I just missing something?

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I have looked at your PDF file, and this requires more explanation, specifically which test is which, and which ones make perfect senses and so on.


Can you also show us the code you used?

 

Furthermore, since you state that your data is not paired, you should not do a paired t-test, it will be meaningless.

--
Paige Miller
Rick_SAS
SAS Super FREQ

Show the code, please. This looks like the output from PROC UNIVARIATE and it looks like a BY group analysis in which each group has one or two observations.

avalenzuela6
Calcite | Level 5

The file is what happens when I run a two sample t-test. Code is below. I guess what is confusing me is that it doesn't show any graphs when I do two sample as opposed to the paired test, which does.

 

* Task code generated by SAS Studio 3.7
*
* Generated on '10/10/18, 5:00 PM'
* Generated by 'avalenzuela6@capellauniversity.edu'
* Generated on server 'ODAWS01.ODA.SAS.COM'
* Generated on SAS platform 'Linux LIN X64 3.10.0-693.21.1.el7.x86_64'
* Generated on SAS version '9.04.01M5P09132017'
* Generated on browser 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
*
*/
 
ods noproctitle;
ods graphics / imagemap=on;
 
/*** Test for normality ***/
proc univariate data=WORK.IMPORT normal mu0=0;
ods select TestsForNormality;
class SF;
var UniDun;
run;
 
/*** t Test ***/
proc ttest data=WORK.IMPORT sides=2 h0=0 plots(showh0);
class SF;
var UniDun;
run;
Rick_SAS
SAS Super FREQ

I suspect that the SF variable contains more than two levels. The SF variable should contain two values that indicate the product version. The UniDun variable contains the measurements. Your data should look like this example:

SF  UniDun

1   1.23

1   3.21

1   4.23

1   2.14

...

2   4.53

2   3.43

2   3.61

2   3.87

 

From the PROC UNIVARIATE output, it looks like your data might look more like this:

SF  UniDun

1   1.23

1   3.21

2   4.23

2   2.14

...

12   4.53

12   3.43

13   3.61

13   3.87

 

 

You can use PROC FREQ to produce the values of the SF variable:

proc freq data=WORK.IMPORT;
tables SF;
run;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 1464 views
  • 2 likes
  • 3 in conversation