MCPD Bias

Author

Matthew Lee

This chunk creates the linear regression model and the bargraph comparing the type of bias committed to the district it occurred in.

lm_model <- lm(`# of Victims` ~ `# of Suspects`, data = MCPD.Bias) 
summary(lm_model)

Call:
lm(formula = `# of Victims` ~ `# of Suspects`, data = MCPD.Bias)

Residuals:
    Min      1Q  Median      3Q     Max 
-1.2968 -0.1969 -0.1969 -0.1969  9.8031 

Coefficients:
                Estimate Std. Error t value Pr(>|t|)    
(Intercept)      0.97694    0.06447  15.154  < 2e-16 ***
`# of Suspects`  0.21998    0.04130   5.327 1.47e-07 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.7958 on 536 degrees of freedom
  (859 observations deleted due to missingness)
Multiple R-squared:  0.05028,   Adjusted R-squared:  0.0485 
F-statistic: 28.37 on 1 and 536 DF,  p-value: 1.474e-07
ggplot(MCPD.Bias, aes(x = District, fill = Bias)) +
  geom_bar() +
  labs(title = "Bias Incidents by District",
       x = "District",
       y = "Number of Incidents",
       fill = "Bias Type",
       caption = "Source: https://data.montgomerycountymd.gov/") +
  theme_minimal()

Districts: Rockville (1D), Bethesda (2D), Silver Spring (3D), Wheaton (4D), Germantown (5D), Montgomery Village (6D)

Departments: Gaithersburg City Police (GCPD), Rockville City Police (RCPD), Takoma Park Police (TPPD)

Because the data used in this project was collected efficiently using a standardized set of variables, it did not require any cleaning to present. The visualization represents the distribution of bias incidents across different districts, categorized by the type of bias reported. It allows us to identify districts with higher frequencies of bias incidents and explore the predominant types of biases reported in each district.