Kratom and Violent Crime

Author

J.D. Dato

Kratom and Crime

Consider that this data set is an example and not reflective of any real relationship that could exist between Kratom and crime

Machine Learning Decision Tree

This decision tree was created by letting the computer discover what variables lead to changes in violent crime.

To read a tree like this, start at the top. The algorithm determined that the variable of interest was the Total Sales. Node 1 has a p-value of less than 0.001, indicating that the finding here is statistically significant. We can proceed to Node 2 if the Kratom shop we’re using to predict the violent crime rate has total sales less than or equal to 3407 or Node 5 if the total sales are more than that.

Let’s say that we are looking at a Kratom shop in the real world, with total sales are 1850. After moving from Node 1 to Node 2, there’s only so much else we can do. Although Node 3 and Node 4 can predict the violent crime rate, since these two fall under Node 2, they are not helpful because the p-value is greater than 0.05. This means that these results have NO STATISTICAL SIGNIFICANCE.

However, suppose a real-world Kratom Shop’s total sales were above 3407. In that case, we can reliably predict the violent crime rate based on this dataset because the p-value of Node 1 is way less than 0.05.

Suppose the shop in question’s total sales were 3560, for example. In that case, we could estimate that the weekly violent crime rate would be between 600 and 800, possibly even 1000.

3-D Scatterplot

This data set is by David Maillie.

This 3D Scatterplot set shows a possible relationship between violent crimes and Kratom sales in/around a local head shop. The colors show how many transactions were made in one day. The Z-axis (up-down), shows the level of violent crime. The Y and X axis show the Units of Kratom sold, and the dollar amount of total sales, respectively. 3D Visualizations are a great way to show 3+ variables all at once, in a way that is still simple to understand.

Correlation Matrix

This is a correlation matrix. Each square represents the pearson correlation r value between the two intersecting variables. The strength/direction of the correlation can be determined from viewing the legend on the right side and comparing it to the square representing the variables in question.