### Question:
StoreLocationIncomePDF implements ProbabilityDensityFunction<Location> { @Override public double probability(Location datum) { double weight = incomeWeight(datum); return weight / this.incomeNormalizationFactor; } StoreLocationIncomePDF(List<Location> zipcodeTable, double incomeScalingFactor); @Override double probability(Location datum);  }### Answer:
@Test public void testProbability() throws Exception { List<Location> zipcodes = Arrays.asList(new Location[] { new Location("11111", Pair.of(1.0, 1.0), "AZ", "Tempte", 30000.0, 100), new Location("22222", Pair.of(2.0, 2.0), "AZ", "Phoenix", 45000.0, 200), new Location("33333", Pair.of(3.0, 3.0), "AZ", "Flagstaff", 60000.0, 300) }); StoreLocationIncomePDF pdf = new StoreLocationIncomePDF(zipcodes, 100.0); for(Location record : zipcodes) { assertTrue(pdf.probability(record) > 0.0); } }