520 likes | 644 Views
Multivariate Data Summary. Linear Regression and Correlation. Pearson’s correlation coefficient r. Slope and Intercept of the Least Squares line. r = 0.0. Scatter Plot Patterns. r = +0.7. r = +0.9. r = +1.0. r = -0.7. r = -0.9. r = -1.0. Non-Linear Patterns.
E N D
r = 0.0 Scatter Plot Patterns r = +0.7 r = +0.9 r = +1.0
r = -0.7 r = -0.9 r = -1.0
Non-Linear Patterns r can take on arbitrary values between -1 and +1 if the pattern is non-linear depending or how well your can fit a straight line to the pattern
An important Identity in Statistics (Total variability in Y) = (variability in Y explained by X) + (variability in Y unexplained by X)
It can also be shown: = proportion variability in Y explained by X. = thecoefficient of determination
Categorical Data Techniques for summarizing, displaying and graphing
The frequency tableThe bar graph Suppose we have collected data on a categorical variable X having k categories – 1, 2, … , k. To construct the frequency table we simply count for each category (i) of X, the number of cases falling in that category (fi) To plot the bar graph we simply draw a bar of height fi above each category (i) of X.
Example In this example data has been collected for n = 34,188 subjects. • The purpose of the study was to determine the relationship between the use of Antidepressants, Mood medication, Anxiety medication, Stimulants and Sleeping pills. • In addition the study interested in examining the effects of the independent variables (gender, age, income, education and role) on both individual use of the medications and the multiple use of the medications.
The variables were: • Antidepressant use, • Mood medication use, • Anxiety medication use, • Stimulant use and • Sleeping pills use. • gender, • age, • income, • education and • Role – • Parent, worker, partner • Parent, partner • Parent, worker • worker, partner • worker only • Parent only • Partner only • No roles
The pie chart • An alternative to the bar chart • Draw a circle (a pie) • Divide the circle into segments with area of each segment proportional to fi or pi = fi /n
Example • In this study the population are individuals who received a head injury. (n = 22540) • The variable is the mechanism that caused the head injury (InjMech) with categories: • MVA (Motor vehicle accident) • Falls • Violence • Other VA (Other vehicle accidents) • Accidents (industrial accident) • Other (all other mechanisms for head injury)
Graphical and Tabular Display of Categorical Data. • The frequency table • The bar graph • The pie chart
The two way frequency table The c2 statistic Techniques for examining dependence amongst two categorical variables
Situation • We have two categorical variables R and C. • The number of categories of R is r. • The number of categories of C is c. • We observe n subjects from the population and count xij = the number of subjects for which R = i and C = j. • R = rows, C = columns
Example Both Systolic Blood pressure (C) and Serum Chlosterol (R) were meansured for a sample of n = 1237 subjects. The categories for Blood Pressure are: <126 127-146 147-166 167+ The categories for Chlosterol are: <200 200-219 220-259 260+
Example This comes from the drug use data. The two variables are: • Age (C) and • Antidepressant Use (R) • measured for a sample of n = 33,957 subjects.
Two-way Frequency Table Percentage antidepressant use vs Age
The c2 statistic for measuring dependence amongst two categorical variables Define = Expected frequency in the (i,j) th cell in the case of independence.
Proportion in column j for row i overall proportion in column j Justification
Proportion in row i for column j overall proportion in row i and
The c2 statistic Eij= Expected frequency in the (i,j) th cell in the case of independence. xij= observed frequency in the (i,j) th cell
Example: studying the relationship between Systolic Blood pressure and Serum Cholesterol In this example we are interested in whether Systolic Blood pressure and Serum Cholesterol are related or whether they are independent. Both were measured for a sample of n = 1237 cases
Expected frequencies In the case of independence the distribution across a row is the same for each rowThe distribution down a column is the same for each column
Standardized residuals The c2 statistic
Example This comes from the drug use data. The two variables are: • Role (C) and • Antidepressant Use (R) • measured for a sample of n = 33,957 subjects.
Two-way Frequency Table Percentage antidepressant use vs Role
Calculation of c2 The Raw data Expected frequencies
The Residuals The calculation of c2
Example • In this example n = 57407 individuals who had been victimized twice by crimes • Rows = crime of first vicitmization • Cols = crimes of second victimization