## Programming the statistical procedures from SAS

Solved
Contributor
Posts: 21

Use the file to test if humans and hybrid differ for 1. Throughput and 2. Quality.

 Variable Columns Human throughput 1-5 hybrid throughput 7-11 Human quality 13-16 Hybrid quality 18-21

• Check the assumptions and determine statistical model
• Find the test statistic and report p-value

So far I have the following code but let me know if this code is correct or if there is any other way to compare throughput and quality

data robot;
input HumT 1-5 HybT 7-11;
diff=HumT-HybT;
run;
proc univariate data=robot normal;
qqplot d /normal (mu=est sigma=est color=red 1=1);
var diff;
run;
proc ttest data=robot side=2 alpha=0.05 h0=0;
var diff;
run;

Two dependent samples with paired t-test.
For Ho: Uc – Ut = 0, t= 4.4689, and the p-value = 0.0231. The conclusion is to reject Ho and conclude that the reading human and hybrid throughput are significantly different.

data robot;
input HumQ 13-16 HybQ 18-21;
diff=HumQ-HybQ;
run;
proc univariate data=robot normal;
qqplot d /normal (mu=est sigma=est color=red 1=1);
var diff;
run;
proc ttest data=robot side=2 alpha=0.05 h0=0;
var diff;
run;

Here is the data:

185.4 180.4 .889 .997
146.3 248.5 .791 .959
174.4 185.5 .866 .821
184.9 216.4 .888 .914
240.0 269.3 .916 .973
253.8 249.6 .923 .925
238.8 282.0 .894 .912
263.5 315.9 .934 .965

Accepted Solutions
Solution
‎04-13-2017 01:35 AM
Super User
Posts: 20,735

[ Edited ]

I don't think this is correct statistically. Because you're taking a difference and testing if it's 0 that's a paired t-test and I suspect your data is not suitable for a paired test.

pacruz wrote:

Use the file to test if humans and hybrid differ for 1. Throughput and 2. Quality.

 Variable Columns Human throughput 1-5 hybrid throughput 7-11 Human quality 13-16 Hybrid quality 18-21

• Check the assumptions and determine statistical model
• Find the test statistic and report p-value

So far I have the following code but let me know if this code is correct or if there is any other way to compare throughput and quality

data robot;
input HumT 1-5 HybT 7-11;
diff=HumT-HybT;
run;
proc univariate data=robot normal;
qqplot d /normal (mu=est sigma=est color=red 1=1);
var diff;
run;
proc ttest data=robot side=2 alpha=0.05 h0=0;
var diff;
run;

Two dependent samples with paired t-test.
For Ho: Uc – Ut = 0, t= 4.4689, and the p-value = 0.0231. The conclusion is to reject Ho and conclude that the reading human and hybrid throughput are significantly different.

data robot;
input HumQ 13-16 HybQ 18-21;
diff=HumQ-HybQ;
run;
proc univariate data=robot normal;
qqplot d /normal (mu=est sigma=est color=red 1=1);
var diff;
run;
proc ttest data=robot side=2 alpha=0.05 h0=0;
var diff;
run;

Here is the data:

185.4 180.4 .889 .997
146.3 248.5 .791 .959
174.4 185.5 .866 .821
184.9 216.4 .888 .914
240.0 269.3 .916 .973
253.8 249.6 .923 .925
238.8 282.0 .894 .912
263.5 315.9 .934 .965

All Replies
Solution
‎04-13-2017 01:35 AM
Super User
Posts: 20,735

[ Edited ]

I don't think this is correct statistically. Because you're taking a difference and testing if it's 0 that's a paired t-test and I suspect your data is not suitable for a paired test.

pacruz wrote:

Use the file to test if humans and hybrid differ for 1. Throughput and 2. Quality.

 Variable Columns Human throughput 1-5 hybrid throughput 7-11 Human quality 13-16 Hybrid quality 18-21

• Check the assumptions and determine statistical model
• Find the test statistic and report p-value

So far I have the following code but let me know if this code is correct or if there is any other way to compare throughput and quality

data robot;
input HumT 1-5 HybT 7-11;
diff=HumT-HybT;
run;
proc univariate data=robot normal;
qqplot d /normal (mu=est sigma=est color=red 1=1);
var diff;
run;
proc ttest data=robot side=2 alpha=0.05 h0=0;
var diff;
run;

Two dependent samples with paired t-test.
For Ho: Uc – Ut = 0, t= 4.4689, and the p-value = 0.0231. The conclusion is to reject Ho and conclude that the reading human and hybrid throughput are significantly different.

data robot;
input HumQ 13-16 HybQ 18-21;
diff=HumQ-HybQ;
run;
proc univariate data=robot normal;
qqplot d /normal (mu=est sigma=est color=red 1=1);
var diff;
run;
proc ttest data=robot side=2 alpha=0.05 h0=0;
var diff;
run;

Here is the data:

185.4 180.4 .889 .997
146.3 248.5 .791 .959
174.4 185.5 .866 .821
184.9 216.4 .888 .914
240.0 269.3 .916 .973
253.8 249.6 .923 .925
238.8 282.0 .894 .912
263.5 315.9 .934 .965

Contributor
Posts: 21

Are the variables dependent or independent?
Super User
Posts: 20,735

pacruz wrote:
Are the variables dependent or independent?

I don't know, I didn't run the data and your tests aren't the correct methodology.

FYI - you should plot them as well.

☑ This topic is solved.