A machine learning engineer is performing exploratory data analysis on a house_price column, which is a continuous numeric feature. They want to understand the shape of its distribution — specifically whether it is approximately normal, right-skewed, or multimodal. Which visualization is most appropriate?
Answer & explanation
Correct answer: E
WHY E: Histograms are the standard and most appropriate visualization for continuous features. By dividing the value range into bins and showing the count per bin, a histogram directly reveals whether the distribution is symmetric, skewed, or multimodal. PySpark's native .plot.hist() (available in Databricks Runtime 17.0+ / Spark 4.0+) and pandas .hist(), for example df_pd['house_price'].hist(bins=30) after converting to Pandas, both support this.
WHY NOT A: A bar chart of the top 20 most frequent values ignores the vast majority of the distribution and cannot reveal overall shape, skewness, or multimodality.
WHY NOT B: Pie charts are inappropriate for high-cardinality continuous data; with thousands of unique price values, every slice is invisibly thin and no distributional insight can be gained.
WHY NOT C: A scatter plot against the row index reflects data entry order, not the statistical distribution shape; it cannot reliably detect skewness or modes.
WHY NOT D: While box plots usefully summarize the five-number summary and flag outliers, they cannot detect multimodality (multiple peaks) and do not show the full shape of the distribution; a histogram is necessary for that purpose.