Courseiva

CCNA Exploratory Data Analysis Questions

75 of 381 questions · Page 2/6 · Exploratory Data Analysis topic · Answers revealed

76
MCQhard

A data scientist is performing EDA on a dataset with missing values in 3 of 20 features. The missing rate is 5% for each feature. The scientist wants to preserve as much data as possible while avoiding bias. Which imputation strategy is most appropriate?

A.Remove rows with any missing values.
B.Impute missing values with the mean of each feature.
C.Use K-Nearest Neighbors (KNN) imputation.
D.Impute missing values with the median of each feature.
AnswerD

Median imputation is robust to outliers, preserves the dataset size, and is a simple, effective method for low missing rates (5% per feature).

Why this answer

Median imputation (Option D) is the most appropriate because it preserves the dataset size, is robust to outliers, and avoids bias introduced by more complex methods. Removing rows (Option A) would discard approximately 14% of the data if missing patterns are independent, unnecessarily reducing sample size. Mean imputation (Option B) is sensitive to outliers, which could skew the distribution.

KNN imputation (Option C) may introduce bias if the neighborhood size is not properly tuned and is computationally expensive for large datasets. Therefore, median imputation provides a simple, robust solution that maintains data integrity.

77
MCQmedium

A data scientist is analyzing a dataset with missing values in 30% of the rows for the 'age' column. The data scientist decides to impute the missing values with the median of the observed 'age' values. What is a potential drawback of this approach?

A.The imputation will introduce bias if the missing values are not random.
B.Imputation using median is computationally expensive for large datasets.
C.The imputed values may reduce the variance of the 'age' distribution.
D.The imputed values will increase the variance of the feature, leading to overfitting.
AnswerC

Replacing missing values with a constant reduces the variability of the feature.

Why this answer

Imputing missing values with the median of the observed data artificially concentrates imputed values around the center of the distribution. This reduces the overall variance of the 'age' column because the imputed values do not reflect the natural spread of the data, potentially distorting downstream analyses like regression or clustering that rely on variance structure.

Exam trap

The MLS-C01 exam often tests the subtle distinction between bias (which is a general risk of any imputation under non-random missingness) and variance reduction (which is a specific, guaranteed statistical consequence of constant-value imputation).

How to eliminate wrong answers

Option A is wrong because while imputation can introduce bias if data are not missing at random (MNAR), the question specifically asks about a drawback of using median imputation; the bias concern is not unique to median imputation and is a general risk of any imputation method under MNAR, not the primary technical drawback described. Option B is wrong because computing the median is O(n) with efficient algorithms and is not computationally expensive even for large datasets; mean or median imputation is among the cheapest imputation methods. Option D is wrong because median imputation reduces variance, not increases it; increased variance would be a concern with methods like mean imputation with added noise, not with simple median imputation.

78
Multi-Selecteasy

Which TWO AWS services can be used to visualize data distributions as part of exploratory data analysis? (Select TWO.)

Select 2 answers
A.AWS Glue
B.Amazon QuickSight
C.Amazon Athena
D.Amazon Comprehend
E.Amazon SageMaker Data Wrangler
AnswersB, E

QuickSight provides interactive dashboards and visualizations.

Why this answer

Amazon QuickSight is a cloud-native business intelligence service that can visualize data distributions through histograms, box plots, scatter plots, and other chart types, making it suitable for exploratory data analysis. Amazon SageMaker Data Wrangler provides a visual interface to create data distribution charts (e.g., histograms, bar charts) directly within the data preparation workflow, enabling quick inspection of feature distributions before model building.

Exam trap

The MLS-C01 exam often tests the misconception that AWS Glue or Athena can visualize data distributions because they are used in data preparation or querying, but neither provides native charting or plotting capabilities—they only return raw data or tabular results.

79
Multi-Selectmedium

A data scientist is analyzing a dataset and finds that two features have a Pearson correlation coefficient of 0.95. Which TWO actions should the data scientist consider? (Choose two.)

Select 2 answers
A.Combine the two features into a single feature using PCA or averaging
B.Add interaction terms between the features
C.Increase regularization strength in the model
D.Remove one of the correlated features
E.Apply standard scaling to both features
AnswersA, D

Combining captures information from both while reducing dimensionality.

Why this answer

A Pearson correlation coefficient of 0.95 indicates strong multicollinearity between the two features. Multicollinearity can inflate coefficient variances and reduce model interpretability. Two standard remedies are to remove one of the correlated features (Option D) or to combine them into a single feature using techniques like PCA, averaging, or summing (Option A).

Option B (adding interaction terms) would introduce additional correlated terms and exacerbate multicollinearity. Option C (increasing regularization) can help stabilize coefficients but does not directly address the high pairwise correlation; it is often used as a secondary technique after feature selection or combination. Option E (standard scaling) does not change the correlation coefficient and therefore does not mitigate multicollinearity.

80
MCQeasy

A machine learning engineer is performing exploratory data analysis on a dataset containing customer transaction records. The dataset includes a column 'transaction_date' with timestamps. The engineer wants to derive features such as day of the week, hour, and month for modeling. Which AWS service can be used directly to extract these features without writing custom code?

A.AWS Glue ETL with built-in timestamp transforms
B.Amazon Athena with SQL date functions
C.Amazon QuickSight
D.Amazon SageMaker Data Wrangler
AnswerA

AWS Glue provides transforms like 'ExtractTimestamp' to derive date components without custom code.

Why this answer

AWS Glue ETL provides built-in transforms like `ExtractTimestamp` that can parse timestamps and extract date/time components (e.g., day of week, hour, month) without writing custom code. Option B is wrong because Amazon Athena requires writing SQL queries to extract date parts, which constitutes custom code. Option C is wrong because Amazon QuickSight is a BI visualization tool, not designed for feature engineering.

Option D is wrong because Amazon SageMaker Data Wrangler, while offering visual transformations, requires an active SageMaker Studio environment and is not a serverless ETL service like AWS Glue.

81
MCQhard

A data scientist is performing EDA on a dataset containing text reviews. To understand the most common words, the data scientist generates a word cloud. Which preprocessing step is most important to ensure the word cloud reflects meaningful content?

A.Stop word removal
B.Part-of-speech tagging
C.Stemming
D.Tokenization
AnswerA

Stop word removal eliminates common, uninformative words.

Why this answer

Removing stop words (common words like 'the', 'and') ensures that the word cloud highlights meaningful content. Stemming (C) may not be necessary for a word cloud. Tokenization (D) is fundamental but not the most critical for meaningfulness.

POS tagging (B) is overkill.

82
Multi-Selectmedium

Which THREE techniques are commonly used in exploratory data analysis to understand the relationships between features and the target variable? (Select THREE.)

Select 3 answers
A.Use box plots to compare feature distributions across target classes.
B.Perform K-means clustering on the features.
C.Compute the correlation matrix between features and target.
D.Generate scatter plots or pair plots to visualize feature interactions.
E.Apply Principal Component Analysis (PCA) to reduce dimensions.
AnswersA, C, D

Box plots by class reveal differences in feature distributions.

Why this answer

Options A, C, and D are correct. Box plots (A) are useful for comparing feature distributions across different target classes, revealing differences that may indicate predictive power. Scatter plots or pair plots (D) allow visual inspection of relationships between features and the target, highlighting patterns, clusters, or outliers.

A correlation matrix (C) quantifies linear relationships between features and the target variable, helping identify strongly correlated features. B is incorrect because K-means clustering is an unsupervised technique used for grouping data, not for understanding feature-target relationships. E is incorrect because PCA is a dimensionality reduction technique, not a direct method for analyzing relationships between features and a target variable.

83
MCQeasy

A data scientist is exploring a dataset and wants to understand the distribution of a continuous feature. Which visualization is most appropriate for identifying skewness and potential outliers?

A.Bar chart
B.Scatter plot
C.Box plot
D.Heatmap
AnswerC

A box plot explicitly shows median, quartiles, and outliers, making it ideal for identifying skewness and potential outliers.

Why this answer

(bar chart) is wrong because bar charts are for categorical data, not for showing distribution of a continuous feature. Option B (scatter plot) is wrong because scatter plots show relationships between two variables, not distribution. Option C is correct because a box plot explicitly shows median, quartiles, and outliers.

Option D is wrong because heatmaps show correlations, not distribution.

84
MCQmedium

A data scientist is analyzing a dataset with a time series component. They suspect there is a weekly seasonality. Which technique should they use to confirm this?

A.Plot the time series line chart
B.Compute autocorrelation function (ACF)
C.Perform Fourier transform
D.Compute a 7-day moving average
AnswerB

Correct. ACF at lag 7 shows the correlation with the value 7 days earlier; a significant positive autocorrelation indicates weekly seasonality.

Why this answer

The autocorrelation function (ACF) measures the correlation between a time series and its lagged values. A significant spike at lag 7 confirms weekly seasonality. Option A (line chart) is subjective and not a definitive test.

Option C (Fourier transform) identifies frequency components but is more complex and less direct for confirming seasonality. Option D (moving average) smooths the series and may obscure seasonality.

85
Multi-Selecthard

A data scientist is analyzing a dataset of customer reviews. The dataset contains a text column 'review' and a numerical rating from 1 to 5. The data scientist wants to create features for sentiment analysis. Which THREE preprocessing steps should be applied to the text data before feature extraction? (Choose THREE.)

