Here we are working to filter pandas data frames. We’d like to use the property value column in the dataset to do some computation and show visualizations in the future. We use comparison operators to only pull property values less than 500000 in the data set and store it in the variable called lower_prices.

Next we’d like to use the tract_minority_population_percent column in the dataset to do some computation and show some visualizations in the future. We use comparison operators to only pull the minority population percentages greater than 75 percent in the data set and store it in the variable called high_minority.

In the final line of code, we’d like to use the tract_minority_population_percent column in the dataset to do some computation and show some visualizations in the future. We use comparison operators to only pull the minority population percentages less than 25 percent in the data set and store it in the variable called low_minority.

No output means nothing went wrong.

By importing matplotlib.pyplot, we gain access to different graphs that can help us to visualize the dataset. Using our pre defined variables we can plot a histogram to show the distribution of data for 2018 home mortgage applications . Was there a high percentage of minorities applying for home mortgages with a property value close to 200000?

With the output of the graph the legend can guide you towards finding what property value mortgage applications had a high or low minority percentage of applicants.

In the next line of code we want to find the mean of two of the variables we already defined. This will help us to understand the correlation between the variables.

With the output we can understand what the mean of the two different variables looks like. Are they similar, far apart, or the same?

doing a null hypothesis test will help us to decide between the interpretation of whether these two means are the same or different. Scipy allows us to do a statistical test.

In this output, H0 = mean property value is the same for high or low % minority tracts would be rejected because the p-value is less than alpha.