Courseiva

CompTIA Data+ (DA0-002) (DA0-002) — Questions 976986

986 questions total · 14pages · All types, answers revealed

Page 13

Page 14 of 14

976
MCQmedium

A data analyst needs to show the relationship between advertising spend (in dollars) and monthly sales revenue (in dollars) for the past 12 months. Which chart type is most appropriate?

A.Scatter plot
B.Line chart
C.Bar chart
D.Pie chart
AnswerA

Correct. Scatter plots display the relationship between two continuous variables.

Why this answer

A scatter plot is used to visualize the correlation between two continuous variables.

977
MCQmedium

A data analyst discovers that the sales data for the current quarter shows a 15% increase in revenue. However, the analyst notes that the data does not include returns from the last week due to a system lag. How should the analyst communicate this uncertainty?

A.Delay the report until returns are processed.
B.Report the 15% increase as final, because the returns are insignificant.
C.Include a caveat that returns from the last week are missing and revenue may be overstated.
D.State that the revenue increase is exactly 15% and provide a confidence interval.
AnswerC

Disclosing the limitation is the correct approach.

Why this answer

When data has limitations, it's important to disclose them, such as missing returns, to avoid misleading conclusions.

978
MCQeasy

Which database index type is most commonly used for exact-match lookups and range queries in a B-tree structure?

A.B-tree index
B.Hash index
C.Clustered index
D.Bitmap index
AnswerA

B-tree indexes support both exact-match and range queries.

Why this answer

A B-tree index is the correct answer because it maintains sorted data in a balanced tree structure, enabling both exact-match lookups (via equality searches) and efficient range queries (via ordered traversal of leaf nodes). This dual capability makes it the standard index type in relational databases like MySQL, PostgreSQL, and Oracle for general-purpose querying.

Exam trap

The trap here is that candidates often confuse 'clustered index' as a separate index type, but it is actually a physical implementation of a B-tree where the leaf nodes contain the full row data, not a different algorithmic structure.

How to eliminate wrong answers

Option B (Hash index) is wrong because hash indexes use a hash function to map keys to bucket locations, which is extremely fast for exact-match lookups but does not support range queries (e.g., BETWEEN, >, <) since the hash order does not preserve key order. Option C (Clustered index) is wrong because while a clustered index physically reorders table data based on the index key and can support range queries, it is not a distinct index type but rather a storage organization; the underlying structure is still a B-tree, and the question asks for the index type most commonly used for both operations, which is the B-tree itself. Option D (Bitmap index) is wrong because bitmap indexes store bitmaps for each distinct key value and are optimized for low-cardinality columns and complex boolean queries, not for efficient range scans or exact-match lookups in high-cardinality scenarios.

979
Multi-Selectmedium

A data analyst is preparing a dataset for analysis and needs to handle outliers. Which TWO of the following are common methods for treating outliers?

Select 2 answers
A.Removal
B.Capping
C.Normalization
D.Imputation
E.Standardization
AnswersA, B

Removing outlier records is a common approach.

Why this answer

Capping (winsorizing) limits extreme values, and removal simply deletes outlier rows. Transformation (e.g., log) can also reduce impact but is not listed here; normalization and imputation are not primary outlier treatments.

980
Multi-Selecteasy

A data analyst is using pandas to clean a DataFrame that contains missing values in the 'age' and 'income' columns. Which THREE pandas methods are appropriate for handling missing data? (Select THREE).

Select 3 answers
A.dropna()
B.pivot_table()
C.merge()
D.apply() with a custom function
E.fillna()
AnswersA, D, E

Removes rows with missing values.

Why this answer

Common pandas methods for missing data include dropna (remove rows with NaN), fillna (replace NaN with a value), and apply with a custom function. Merge is for combining DataFrames; pivot_table is for reshaping.

981
MCQmedium

A healthcare analytics team is analyzing patient readmission rates. They have a dataset with thousands of records including patient age, diagnosis, length of stay, number of prior admissions, and discharge date. The goal is to identify key factors influencing readmission and create a model to predict high-risk patients. The data is imbalanced: only 5% of patients are readmitted within 30 days. The team plans to use logistic regression. What is the most appropriate approach?

A.Use the dataset as is because logistic regression handles imbalance
B.Remove most of the non-readmitted patients to balance the dataset
C.Use accuracy as the evaluation metric
D.Apply oversampling techniques like SMOTE to the training set
AnswerD

Oversampling balances the classes, improving model performance on the minority class.

Why this answer

With imbalanced data, logistic regression can be biased toward the majority class. Oversampling the minority class (e.g., SMOTE) helps the model learn patterns for readmission. Using accuracy as a metric would be misleading.

Removing majority samples discards valuable data. Using data as-is often fails to predict the minority class.

982
Multi-Selecthard

An e-commerce company wants to analyze sales performance across product categories. The dataset includes transaction amounts and a column 'category' with values (Electronics, Clothing, Home). The analyst decides to use stratified sampling to ensure proportional representation. Which THREE steps are required to implement this? (Select THREE).

Select 3 answers
A.Calculate the proportion of each category in the population
B.Take a random sample from each stratum with size proportional to its population proportion
C.Divide the dataset into three strata based on category
D.Select every 10th transaction from the entire dataset
E.Combine all categories into a single group and perform simple random sampling
AnswersA, B, C

Proportions are needed to determine sample sizes per stratum.

Why this answer

Stratified sampling requires dividing the population into strata (categories), then randomly sampling from each stratum in proportion to its size. Combining strata or simple random sampling without stratification would not achieve proportional representation.

983
MCQmedium

A data analyst wants to find customers whose last name starts with 'Mc' and have made purchases in 2023. The purchase table has a purchase_date column. Which SQL query accomplishes this?

A.SELECT * FROM customers WHERE last_name LIKE 'Mc_' AND YEAR(purchase_date) = 2023;
B.SELECT * FROM customers WHERE last_name LIKE '%Mc%' AND purchase_date = 2023;
C.SELECT * FROM customers WHERE last_name = 'Mc%' AND YEAR(purchase_date) = 2023;
D.SELECT * FROM customers c JOIN purchases p ON c.id = p.customer_id WHERE last_name LIKE 'Mc%' AND p.purchase_date BETWEEN '2023-01-01' AND '2023-12-31';
AnswerD

Correct use of LIKE, JOIN, and date range.

Why this answer

The correct query (option D) joins the customers and purchases tables on customer ID to link customers with their purchases. It uses `LIKE 'Mc%'` to match last names starting with 'Mc' (the wildcard '%' matches any sequence of characters) and filters purchase dates within the year 2023 using `BETWEEN '2023-01-01' AND '2023-12-31'`. Options A, B, and C are incorrect: A uses `LIKE 'Mc_'` which matches exactly two characters after 'Mc', not any sequence; B uses `LIKE '%Mc%'` which matches 'Mc' anywhere in the name, not just the beginning; C uses `= 'Mc%'` which treats the wildcard as a literal character; and all three fail to join the purchases table, so they cannot filter by purchase date.

984
MCQhard

A data engineer is designing a data warehouse for a multinational corporation. The company has sales data from different regions with varying currencies and date formats. To ensure consistency, which data concept should be applied to standardize the data before loading into the warehouse?

A.Data cleansing
B.Data transformation
C.Data profiling
D.Data masking
AnswerB

Transformation includes standardization of formats.

Why this answer

Data transformation is the correct concept because it involves converting data from source formats (e.g., different currencies and date formats) into a consistent, standardized format before loading into the data warehouse. This process includes applying conversion rules, such as using ISO 8601 for dates and a single base currency (e.g., USD) with exchange rate tables, ensuring uniformity across all regional data. Without transformation, the warehouse would contain incompatible data types, breaking referential integrity and analytical queries.

Exam trap

CompTIA often tests the distinction between data cleansing and data transformation, where candidates mistakenly choose cleansing because they think fixing formats is about 'cleaning' data, but cleansing addresses errors and missing values, not structural conversions like currency or date standardization.

How to eliminate wrong answers

Option A is wrong because data cleansing focuses on detecting and correcting inaccuracies, inconsistencies, or missing values (e.g., removing duplicates or fixing typos), not on converting data types or formats like currencies and dates. Option C is wrong because data profiling is an exploratory process that analyzes source data to understand its structure, quality, and relationships (e.g., checking data types or null percentages), but it does not perform any standardization or conversion. Option D is wrong because data masking is a security technique used to obfuscate sensitive information (e.g., replacing credit card numbers with tokens) for privacy or compliance, and it has no role in standardizing currencies or date formats.

985
MCQeasy

A data analyst calculates the mean, median, and mode of a sales dataset and finds they are all equal. Which type of distribution does this indicate?

A.Normal distribution
B.Skewed right
C.Bimodal distribution
D.Skewed left
AnswerA

Normal distribution has equal mean, median, and mode.

Why this answer

When mean, median, and mode are equal, the distribution is symmetric and typically bell-shaped (normal).

986
MCQhard

A logistics company is analyzing truck delivery times. Which variable is discrete?

A.Number of stops
B.Time taken in hours
C.Fuel consumption in liters
D.Distance traveled
AnswerA

Correct. The number of stops is a count and therefore discrete.

Why this answer

A discrete variable is one that takes on a countable number of distinct values, often integers. The number of stops a truck makes is a count (e.g., 0, 1, 2, 3) and cannot be a fraction, making it a classic discrete variable in data analysis.

Exam trap

The trap here is that candidates confuse 'recorded as an integer' with 'discrete'—for example, thinking distance in whole kilometers is discrete, when the underlying measurement scale is continuous.

How to eliminate wrong answers

Option B is wrong because time taken in hours is a continuous variable—it can be measured to any fractional precision (e.g., 2.5 hours, 3.75 hours). Option C is wrong because fuel consumption in liters is continuous; it can take any value within a range (e.g., 45.3 liters). Option D is wrong because distance traveled is continuous, as it can be measured in fractional units (e.g., 120.7 km).

Page 13

Page 14 of 14