You are on page 1of 10

Question 1: The sugar content (mg/ g fresh weight) of 25 oranges in Omachis garden was

measured using a sweeten meter, and data shown as following:


1, 5, 7, 10, 11,12, 15, 8, 9, 11, 10, 9, 11, 16, 15, 6, 14, 11, 7, 8, 10, 12, 17, 21, and 13.
Calculate mean, mode, medium, variance, standard deviation, standard error, coefficient
variation, and draw pie chart and histogram with normal graph.
Input data:
data sugar;
input grade @@;
cards;
1 5 7 10 11 12 15 8 9 11 10 9
11 16 15 6 14 11 7 8 10 12 17 21 13
;
proc univariate;
var grade;
histogram grade/ normal;
proc gchart data=sugar;
pie grade;
run;
quit;

Result:
Moments
N
Mean
Std Deviation
Skewness
Uncorrected SS
Coeff Variation

25
10.76
4.22571493
0.1638015
3323
39.2724436

Basic Statistical Measures


Location
Mean 10.76000
Median 11.00000
Mode 11.00000

Conclution:
- Mean:
- Mode:
- Medium:
- Variance:

Sum Weights
Sum Observations
Variance
Kurtosis
Corrected SS
Std Error Mean

25
269
17.8566667
0.82781102
428.56
0.84514299

Variability
Std Deviation
4.22571
Variance
17.85667
Range
20.00000
Interquartile Range 5.00000
10.76000
11
11
17.8566667

- Standard deviation:
- Standard error:
- Coefficient variation:

4.22571
0.84514299
39.2724436

Pie grade:

Histogram grade:

Question 2: Mr. Nguyn Hong Chinh investigated the effects of 4 new varieties of peas (A~D)
on 5 different types of soils (1-5) for the yield (kg/hectare) of peas. The following layout was the

map for this experimental design and data were also collected when this experiment was
completed. Are there any differences ( = 0.05) of the average yield among these varieties?

data peas ;
input block $ treat $ obs @@;
cards;
1 a 8.4
2 a 10.8 3 a 8.6
1 b 9.4
2 b 15.2 3 b 10.0
1 c 9.8
2 c 9.9 3 c 10.2
1 d 12.2 2 d 14.4 3 d 11.5
proc anova;
class block treat;
model obs= block treat;
means treat/lsd duncan lines;
run;
quit;

4 a 8.8 5 a 8.4
4 b 9.8 5 b 9.2
4 c 8.9 5 c 8.5
4 d 12.0 5 d 9.5

The ANOVA Procedure


Class Level Information
Class
Levels Values
block
5 12345
treat
4 abcd
Number of observations 20
The ANOVA Procedure
Dependent Variable: obs
Sum of
Source
DF
Squares Mean Square F Value Pr > F
Model
7 55.58300000
7.94042857
6.75 0.0021
Error
12 14.10900000
1.17575000
Corrected Total
19 69.69200000
R-Square Coeff Var
Root MSE obs Mean
0.797552
10.54786
1.084320
10.28000

Source
DF
Anova SS Mean Square F Value Pr > F
block
4 29.86700000
7.46675000
6.35 0.0055
treat
3 25.71600000
8.57200000
7.29 0.0048
The ANOVA Procedure
t Tests (LSD) for obs
NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error
rate.
Alpha
0.05
Error Degrees of Freedom
12
Error Mean Square
1.17575
Critical Value of t
2.17881
Least Significant Difference
1.4942
Means with the same letter are not significantly different.
t Grouping
Mean
N treat
A
11.9200
5 d
A
B A
10.7200
5 b
B
B C
9.4600
5 c
C
C
9.0200
5 a

In the Department of Biotechnology. Mrs. Tng H asks 4 students for measuring


total starch content (mg/ g DW) of 4 sweet potato varieties (A~D) using 4 different High
Performance Liquid Chromatography (HPLC) apparatus in his lab, and the result is as
following. Are there any difference 0.05of total starches content between these
varieties?

data variety;
input row $ col $ treat $ obs @@;
cards;
1 1 a 14 1 2 a 10 1 3 a 15 1 4 a 16
2 1 b 16 2 2 b 25 2 3 b 22 2 4 b 20
3 1 c 20 3 2 c 18 3 3 c 14 3 4 c 16
4 1 d 16 4 2 d 20 4 3 d 18 4 4 d 12
;
proc anova;
class row col treat;
model obs=row col treat;
means treat/duncan lines;
means row/duncan lines;
means col/duncan lines;
run;
quit;

The SAS System

14:45 Thursday, September 8, 2015 1

The ANOVA Procedure


Class Level Information
Class
row
col
treat

Levels
4
4
4

Values
1234

1234
abcd

Number of observations
The SAS System

16
14:45 Thursday, September 8, 2015 2

The ANOVA Procedure


Dependent Variable: obs
Source

DF

Sum of
Squares

Model

210.5000000

Error

Corrected Total

row
col
treat

3
3
3

18.71

Pr > F
0.0010

1.2500000

Root MSE

6.576671
DF

F Value

218.0000000

Coeff Var

0.965596
Source

23.3888889

7.5000000
15

R-Square

Mean Square

obs Mean

1.118034

Anova SS

17.00000

Mean Square

99.50000000
11.50000000
99.50000000
The SAS System

F Value

Pr > F

33.16666667
26.53 0.0007
3.83333333
3.07 0.1127
33.16666667
26.53 0.0007
14:45 Thursday, September 8, 2015 3

The ANOVA Procedure


Duncan's Multiple Range Test for obs
NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate.
Alpha
0.05
Error Degrees of Freedom
6
Error Mean Square
1.25
Number of Means
2
Critical Range
1.934

3
2.005

4
2.040

Means with the same letter are not significantly different.


Duncan Grouping

Mean

20.7500

B
B
B

17.0000

16.5000

13.7500

treat

The ANOVA Procedure


Duncan's Multiple Range Test for obs
NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate.
Alpha
0.05
Error Degrees of Freedom

Error Mean Square

1.25

Number of Means
2
3
4
Critical Range
1.934
2.005
2.040
Means with the same letter are not significantly different.
A
20.7500
4 2
B
B
B

17.0000

16.5000

13.7500

The SAS System

14:45 Thursday, September 8, 2015 5

The ANOVA Procedure


Duncan's Multiple Range Test for obs
NOTE: This test controls the Type I comparisonwise error rate, not the experimentwise error rate.
Alpha
0.05
Error Degrees of Freedom
6
Error Mean Square
1.25
Number of Means
2
Critical Range
1.934

3
2.005

4
2.040

Means with the same letter are not significantly different.


Duncan Grouping
A
A
B A
B A
B A
B
B

18.2500

Mean
4

N
2

17.2500

16.5000

16.0000

col

[ Q4] In Bnh Thun-Ninh Thun, the data of X (precipitation, mm) and Y (yield, kg/ha) in
the spring wheat collected from different years list below.
(a) What is a best liner unbiased equation for X and Y?
(b) Draw this line using SAS.
(c) How to interpret slope (regression coefficient) of this linear regression line?
Lm th no gii thch dc ( h s hi quy ) ca ng hi quy tuyn tnh ny ?

(d) Interpret r (correlation coefficient) between X and Y.


Gii thch r ( h s tng quan) gia X v Y

(e) Interpret r2 (coefficient of determination) between X and Y.


(f) Estimate a yield of wheat under 35-mm rainfall, and explain the characteristics of this
value.
c tnh sn lng la m di 35 mm lng ma , v gii thch cc c im ca gi tr
ny .

Data pre and yield;


Input x y @@;
cards;
23.5 34.0 20.4 23.0 22.8 33.5 25.9 35.8
28.9 44.6 27.1 41.2 26.8 45.4 25.2 39.0
;
Proc reg;
Model y=x;
run;
quit;

The REG Procedure


Model: MODEL1
Dependent Variable: y
Analysis of Variance
Source

DF

Model
Error
Corrected Total

1
6

Sum of
Squares

Mean
Square

F Value

322.84578
322.84578
45.77297
7.62883
7
368.61875

Pr > F

42.32

Root MSE
2.76203 R-Square
0.8758
Dependent Mean
37.06250 Adj R-Sq
0.8551
Coeff Var
7.45237
Parameter Estimates
Variable

Parameter
Standard
DF
Estimate
Error

t Value

Pr > |t|

0.0006

Intercept
1
x
1

-25.46802
9.66169
-2.64
0.0387
2.49374
0.38334
6.51
0.0006

Data pre and yield;


Input x y @@;
cards;
23.5 34.0 20.4 23.0 22.8 33.5 25.9 35.8
28.9 44.6 27.1 41.2 26.8 45.4 25.2 39.0
;
proc reg;
model y=x;
plot y*x;
run;
quit;

The REG Procedure

Model: MODEL1
Dependent Variable: y
Analysis of Variance

Source

DF

Model
Error
Corrected Total

1
6

Sum of
Squares

Mean
Square

F Value

322.84578
322.84578
45.77297
7.62883
7
368.61875

Pr > F

42.32

0.0006

Root MSE
2.76203 R-Square
0.8758
Dependent Mean
37.06250 Adj R-Sq
0.8551
Coeff Var
7.45237
Parameter Estimates
Variable

Parameter
Standard
DF
Estimate
Error

Intercept
1
x
1

t Value

Pr > |t|

-25.46802
9.66169
-2.64
0.0387
2.49374
0.38334
6.51
0.0006

You might also like