1STAT 13, UCLA, Ivo DinovSlide 1UCLA STAT 13Introduction toStatistical Methods for the Life and Health Sciences!Instructor: Ivo Dinov, Asst. Prof. In Statistics and Neurology!Teaching Assistants:Ming Zheng, Annie CheUCLA StatisticsUniversity of California, Los Angeles, Winter 2004http://www.stat.ucla.edu/~dinov/courses_students.htmlSTAT 13, UCLA, Ivo DinovSlide 2Chapter 2: Tools for Exploring Univariate Data!Types of variables!Presentation of data!Simple plots!Numerical summaries!Repeated and grouped data!Qualitative variablesSTAT 13, UCLA, Ivo DinovSlide 3TABLE 2.1.1 Data on Male Heart Attack PatientsA subset of the data collected at a Hospital is summarized in this table. Each patient has measurements recorded for a number of variables –ID, Ejection factor (ventricular output), blood systolic/diastolic pressure, etc.- Reading the table- Which of the measured variables (age, ejection etc.)are useful in predictinghow long the patient may live.- Are there relationshipsbetween these predictors?- variability & noise in the observations hide the messageof the data.STAT 13, UCLA, Ivo DinovSlide 4TABLE 2.1.1 Data on Male Heart Attack PatientsSYS- DIA- OUT-ID EJEC VOL VOL OCCLU STEN TIME COME AGE SMOKE BETA CHOLaS URG390 72 36 131 0 0 143 0 49 2 2 59 0279 52 74 155 37 63 143 0 54 2 2 68 1391 62 52 137 33 47 16 2 56 2 2 52 0201 50 165 329 33 30 143 0 42 2 2 39 0202 50 47 95 0 100 143 0 46 2 2 74 169 27 124 170 77 23 143 0 57 2 2 NA 2310 60 86 215 7 50 40 0 51 2 2 58 0392 72 37 132 40 10 9 5 56 2 2 75 0311 60 65 163 0 40 142 0 45 2 2 72 0393 63 52 140 0 10 142 0 46 2 2 90 070 29 117 164 50 0 142 0 48 2 2 72 0203 48 69 133 0 27 142 0 54 2 2 NA 0394 59 54 133 30 13 142 0 39 2 1 NA 0204 50 67 135 37 63 141 0 49 2 2 86 2280 53 65 138 0 33 140 0 58 2 1 49 055 17 184 221 57 13 5 1 50 2 2 70 279 37 88 140 37 47 118 5 58 2 2 NA 0205 45 106 193 33 43 140 0 47 1 1 38 1206 43 85 150 0 50 23 5 51 2 2 61 0312 60 59 149 7 37 139 0 43 2 1 56 080 38 103 168 47 43 100 1 55 2 2 62 1281 57 53 124 0 57 140 0 58 2 1 93 0207 44 68 121 27 60 139 0 55 2 2 63 1282 51 53 109 0 77 139 0 41 2 2 45 4396 63 58 157 0 73 139 0 51 2 2 60 0208 49 81 157 13 13 139 0 49 2 2 60 0209 48 58 112 0 0 72 1 56 2 2 57 0283 58 71 167 27 0 138 0 45 2 1 46 0210 42 92 159 0 0 139 0 57 2 2 58 0397 68 50 156 0 100 138 0 51 2 1 NA 0211 43 146 259 47 33 3 1 56 2 2 70 0398 67 43 130 0 70 138 0 49 2 2 NA 3284 52 70 146 0 23 137 0 47 1 2 NA 0399 63 73 195 27 0 136 0 36 1 1 61 0285 54 62 133 33 23 137 0 38 2 2 NA 071 37 93 148 47 0 137 0 59 2 2 NA 0286 51 65 133 43 7 136 0 54 2 2 NA 0212 42 95 163 40 10 109 3 57 2 2 NA 4400 66 49 144 10 50 65 1 52 2 2 55 0287 54 66 145 7 40 136 0 47 2 2 62 081 39 144 237 13 87 136 0 39 2 2 56 3813 63 52 141 0 47 43 3 48 2 2 NA 068 30 219 314 33 45 76 1 53 1 2 NA 0288 59 39 94 0 0 135 0 47 1 2 63 0407 67 39 117 0 73 53 1 57 2 2 62 2a NA = No t Ava ilable(miss ing data co de ).SYS- DIA-ID EJEC VOL VOL OCCLU STENT390 72 36 131 0 0279 52 74 155 37 63391 62 52 137 33 47201 50 165 329 33 30202 50 47 95 0 10069 27 124 170 77 23310 60 86 215 7 50392 72 37 132 40 10311 60 65 163 0 40288 59 39 94 0 0407 67 39 117 0 73a NA = Not Available(missing data code).TABLE 2.1.1 Data on Male Heart Attack PatientsSTAT 13, UCLA, Ivo DinovSlide 5! Quantitative variables are measurements and counts"Variables with few repeated values are treated as continuous."Variables with many repeated values are treated as discrete ! Qualitative variables (a.k.a. factors or class-variables) describe group membershipTypes of variableSTAT 13, UCLA, Ivo DinovSlide 6Types of VariablesQualitativeContinuous Discrete Categorical OrdinalQuantitative(few repeated values) (many repeated values) (no idea of order) (fall in natural order)(measurements and counts) (define groups)Figure 2.1.1 Tree diagram of types of variable.From Chance Encounters by C.J. Wild and G.A.F. Seber, © John Wiley & Sons, 2000.Distinguishing between types of variable2STAT 13, UCLA, Ivo DinovSlide 7Questions …! What is the difference between quantitative and qualitative variables?! What is the difference between a discrete variable and a continuous variable?! Name two ways in which observations on qualitative variables can be stored on a computer. (strings/indexes)! When would you treat a discrete random variable as though it were a continuous random variable?" Can you give an example? ($34.45, bill)STAT 13, UCLA, Ivo DinovSlide 8Storing and Reporting Numbers! Round numbers for presentation! Maintain complete accuracy in numbers to be used in calculations. If you need to round-off, this should be the very last operation …STAT 13, UCLA, Ivo DinovSlide 9Table before simplificationCountry 1970 1975 1980 1985 1990Belgium 42.01 42.17 34.18 34.18 30.23Canada 22.59 21.95 20.98 20.11 14.76France 100.91 100.93 81.85 81.85 81.85Italy 82.48 82.48 66.67 66.67 66.67Japan 15.22 21.11 24.23 24.33 24.23Netherlands 51.06 54.33 43.94 43.94 43.94Switzerland 78.03 83.2 83.28 83.28 83.28U.K. 38.52 21.03 18.84 19.03 18.94U.S.A. 316.34 274.71 264.32 262.65 261.91Units: millions of troy ounces.Source: The World Almanac and Book of Facts.TABLE 2.2.1 Gold Reserves of Gold-Holding IMF CountriesSTAT 13, UCLA, Ivo DinovSlide 10TABLE 2.2.2 Simplified Table of Gold Reserves of IMF CountriesCountry 1970 1975 1980 1985 1990 AverageUS 320 270 260 260 260 280Switzerland 788383838382France 100 100 82 82 82 89Italy 828267676773Netherlands 515444444447Belgium 424234343037Japan 152124242422UK 39 21 19 19 19 23Canada 23 22 21 20 15 20 Average 8378717170Units: millions of troy ounces. Table after simplificationSTAT 13, UCLA, Ivo DinovSlide 110%10%20%30%29%US14%11%11%8%6%21%S. AfricaUSSRAustr.Can.Chin.Rest(a) Bar graph (b) Pie chart0%20%40%60%80%100%(c) Segmented barS. AfricaU.S.USSRAustr.Can.ChinaRest.Figure 2.6.3Percentages of the world's gold production in 1991.From Chance Encounters by C.J. Wild and G.A.F. Seber, © John Wiley & Sons, 2000.Different graphs of the same set of numbersSTAT 13, UCLA, Ivo DinovSlide 13345678Figure 2.3.1Dot plot.From Chance Encounters by C.J. Wild and G.A.F. Seber, © John Wiley & Sons, 2000.cluster gapoutlierFigure 2.3.2 Dot plot showing special features.From Chance Encounters by C.J. Wild and G.A.F. Seber, © John Wiley & Sons, 2000.The dot plotAtypical obs.3STAT 13, …
View Full Document