Programming the statistical procedures from SAS

Stuck with a dependent and independent variables. Please help

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

Stuck with a dependent and independent variables. Please help

 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
  • Made a decision

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;
infile 'C:\Users\\Downloads\gas.dat' dlm=',' firstobs=2;
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;
infile 'C:\Users\paul\Downloads\gas.dat' dlm=',' firstobs=2;
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
Grand Advisor
Posts: 16,877

Re: Stuck with a dependent and independent variables. Please help

[ 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
  • Made a decision

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;
infile 'C:\Users\\Downloads\gas.dat' dlm=',' firstobs=2;
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;
infile 'C:\Users\paul\Downloads\gas.dat' dlm=',' firstobs=2;
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

 


 

View solution in original post


All Replies
Solution
‎04-13-2017 01:35 AM
Grand Advisor
Posts: 16,877

Re: Stuck with a dependent and independent variables. Please help

[ 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
  • Made a decision

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;
infile 'C:\Users\\Downloads\gas.dat' dlm=',' firstobs=2;
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;
infile 'C:\Users\paul\Downloads\gas.dat' dlm=',' firstobs=2;
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

Re: Stuck with a dependent and independent variables. Please help

Are the variables dependent or independent?
Grand Advisor
Posts: 16,877

Re: Stuck with a dependent and independent variables. Please help


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.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 86 views
  • 0 likes
  • 2 in conversation