/* module 5: problems 5.1, 5.4 */ * for skewed data use percentiles; * for symmetric data use mean and sd; /* 5.1 */ filename utility 'Utility.dat'; data one; infile utility; input date $ 1-6 telcost 9-15 fuelcost 17-22 emcost 25-29; totcost = telcost + fuelcost + emcost; label telcost = Telephone Costs; label fuelcost = Fuel Costs; label emcost = Electricity Costs; label totcost = Total Costs; run; proc univariate plot; var telcost fuelcost; id date; title "Utility Costs: Telephone and Fuel"; run; proc univariate plot; var emcost totcost; id date; title "Utility Costs: Electricity and Total"; run; * telcost is positively skewed with a skewness of .991; * the minimum is 39.39 (Jan 92); * Q1 is 51.33; * the median is 69.02; * Q3 is 91.50; * the maximum is 145.17 (Jun 90); * no outliers; * fuelcost is positively skewed with a skewness of .733; * the minimum is 16.21 (Jul 92); * Q1 is 23.72; * the median is 48.67; * Q3 is 105.94; * the maximum is 157.71 (Jan 91); * no outliers; * emcost is positively skewed with a skewness of .903; * the minimum is 18.69 (Jun 92); * Q1 is 26.58; * the median is 30.07; * Q3 is 36.88; * the maximum is 56.61 (Dec 88, an outlier); * no outliers; * totcost is positively skewed with a skewness of .597; * Max 317.41 (Sep 92); * Q3 204.72 ; * Median 166.04 ; * Q1 120.70 ; * Min 91.40 (Jan 91); * no outliers; /* 5.4 */ filename china 'China#1.dat'; data two; infile china; input year 1-4 gross 6-10 exports 12-16 imports 18-22; balance = exports - imports; label year = Year gross = "Gross Trade (US$ billion)" exports = "Exports (US$ billion)" imports = "Imports (US$ billion)" balance = "Trade Balance (US$ billion)" ; run; proc univariate plot; var imports exports balance; id year; title Chinese Trade; run; * imports is positively skewed with a skewness of 1.254; * Max 39.85 ; * Q3 18.53 ; * Median 2.86 ; * Q1 1.89 ; * Min 1.17 ; * no outliers; * exports is positively skewed with a skewness of 1.343; * Max 43.44 ; * Q3 20.89 ; * Median 3.44 ; * Q1 1.98 ; * Min 1.41 ; * no outliers; * balance is negatively skewed with a skewness of -1.645; * Max 4.34 ; * Q3 0.43 ; * Median 0.14 ; * Q1 -0.23 ; * Min -8.41 ; * low outliers in 78, 80, 79, 86, and 85; * high outliers in 81, 83, 89, and 82;