Police Shootings

Let $R$ denote a person's race, $S=\{0,1\}$ indicate death by police shooting

The Washington Post database allows us to measure the number of fatalities in police shootings by race in other words, in terms of probabilities $P(R=r|S=1)$. The probability $P(R=r|S=1)$ can be estimated as: $$ P(R=r|S=1) \approx \frac{\text{count}(R=r,S=1)}{\text{count}(S=1)} $$

Typically, the percentage above is typically reported as a counterargument for police violence against people of color. For example, former Arkansas governor Mike Huckabee stated, “More white people have been shot by police officers this past year than minorities.”

Yet some inference can be carried out to estimate the relative size of the probabilities $P(S=1|R=r)$. Using Bayes rule,

$$P(S=1|R=r)=\frac{P(R=r|S=1)P(S=1)}{P(R=r)}$$

The relative values of probabilities can be compared with bit of math. $$\frac{P(S=1|R=r')}{P(S=1|R=r'')} = \frac{P(R=r'|S=1)P(R=r'')}{P(R=r''|S=1)P(R=r')}$$

$P(R|S)$ is estimated from the Washington Post database, and $P(R)$ is data that can be obtain from US census data. From the computation below, one can see given your a black person that the probability of being shot by the police approximately 2.4 times greater if you were white. Similar effect occurs when inspecting the same rate for Latinos.


In [22]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot')

%matplotlib inline

df_police=pd.read_csv('./data-police-shootings-master/fatal-police-shootings-data.csv')

In [24]:
#print df_police['manner_of_death'].unique()


p_w=.616
p_b=.133
p_h=.176
p_n=.02

df_shot=df_police[(df_police['manner_of_death']=='shot') | (df_police['manner_of_death']=='shot and Tasered')]
total_shootings=float(len(df_shot.index))

w_shootings=len(df_shot[df_shot['race']=='W'].index)
b_shootings=len(df_shot[df_shot['race']=='B'].index)
h_shootings=len(df_shot[df_shot['race']=='H'].index)
n_shootings=len(df_shot[df_shot['race']=='N'].index)

p_ws=w_shootings/total_shootings
p_bs=b_shootings/total_shootings
p_hs=h_shootings/total_shootings
p_ns=n_shootings/total_shootings


print "P(R=W|S=1)=%f" % (p_ws)
print "P(R=B|S=1)=%f" % (p_bs)
print "P(R=H|S=1)=%f" % (p_hs)
print "P(R=N|S=1)=%f" % (p_ns)
print "P(S=1|R=B)/P(S=1|R=W) ratio %f" % ((p_w/p_b)*p_bs/p_ws )
print "P(S=1|R=H)/P(S=1|R=W)  ratio %f" % ((p_w/p_h)*p_hs/p_ws )
print "P(S=1|R=N)/P(S=1|R=W) ratio %f" %  ((p_w/p_n)*p_ns/p_ws)


P(R=W|S=1)=0.485733
P(R=B|S=1)=0.255474
P(R=H|S=1)=0.167220
P(R=N|S=1)=0.011944
P(S=1|R=B)/P(S=1|R=W) ratio 2.436008
P(S=1|R=H)/P(S=1|R=W)  ratio 1.204918
P(S=1|R=N)/P(S=1|R=W) ratio 0.757377

In [ ]: