Home / ML Associate practice test / Data Processing / Question

Databricks Machine Learning Associate · free practice question

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…

Exam-style question on Data Processing from the free ML Associate practice test, with the answer and a full explanation below.

Updated November 10, 2026

Data Processing

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?

  1. AA bar chart of the 20 most frequent house_price values, for example from df.groupBy('house_price').count() — ranking the commonest price points as categories exposes skew and multiple modes
  2. BA pie chart showing each unique house_price value as a share of the dataset — the relative size of each slice exposes which price points dominate and whether the distribution has several modes
  3. CA scatter plot of house_price against the DataFrame row index — plotting each price in sequence exposes the spread of the values and whether the distribution is skewed or has several modes
  4. DA box-and-whisker plot of house_price with no histogram alongside — the median, interquartile range, and whisker bounds expose skew, outlier tails, and multiple modes in the distribution
  5. EA histogram that groups house_price into bins and shows the count per bin, for example df.plot.hist(column='house_price', bins=30) — adjacent frequency bins expose skew, tails, and multiple modes
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.

Take the full ML Associate practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Machine Learning Associate practice test. Take it and get a section-by-section score.

Start the free test →