CPA Data Analytics 2 — Questions and Answers
Question 1: Which measure of central tendency is most resistant to the effect of outliers?
- Mean
- Median (Correct answer)
- Mode
- Range
Correct answer: Median
The median is resistant to outliers because it depends only on the middle value(s), not the magnitude of extreme values.
Question 2: In a dataset with values [2, 4, 4, 6, 8, 10], what is the interquartile range (IQR)?
- 4 (Correct answer)
- 5
- 6
- 8
Correct answer: 4
Q1=4, Q3=8, so IQR = Q3 - Q1 = 8 - 4 = 4.
Question 3: What does a correlation coefficient of -0.95 indicate?
- Weak negative relationship
- Strong positive relationship
- Strong negative relationship (Correct answer)
- No relationship
Correct answer: Strong negative relationship
A correlation coefficient close to -1 indicates a strong negative linear relationship between two variables.
Question 4: Which Python library is most commonly used for data manipulation and analysis using DataFrames?
- NumPy
- pandas (Correct answer)
- matplotlib
- scikit-learn
Correct answer: pandas
pandas provides the DataFrame structure and extensive data manipulation tools, making it the primary library for data analysis in Python.
Question 5: What is the purpose of the GROUP BY clause in SQL?
- Sort query results in ascending order
- Filter rows before aggregation
- Aggregate rows sharing the same column values (Correct answer)
- Join two or more tables
Correct answer: Aggregate rows sharing the same column values
GROUP BY groups rows with the same values in specified columns so aggregate functions like SUM or COUNT apply per group.
Question 6: In data analytics, what is 'data wrangling'?
- Visualizing data in charts
- Cleaning and transforming raw data into a usable format (Correct answer)
- Running statistical hypothesis tests
- Storing data in a relational database
Correct answer: Cleaning and transforming raw data into a usable format
Data wrangling (also called data munging) involves cleaning, structuring, and enriching raw data to make it suitable for analysis.
Question 7: Which type of chart is best suited for showing the distribution of a single continuous variable?
- Pie chart
- Scatter plot
- Histogram (Correct answer)
- Line chart
Correct answer: Histogram
A histogram divides a continuous variable into bins and shows the frequency of values within each bin, revealing the distribution shape.
Which measure of central tendency is most resistant to the effect of outliers?