← seanbair.ai
A.I. in Policing, a book by Sean Bair
Reader resources

A.I. in Policing

The book tells you how these methods work. This page is where you try them. Practice data, hands-on exercises tied to the chapters, and the tools I point to in the book.
For readers of A.I. in Policing: The Rise of A.I. in the Fight Against Crime by Sean Bair (BYU Academic Publishing)

Practice on a real workstation

Reading about pattern analysis only takes you so far. At some point you have to load the incidents and go find the series yourself.

The exercises below use MICHAEL (Machine Intelligence Complementing Human Analysts on Every Lead), a crime and intelligence analysis workstation from my company, BAIR Systems. So yes, weigh my opinion of it accordingly. It runs on your own Windows computer, works with no internet connection, and comes with a free trial. Request one and the download link comes by email.

The practice data

Two files with the same structure, built for teaching. Every person, phone number and plate in them is invented (the phones all use the reserved 555 prefix), and there are no photographs. Street names are real Phoenix arterials with made-up block numbers.

The patterns in them were planted on purpose: crews, a series, a fence, an offender's anchor point, and a few data problems. That means there is a right answer to find, and the tool doesn't get the last word. Import either file into MICHAEL as a CSV.

Teaching set

69 records, four crews. Small enough to put on a screen and trace every link by eye. Start here.

michael-teaching-set.csv (18 KB)

Practice set

828 records, the same kinds of structure, many more crews. Too big to eyeball; you'll need the tools. Try it on your own once the teaching set makes sense.

michael-practice-set.csv (210 KB)

Exercises

Each one goes with a chapter. They tell you what to find, not which buttons to press; the software changes faster than the book does, and figuring out how to ask the question is half the job. Work them in this order if you can. Instructors can request the answers (see below).

Chapter 25 · Data capture 1. Clean it before you trust it Every analysis starts with the data, and this data has problems.

Load the teaching set and look at it before you analyze anything.

  1. Some incidents were entered twice under different case numbers. Find them.
  2. Some records have an address but no coordinates. How many? Put the data on the map and count what's missing.
  3. Geocode the records that need it, and check the map again.
Think about itNothing warned you those records were missing from the map. What would a hot spot map built on this data have told a commander?
Teaching setData gridEnhance
Chapters 5 and 24 · Link analysis 2. The person nobody noticed The most important person in a network isn't always the one with the most connections.

Build a network from the teaching set, linking cases that share a suspect, a vehicle or a phone.

  1. How many crews are there? Which suspects belong to each?
  2. Find the person who works with two crews. Then find the link between two crews that share no person at all. What is it?
  3. Size the network by number of connections, then by betweenness. One person nearly disappears in the first view and jumps to the top in the second. Who, and why?
Think about itChapter 5 separates facts from inferences. Which of your answers are facts in the data, and which are inferences you'd need to confirm before writing them in a bulletin?
Chapters 6 and 22 · Pattern detection 3. The series the network can't see Five burglaries, five different suspects, no shared car or phone. One signature.

The network from Exercise 2 links cases through people and things. Some series only show up in how the crime was done.

  1. Read a few burglary narratives in the teaching set. Look for a method of entry that repeats.
  2. Search the narratives for two words that appear close together in that method. Which cases come back?
  3. Check those cases against the network. Are they linked there?
Think about itChapter 22 is about seeing what isn't there. If you had only run the network, what would you have concluded about these five cases?
Teaching setNarrative searchHow narrative search works →
Chapters 3 and 13 · Forecasting 4. When is the next one? One offender, seven burglaries, a steady rhythm.

One suspect in the teaching set appears on nothing but a run of residential burglaries.

  1. Find that suspect and filter to their cases.
  2. How many days usually pass between events? How consistent is it?
  3. Forecast the next event. Write down the window you would give patrol, and how confident you are.
Think about itMICHAEL forecasts a time window and an area, never a single pin on a map and never a person. Using Chapter 3, explain why that design choice matters, and what could go wrong if a tool did the opposite.
Chapters 2 and 13 · Geographic profiling 5. Where does the crew start from? One crew's offenses circle a point they never hit. Find the point.

Chapter 2 mentions Kim Rossmo's work on geographic profiling. One crew in the teaching set was built around a hidden anchor point.

  1. Map the crews. Which one looks like it surrounds an empty center?
  2. Run a geographic profile on that crew alone. Record the coordinate of the peak.
  3. Now run it on all the crews at once. What happens to the surface?
Think about itYour instructor knows the true anchor and can score you in meters. Why does a profile need the right cases going in, and who decides which cases belong to a series?
Chapter 3 · Bias and statistics 6. A real relationship and a null one Learn what a significant result looks like by putting it next to one that isn't.

Run a chi-square test twice on the teaching set.

  1. Premise against crime type. Is there a relationship? Does it make sense?
  2. Suspect race against crime type. Is there one?
  3. Find the two records with losses far above everything else. Do two different outlier methods agree?
This data was built so that race and sex have no relationship with offense type. The generator checks that before it writes the file.
Think about itSuppose a training set had quietly tied race to offense type. Trainees would "discover" it, and the tool would seem to confirm it. Where in your own agency's data could that happen without anyone intending it?
Teaching setStatisticsHow the statistics work →
Chapter 19 · Proving value 7. Places and change Which addresses carry the load, and which beat just spiked?
  1. Run an 80/20 analysis by address. Three addresses hold far more than their share. What kind of place is each one?
  2. Which of the three looks like a risky facility, and which looks like a repeat victim?
  3. Compare the last two 28-day periods by beat. Which beat changed the most? Is the change bigger than chance, and did the whole city rise with it?
Think about itChapter 19 is about showing a chief or city manager what worked. If you put a problem-solving project at one of these three addresses, what would you measure, and over what period?
Teaching setStatistics
Chapter 24 · Data mining 8. On your own: the practice set 828 records. The same kinds of patterns, and a fraud ring with made-up numbers.

Load the practice set and repeat Exercises 1 to 7 without the training wheels. Then one more:

  1. Run Benford's Law on the loss values for the whole set. Then filter to fraud and run it again.
  2. How far from Benford's expected pattern is each result, compared with what you'd expect from clean data of the same size?
Think about itA small sample can fail a Benford test even when nothing is wrong. Before you call figures fabricated, what else would you want to see?
Practice setEvery view
Chapter 19 · Patrol workload 9. How many officers does a beat need? A year of sample dispatch records ships inside MICHAEL.

This one doesn't use the files above. Open the patrol workload view and load the sample dispatch extract that comes with MICHAEL.

  1. Which beat and watch carry the most committed time?
  2. Work out the staffing under two different policing models. How far apart are the answers?
  3. Write the one paragraph you'd hand a city manager. What does each answer cost?
Think about itThe staffing number changes with the model you choose. Who in your agency should choose it, and how would you explain that choice to the city council?
Built-in sampleWorkloadHow workload analysis works →

For instructors

If you adopt A.I. in Policing for a course, I can set your class up with MICHAEL licenses. I can also send the answer key for these exercises. It is generated from the same script that planted the findings, so it always matches the data, and it includes a suggested 90-minute session plan.

Chapter 21 is about teaching technology so it sticks. For these exercises, my advice is simple: teach on the small set, where nobody has to take the tool's word for anything, and then hand out the big one.

More resources

Free guides on this site that go with the book. The full list of outside tools, training and organizations is in Appendix C.