Question

In: Statistics and Probability

5. Suppose you have a data set: Experiment 56 880 Control       15 398 Experiment 30 479...

5. Suppose you have a data set:

Experiment 56 880

Control       15 398

Experiment 30 479

Control       18 293

Experiment 35 365

Control       22 984

Control        13 230

Control        20 432

Experiment 34 560

Variables are treatment, weight (g), area (m2), please create a SAS program that:

(A). Reading the data and create a SAS data set;

(b). Create a new variable wt_per_area, using wt_per_area=weight/area and change the unit of weight from g to kg;

(c). Sort the data set by treatment;

(d). Calculate the mean, standard error of weight, area and wt_per_area;

(e). Calculate the mean and standard error for treatment=”experiment” and “control”.

Solutions

Expert Solution

SAS code:

/*create a SAS data set*/
data avi;
input treatment$1-10 weight area;
datalines;
Experiment 56 880
Control 15 398
Experiment 30 479
Control 18 293
Experiment 35 365
Control 22 984
Control 13 230
Control 20 432
Experiment 34 560
;
run;
proc print data=avi;
run;
/*(b)new variable wt_per_area, using wt_per_area=weight/area and change the unit of weight from g to kg*/
data avi3;
set avi;
wt_per_area=weight/(area*1000);
run;
proc print data=avi3;
run;
/*(c)Sort the data set by treatment*/
proc sort data=avi3 out=avi3_sort;
by treatment;
proc print data=avi3_sort;
run;
/*(d)mean, standard error of weight, area and wt_per_area*/
proc means data=avi3_sort;
run;
/*(e) mean and standard error for treatment=”experiment” and “control”*/
proc means data=avi3_sort;
by treatment;
run;

SAS output:

Obs treatment weight area
1 Experiment 56 880
2 Control 15 398
3 Experiment 30 479
4 Control 18 293
5 Experiment 35 365
6 Control 22 984
7 Control 13 230
8 Control 20 432
9 Experiment 34 560
The SAS System
Obs treatment weight area wt_per_area
1 Experiment 56 880 .000063636
2 Control 15 398 .000037688
3 Experiment 30 479 .000062630
4 Control 18 293 .000061433
5 Experiment 35 365 .000095890
6 Control 22 984 .000022358
7 Control 13 230 .000056522
8 Control 20 432 .000046296
9 Experiment 34 560 .000060714
The SAS System
Obs treatment weight area wt_per_area
1 Control 15 398 .000037688
2 Control 18 293 .000061433
3 Control 22 984 .000022358
4 Control 13 230 .000056522
5 Control 20 432 .000046296
6 Experiment 56 880 .000063636
7 Experiment 30 479 .000062630
8 Experiment 35 365 .000095890
9 Experiment 34 560 .000060714
The SAS System

The MEANS Procedure

Variable N Mean Std Dev Minimum Maximum
weight
area
wt_per_area
9
9
9
27.0000000
513.4444444
0.000056352
13.5000000
257.4082900
0.000020328
13.0000000
230.0000000
0.000022358
56.0000000
984.0000000
0.000095890
The SAS System

The MEANS Procedure

treatment=Control

Variable N Mean Std Dev Minimum Maximum
weight
area
wt_per_area
5
5
5
17.6000000
467.4000000
0.000044860
3.6469165
299.8829772
0.000015577
13.0000000
230.0000000
0.000022358
22.0000000
984.0000000
0.000061433

treatment=Experiment

Variable N Mean Std Dev Minimum Maximum
weight
area
wt_per_area
4
4
4
38.7500000
571.0000000
0.000070718
11.7011395
220.9841623
0.000016825
30.0000000
365.0000000
0.000060714
56.0000000
880.0000000
0.000095890

Related Solutions

Suppose you have one data set with 30 cases, each case representing a student in this...
Suppose you have one data set with 30 cases, each case representing a student in this class. The following variables are available: age, gender/sex, race/ethnicity, class (freshman, sophomore, etc.), and GPA. For each of the 5 variables, explain (1) the level of measurement and (2) the measures of central tendency available to them. Race: Gender/sex: Race/ethnicity: Class: GPA:
1. Consider the following data set: D= (5, 10, 15, 15, 5, 10, 15, 15, 5,...
1. Consider the following data set: D= (5, 10, 15, 15, 5, 10, 15, 15, 5, 10, 15, 15) SD= 4.33 How would you add a number to this set while keeping the SD the same? 2. tossing a coin 50 times A. from the 50 flips compute the proportion of heads from your 50 flips. B. For a 95% confidence level find the z critical value C. compute the 95% confidence interval for p, the margin of error from...
Suppose that you performed a new glucose experiment with a different set of standards and a...
Suppose that you performed a new glucose experiment with a different set of standards and a different wavelength, where x is concentration is M and y is ∆A. x y 2.50e-04 .025 5.00e-04 .058 1.00e-03 .106 3.00e-03 .301 6.00e-03 .508 The ∆A for the unknown is 0.123. Calculate the relative uncertainty on the unknown, i.e., u/cunk. Use 2 sign figs
suppose you have two sets of data to work with.The first set is a list of...
suppose you have two sets of data to work with.The first set is a list of all the injuries that were seen in a clinic in a month's time.The second set contains data on the number of minutes that each patient spent in the waiting room of a doctor's office. Propose your idea of how to represent the key information.To organize your data would you choose to use a frequency table,a culmative frequency table, or avrelative frequency table?Why?
Given that the set X = 1, 2, 3, 5, 6, 10, 15, 30) and Poset...
Given that the set X = 1, 2, 3, 5, 6, 10, 15, 30) and Poset (X, ≼). The relation ≼ is defined as follows: (x, y X) x ≼ y ↔ x factor of y Question i). Draw a Hasse diagram of the Poset. ii). Specify maximum, Maximum, Minimum, Minimum (if any) elements iii). Is the relation "≼" a Lattice? Explain !
5. Suppose you have data on the prices of bonds in the Canadian market for every...
5. Suppose you have data on the prices of bonds in the Canadian market for every day in the year. How could you determine the timing of the Bank of Canada’s interest rate policy statements using the assumption that the market has no advanced knowledge of these rate decisions and there are no business cycles? Is it possible to do the same thing without these two assumptions?
Suppose you have data from the Centers for Disease Control (CDC) listing HN rates for all...
Suppose you have data from the Centers for Disease Control (CDC) listing HN rates for all counties in the United States. You want to construct a choropleth map based on these data, and your goal is have about the same number of counties allocated to each of the five categories you plan to have on the map. What classification method are you going to use? 1. quantile breaks 2. natural breaks 3. equal interval based on range 4. equal interval...
Suppose that, next month, the quality control division will inspect 80 units. Among these, 56 will...
Suppose that, next month, the quality control division will inspect 80 units. Among these, 56 will undergo a speed test and 24 will be tested for current flow. If an engineer is randomly assigned 3 units, what are the probabilities that: a) none of them will need a speed test? b) only 2 will need a speed test? c) at least 2 will need a speed test? Evaluate these solutions using the hypergeometric distribution and compare the result using the...
Activity 4: Experiment (YOU PRETEND TO DO THIS EXPERIMENT) The control group in an experiment is...
Activity 4: Experiment (YOU PRETEND TO DO THIS EXPERIMENT) The control group in an experiment is the group who does not receive any treatment and is used as a benchmark against which other test results are measured. A control group is used in an experiment as a point of comparison, so that it can be isolated in testing that the experiment did, or did not, have the intended effect. For example, scientists have developed many tests using reagents (substances used...
Construct a data set of 15 whole numbers between 5 and 20. Separate them into three...
Construct a data set of 15 whole numbers between 5 and 20. Separate them into three equal groups (treatment conditions) twice, once where the resulting F ratio would be significant and once where the resulting F ratio would not be significant. Try to keep the within group variance as similar as possible across all SIX groups
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT