Describing Quantitative Data (1)

 

 

*--- SAS program: DESCRIBING_QUANTITATIVE_DATA_1.SAS ;

 

options nodate pageno=1;

 

*---Create Test Data;

data gold_price;

� input year price @@;

� cards;

1971� 41.25� 1972� 58.61 1973� 97.81 1974 159.7� 1975 161.4

1976 124.85� 1977 148.30 1978 193.50 1979 307.8� 1980 606.01

1981 450.63� 1982 374.18 1983 449.03 1984 360.29 1985 317.30

1986 367.87� 1987 408.91 1988 436.93 1989 381.28 1990 384.07

;

run;

 

*---Using PROC MEANS;

proc means data=gold_price;

� title 'Summary of Gold Price';

� var price;

run;

 

 

SAS Output

 

����������������������� Summary of Gold Price

 

������������������������ The MEANS Procedure

 

��������������������� Analysis Variable : price

 

�� N����������� Mean�������� Std Dev�������� Minimum�������� Maximum

� ャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャ

� 20���� 291.4860000���� 156.5263282����� 41.2500000���� 606.0100000

� ャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャャ

 

 

 

*---Using PROC UNIVARITE;

proc univariate data=gold_price plot;

� title 'Univariate Statistics of Gold Price';

� var price;

run;

 

 

SAS Output

 

���������������� Univariate Statistics of Gold Price

 

���������������������� The UNIVARIATE Procedure

�������������������������� Variable:� price

 

������������������������������ Moments

 

�� N������������������������� 20��� Sum Weights���������������� 20

�� Mean����������������� 291.486��� Sum Observations������ 5829.72

�� Std Deviation����� 156.526328��� Variance����������� 24500.4914

�� Skewness���������� -0.0294286��� Kurtosis���������� �-0.8839233

�� Uncorrected SS����� 2164791.1��� Corrected SS������� 465509.337

�� Coeff Variation��� 53.6994326��� Std Error Mean������ 35.000351

 

 

��������������������� Basic Statistical Measures

 

����������� Location������������������� Variability

 

������� Mean���� 291.4860���� Std Deviation��������� 156.52633

������� Median�� 338.7950���� Variance������������������ 24500

������� Mode������� .�������� Range����������������� 564.76000

����������������������������� Interquartile Range��� 242.49000

 

 

� ��������������������Tests for Location: Mu0=0

 

���������� Test���������� -Statistic-��� -----p Value------

 

���������� Student's t��� t� 8.328088��� Pr > |t|��� <.0001

���������� Sign���������� M������� 10��� Pr >= |M|�� <.0001

���������� Signed Rank��� S ������105��� Pr >= |S|�� <.0001

 

 

���������������������� Quantiles (Definition 5)

 

����������������������� Quantile����� Estimate

 

����������������������� 100% Max������ 606.010

����������������������� 99%����������� 606.010

����������������������� 95%��� ��������528.320

����������������������� 90%����������� 449.830

����������������������� 75% Q3�������� 396.490

����������������������� 50% Median���� 338.795

����������������������� 25% Q1�������� 154.000

����������������������� 10%������������ 78.210

 

 

������������������������������ ���������������Univariate Statistics of Gold Price

 

��������������������������������������������������� The UNIVARIATE Procedure

������������������������������������������������������� Variable:� price

 

��������������������������������������������������� Quantiles (Definition 5)

 

���������������������������������������������������� Quantile����� Estimate

 

���������������������������������������������������� 5%������������� 49.930

���������������������������������������������������� 1%������������� 41.250

� ���������������������������������������������������0% Min��������� 41.250

 

 

����������������������������������������������������� Extreme Observations

 

������������������������������������������� -----Lowest-----������� -----Highest----

 

����������������� ����������������������������Value����� Obs��������� Value����� Obs

 

��������������������������������������������� 41.25������� 1�������� 408.91������ 17

��������������������������������������������� 58.61������� 2�������� 436.93������ 18

��������������������������������������������� 97.81������� 3�������� 449.03������ 13

�������������������������������������������� 124.85������� 6�������� 450.63������ 11

�������������������������������������������� 148.30������� 7�������� 606.01������ 10

 

 

��� Stem Leaf�������������������� #������������ Boxplot���������������������������������� Normal Probability Plot

������ 6 1����������������������� 1��������������� |������������������� 650+������������������������������������������� *++++++

������ 5���� ��������������������������������������|���������������������� |�������������������������������������� ++++++

������ 4 1455�������������������� 4������������ +-----+������������������� |������������������������������� *+*+*++*

������ 3 1267788������������� ����7������������ *-----*���������������� 350+���������������������� ** ****+*

������ 2��������������������������������������� |� +� |������������������� |������������������� ++++++

������ 1 025669������������������ 6������������ +-----+������������������ �|������������ +++*+** **

������ 0 46���������������������� 2��������������� |�������������������� 50+����� *++++*+ *

�������� ----+----+----+----+���������������������������������������������� +----+----+----+----+----+----+----+----+----+----+

���� Multiply Stem.Leaf by 10**+2���������������������������������������������� -2������� -1�������� 0������� +1������� +2

 

 

 

*---Using PROC PLOT;

proc plot data=gold_price;

� title 'Sequence Plot of Gold Price';

� plot price*year;

quit;

 

 

SAS Output

 

 

��������������������������������������������������������� Sequence Plot of Gold Price

 

������������������������������������������� Plot of price*year.� Legend: A = 1 obs, B = 2 obs, etc.

 

price �

����� �

� 600 �������������������������������������������� ��������������������A

����� �

����� �

����� �

����� �

� 500 �

����� �

����� ����������������������������������������������������������������������� A

����� ��������������������������������������������������������������������������� ����������A��������������������������������� A

����� �

� 400 ����������������������������������������������������������������������������������������������������������������� A

����� ������������������������������������������������������������������������ ������A����������������������������������������������� A����� A

����� �������������������������������������������������������������������������������������������� A������������ A

����� �

����� �������������������������������������������������������������� �������������������������������������A

� 300 ��������������������������������������������������������� A

����� �

����� �

����� �

����� �

� 200 �������������������������������������������������� A

����� �

����� ���������������������� A����� A

����� ������� ������������������������������������A

����� ������������������������������������ A

� 100 ��������������� A

����� �

����� �������� A

����� � A

����� �

��� 0 �

����� �

����� 潟�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ�ャャャ��

����� 1971�� 1972�� 1973�� 1974�� 1975�� 1976�� 1977�� 1978�� 1979�� 1980�� 1981�� 1982�� 1983�� 1984�� 1985�� 1986�� 1987�� 1988�� 1989�� 1990

 

������������������������������������������������������������������������ year

 

 

Note

 

 

 

SAS Output