Select 3 answers
A.Standardize the text data using z-score normalization.
B.Apply stemming to reduce words to their root form.
C.Tokenize the text into individual words.
D.Convert all text to lowercase.
E.Remove common stop words (e.g., 'the', 'and', 'is').
AnswersB, D, E

Stemming groups related words, reducing feature dimensionality.

Why this answer

Stemming reduces words to their root form (e.g., 'running' to 'run'), which consolidates variations of the same word and reduces feature dimensionality. This is a standard preprocessing step before feature extraction in NLP tasks like sentiment analysis, as it helps the model generalize across different word forms.

Exam trap

The MLS-C01 exam often tests the distinction between preprocessing steps that are specific to text (like stemming, lowercasing, stop word removal) versus those meant for numerical data (like normalization), and candidates may mistakenly apply scaling techniques to text or forget that tokenization is a prerequisite but not always listed as a separate 'correct' step in multi-select questions.

86
Multi-Selectmedium

Which TWO techniques are appropriate for detecting outliers in a univariate numeric dataset?

Select 2 answers
A.Cook's distance
B.Mahalanobis distance
C.Z-score method
D.Interquartile range (IQR) method
E.DBSCAN clustering
AnswersC, D

Z-score flags points beyond a threshold (e.g., |z|>3).

Why this answer

Options C and D are correct. The Z-score method identifies outliers by measuring how many standard deviations a data point is from the mean; points with |Z| > 3 are often considered outliers. The Interquartile Range (IQR) method defines outliers as points falling below Q1 - 1.5*IQR or above Q3 + 1.5*IQR.

