Crime and Demographics: an Analysis of LAPD Crime Data
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITY OF CALIFORNIA Los Angeles Crime and Demographics: An Analysis of LAPD Crime Data A thesis submitted in partial satisfaction of the requirements for the degree Master of Science in Statistics by Bianca Cung 2013 © Copyright by Bianca Cung 2013 ABSTRACT OF THE THESIS Crime and Demographics: An Analysis of LAPD Crime Data by Bianca Cung Master of Science in Statistics University of California, Los Angeles, 2013 Professor Robert Gould, Co-Chair Professor Frederic Paik-Schoenberg, Co-Chair The Los Angeles Police Department (LAPD) often faces the task of predicting crime before it happens to better safeguard the community. The LAPD has a historical record of over a million incidences. Statistical analysis of some of these incidences can aid the LAPD in crime prevention by identifying patterns and trends. The LAPD can then allocate resources accordingly. This thesis looks at crimes in Los Angeles from 2005 to 2009 though focuses on crimes in the most recent year. It uses clustering and regression techniques in addition to contingency tables and Chi-squared tests to find clear crime trends. Historical weather data and demographic data from the U.S. 2010 Census are included as part of the analysis in order to determine some external factors that may affect crime. This paper looks particularly at trends over the course of the year as well as victim characteristics. ii This thesis of Bianca Cung is approved. ___________________________________________________ Yingnian Wu ___________________________________________________ Frederic Paik Schoenberg, Committee Co-Chair ___________________________________________________ Robert Gould, Committee Co-Chair University of California, Los Angeles 2013 iii TABLE OF CONTENTS List of Figures .................................................................................................................................v List of Tables ............................................................................................................................... vii 1 Introduction ........................................................................................................................1 2 The Three Datasets ............................................................................................................2 3 Crime Type Overview........................................................................................................6 3.1 Crime Over the Year ................................................................................................6 3.2 When Crime Happens ............................................................................................10 3.3 Holidays .................................................................................................................17 3.4 Where Crime Happens ...........................................................................................22 4 U.S. Census .......................................................................................................................24 4.1 Population and Crime ............................................................................................26 4.2 Density, Unemployment, and Poverty ...................................................................29 4.3 Gender ....................................................................................................................33 4.4 Ethnicity .................................................................................................................35 5 Clustering..........................................................................................................................38 5.1 AGNES Clustering.................................................................................................38 5.2 k-Means Clustering ................................................................................................43 5.3 Cluster Findings .....................................................................................................51 6 Concluding Remarks .......................................................................................................54 6.1 Conclusion .............................................................................................................54 iv 6.2 Future Studies ........................................................................................................55 Appendix A: Map of Los Angeles ..................................................................................57 References .........................................................................................................................58 v LIST OF FIGURES 2.1 Bar Chart of Crime Types by Available or Missing ZIP Code ...........................................5 2.2 Bar Chart of Victim Ethnicity by Available or Missing ZIP Code .....................................5 3.1 Frequency of Crime Start Times by Crime Type in 2009 .................................................10 3.2 Frequency of Crime Start Times by Day of the Week in 2009 .........................................11 3.3 Proportion of Crime Types by Day of the Week in 2009 ..................................................11 3.4 Proportion of Crime Types by Month in 2009...................................................................13 3.5 Average Crimes per Day Across Months in 2005-2009 ....................................................13 3.6 Crimes per Day in 2005-2009 ............................................................................................14 3.7 Density of Crimes per Day Across Months in 2005-2009 .................................................14 3.8 Crimes per Day in 2005-2009 with First Day of the Month Removed ............................16 3.9 Difference in Expected and Actual Crimes per Day in 2005-2009 ...................................16 3.10 Crime Time Proportions of Sundays and Mondays ..........................................................18 3.11 Crime Type Histogram of Sundays and Mondays ............................................................18 3.12 Kernel Smoothed Estimates for Number of Recorded Crimes by Day of the Week ........20 3.13 Bar Chart of Crime Types in 21 Areas in 2009 .................................................................23 4.1 Histogram of Population for 133 ZIP code areas ..............................................................25 4.2 Histogram of Total Crimes per ZIP Code .........................................................................26 4.3 Linear Model of Crime from Population Total .................................................................26 vi 4.4 The 91205 Zip Code .........................................................................................................28 4.5 Histogram of Total Crimes per ZIP Code (Fully in Los Angeles) ....................................29 4.6 Linear Model of Crime from Population Total (Fully in Los Angeles) ............................29 4.7 Scatterplot for Density, Unemployment, and Poverty ......................................................30 4.8 Histogram of Crimes per Square Mile ..............................................................................31 4.9 Histogram of Crimes per Thousand People ......................................................................33 5.1 AGNES Five-Cluster Density Characteristics ..................................................................41 5.2 Comparison of Clusters in k-Means Clustering with k = 2 ................................................44 5.3 Clusters in k-Means Clustering Starting with Rain vs. No Rain Center ...........................47 5.4 Cluster Summaries from k-Means Clustering with k = 5 ...................................................48 5.5 k-Means Clustering with k = 2 on Demographic Background ..........................................49 5.6 k-Means Clustering with k = 5 on Demographic Background ..........................................53 A Map of Los Angeles ..........................................................................................................57 vii LIST OF TABLES 3.1 Crime Type Overall Frequency ..........................................................................................7 3.2 Projecting Crime over the Year ..........................................................................................8 3.3 Prediction by Day of Week .................................................................................................9 3.4 Chi-Square Test for Differences in Crime Frequency on Weekdays and Weekends .......12 3.5 Top 10 Common Crime Premises in 2009 .........................................................................23 4.1 Demographic and Victim Summary .................................................................................25 4.2 LAPD Crime Count for ZIP Codes Outside of Los Angeles in 2009 ................................27 4.3 Regression Models for Number of Crimes in 2009 ...........................................................30 4.4 Comparison of High Crime Areas and Low Crime Areas ................................................32 4.5 Victims by Crime and Gender ..........................................................................................34 4.6 Difference in Proportion Test for Victims According to Background .............................35 4.7 Victims by Crime and Ethnicity .......................................................................................36 4.8 Victim Proportion Excluding ZIP Codes with