An outlier is a data point that is far away from the rest of the dataset. Ouliers do not have a formal definition, but are easy to determine by looking at histogram. The histogram below shows an example of an oulier. There is one datapoint that is much larger than the rest.
If you see an outlier in your dataset, it’s worth reporting and investigating. This data can often indicate an error in your data or an interesting insight.
Using the following lines of code, we found the values for the outlier of our dataset. It is the same value as our maximum. Replace the relevant
????????? with the maximum value in summary.txt, and the hospital it correspends to (see below).
The median is $81,083:
cp_data[' Average Covered Charges '].max()
The hospital that charges the most for a chest pain emergency is Bayonne Hospital Center in New Jersey.