Option A (Cook's distance) is used in regression to identify influential points, not general univariate outlier detection. Option B (Mahalanobis distance) is a multivariate distance measure. Option E (DBSCAN) is a clustering algorithm that can identify outliers in multivariate space, but not specifically for univariate numeric data.

87
MCQhard

A data engineer is running an Amazon SageMaker Data Wrangler flow on a dataset with 5 million rows. The flow includes several transformations. The engineer wants to validate the data quality by checking for missing values and outliers before training. Which approach is most efficient?

A.Use Data Wrangler's data quality and insights report to generate a report with statistics and visualizations.
B.Export the transformed data to S3 and query with Amazon Athena.
C.Use Amazon EMR with Spark to compute statistics.
D.Import the data into Amazon QuickSight and create dashboards.
AnswerA

Data Wrangler has a built-in report for data quality.

Why this answer

Using Data Wrangler's built-in data quality and insights report is the most efficient way to get statistics and detect issues without custom code. Option B (Athena) requires writing SQL queries. Option C (QuickSight) needs exporting.

Option D (EMR) is overkill.

88
MCQmedium

A data scientist is analyzing a dataset with 100 features and 10,000 samples. The target variable is highly imbalanced (1% positive class). Which exploratory data analysis step is most critical before model training?

A.Apply PCA and visualize the first two principal components
B.Compute pairwise correlation matrix among all features
C.Impute missing values using mean imputation
D.Plot the histogram of the target variable
AnswerD

Plotting the histogram of the target variable directly shows the class distribution, confirming the severe imbalance (1% positive). This insight is crucial for deciding on resampling techniques, evaluation metrics, or algorithmic adjustments.

Why this answer

The most critical EDA step for a highly imbalanced target variable is to examine its distribution. Therefore, plotting the histogram of the target variable (D) reveals the imbalance and guides decisions on resampling or evaluation metrics. Option A (PCA) is primarily for dimensionality reduction and not essential for understanding target balance.

Option B (correlation matrix) examines feature relationships, not target distribution. Option C (mean imputation) addresses missing values, which is important but not the most critical for handling class imbalance.

89
MCQeasy

During EDA, a data scientist discovers that a numerical feature 'income' has a skewness of 3.5. Which transformation should the scientist apply to make the distribution more symmetric?

A.Standardization (Z-score)
B.Square transformation
C.Log transformation
D.Min-Max scaling
AnswerC

Log transformation compresses the tail and reduces right skewness.

Why this answer

A log transformation is commonly applied to right-skewed positive data to reduce skewness and make the distribution more symmetric. Option A is wrong because standardization (Z-score) centers and scales the data but does not change the shape of the distribution. Option B is wrong because a square transformation would increase skewness for right-skewed data.

Option D is wrong because min-max scaling rescales the data to a fixed range but does not alter the distribution's skewness.

90
MCQeasy

A data scientist is analyzing a dataset with 1,000 features. They suspect many features are redundant and want to reduce dimensionality before training a model. Which technique is most appropriate for identifying the most important features?

A.Apply principal component analysis (PCA) and select the top components
B.Use L1 regularization (Lasso) to shrink coefficients to zero
C.Train a random forest and remove features with low importance
D.Compute the correlation matrix and remove features with high correlation
AnswerB

L1 regularization (Lasso) is correct because it shrinks coefficients of less important features to zero, thereby selecting the most important original features.

Why this answer

L1 regularization (Lasso) is the most appropriate technique for identifying the most important features because it performs feature selection by shrinking the coefficients of less important features to zero, effectively selecting a subset of original features. This directly identifies which features are most relevant. PCA, while a dimensionality reduction technique, creates new components that are linear combinations of original features and does not identify the importance of original features.

Random forest feature importance and correlation matrix methods can identify redundant features but are less direct for selecting the most important subset.

Exam trap

Candidates often confuse dimensionality reduction with feature selection. PCA reduces dimensions by creating new features, whereas Lasso selects original features.

91
MCQhard

A company has a large dataset of customer transactions stored in Amazon Redshift. A data scientist wants to perform EDA using Python libraries like pandas and matplotlib. The dataset is too large to fit into memory on a single EC2 instance. What is the most efficient approach?

A.Launch an Amazon SageMaker notebook instance with an attached EBS volume large enough to hold the data
B.Use Amazon Athena Federated Query to run SQL queries against Redshift and retrieve aggregated results
C.Use a SQLAlchemy connection to read the entire table into a pandas DataFrame and sample it
D.Export the Redshift table to Amazon S3 in Parquet format, then use pandas to read the Parquet files
AnswerB

Amazon Athena Federated Query allows running SQL queries directly against Redshift, returning only aggregated results. This avoids moving the entire dataset and reduces memory usage on the notebook instance, making it the most efficient approach for EDA.

Why this answer

Amazon Athena Federated Query can query data in Amazon Redshift directly, allowing the data scientist to run SQL queries that aggregate the data before returning results. This avoids moving the entire dataset and reduces memory usage. Option A is wrong because even with a large EBS volume, the data must still be loaded into memory (pandas DataFrame) on the notebook instance, which may not fit.

Option C is wrong because using SQLAlchemy to read the entire table into a pandas DataFrame would require loading all data into memory, causing an out-of-memory error. Option D is wrong because exporting to S3 and then reading with pandas still requires loading the entire dataset into memory, which is inefficient for large datasets.

92
MCQmedium

A machine learning engineer is performing exploratory data analysis on a large dataset stored in S3 using Amazon Athena. The dataset contains a timestamp column 'event_time' of type string. The engineer wants to analyze daily trends. Which approach is the most cost-effective and efficient?

A.Create a view that casts the column to timestamp and query the view.
B.Use the CAST function in the SELECT statement to convert the string to timestamp.
C.Convert the data to Parquet format with a timestamp column and re-query.
D.Partition the table by date derived from the event_time string and query using partition filtering.
AnswerD

Partitioning the table by date derived from the event_time string allows Athena to use partition pruning, which significantly reduces the data scanned when querying daily trends, making it the most cost-effective and efficient approach.

Why this answer

Converting the string to a date type in the query allows Athena to use partition pruning if the table is partitioned by date, reducing scanned data. Option A is wrong because creating a view does not reduce data scanned; CAST still processes all rows. Option B is wrong because using CAST in the SELECT statement still scans all data.

Option C is wrong because converting to Parquet is beneficial but not the most direct for the given task.

93
Multi-Selectmedium

Which TWO of the following are appropriate techniques for handling missing data during exploratory data analysis? (Select TWO.)

Select 2 answers
A.Ignore missing values and proceed with modeling
B.Replace missing values with -1 to indicate missing
C.Impute missing values using mean or median for numerical features
D.Visualize the missing data pattern using heatmaps or bar charts
E.Delete all rows with any missing values
AnswersC, D

Mean/median imputation is a common EDA technique.

Why this answer

Options C and D are correct. Imputing missing values using mean or median for numerical features (C) is a common technique during EDA to preserve data size. Visualizing the missing data pattern with heatmaps or bar charts (D) helps understand the distribution and mechanism of missingness.

Option A is incorrect because ignoring missing values can introduce bias and lead to inaccurate models. Option B is incorrect because replacing with -1 may distort the data distribution and is not a standard practice. Option E is incorrect because deleting all rows with missing values can cause significant data loss, especially if missingness is not random.

94
MCQeasy

A data analyst is examining the distribution of a continuous variable and notices that its histogram is heavily skewed to the right. Which transformation should the analyst apply to make the distribution more symmetrical?

A.Box-Cox transformation with lambda=2.
B.Logarithmic transformation (log).
C.Standardization (z-score).
D.Square root transformation.
AnswerB

Log transformation reduces right skewness.

Why this answer

Logarithmic transformation compresses the long tail of right-skewed data, making the distribution more symmetrical. Option A (Box-Cox with lambda=2) is actually a square transformation, which would exacerbate right skewness. Option C (standardization) only centers and scales the data without altering the shape.

Option D (square root) can reduce moderate right skew but is less effective than log for severe skewness.

95
Multi-Selecteasy

Which TWO actions are appropriate when handling missing data in a dataset for machine learning? (Select TWO.)

Select 2 answers
A.Use a machine learning model to predict missing values based on other features
B.Drop all rows that contain any missing value
C.Impute missing values with the mean or median of the feature
D.Remove the feature entirely if it contains missing values
E.Fill missing values with zero
AnswersA, C

Correct. Using a model to predict missing values based on other features is a sophisticated imputation method that leverages correlations in the data.

Why this answer

Options A and C are correct. Using a machine learning model to predict missing values is a valid imputation technique that can preserve relationships in the data. Imputing with the mean or median is a standard approach for numerical features and maintains the dataset size.

Option B is incorrect because dropping all rows with any missing values can lead to significant data loss, especially if missingness is widespread. Option D is incorrect because removing an entire feature due to missing values might discard predictive information unless the feature is mostly missing. Option E is incorrect because filling all missing values with zero can introduce bias and distort distributions, as zero may not be a natural placeholder for the data.

96
MCQhard

A data scientist queried an Athena table and got only one row back, but the CSV file is 1 MB. What is the most likely reason?

A.The table is partitioned but the partition is not correctly defined
B.The CSV file contains only one row
C.The table is not an external table
D.Athena does not support CSV format
AnswerA

Correct: If date partition is not correctly mapped, the filter may return no data.

Why this answer

A 1 MB CSV file likely contains many rows, but querying returns only one row, which indicates that the table's partition mapping is incorrect. Athena uses partitions to minimize data scanned; if the partition definition does not match the actual data location, the query may only read (or miss) certain partitions, resulting in fewer rows. Option B is wrong because a 1 MB file is too large to contain only one row, as typical CSV rows are much smaller.

Option C is irrelevant: whether the table is external does not affect row count. Option D is wrong because Athena supports CSV format.

97
MCQmedium

A data scientist is performing EDA on a dataset with 500 features. The dataset has a mix of numeric and categorical features. The scientist wants to identify which features have a strong nonlinear relationship with the target variable. Which technique is most appropriate?

A.Use ANOVA to compare feature means across target classes.
B.Compute Pearson correlation coefficients.
C.Calculate mutual information between each feature and the target.
D.Perform chi-squared tests for each feature.
AnswerC

Mutual information measures any dependency, including nonlinear.

Why this answer

Mutual information can capture any kind of dependency (including nonlinear) between features and target. Option A (ANOVA) compares means across groups but assumes linearity. Option B (Pearson correlation) only captures linear relationships.

Option D (Chi-squared test) is for categorical features, not suitable for the mix of numeric and categorical features.

98
MCQhard

Refer to the exhibit. A data scientist queries the table with 'SELECT COUNT(*) FROM mytable' in Athena and gets a result of 1000 rows. However, the scientist knows there are 1500 data files in the S3 location. What is the most likely reason for the discrepancy?

A.Some files may use a different delimiter (e.g., tab) and are not parsed correctly, resulting in zero rows from those files.
B.The table schema does not match the data, causing some files to be skipped.
C.Some files may be empty or contain only headers, so they contribute 0 rows.
D.Athena skips files larger than a certain size to prevent scanning too much data.
AnswerC

Correct. Files that are empty or contain only a header row contribute zero data rows, explaining the discrepancy.

Why this answer

Athena counts rows from data files; if files are empty or contain only headers, they contribute 0 rows. With 1500 files and only 1000 rows, it is plausible that many files are empty or header-only, especially if the data pipeline produces such files. Option A is incorrect because Athena still parses lines even with a delimiter mismatch, treating each line as a row (though columns may be incorrect).

Option B is incorrect because schema mismatch typically causes query errors, not silent skipping. Option D is false because Athena does not skip files based on size limits.

99
Multi-Selecteasy

A data scientist is analyzing a dataset with a mix of numerical and categorical features. The target variable is binary. The data scientist wants to visualize the distribution of a numerical feature across the two target classes. Which TWO visualization techniques are appropriate? (Choose 2.)

Select 2 answers
A.Heatmap of the correlation matrix
B.Stacked bar chart of the feature binned
C.Overlapping histograms with transparency
D.Side-by-side boxplots
E.Scatter plot with color-coded classes
AnswersC, D

Histograms show distribution shapes; transparency allows comparison.

Why this answer

Correct answers are options C and D. Option C (Overlapping histograms with transparency) is appropriate because it allows comparing the distribution of a numerical feature across two classes by overlaying histograms, making it easy to see shape, central tendency, and spread. Option D (Side-by-side boxplots) is appropriate because it succinctly displays median, quartiles, and outliers for each class, facilitating comparison.

Option A (Heatmap of the correlation matrix) is not suitable as it visualizes correlations between features, not distribution of a single feature across classes. Option B (Stacked bar chart of the feature binned) is intended for categorical data, not numerical distributions. Option E (Scatter plot with color-coded classes) requires two numerical variables and is used to show relationships, not distribution of a single numerical feature.

100
MCQmedium

A data scientist is working with a dataset that has missing values in 30% of rows for a categorical feature 'city'. Which EDA step should be performed before deciding on imputation?

A.Check if missingness is related to other features or random
B.Impute missing values with the mode of the column
C.Drop all rows with missing values
D.Encode the city feature using label encoding
AnswerA

Before deciding on imputation, you must investigate the pattern of missingness to determine if it is MCAR, MAR, or MNAR. This involves checking if missingness in 'city' is related to other features or random. Understanding the missing mechanism informs the appropriate imputation strategy.

Why this answer

Before deciding on imputation for the 'city' feature, the first exploratory data analysis (EDA) step is to investigate the pattern of missingness. Option A is correct because you must determine whether the missing data are Missing Completely at Random (MCAR), Missing at Random (MAR), or Missing Not at Random (MNAR). This involves checking if missingness in 'city' is related to other features or is random.

Understanding the missing mechanism informs the appropriate imputation strategy. Option B (impute with mode) is an imputation method, not a diagnostic step; applying it without prior analysis risks introducing bias. Option C (drop rows) may be valid only if missingness is MCAR and the amount of data loss is acceptable, but it should not be the first step.

Option D (label encoding) transforms categorical data and does not address missing values.

101
Multi-Selecteasy

Which TWO are appropriate visualizations for exploring the distribution of a single numeric variable? (Select TWO.)

Select 2 answers
A.Heatmap
B.Histogram
C.Bar chart
D.Scatter plot
E.Box plot
AnswersB, E

Histogram displays frequency distribution of a single numeric variable.

Why this answer

Options B and E are correct. A histogram displays the frequency distribution of a single numeric variable by binning the data, and a box plot shows the five-number summary (minimum, first quartile, median, third quartile, maximum) to visualize spread and outliers. Option A (heatmap) is typically used for two numeric variables to show density or correlation.

Option C (bar chart) is for categorical data, not numeric distribution. Option D (scatter plot) visualizes the relationship between two numeric variables, not the distribution of one.

102
MCQmedium

A data scientist is analyzing a dataset with a binary target variable. They compute the correlation matrix and find that all features have correlations between -0.1 and 0.1 with the target. They suspect that the relationship might be non-linear. Which of the following techniques should they use to detect non-linear relationships?

A.ANOVA test
B.Spearman's rank correlation
C.Pearson correlation coefficient
D.Mutual information
AnswerD

Measures any kind of dependency, linear or non-linear.

Why this answer

Mutual information is the correct technique because it measures the dependency between variables and can capture any type of relationship, including non-linear and non-monotonic. Options A and C are incorrect: ANOVA is used for comparing means of categorical vs continuous variables, and Pearson correlation only measures linear relationships. Option B is also incorrect: Spearman's rank correlation captures monotonic relationships but may miss other non-linear patterns.

103
MCQeasy

During exploratory data analysis, a data scientist notices that a feature has a highly skewed distribution. Which transformation is most likely to make the distribution approximately normal?

A.Log transformation
B.Min-max scaling
C.One-hot encoding
D.Standardization (z-score)
AnswerA

Log transformation reduces right skewness and makes the distribution approximately normal.

Why this answer

Log transformation is commonly used to reduce right skewness and make the distribution approximately normal. Option B (min-max scaling) is incorrect because it does not change the shape of the distribution. Option C (one-hot encoding) is incorrect because it is used for categorical variables, not for transforming continuous skewed data.

Option D (standardization) is incorrect because it does not change the shape of the distribution.

104
MCQmedium

A data scientist is analyzing a dataset with 10 million rows and 50 columns. The target variable is highly imbalanced (99% negative, 1% positive). Which approach is most appropriate for exploratory data analysis before modeling?

A.Remove all negative examples and analyze only the positive ones.
B.Take a random sample of 100,000 rows from the entire dataset.
C.Take a stratified sample that preserves the 99:1 ratio.
D.Up-sample the minority class to balance the dataset before analysis.
AnswerC

Stratified sampling ensures representation of both classes.

Why this answer

C is correct because stratified sampling preserves the original class proportion (99:1) in the sample, which is important for exploratory data analysis on imbalanced data without artificially altering the distribution. Option A (remove all negatives) loses all negative data, preventing analysis of majority class patterns. Option B (random sample) may result in insufficient positive examples due to imbalance.

Option D (up-sample minority) would change the distribution and could lead to misleading visualizations and statistics during EDA.

105
MCQeasy

A data scientist needs to detect outliers in a dataset with multiple features that follow different distributions. Which method is most robust for multivariate outlier detection?

A.Z-score threshold
B.Interquartile range (IQR)
C.DBSCAN clustering
D.Isolation Forest
AnswerD

Correct: Isolation Forest works well for multivariate data without distributional assumptions.

Why this answer

Isolation Forest is an ensemble method that isolates anomalies effectively in high-dimensional spaces without assuming any specific distribution. Option A is wrong because Z-score assumes a normal distribution. Option B is wrong because IQR is univariate and does not capture multivariate interactions.

Option C is wrong because DBSCAN is primarily a clustering algorithm and is not specifically designed for outlier detection, though it can identify outliers as noise; however, Isolation Forest is more robust for this purpose.

106
Multi-Selecteasy

Which TWO actions should a data scientist take when exploring a dataset that contains missing values and outliers? (Select TWO.)

Select 2 answers
A.Calculate the percentage of missing values per column.
B.Normalize all features using Min-Max scaling.
C.Remove all rows with outliers.
D.Impute missing values with the mean immediately.
E.Visualize the distribution of each feature using histograms.
AnswersA, E

Missing value counts inform imputation strategy.

Why this answer

Calculating the percentage of missing values per column is a standard first step in exploratory data analysis (EDA) to quantify data completeness. This informs downstream decisions such as whether to impute, drop, or flag missing data, and helps assess the risk of bias or information loss. It is a diagnostic action, not a transformation, and should precede any imputation or removal.

Exam trap

The MLS-C01 exam often tests the distinction between EDA actions (diagnostic) and preprocessing actions (transformative), so the trap here is that candidates confuse immediate imputation or scaling with proper exploratory steps, leading them to select B, C, or D instead of the correct diagnostic actions A and E.

107
MCQmedium

A data scientist is analyzing a dataset with a target variable that is heavily imbalanced (e.g., 99% negative class, 1% positive class). Which exploratory data analysis technique is most appropriate to understand the relationship between features and the target before modeling?

A.Randomly sample 10% of the data and plot feature distributions by class.
B.Apply PCA to reduce dimensionality, then visualize the first two components.
C.Use stratified sampling to create a balanced subset, then compute correlation matrices and box plots.
D.Focus only on the majority class features to avoid bias.
AnswerC

Stratified sampling preserves class proportions, enabling meaningful EDA.

Why this answer

Stratified sampling preserves the class distribution in the sample, allowing you to create a balanced subset for exploratory analysis. Computing correlation matrices and box plots on this balanced subset reveals feature-target relationships without being overwhelmed by the majority class, which is critical for imbalanced datasets like 99% negative vs. 1% positive.

Exam trap

The trap here is that candidates may think random sampling (Option A) is sufficient for EDA, but they overlook that severe class imbalance (99:1) makes random samples uninformative for the minority class, whereas stratified sampling explicitly addresses this by ensuring both classes are represented in the analysis subset.

How to eliminate wrong answers

Option A is wrong because random sampling of 10% of the data will likely preserve the original class imbalance (99:1), so feature distributions by class will still be dominated by the negative class, obscuring patterns for the rare positive class. Option B is wrong because PCA is an unsupervised dimensionality reduction technique that does not use the target variable; the first two components may capture variance unrelated to the target, and the resulting visualization may not highlight class-specific separations. Option D is wrong because focusing only on the majority class features ignores the minority class entirely, which is the very class of interest in imbalanced problems; this approach would miss important discriminative features and introduce bias.

108
MCQeasy

A data scientist runs the following AWS CLI command: aws s3api head-object --bucket my-bucket --key data.csv The output is: { "AcceptRanges": "bytes", "LastModified": "2021-08-21T12:00:00+00:00", "ContentLength": 1048576, "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "ContentType": "text/csv", "Metadata": {} } What can be concluded from the output?

A.The ETag can be used for integrity checking.
B.The file is 1 GB in size.
C.The object has S3 versioning enabled.
D.The file has not been preprocessed.
AnswerA

The ETag can be used for integrity checking, as it is an MD5 hash of the object content.

Why this answer

The ETag can be used for integrity checking, as it is an MD5 hash of the object content. Option B is wrong because ContentLength 1048576 corresponds to 1 MB, not 1 GB. Option C is wrong because S3 versioning is indicated by VersionId, not ETag.

Option D is wrong because the output does not provide any information about preprocessing; the presence of metadata like 'preprocessed' is not shown.

109
MCQeasy

A data scientist is using Amazon SageMaker Data Wrangler for exploratory data analysis. The dataset contains a column with missing values that are encoded as 'NA' strings. The data scientist wants to treat these as missing values during the import. Which step should the data scientist take?

A.Configure a custom missing value symbol 'NA' in the import settings of Data Wrangler.
B.Use the 'Impute' transform to fill 'NA' with the mean of the column.
C.Use the 'Replace missing' transform to replace 'NA' with null after import.
D.Use the 'Drop missing' transform to remove rows containing 'NA'.
AnswerA

Data Wrangler supports custom missing value symbols during data import.

Why this answer

Amazon SageMaker Data Wrangler allows specifying custom missing value symbols during the import step. By configuring 'NA' as a custom missing value symbol in the import settings, Data Wrangler will automatically treat 'NA' strings as missing values when reading the dataset. Option B is incorrect because the 'Impute' transform is used to fill missing values after they have been recognized as missing; it does not handle the initial identification of 'NA' strings as missing.

Option C is incorrect because using 'Replace missing' after import is less efficient and not the recommended approach; it is better to handle it during import to ensure downstream transforms treat the values correctly. Option D is incorrect because dropping rows with 'NA' prematurely discards data before any analysis; the goal is to treat 'NA' as missing, not to remove the rows.

110
MCQhard

The exhibit shows an IAM policy for a SageMaker notebook. A data scientist wants to use the notebook to run an Athena query and then load the results into a pandas DataFrame. Which action is NOT possible with this policy?

A.Read the Athena query results from the output S3 location
B.Start an Athena query execution
C.Read a specific object from the my-training-data bucket
D.List objects in the my-training-data bucket
AnswerA

The policy only allows read on my-training-data, not the Athena output bucket.

Why this answer

The policy grants s3:GetObject on the 'my-training-data' bucket, so reading a specific object from that bucket (Option C) is possible. It also grants s3:ListBucket on that bucket, so listing objects (Option D) is possible. The policy includes Athena permissions, so starting a query execution (Option B) is allowed.

However, to read Athena query results, the user needs s3:GetObject permission on the S3 location where Athena writes the results, which is typically a different bucket (the query output location). The policy does not grant s3:GetObject on that output bucket, so reading the results (Option A) is not possible.

111
MCQeasy

A data scientist uses Amazon SageMaker Data Wrangler to explore a dataset and notices that the target variable is highly imbalanced. Which technique should the data scientist apply to balance the dataset before training?

A.Synthetic Minority Oversampling Technique (SMOTE)
B.One-hot encoding of the target variable
C.Random undersampling of the majority class
D.Min-Max scaling of all features
AnswerA

SMOTE creates synthetic minority samples to balance the dataset.

Why this answer

Synthetic Minority Oversampling Technique (SMOTE) is the correct technique because it generates synthetic samples for the minority class by interpolating between existing minority instances and their k-nearest neighbors, effectively balancing the dataset without simply duplicating data. Amazon SageMaker Data Wrangler includes a built-in SMOTE transform, making it directly applicable for handling imbalanced target variables during exploratory data analysis.

Exam trap

The MLS-C01 exam often tests the misconception that random undersampling is always safe, but the trap here is that candidates may overlook the information loss from discarding majority class data, while SMOTE provides a more robust synthetic oversampling approach.

How to eliminate wrong answers

Option B is wrong because one-hot encoding is a technique for converting categorical features into binary vectors, not for addressing class imbalance in the target variable. Option C is wrong because random undersampling of the majority class can lead to loss of valuable information and potential underfitting, whereas SMOTE creates synthetic data to preserve information. Option D is wrong because Min-Max scaling normalizes feature ranges to [0,1] and has no effect on class distribution or imbalance.

112
MCQeasy

A data analyst is using Amazon QuickSight to explore a dataset with 10 million rows. The analyst wants to create a histogram of a numerical column. However, the query is taking too long. Which action should the analyst take to improve performance without losing accuracy?

A.Change the data source to Amazon Athena directly with a limit clause.
B.Reduce the number of bins in the histogram.
C.Use a sample of the data (e.g., 1 million rows) for the histogram.
D.Import the dataset into SPICE (Super-fast, Parallel, In-memory Calculation Engine).
AnswerD

SPICE accelerates queries by loading data into memory.

Why this answer

SPICE (Super-fast, Parallel, In-memory Calculation Engine) is Amazon QuickSight's in-memory engine that caches data, enabling fast query performance without losing accuracy. Importing the dataset into SPICE speeds up histogram computation while preserving full data. Option A is incorrect because using Athena with a limit clause reduces the number of rows, losing accuracy.

Option B is incorrect because reducing bins changes histogram granularity, not necessarily improving performance and potentially losing detail. Option C is incorrect because sampling reduces accuracy by excluding data points.

113
MCQeasy

After loading a dataset into a pandas DataFrame, a data scientist runs df.info() and sees that a column 'income' has object dtype. What does this indicate, and what EDA step should be taken?

A.The column has missing values; impute them.
B.The column contains strings; convert to numeric using pd.to_numeric() and investigate non-convertible values.
C.Normalize the column to a 0-1 range.
D.The column is already numeric; proceed.
AnswerB

Conversion to numeric is necessary for analysis; non-convertible values may indicate errors.

Why this answer

'object' dtype in pandas typically indicates string or mixed types. The appropriate EDA step is to attempt conversion to numeric using pd.to_numeric() and investigate non-convertible values to handle data quality issues. Option A is incorrect because object dtype does not specifically indicate missing values; missing values can appear in any dtype.

Option C is premature; conversion should precede normalization. Option D is incorrect because object dtype is not numeric.

114
MCQhard

A data analyst is examining a dataset with a target variable that has three classes: A, B, C. They plot the distribution of a feature 'X' for each class and notice that for classes A and B, the distributions are bimodal, while for class C it is unimodal. They want to assess whether feature 'X' is useful for separating the classes. Which of the following metrics should they compute to quantify the separability?

A.ANOVA F-statistic between feature X and the target.
B.Variance ratio (between-group variance / within-group variance).
C.Chi-square test of independence.
D.Mutual information between X and the target.
AnswerA

Correct. The ANOVA F-statistic tests whether the means of feature X differ significantly across classes A, B, and C, which is a direct measure of separability.

Why this answer

The ANOVA F-statistic measures the ratio of between-group variance to within-group variance, directly quantifying separability. Option B is wrong because 'variance ratio' is not the standard name; the correct metric is the F-statistic. Option C is wrong because the chi-square test is for categorical features, not continuous ones like feature X.

Option D is wrong because mutual information measures dependency but does not specifically test separability in terms of variance between groups.

115
MCQeasy

A data scientist is exploring a dataset with 10 features and observes that the correlation between feature A and feature B is 0.98. Which action should be taken to address multicollinearity before training a linear regression model?

A.Use Principal Component Analysis (PCA) to combine them.
B.Apply Min-Max scaling to both features.
C.Remove one of the two features from the dataset.
D.Add polynomial features to both.
AnswerC

Dropping one of the highly correlated features removes redundancy and mitigates multicollinearity, which is a simple and effective solution.

Why this answer

Dropping one of the highly correlated features reduces redundancy and mitigates multicollinearity. Option A (PCA) creates orthogonal components, which addresses multicollinearity but reduces interpretability; dropping a feature is more straightforward. Option B (Min-Max scaling) does not address collinearity at all.

Option D is wrong because adding polynomial features increases correlation.

116
Multi-Selecthard

Which TWO statements about handling missing data during exploratory data analysis are correct? (Select TWO.)

Select 2 answers
A.Missing values can be ignored during EDA and handled during model training.
B.Visualizing the pattern of missingness can help determine if data is missing at random.
C.Understanding the missing data mechanism (MCAR, MAR, MNAR) is important for choosing an imputation strategy.
D.Listwise deletion (removing rows with missing values) is always safe and unbiased.
E.Imputing missing values with the mean preserves the original variance.
AnswersB, C

Missingness patterns inform assumptions about missing data mechanisms.

Why this answer

Options B and C are correct. Visualizing the pattern of missingness helps determine if data is missing at random, which is a key EDA step. Understanding the missing data mechanism (MCAR, MAR, MNAR) is important for selecting an appropriate imputation strategy.

Option A is incorrect because missing values should be addressed during EDA, not deferred to model training. Option D is incorrect because listwise deletion can introduce bias if data is not MCAR. Option E is incorrect because mean imputation reduces the variance of the imputed variable.

117
MCQeasy

A data scientist wants to identify outliers in a dataset with 1,000 samples and 5 numerical features. Which technique is most appropriate for univariate outlier detection?

A.Principal component analysis (PCA)
B.Interquartile range (IQR) method
C.Mahalanobis distance
D.Z-score with a threshold of 3
AnswerB

IQR is robust and suitable for univariate outlier detection.

Why this answer

The IQR method, where outliers are defined as points below Q1 - 1.5*IQR or above Q3 + 1.5*IQR, is appropriate for univariate outlier detection as it does not assume a specific distribution and is robust to extreme values. PCA (A) is a dimensionality reduction technique, not for outlier detection. Mahalanobis distance (C) is for multivariate outliers.

Z-score with threshold 3 (D) assumes normality and is sensitive to extreme outliers.

118
MCQmedium

A data analyst is using Amazon Athena to query a partitioned dataset in S3. They notice that queries are scanning more data than expected. Which step should they take during exploratory data analysis to optimize query performance?

A.Convert the data to Parquet format.
B.Use S3 Select to filter data before querying.
C.Increase the number of workers in Athena.
D.Check the partition metadata to ensure queries are pruning partitions.
AnswerD

Verifying partition structure ensures efficient partition pruning.

Why this answer

Checking partition metadata (e.g., using SHOW PARTITIONS or querying information_schema) ensures that queries are applying partition pruning, which reduces the amount of data scanned. Option A is incorrect: converting to Parquet improves columnar scan efficiency but does not directly address partition misuse. Option B is incorrect: S3 Select filters data at the object level, but Athena already pushes down filters; this does not fix a lack of partition pruning.

Option C is incorrect: increasing workers improves parallelism but does not reduce scanned data if partitions are not pruned.

119
Multi-Selecthard

A data scientist is performing EDA on a dataset stored in Amazon S3 using Amazon Athena. The dataset is partitioned by date, and each partition contains CSV files. The data scientist notices that some queries return zero rows for partitions that should have data. Which THREE steps should the data scientist take to troubleshoot? (Choose 3.)

Select 3 answers
A.Verify that the CSV files exist in the S3 bucket for the specific partition.
B.Run MSCK REPAIR TABLE to add new partitions to the Glue Data Catalog.
C.Convert the CSV files to Parquet format.
D.Check the data types of the columns used in the query's WHERE clause.
E.Re-run the query with a LIMIT clause to force partition discovery.
AnswersA, B, D

Files may have been moved or deleted.

Why this answer

Verifying that the CSV files actually exist in the S3 bucket for the specific partition confirms whether data is present. Option B is correct because MSCK REPAIR TABLE adds new partitions to the Glue Data Catalog that may not have been registered automatically. Option D is correct because incorrect data types in the query's WHERE clause can cause filters to exclude rows, resulting in zero returned rows.

Option C is incorrect because converting to Parquet is not a troubleshooting step for this issue—it is an optimization. Option E is incorrect because adding a LIMIT clause does not force partition discovery; it only limits the number of rows returned.

120
MCQeasy

In exploratory data analysis, a data scientist notices that the distribution of a continuous variable is bimodal. The scientist suspects that the two modes correspond to two different groups in the data. Which visualization is MOST appropriate to confirm this suspicion?

A.Box plot
B.Bar chart
C.Histogram with overlaid densities by group
D.Scatter plot
AnswerC

Overlaying densities by group allows visual comparison of the two modes.

Why this answer

The most appropriate because a histogram with overlaid densities, colored by group, directly shows the distribution of each group and can reveal whether the two modes correspond to different groups. Option A (box plot) displays summary statistics but not the shape or modality. Option B (bar chart) is for categorical data, not continuous.

Option D (scatter plot) is for two continuous variables, not for examining a single distribution.

121
Multi-Selectmedium

Which THREE of the following are appropriate data visualization techniques for exploring the relationship between two numerical variables?

Select 3 answers
A.Scatter plot
B.Hexbin plot
C.Box plot
D.Bar chart
E.Pair plot
AnswersA, B, E

Scatter plots directly show the relationship between two numerical variables.

Why this answer

Scatter plot, hexbin plot, and pair plot are designed for bivariate numerical relationships. Bar chart is for categorical. Box plot is for numerical vs categorical.

122
MCQeasy

During exploratory data analysis, a data scientist notices that the target variable is highly imbalanced. Which technique should be used to address this issue before training a classification model?

A.Apply PCA to reduce dimensionality
B.Remove outliers from the majority class
C.Use cross-validation to evaluate the model
D.Apply feature scaling to all features
E.Use SMOTE to generate synthetic samples for the minority class
AnswerE

SMOTE is a standard technique for imbalanced classification.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) is a popular method for handling imbalanced datasets by generating synthetic samples for the minority class. Option A (PCA) is wrong because dimensionality reduction does not address class imbalance. Option B (removing outliers) is wrong because it may worsen imbalance and is not a standard technique for imbalance.

Option C (cross-validation) is a model evaluation technique, not a solution for imbalance. Option D (feature scaling) does not affect class distribution.

123
MCQhard

A data engineer is preparing a dataset for training a binary classification model. The target variable is highly imbalanced (95% negative, 5% positive). The engineer needs to split the data into training and test sets while maintaining the class distribution in both sets. Which method should the engineer use?

A.Use k-fold cross-validation and then split the data
B.Oversample the minority class first, then do a random split
C.Perform a simple random 80/20 split
D.Use stratified random sampling to split the data
AnswerD

Stratified split preserves class proportions in each subset.

Why this answer

Stratified random sampling ensures the proportion of classes is preserved in both training and test sets. Option A is wrong because k-fold cross-validation is a model evaluation technique, not a method for splitting data into training and test sets; using it before splitting would not guarantee class balance. Option B is wrong because oversampling should be done after splitting to avoid data leakage and ensure the test set reflects the original distribution.

Option C is wrong because a simple random 80/20 split may not preserve the class distribution due to random variation, especially with imbalanced data.

124
MCQmedium

Refer to the exhibit. A data scientist is unable to read a CSV file from the S3 bucket 'my-bucket' using SageMaker. The IAM policy attached to the SageMaker execution role is shown. What is the most likely cause of the failure?

A.The policy does not allow the s3:GetObject action
B.The policy does not grant read access to the bucket
C.The bucket uses server-side encryption with AWS KMS (SSE-KMS) and the policy lacks kms:Decrypt permission
D.The policy does not include s3:ListBucket action
AnswerC

KMS-encrypted objects require kms:Decrypt permission.

Why this answer

The policy includes s3:GetObject and s3:ListBucket, so it allows reading objects. However, if the S3 bucket uses server-side encryption with AWS KMS (SSE-KMS), the SageMaker execution role must also have the kms:Decrypt permission to decrypt the object. Without this permission, the read operation fails even though the S3 permissions are correct.

Therefore, the most likely cause is that the bucket uses SSE-KMS and the policy lacks kms:Decrypt, making option C correct.

125
Multi-Selectmedium

A data scientist is performing EDA on a dataset with 500,000 rows and 20 columns. The dataset contains missing values in some columns. Which TWO approaches are appropriate for handling missing data during EDA? (Choose 2)

Select 2 answers
A.Use forward fill to propagate the last observed value
B.Remove all rows with any missing value (listwise deletion)
C.Create an indicator column to flag whether the value was missing, then impute with a placeholder
D.Impute missing values with the mean of each column
E.Impute missing values with the median for numerical columns and mode for categorical columns
AnswersC, E

This retains the information about missingness and is a common practice.

Why this answer

Options C and E are correct. Creating an indicator column to flag missingness and then imputing with a placeholder (e.g., mean/median) is a common technique to preserve information about missing patterns. Imputing numerical columns with median and categorical with mode is robust to outliers and preserves distribution.

Option A (forward fill) is typically used for time series data, not general tabular EDA. Option B (listwise deletion) can reduce sample size and introduce bias if data is not missing completely at random. Option D (mean imputation) is sensitive to outliers and can distort variance.

126
MCQeasy

A data analyst is performing EDA on a dataset containing timestamps of user logins. They want to understand daily login patterns. The timestamp column is in Unix epoch format (integer). Which of the following is the most appropriate transformation to extract day-of-week patterns?

A.Convert the timestamps to datetime objects and extract the day-of-week.
B.Convert the timestamps to string and split into date and time.
C.Apply min-max scaling to the timestamp values.
D.Bin the timestamps into 1-hour intervals.
AnswerA

This enables grouping by day of the week to analyze patterns.

Why this answer

Converting Unix epoch timestamps to datetime objects allows extraction of the day-of-week using functions like .dt.dayofweek() in pandas. Option B is wrong because converting to string and splitting into date and time does not directly give day-of-week patterns and loses temporal properties. Option C is wrong because min-max scaling is used for normalizing numerical features, not for extracting temporal patterns.

Option D is wrong because binning into 1-hour intervals captures hourly patterns, not day-of-week patterns.

127
MCQeasy

A data analyst needs to visualize the distribution of a numerical feature in a dataset. Which AWS service can be used to create a histogram directly from data stored in S3 without writing code?

A.Amazon Athena
B.Amazon SageMaker Studio
C.Amazon QuickSight
D.AWS Glue
AnswerC

QuickSight provides no-code visualizations like histograms.

Why this answer

Mazon QuickSight (Option C) because it is a business intelligence (BI) service that can connect directly to data stored in Amazon S3 and create visualizations such as histograms without requiring any coding. Amazon Athena (Option A) is an interactive query service that returns raw query results, not visualizations. Amazon SageMaker Studio (Option B) is a machine learning IDE that typically requires writing code or using notebooks to generate plots.

AWS Glue (Option D) is a serverless data integration service for ETL operations, not for visualization.

128
MCQhard

A data science team at a financial services company is building a fraud detection model using a dataset of credit card transactions. The dataset contains 10 million rows and 20 features, including transaction amount, merchant category, time since last transaction, and customer ID. The target variable 'is_fraud' is highly imbalanced: only 0.1% of transactions are fraudulent. The team is performing exploratory data analysis (EDA) on a sample of 100,000 rows. They compute the correlation matrix and find that 'transaction amount' has a correlation of 0.02 with 'is_fraud'. They also plot the distribution of 'transaction amount' and see that it is heavily right-skewed with a long tail. The team wants to understand the relationship between 'transaction amount' and fraud more deeply before feature engineering. They have access to AWS SageMaker and can run processing jobs. Which course of action is most appropriate?

A.Conclude that 'transaction amount' is not predictive because the correlation is near zero
B.Train a random forest model on the sample and use feature importance to assess the predictive power of 'transaction amount'
C.Create bins for 'transaction amount' (e.g., 0-10, 10-50, 50-100, 100+) and compute the fraud rate per bin to detect any non-linear patterns
D.Apply a log transformation to 'transaction amount' to reduce skewness and re-run the correlation analysis
AnswerC

Binning and examining fraud rates per bin can reveal non-linear relationships.

Why this answer

Binning the transaction amount and computing fraud rates per bin can reveal non-linear relationships that correlation might miss. Option A is wrong because concluding non-predictiveness based solely on correlation ignores potential non-linear patterns. Option B is premature since feature importance from a random forest model is typically used after feature engineering, not during initial EDA.

Option D is a data transformation that addresses skewness but does not directly help understand the relationship with the target; it would be more appropriate as a preprocessing step.

129
MCQhard

A data scientist is performing EDA on a dataset of 1 million images stored in Amazon S3. Each image is 100x100 pixels in RGB format. The data scientist wants to compute the mean pixel value per channel across the entire dataset. Which approach is most efficient?

A.Use Amazon SageMaker Processing with a custom Python script that iterates over S3 objects and aggregates pixel values.
B.Use Amazon Athena with a SQL query on the image metadata stored in a CSV file.
C.Use AWS Glue ETL to read images and compute the mean.
D.Use a SageMaker notebook instance with a large instance type to load all images into memory and compute the mean.
AnswerA

SageMaker Processing can distribute the workload across multiple instances for efficient computation.

Why this answer

(Amazon SageMaker Processing with a custom Python script) is the most efficient because it can distribute the computation across multiple instances, processing images in parallel without loading all into memory at once. This is ideal for a large dataset of 1 million images. Option B (Athena) is designed for querying structured data, not image processing.

Option C (AWS Glue ETL) is for ETL on tabular data, not image processing. Option D (SageMaker notebook with large instance) would require loading all images into memory, which is not feasible for 1 million images.

130
MCQhard

A data scientist is analyzing a dataset with 1 million records and 20 features. The target variable is continuous. The scientist wants to identify non-linear relationships between features and the target. Which technique is MOST suitable for this purpose during exploratory data analysis?

A.Visualize the correlation matrix heatmap of all features.
B.Apply Principal Component Analysis (PCA) and examine the loadings.
C.Calculate mutual information scores between each feature and the target.
D.Compute Pearson correlation coefficients between each feature and the target.
AnswerC

Mutual information captures non-linear dependencies.

Why this answer

Mutual information captures any kind of dependency, including non-linear. Option A is wrong because a correlation matrix heatmap only shows pairwise linear correlations among features, not feature-target relationships. Option B is wrong because PCA is for dimensionality reduction and does not directly assess feature-target relationships.

Option D is wrong because Pearson correlation only measures linear relationships, missing non-linear ones.

131
MCQeasy

A data scientist is analyzing a dataset with a target variable that is binary (0/1). Which visualization is most appropriate to explore the relationship between a continuous feature and the target?

A.Scatter plot of the feature vs. the target.
B.Bar chart of the feature.
C.Box plot of the feature grouped by target.
D.Histogram of the feature.
AnswerC

Box plots compare distributions across categories.

Why this answer

The most appropriate visualization to explore the relationship between a continuous feature and a binary target is a box plot of the feature grouped by the target. This allows comparing the distribution of the continuous feature across the two target classes (0 and 1), revealing differences in central tendency, spread, and outliers. Option A (scatter plot) is unsuitable because scatter plots are for two continuous variables, not a binary target.

Option B (bar chart) is typically used for categorical features, not continuous ones. Option D (histogram) shows the distribution of a single continuous variable but does not separate by target class, so it cannot reveal the relationship with the binary target. Therefore, option C is correct.

132
MCQmedium

A data scientist runs a logistic regression and obtains a model with 95% accuracy on the training set. However, the model performs poorly on the test set. Which exploratory data analysis step should have been performed to identify this issue?

A.Generating a correlation matrix of features
B.Log transformation of skewed features
C.Checking for class imbalance in the target variable
D.Creating a heatmap of missing values
AnswerC

Checking for class imbalance is the correct step because a model can achieve high training accuracy by simply predicting the majority class, but fails on the minority class in the test set.

Why this answer

Checking for class imbalance is critical because it can cause a model to predict the majority class and still achieve high accuracy, but fail on the minority class in unseen data. Option A (correlation matrix) is wrong because it helps with multicollinearity, not class imbalance. Option B (log transformation) is wrong because it addresses skewness in features, not class imbalance.

Option D (heatmap of missing values) is wrong because it shows missing data patterns, not class imbalance.

133
MCQeasy

A data scientist is analyzing a dataset with missing values in several columns. The dataset is stored in an S3 bucket. What is the most efficient method to identify the percentage of missing values per column using AWS services?

A.Use Amazon SageMaker Notebook with pandas to load the dataset and compute missing percentages.
B.Use Amazon QuickSight to connect to S3 and calculate missing value percentages via calculated fields.
C.Use Amazon Athena to query the data with SQL using COUNT(*) and CASE statements to compute missing percentage per column.
D.Use AWS Glue Crawler to infer schema and view missing values statistics in the AWS Glue Data Catalog.
AnswerC

Amazon Athena allows running SQL queries directly on data in S3, and the COUNT and CASE statements can compute missing value percentages efficiently without moving data.

Why this answer

Amazon Athena allows running SQL queries directly on data in S3, and the COUNT and CASE statements can compute missing value percentages efficiently without moving data. Option A is wrong because Amazon SageMaker Notebook requires manual coding and is less efficient for quick checks. Option B is wrong because Amazon QuickSight is a visualization tool, not for direct SQL-based analysis.

Option D is wrong because AWS Glue Crawler only catalogs metadata, not performing data analysis.

134
MCQhard

During exploratory data analysis, a data scientist observes a strong correlation (r=0.95) between two numeric features. The model to be trained is a linear regression. What is the most appropriate action?

A.Apply standardization to both features.
B.Remove one of the correlated features.
C.Use L2 regularization (Ridge regression) without removing features.
D.Create an interaction term between the two features.
AnswerB

Removing reduces multicollinearity in linear regression.

Why this answer

High correlation (r=0.95) between two features indicates severe multicollinearity in linear regression, which can cause unstable coefficient estimates and inflated standard errors. The most straightforward solution is to remove one of the correlated features (Option B), as it directly eliminates the redundancy. Option A (standardization) does not affect correlation.

Option C (L2 regularization) can help but is not the first choice because removal is simpler and preserves interpretability; regularization only shrinks coefficients but does not remove the linear dependence. Option D (interaction term) would increase multicollinearity, making the problem worse.

135
MCQeasy

A data analyst wants to understand the distribution of a continuous variable. Which visualization is most appropriate for this purpose?

A.Box plot
B.Bar chart
C.Histogram
D.Scatter plot
AnswerC

Histogram displays the distribution of a single continuous variable.

Why this answer

(Histogram) is correct because a histogram displays the frequency distribution of a continuous variable by grouping data into bins. Option A (Box plot) is incorrect because it shows summary statistics (median, quartiles, outliers) but not the full distribution. Option B (Bar chart) is incorrect because bar charts are for categorical data, not continuous.

Option D (Scatter plot) is incorrect because it shows the relationship between two continuous variables, not the distribution of a single variable.

136
MCQeasy

A data scientist is analyzing a dataset with missing values. Which technique is most appropriate for imputing missing values in a numerical feature that follows a normal distribution?

A.Mean imputation
B.Standard deviation imputation
C.Mode imputation
D.Median imputation
AnswerA

Mean imputation preserves the mean of the normal distribution.

Why this answer

Mean imputation is suitable for normally distributed data as it preserves the mean. Median is robust to outliers, not normality. Mode is for categorical data.

Standard deviation is not an imputation method. KNN imputation is non-parametric.

137
MCQhard

A team is building a regression model to predict house prices. The dataset includes a column 'zip_code' with 100 unique values. The data scientist one-hot encodes this column, resulting in 100 new binary columns. The model shows poor performance on a validation set. What is the most likely cause?

A.One-hot encoding introduced multicollinearity among the binary columns.
B.One-hot encoding reduced the number of features, causing underfitting.
C.The one-hot encoding introduced high variance, but the validation set has low variance.
D.The model suffers from the curse of dimensionality due to the large number of features.
AnswerD

With 100 additional sparse features, the model may overfit and not generalize well.

Why this answer

One-hot encoding 'zip_code' with 100 unique values creates 100 binary features. When combined with other features, the total number of features can be large relative to the number of training samples, leading to the curse of dimensionality. This causes the model to overfit the training data and generalize poorly to the validation set.

While multicollinearity among one-hot encoded columns is often low due to their binary nature, the primary issue here is the high dimensionality relative to sample size. Option D correctly identifies this as the most likely cause.

Exam trap

Candidates often underestimate the impact of one-hot encoding high-cardinality categorical variables. While the features are binary and not collinear, the sheer number of new features can cause the curse of dimensionality, leading to overfitting and poor generalization.

How to eliminate wrong answers

Option A is wrong because one-hot encoding does not introduce multicollinearity; in fact, it creates orthogonal binary columns that are linearly independent when the intercept is dropped. Option B is wrong because one-hot encoding increases the number of features, not reduces them, so it cannot cause underfitting due to feature reduction. Option C is wrong because one-hot encoding can increase variance (overfitting) but the validation set having low variance is not a direct consequence; the issue is that the model may overfit the training data, not that the validation set has low variance.

138
MCQhard

A data engineer is performing EDA on a dataset with 1 million rows and 200 columns. The dataset is stored in S3 as CSV files. The engineer notices that some columns have a high proportion of zeros. What is the best approach to determine if these zeros represent missing data or actual zero values?

A.Check correlation of zero columns with other features; if low, assume zeros are missing.
B.Calculate the percentage of zeros and compare with other columns; if unusually high, treat as missing.
C.Use AWS Glue Data Catalog to view column statistics and infer missing values.
D.Consult the data source documentation or domain experts to understand the meaning of zero values.
AnswerD

Domain knowledge is crucial for accurate interpretation of data.

Why this answer

Domain knowledge and documentation are the most reliable ways to understand the meaning of zeros. Option A is wrong because statistical methods cannot distinguish missing vs actual zero without context. Option B is wrong because metadata may not have this detail.

Option C is wrong because comparing to other columns might be misleading.

139
Multi-Selecthard

Which TWO techniques can be used to detect multicollinearity among numerical features during exploratory data analysis? (Choose two.)

Select 2 answers
A.Apply Principal Component Analysis (PCA) and examine loadings.
B.Compute a correlation matrix and look for pairs with absolute correlation > 0.8.
C.Perform a t-test between each pair of features.
D.Calculate Variance Inflation Factor (VIF) for each feature.
E.Use a chi-square test of independence.
AnswersB, D

High correlation indicates multicollinearity.

Why this answer

Multicollinearity indicates high correlation between predictors. Option B: Compute a correlation matrix and look for pairs with absolute correlation > 0.8 directly reveals linear dependencies. Option D: Variance Inflation Factor (VIF) measures how much the variance of a coefficient is inflated due to collinearity; VIF > 5 or 10 suggests multicollinearity.

Option A (PCA) reduces dimensionality but does not directly detect collinearity. Option C (t-test) tests mean differences, not associations. Option E (chi-square) tests categorical independence, not applicable to numerical features.

140
Multi-Selecthard

Which THREE statements about data leakage in machine learning are correct? (Select THREE.)

Select 3 answers
A.Using the target variable to filter features before splitting leads to data leakage
B.Applying SMOTE after splitting the dataset prevents data leakage
C.Applying standardization on the entire dataset before splitting into training and test sets can cause data leakage
D.Using cross-validation eliminates all possible data leakage
E.For time series data, using a random train-test split is recommended to avoid data leakage
AnswersA, B, C

Correct. Filtering features based on the target before splitting uses test set information to decide which features to keep, causing data leakage.

Why this answer

Using the target variable to filter features before splitting allows test set information to influence feature selection, causing data leakage. Option B is correct: applying SMOTE after splitting the dataset into training and test sets prevents leakage that would occur if SMOTE were applied before splitting, as synthetic samples would then be generated using information from the entire dataset. While SMOTE after splitting does not prevent all forms of leakage, the statement 'prevents data leakage' is interpreted in the context of the specific leakage that SMOTE can introduce, making it a correct practice.

Option C is correct: standardizing the entire dataset before splitting uses statistics computed from both training and test data, which leaks information about the test set into the training process. Option D is incorrect because cross-validation does not eliminate all leakage; if preprocessing steps like scaling are applied to the entire dataset before cross-validation, leakage still occurs. Option E is incorrect because for time series data, a random train-test split ignores the temporal order and can cause future information to leak into past predictions; a time-based split is recommended.

141
MCQeasy

A data scientist is working on a project to predict customer churn. The dataset contains 50,000 rows and 20 features, including categorical variables like 'Region' (10 categories) and 'SubscriptionType' (5 categories). The target variable is binary (churn or not). During exploratory data analysis, they plot the distribution of each feature and notice that 'Region' has a highly imbalanced distribution: one region accounts for 80% of the data. Which of the following is the most appropriate next step?

A.Apply one-hot encoding to the 'Region' feature.
B.Remove the 'Region' feature from the dataset.
C.Group rare categories into an 'Other' category.
D.Oversample the minority classes in the target variable.
AnswerC

Grouping rare categories into an 'Other' category helps manage highly imbalanced categorical features, preventing the model from overemphasizing the dominant category and allowing rare categories to be represented without causing sparse or noisy signals.

Why this answer

Grouping rare categories into an 'Other' category helps manage highly imbalanced categorical features, preventing the model from overemphasizing the dominant category and allowing rare categories to be represented without causing sparse or noisy signals. Option A is incorrect: one-hot encoding does not address the imbalance; it simply creates dummy variables, and rare categories would still be underrepresented. Option B is incorrect: removing the 'Region' feature could discard potentially useful information; the problem is imbalance, not irrelevance.

Option D is incorrect: oversampling the minority class targets address target imbalance, not feature imbalance.

142
MCQmedium

A machine learning team is analyzing a dataset with a target variable that is highly imbalanced (99% negative class, 1% positive class). They want to understand the distribution and relationships before modeling. Which exploratory data analysis technique is most appropriate to visualize the imbalance and guide resampling strategy?

A.Confusion matrix on a sample of the data
B.Scatterplot matrix of all features colored by class
C.Box plots of each feature grouped by the target class
D.Bar chart of class frequencies and a correlation heatmap
AnswerD

Bar chart shows imbalance clearly; correlation heatmap helps identify features related to the target.

Why this answer

A bar chart of class frequencies clearly visualizes the imbalance (99% negative vs 1% positive), and a correlation heatmap helps identify which features are correlated with the target, guiding resampling strategy. Option A is wrong because a confusion matrix is used for evaluating model predictions, not for initial exploratory data analysis of class imbalance. Option B is wrong because a scatterplot matrix is designed to visualize relationships between continuous variables and can be overwhelming with many features; it does not directly highlight the class imbalance.

Option C is wrong because box plots grouped by target class show feature distributions across classes but do not explicitly quantify the imbalance ratio itself.

143
MCQhard

A data scientist is performing feature engineering on a dataset with high cardinality categorical features (e.g., ZIP codes with thousands of unique values). Which technique is most effective for reducing dimensionality while preserving predictive power?

A.Hash encoding
B.One-hot encoding
C.Target encoding
D.Label encoding
AnswerC

Correct: Target encoding reduces cardinality by using target statistics, preserving predictive power.

Why this answer

Target encoding (also known as mean encoding) replaces each category with the mean of the target variable for that category. This preserves the predictive signal by directly encoding the relationship between the category and the target, while reducing the dimensionality to a single continuous feature. Hash encoding can cause collisions and loss of information.

One-hot encoding creates too many dummy variables for high cardinality features. Label encoding imposes an arbitrary ordinal relationship that may not exist and can mislead models.

144
MCQeasy

During exploratory data analysis, a machine learning engineer finds that a dataset has a significant number of missing values in a categorical feature with 10 levels. Which approach should they take to handle these missing values before modeling?

A.Impute missing values with the mean of the feature.
B.Create a new category labeled 'Missing' for missing values.
C.Drop all rows with missing values.
D.Impute missing values with the mode of the feature.
AnswerB

Preserves the missingness pattern and avoids bias.

Why this answer

Creating a separate 'Missing' category preserves the missingness pattern and avoids data loss or bias from imputation for categorical features. Option A is incorrect because mean imputation is for numerical features, not categorical. Option C is incorrect because dropping all rows with missing values may discard valuable data and reduce sample size.

Option D is incorrect because mode imputation may introduce bias if missingness is not random.

145
MCQeasy

A data scientist is analyzing a dataset of online retail transactions. The dataset contains 500,000 rows and 10 columns: 'TransactionID', 'CustomerID', 'ProductID', 'Quantity', 'UnitPrice', 'TransactionDate', 'PaymentMethod', 'ShippingAddress', 'Country', and 'TotalAmount'. The data scientist loads the data into a SageMaker notebook and performs initial EDA. The data scientist finds that 'UnitPrice' has a range from $0.01 to $10,000, with a mean of $50 and a median of $20. 'Quantity' ranges from -10 to 100, with negative values indicating returns. 'TotalAmount' is calculated as Quantity * UnitPrice. The data scientist also notices that 2% of the 'CustomerID' values are missing, and 1% of 'ProductID' values are missing. There are no missing values in other columns. The data scientist wants to clean the data and prepare it for customer segmentation. Which course of action is most appropriate?

A.Impute missing 'CustomerID' with the mean of 'CustomerID' and missing 'ProductID' with the mode.
B.Remove all rows with any missing values.
C.Keep negative 'Quantity' and treat them as errors; replace them with the median of positive quantities.
D.Remove rows with negative 'Quantity' to focus on purchases. Impute missing 'CustomerID' and 'ProductID' with a placeholder such as 'Unknown'.
AnswerD

Negative quantities are returns; imputing with 'Unknown' preserves rows.

Why this answer

The most appropriate approach. Negative quantities represent returns, which should be removed when analyzing purchase behavior for customer segmentation. Imputing missing 'CustomerID' and 'ProductID' with a placeholder like 'Unknown' retains data without guessing categorical values.

Option A is incorrect because mean imputation is not valid for categorical 'CustomerID'. Option B is incorrect because removing all rows with missing values would discard valuable data. Option C is incorrect because negative quantities are meaningful returns, not errors, and replacing them distorts the data.

146
MCQmedium

A machine learning engineer is analyzing a dataset with a mix of categorical and numerical features. The engineer wants to understand the correlation between categorical features and the target variable. Which statistical test is most appropriate for measuring association between a categorical feature and a binary target?

A.Pearson correlation coefficient
B.ANOVA (Analysis of Variance)
C.Chi-squared test of independence
D.Mutual information
AnswerC

Chi-squared test tests association between two categorical variables.

Why this answer

The Chi-squared test of independence is used to determine if there is a significant association between two categorical variables, which is applicable here. Option A is wrong because Pearson correlation is for continuous variables. Option B is wrong because ANOVA is for comparing means across groups, but assumes continuous target.

Option D is wrong because Mutual Information can be used but is not a statistical test with a p-value.

147
MCQeasy

A data scientist is starting a new machine learning project and needs to understand the dataset. The dataset is stored as CSV files in Amazon S3, with a total size of 50 GB. The data scientist wants to quickly get summary statistics (count, mean, standard deviation, min, max) for each numerical column, and also check for missing values. The data scientist has access to SageMaker Studio. What is the most efficient way to achieve this?

A.Use AWS Glue Crawler to infer schema and then query with Athena.
B.Write a PySpark script in a SageMaker notebook to compute statistics.
C.Load a sample into Amazon QuickSight and use SPICE to compute statistics.
D.Use SageMaker Data Wrangler to import the data and generate a data quality report.
AnswerD

Data Wrangler provides summary statistics and missing value analysis.

Why this answer

SageMaker Data Wrangler is purpose-built for data preparation and profiling, allowing you to compute summary statistics and check for missing values with a visual interface and without writing code. Option A (AWS Glue Crawler + Athena) only infers schema and enables SQL queries; it does not automatically provide summary statistics or missing value counts. Option B (PySpark script) is possible but requires manual coding and Spark cluster management, making it less efficient for quick exploration.

Option C (Amazon QuickSight) is a BI tool that requires loading data into SPICE, which is not as streamlined for initial data profiling as Data Wrangler.

148
MCQhard

A data scientist examines a dataset with 100 features and suspects that some features are redundant due to high pairwise correlations. Which EDA technique should the scientist use to systematically identify groups of highly correlated features?

A.Generate a correlation matrix and visualize it as a heatmap.
B.Plot histograms for each feature.
C.Create scatter plots for each pair of features.
D.Use box plots to identify outliers.
AnswerA

Heatmap of correlation matrix quickly reveals high pairwise correlations.

Why this answer

A correlation matrix heatmap allows systematic identification of groups of highly correlated features by visually highlighting high pairwise correlations. Option B is incorrect because histograms show univariate distributions, not relationships between features. Option C is incorrect because scatter plots for each pair would be time-consuming and not systematic for 100 features.

Option D is incorrect because box plots show outliers, not correlations.

149
MCQhard

During EDA, a data scientist plots the distribution of a feature and sees a bimodal pattern. What does this likely indicate?

A.The data may contain two distinct groups.
B.The feature has missing values.
C.The feature contains outliers.
D.The feature needs to be standardized.
AnswerA

Bimodal suggests mixture of two populations.

Why this answer

A bimodal distribution has two distinct peaks, which typically indicates that the data contains two different subpopulations or clusters. This is a common finding in exploratory data analysis (EDA) when the feature is influenced by a categorical variable with two categories. For example, in a dataset of customer purchases, transaction amounts may be bimodal if there are two types of customers (e.g., individuals and businesses).

Therefore, option A is correct. Option B is incorrect because missing values usually appear as a separate bar or a spike at a specific value, not as a second peak. Option C is incorrect because outliers typically appear as extreme values far from the main distribution, not as a second mode.

Option D is incorrect because standardization (scaling to zero mean and unit variance) does not change the shape of the distribution; it only changes the scale.

150
Multi-Selectmedium

A data scientist is performing EDA on a dataset with 100 features. They want to reduce dimensionality by removing highly correlated features. Which TWO approaches are appropriate? (Choose TWO.)

Select 2 answers
A.Use feature importance from a random forest to select top features.
B.Remove features with low variance using VarianceThreshold.
C.Compute a correlation matrix and remove one feature from each pair with correlation >0.95.
D.Use Principal Component Analysis (PCA) and select components that explain 95% of variance.
E.Apply L1 regularization (Lasso) during model training to zero out coefficients of correlated features.
AnswersC, D

This directly removes redundant features.

Why this answer

Options C and D are correct. Option C directly addresses dimensionality reduction by removing highly correlated features, which reduces redundancy. Option D uses PCA to create uncorrelated components, effectively reducing dimensionality while preserving variance.

Option A is incorrect because feature importance from random forest is used for selecting features predictive of the target, not for removing correlated features per se. Option B is incorrect because VarianceThreshold removes features with low variance, not specifically for correlation. Option E is incorrect because L1 regularization (Lasso) is a modeling technique that zeroes out coefficients during model training, not a method for EDA.

← PreviousPage 2 of 6 · 381 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Exploratory Data Analysis questions.