Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I’m using SAS to answer this question. is my code correct? I am trying to run a

ID: 3376553 • Letter: I

Question

I’m using SAS to answer this question. is my code correct? I am trying to run a two sample t-test of the null hypothesis
/An economist is comparing the average hourly wages for employees of union vs. nonunion shops. She has recorded the tollowing average hourly wages in 11 shops (in $): a. Nonunion: 8.26, 8.17, 8.45, 9.09, 8.85, 8.31 b. Union: 7.92, 8.39, 8.64, 8.04, 8.24 Is there an average $ ditterence betveen the two groups of shops?*/ Edata wages; input Nonunion Union; cards; 8.26 7.92 8.17 8.39 8.45 8.64 9.09 8.04 8.85 8.24 8.31 run: ods graphics on: ?proc ttest h0_0 plots (showh0) sides-2 alpha-0.05; var weight: run: ods rtf text - 2n Here we have to test the hypothesis that, Ho: mul mu2 these hypotheses constitute a two-tailed test. The null hypothesis will be rejected if the difference between sample means is too big or if it is too smal1. Assume alpha-level of significance = 0.05 we will conduct a two-sample c-test of the null hypothesis. Sample size (n) 1

Explanation / Answer

Data wages;

Input shopstype $ wages;

Cards;

Nonunion   8.26

Nonunion 8.17

Nonunion 8.45

Nonunion 9.09

Nonunion 8.85

Nonunion 8.31

Union 7.92

Union 8.39

Union 8.64

Union 8.04

Union 8.24

;

Run;

ods graphics on;

Proc ttest data=wages ;

Class shopstype ;

Var wages;

Run;

ods graphics off;

Explanation:

Proc t test comparing two means.

Class statement contains the variable that distinguishes between groups.

var statement to analsye continuou variable.