Databricks Certified Associate Developer for Apache Spark — Question 211

Which of the following operations calculates the simple average of a group of values, like a column?

Answer options

Correct answer: B

Explanation

The correct answer is B, as 'mean()' is the standard function used to calculate the simple average in many programming languages and data processing tools. While 'simpleAvg()' and 'average()' might suggest similar functionality, they are not standard functions for calculating the average. 'agg()' is typically used for aggregating multiple functions, and 'approxMean()' is for approximating the mean, not calculating the exact average.