Courseiva

CCNA Exploratory Data Analysis Questions

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

151
MCQhard

During exploratory data analysis on a dataset with 1 million rows, a data scientist notices that the distribution of the target variable is highly imbalanced (99% class A, 1% class B). Which technique should be applied to address this imbalance before model training?

A.Randomly undersample the majority class to match the minority class size
B.Apply standard scaling to all features
C.Use PCA to reduce dimensionality and oversample in principal component space
D.Use SMOTE to generate synthetic samples for the minority class
AnswerD

SMOTE creates synthetic examples to balance classes.

Why this answer

SMOTE (Synthetic Minority Oversampling Technique) generates synthetic samples for the minority class, balancing the dataset. Option A is wrong because random undersampling can discard important data. Option B is wrong because scaling does not address imbalance.

Option C is wrong because PCA does not fix imbalance.

152
MCQmedium

A data scientist is exploring a dataset containing customer transactions. They want to create a feature that captures the average purchase amount per customer over the last 30 days. Which approach is most efficient in Amazon SageMaker Processing?

A.Use Amazon Athena SQL query with GROUP BY
B.Use PySpark with window functions in SageMaker Processing
C.Use a Python script with a for loop to calculate per customer
D.Use pandas groupby and rolling functions
AnswerB

Correct: PySpark window functions are optimized for large-scale grouped rolling aggregates.

Why this answer

Using PySpark with window functions in SageMaker Processing allows efficient distributed computation for grouped time-series aggregations like average purchase amount per customer over the last 30 days. Option A is wrong because Amazon Athena SQL requires moving data out of SageMaker Processing and may not be as tightly integrated. Option C is wrong because iterating over rows with a Python for loop is inefficient and does not scale.

Option D is wrong because pandas groupby and rolling functions may not scale to large datasets in a distributed environment; SageMaker Processing with PySpark provides better performance.

153
MCQeasy

A data analyst is exploring a dataset with a target variable that is highly imbalanced. The minority class represents only 1% of the data. Which technique should the analyst use to better understand the relationships between features and the minority class?

A.Apply SMOTE to the dataset before analysis.
B.Use random sampling to reduce the dataset size.
C.Scale the features using Min-Max scaling.
D.Use stratified sampling to create a balanced sample for analysis.
AnswerD

Stratified sampling preserves class proportions.

Why this answer

Stratified sampling ensures the minority class is proportionally represented in the sample, allowing meaningful analysis. Option A is wrong because SMOTE generates synthetic data, which is not appropriate for initial exploratory analysis. Option B is wrong because random sampling may miss the minority class entirely.

Option C is wrong because scaling features does not address class imbalance.

154
MCQhard

A data scientist is performing EDA on a time series dataset of daily sales. The data scientist observes a pattern that repeats every 7 days. Which characteristic of the time series is being observed?

A.Stationarity
B.Autocorrelation
C.Seasonality
D.Trend
AnswerC

Seasonality is a periodic pattern with a fixed frequency.

Why this answer

A pattern that repeats at a fixed frequency (every 7 days) is called seasonality. Option A is wrong because trend is a long-term increase or decrease. Option C is wrong because autocorrelation measures correlation with lagged values, not a repeating pattern.

Option D is wrong because stationarity refers to constant mean/variance over time.

155
MCQeasy

During exploratory data analysis, a data scientist plots the distribution of a numerical feature and observes a heavy right skew. The feature has many outliers at the high end. Which transformation is most appropriate to reduce skewness?

A.Apply a log transformation to the feature.
B.Apply z-score normalization.
C.Apply one-hot encoding.
D.Apply min-max scaling.
AnswerA

Log transformation compresses high values and can make the distribution more symmetric.

Why this answer

A log transformation compresses the range of the data, reducing the impact of extreme values and pulling in the long tail of a right-skewed distribution. This makes the feature more normally distributed, which is often required for linear models and many statistical tests. It is the standard technique for handling positive-valued features with heavy right skew.

Exam trap

AWS often tests the distinction between scaling (which changes range) and transformation (which changes distribution shape), so the trap here is that candidates might pick min-max scaling or z-score normalization thinking they handle outliers, but they only rescale without fixing skewness.

How to eliminate wrong answers

Option B is wrong because z-score normalization (standardization) centers the data around zero with unit variance but does not change the shape of the distribution; it will still be skewed. Option C is wrong because one-hot encoding is used for categorical features, not for transforming numerical features to reduce skewness. Option D is wrong because min-max scaling rescales the feature to a fixed range (e.g., [0,1]) but does not alter the distribution's skewness; outliers remain outliers in the scaled range.

156
MCQeasy

A data scientist is analyzing a dataset with a timestamp column. The goal is to identify seasonality and trends. Which visualization technique is most suitable?

A.Time series line plot of the target variable over time.
B.Box plot of the target variable grouped by day of week.
C.Scatter plot of the target variable vs. the timestamp.
D.Heatmap of correlation between all features.
AnswerA

Line plots are standard for time series data.

Why this answer

A time series line plot is the standard visualization for identifying trends and seasonality over time. Option B (box plot grouped by day of week) can show distributions but may not reveal trends or seasonality clearly. Option C (scatter plot of target vs. timestamp) can show patterns but may be less clear than a line plot for time series.

Option D (heatmap of correlations) is for exploring relationships between features, not for time series analysis.

157
MCQhard

A data scientist is trying to read a CSV file from S3 bucket 'my-bucket' with key 'training/data.csv' using an IAM role with the attached policy shown in the exhibit. The read operation fails with an Access Denied error. What is the most likely cause?

A.The policy does not include the s3:ListBucket permission, which is required to access the object.
B.The object is encrypted with SSE-KMS and the role does not have kms:Decrypt permission.
C.The resource ARN in the first statement should be 'arn:aws:s3:::my-bucket/training' without the wildcard.
D.The policy explicitly denies s3:GetObject because of the second statement with the trailing slash.
AnswerA

To read an S3 object, the principal needs both s3:GetObject on the object and s3:ListBucket on the bucket (or at least the bucket-level permission to allow access). The policy only grants object-level permissions, not bucket-level ListBucket.

Why this answer

The s3:GetObject permission alone is sufficient for direct object retrieval using the object's full key (e.g., via AWS CLI `aws s3api get-object`). However, many AWS services and tools (such as the S3 console, Amazon Athena, or AWS Glue) implicitly invoke a ListObjects API call to resolve the object path or display the bucket contents, which requires the s3:ListBucket permission. Without it, these operations fail with an Access Denied error even though GetObject is granted.

In this scenario, the error likely occurs because the tool or service used to read the file performs a ListObjects call first.

Exam trap

The MLS-C01 exam often tests the nuanced distinction between object-level permissions (GetObject) and bucket-level permissions (ListBucket). A common pitfall is assuming that GetObject alone is sufficient for all read operations, ignoring the fact that many S3 interactions (e.g., via the console or certain SDK methods) implicitly require ListBucket to navigate the bucket hierarchy. This question highlights that even with GetObject allowed, the absence of ListBucket can cause an Access Denied error.

How to eliminate wrong answers

Option B is wrong because the question does not mention any encryption settings on the object, and the error is Access Denied, not a KMS-related permission error (which would typically return a 400 Bad Request with a KMS-specific message). Option C is wrong because the resource ARN 'arn:aws:s3:::my-bucket/training/*' correctly grants access to all objects under the 'training/' prefix; removing the wildcard would restrict access to a single object named 'training' (without a trailing slash), which is not the intended scope. Option D is wrong because the second statement with a trailing slash ('arn:aws:s3:::my-bucket/training/') does not explicitly deny s3:GetObject; it only grants s3:GetObject on objects with keys starting with 'training/' (the trailing slash is part of the prefix pattern, not a denial).

158
Multi-Selectmedium

Which THREE of the following are valid techniques for detecting outliers in a dataset during exploratory data analysis? (Select THREE.)

Select 3 answers
A.Z-score method: flag points with absolute Z-score > 3.
B.Linear regression residuals.
C.Isolation Forest algorithm.
D.K-means clustering.
E.Interquartile Range (IQR) method: flag points outside 1.5*IQR from quartiles.
AnswersA, C, E

Z-score is a standard outlier detection technique.

Why this answer

Z-score, IQR, and Isolation Forest are all common outlier detection methods. Option B (Linear regression) is not for outlier detection; it models relationships between variables. Option D (K-means) is a clustering algorithm, not primarily for outlier detection.

159
MCQhard

A data scientist is granted the IAM policy shown in the exhibit. The data scientist can query the 'data-lake-bucket' using Athena and get results. However, when the data scientist tries to run a CTAS (CREATE TABLE AS SELECT) query in Athena to write results to a new S3 location, the query fails. What is the most likely reason?

A.The policy does not grant athena:CreateTable permission.
B.The policy does not grant s3:PutObject permission on the bucket.
C.The policy does not grant permissions to the Glue Data Catalog.
D.The policy uses a wildcard for Athena actions, which is not allowed.
AnswerB

CTAS queries write output to S3, requiring s3:PutObject.

Why this answer

The policy allows s3:GetObject and s3:ListBucket, but not s3:PutObject, which is required for CTAS queries. Option A is wrong because the policy uses resource-level permissions for S3. Option C is wrong because Athena does not require Glue Data Catalog permissions for CTAS if the table metadata is already stored.

Option D is wrong because the policy does not restrict Athena resource ARNs.

160
MCQmedium

During EDA, a data scientist finds that a numeric feature has many outliers. The feature will be used in a linear regression model. Which approach should the scientist take to handle the outliers?

A.Remove all rows with outlier values.
B.Apply a logarithmic transformation to the feature.
C.Standardize the feature using Z-score normalization.
D.Cap the feature values at the 1st and 99th percentiles.
AnswerD

Correct. Capping at percentiles limits extreme values, reducing their impact while preserving data size.

Why this answer

Capping (winsorizing) the feature values at the 1st and 99th percentiles limits the influence of extreme outliers while retaining all data points. This is particularly important for linear regression, which is sensitive to outliers. Option A is wrong because removing all rows with outliers can lead to significant data loss and bias.

Option B is wrong because a logarithmic transformation reduces skew but does not eliminate the impact of outliers; it only compresses their range. Option C is wrong because Z-score normalization standardizes the data but does not reduce the influence of outliers; extreme values remain extreme relative to the distribution.

Exam trap

Candidates often confuse capping (winsorization) with standardization or transformation. Standardization does not mitigate outliers; it only rescales the data. The key is to limit extreme values using percentile-based capping.

161
Multi-Selecthard

A data scientist is analyzing a dataset with missing values. Which THREE methods are appropriate for handling missing data during EDA and preprocessing?

Select 3 answers
A.Remove rows with any missing values
B.Impute missing values with the mean of the column
C.Replace missing values with 0
D.Ignore missing values and proceed with modeling
E.Impute missing values with the median of the column
AnswersA, B, E

Listwise deletion is acceptable if missing is MCAR and few rows.

Why this answer

(remove rows with any missing values) is appropriate if missing data is random and limited. Option B (impute with mean) is commonly used for numeric features without outliers. Option E (impute with median) is robust to outliers.

Option C (replace missing values with 0) is generally not recommended as it can introduce bias unless 0 is a valid value. Option D (ignore missing values and proceed with modeling) is problematic because most algorithms cannot handle missing values and will raise errors.

162
MCQeasy

A data scientist is analyzing a dataset with numerical features and a binary target variable. The data scientist creates a pairplot and notices that one feature has a bimodal distribution when colored by the target class. What does this observation suggest?

A.The feature is irrelevant and should be removed.
B.The feature is likely predictive of the target.
C.The feature contains outliers that need to be removed.
D.The feature has missing values that need to be imputed.
AnswerB

Different distributions for each class indicate the feature can separate the classes.

Why this answer

A bimodal distribution separated by class indicates the feature can help distinguish between the classes, making it predictive. Option A is wrong because bimodality separated by class suggests the feature is useful, not irrelevant. Option C is wrong because bimodality is not an indication of outliers; it shows a pattern related to the target.

Option D is wrong because bimodality does not imply missing values.

163
MCQhard

A data scientist is working on a binary classification problem with a highly imbalanced dataset (1% positive class). They have applied oversampling using SMOTE and trained a logistic regression model. The model achieves 99% accuracy on the test set, but the recall for the positive class is only 5%. What is the most likely cause?

A.SMOTE was applied before splitting the data into training and test sets
B.The model is overfitting due to lack of regularization
C.Accuracy is not a suitable metric for imbalanced data
D.Logistic regression is inappropriate for imbalanced datasets
AnswerA

Applying SMOTE before splitting the data causes data leakage, artificially inflating training accuracy but not improving generalization, leading to poor recall.

Why this answer

Applying SMOTE before splitting the data causes data leakage. SMOTE generates synthetic samples based on the entire dataset, including the test set, so synthetic versions of test samples can appear in the training set. This inflates training accuracy artificially but does not improve the model's ability to generalize to unseen data, leading to poor recall on the true test set.

Option B is incorrect because while overfitting due to lack of regularization can cause poor generalization, the specific pattern of high accuracy but very low recall is characteristic of data leakage from preprocessing before splitting. Option C is incorrect because accuracy is indeed a poor metric for imbalanced data, but the low recall (5%) indicates a fundamental issue with the model's ability to detect positives, which goes beyond metric choice. Option D is incorrect because logistic regression can be effective for imbalanced datasets when properly handled (e.g., with class weights or resampling); the problem here stems from the improper application of SMOTE, not the algorithm itself.

164
MCQhard

A data scientist is performing exploratory data analysis on a dataset with mixed data types: numerical, categorical, and text. They want to use Amazon SageMaker Data Wrangler to create a quick visualization dashboard. Which set of transformations should they apply in Data Wrangler to handle all data types appropriately?

A.Use the built-in analysis: summary statistics for numerical, word cloud for text, and frequency for categorical.
B.Convert all features to numerical using one-hot encoding and then create a scatter matrix.
C.Apply TF-IDF vectorization to text and then run k-means clustering.
D.Use PCA to reduce dimensionality and then visualize the first two components.
AnswerA

These are appropriate EDA visualizations for different data types.

Why this answer

Amazon SageMaker Data Wrangler provides built-in analysis types that are appropriate for EDA with mixed data types: summary statistics for numerical features, word clouds for text, and frequency counts for categorical features. These allow quick visualization without complex transformations. Option B is incorrect because one-hot encoding and scatter matrix are not suitable for mixed types, and Data Wrangler does not offer a scatter matrix as a built-in analysis.

Option C is incorrect because TF-IDF vectorization and k-means clustering are feature engineering and modeling steps, not EDA. Option D is incorrect because PCA is for dimensionality reduction and not a standard EDA visualization technique.

165
Multi-Selecteasy

Which TWO of the following are common techniques for handling missing values in a dataset during exploratory data analysis? (Select TWO.)

Select 2 answers
A.Apply feature scaling to normalize the data.
B.Remove rows or columns with missing values if they are few.
C.Use Principal Component Analysis (PCA) to reduce dimensionality.
D.Apply one-hot encoding to the missing values.
E.Impute missing values with the mean or median of the column.
AnswersB, E

Deletion is a valid approach when missing data is minimal.

Why this answer

The correct techniques for handling missing values are removing rows/columns with missing values (if the proportion is small) and imputing missing values with statistical measures like the mean or median. Options A (feature scaling), C (PCA), and D (one-hot encoding) are not methods for dealing with missing data; they serve other purposes such as normalization, dimensionality reduction, and encoding categorical variables.

166
MCQmedium

A machine learning engineer is analyzing a dataset and observes that the distribution of a continuous feature is heavily right-skewed. Which transformation is most likely to make the distribution approximately normal?

A.Square root transformation
B.Exponential transformation
C.Log transformation
D.Box-Cox transformation with lambda = 0
AnswerC

Log transformation is standard for right-skewed data.

Why this answer

A log transformation (C) is most appropriate for heavily right-skewed continuous data because it compresses the long right tail and can make the distribution approximately normal. Square root (A) is less effective for severe skewness. Exponential (B) would amplify the skewness.

Box-Cox with lambda = 0 (D) is equivalent to log, but since log is explicitly given and commonly known, option C is the direct and correct choice.

167
MCQmedium

A team is exploring a dataset with missing values in multiple columns. They want to decide whether to drop rows or impute values. Which approach is most appropriate for exploratory data analysis?

A.Impute missing values with the mean of each column
B.Analyze the missing data pattern using visualizations and summary statistics
C.Drop all rows with missing values to ensure data quality
D.Use Amazon SageMaker Data Wrangler to automatically impute missing values
AnswerB

Understanding the missing data pattern is crucial before deciding on imputation or deletion.

Why this answer

During EDA, the first step is to understand the pattern and extent of missing data using visualizations and summary statistics. This helps determine whether missingness is random or systematic, and guides the choice of imputation or deletion. Option A is wrong because imputing with the mean without understanding the missing mechanism can introduce bias.

Option C is wrong because dropping rows may discard valuable data and reduce sample size unnecessarily. Option D is wrong because using SageMaker Data Wrangler is a specific tool and may not be necessary; EDA focuses on understanding data, not automated imputation.

168
MCQhard

Refer to the exhibit. A data scientist ran an S3 Select query on a large CSV file stored in Amazon S3. The output shows only 2 records returned, but the data scientist expected thousands. The file size is 10 GB. What is the MOST likely reason for the small result set?

A.The file needs to be indexed by S3 Select before querying.
B.The city column may have leading/trailing spaces or case differences.
C.The CSV file contains nested arrays that S3 Select cannot parse.
D.S3 Select does not support the WHERE clause on CSV files.
AnswerB

String comparison is exact; variations cause mismatches, reducing results.

Why this answer

S3 Select performs exact string matching by default, so if the WHERE clause filters on the city column, any leading/trailing spaces or case differences will cause mismatches, returning far fewer rows than expected. The query likely used a literal like 'New York' while the data contains ' New York ' or 'new york', resulting in only 2 matches instead of thousands.

Exam trap

The MLS-C01 exam often tests the nuance that S3 Select does not automatically trim or normalize string data, so candidates mistakenly assume the query engine handles such common data quality issues.

How to eliminate wrong answers

Option A is wrong because S3 Select does not require indexing; it scans the entire file and applies the query on the fly. Option C is wrong because S3 Select can parse CSV files with nested arrays as long as the CSV is well-formed (e.g., quoted fields), and nested arrays are not inherently unsupported. Option D is wrong because S3 Select fully supports the WHERE clause on CSV files, including standard SQL predicates.

169
MCQmedium

A data engineer is performing EDA on a dataset containing user activity logs from a mobile app. The dataset has 10 million rows and includes columns: 'user_id', 'event_type', 'timestamp', 'device_type', and 'session_duration'. The engineer uses Amazon Athena to query the data stored in S3 as CSV files. The engineer runs a query to find the average session_duration per device_type, but the query takes over 5 minutes and scans 100 GB of data. The engineer wants to reduce query cost and improve performance for future EDA. The dataset is not partitioned, and the engineer anticipates frequent queries filtering on 'timestamp' and 'device_type'. Which action will most effectively reduce data scanned?

A.Partition the table by date derived from timestamp and convert to Parquet.
B.Use random sampling to query a subset of data.
C.Convert the data to Parquet format and use columnar storage.
D.Partition the table by device_type.
AnswerA

Combining partitioning and columnar storage maximizes reduction in scanned data.

Why this answer

The most effective because it combines partitioning by date (derived from timestamp) and converting to Parquet format. Partitioning by date enables partition pruning for queries filtering on 'timestamp', drastically reducing the amount of data scanned. Parquet provides columnar storage and compression, further minimizing I/O and cost.

Option C (Parquet without partitioning) still requires full file scans when filters are applied. Option B (random sampling) sacrifices accuracy for speed, which is undesirable for accurate EDA. Option D (partitioning by device_type) helps only for device_type filters, not for the common timestamp filters mentioned in the scenario.

170
Multi-Selecthard

Which THREE of the following are common causes of multicollinearity in a linear regression model?

Select 3 answers
A.Including a polynomial term (e.g., x^2) along with the original variable
B.Including interaction terms between independent variables
C.Including all dummy variables for a categorical feature
D.Having two or more predictors that are highly correlated
E.Presence of outliers in the target variable
AnswersA, C, D

Polynomial terms are correlated with the original variable.

Why this answer

Options A, C, and D are correct. Dummy variable trap occurs when all categories are included without dropping one. Highly correlated predictors directly cause multicollinearity.

Including polynomial terms creates correlation with the original variable. B (interaction terms) can also cause but is less common. E (outliers) does not cause multicollinearity.

171
MCQeasy

A data scientist receives the above error during model training. What is the most likely cause?

A.The training data contains missing or infinite values.
B.The learning rate is too high.
C.The data format is incorrect; expected CSV but received JSON.
D.The instance type lacks sufficient memory.
AnswerA

Correct: The error suggests NaN or infinite values in the data. Cleaning the data by imputing or removing such values resolves the issue.

Why this answer

The error message indicates that the training data contains missing (NaN) or infinite values, which causes the loss function to become NaN. This is a common issue when data has not been properly cleaned. Option B is wrong because a high learning rate typically leads to divergence or instability, not NaN values due to data issues.

Option C is wrong because an incorrect data format would result in a parsing error, not a NaN loss. Option D is wrong because insufficient memory leads to an out-of-memory error, not NaN values.

172
MCQhard

A data scientist is performing EDA on a dataset with 1 million rows. They suspect the dataset contains duplicate rows. Which approach is most efficient to identify duplicates in Amazon SageMaker Studio?

A.Write a Python script that loops through each row and compares to a set of seen rows.
B.Use pandas drop_duplicates and then check the length difference.
C.Use DuckDB SQL query: SELECT COUNT(*) - COUNT(DISTINCT *) FROM table.
D.Use Amazon Athena to query the S3 data with COUNT(DISTINCT *).
AnswerC

DuckDB efficiently processes large DataFrames in-memory.

Why this answer

DuckDB is an in-process SQL OLAP database that can run on a single machine and efficiently handle large datasets. Option A (Python loop) is slow; Option B (pandas drop_duplicates) may be memory-intensive; Option D (Athena) is serverless but incurs cost and latency.

173
MCQhard

A data scientist is working with a dataset containing text reviews. The goal is to build a sentiment analysis model. Which EDA step is most critical before feature extraction?

A.Calculating the vocabulary size
B.Creating a word cloud
C.Removing stop words
D.Checking the distribution of sentiment labels
AnswerD

Class imbalance can significantly impact model performance.

Why this answer

Checking the distribution of sentiment labels is critical before feature extraction because it reveals class imbalance, which can bias the model towards the majority class and affect evaluation metrics. This EDA step enables informed decisions about resampling or weighting techniques. Option A (vocabulary size) is not a critical first step; option B (word cloud) is a visualization tool, not essential; option C (removing stop words) is a preprocessing step, not part of EDA.

Exam trap

A common pitfall is jumping directly into text preprocessing (stop word removal, tokenization) without first examining the label distribution, which can lead to biased models and misleading accuracy metrics.

174
MCQhard

A data scientist is exploring a dataset with 500 features and 100,000 observations for a regression problem. The scientist notices that many features are highly correlated with each other. Which technique should the scientist use to reduce multicollinearity and improve model interpretability during exploratory data analysis?

A.Compute mutual information between each feature and the target, and keep only the top 50 features.
B.Apply Principal Component Analysis (PCA) to reduce the feature space.
C.Use Lasso regression to select features with non-zero coefficients.
D.Calculate Variance Inflation Factor (VIF) for each feature and remove those with VIF > 10.
AnswerD

VIF quantifies how much a feature is explained by other features; high VIF indicates multicollinearity.

Why this answer

Variance Inflation Factor (VIF) is a measure of multicollinearity among features. Removing features with high VIF (e.g., > 10) reduces multicollinearity and retains interpretability. Option A is incorrect because mutual information measures dependency between feature and target, not multicollinearity.

Option B is incorrect because PCA creates new features that are linear combinations, reducing interpretability. Option C is incorrect because Lasso regression is a modeling technique, not typically used during exploratory data analysis, and it may not remove all correlated features.

175
MCQmedium

A data scientist is analyzing a dataset with 500 features and 10,000 rows. The target variable is binary. After training a logistic regression model, the coefficients show many non-zero values but the model has low accuracy on the test set. Which EDA step should the data scientist perform next to improve model performance?

A.Apply Principal Component Analysis (PCA) to reduce dimensionality.
B.Collect more training data to improve generalization.
C.Normalize the features using StandardScaler.
D.Use correlation analysis or mutual information to select the most relevant features.
AnswerD

Feature selection removes irrelevant features, reducing noise and overfitting.

Why this answer

With 500 features and low accuracy, the model likely suffers from overfitting due to irrelevant or redundant features. Correlation analysis or mutual information helps select the most relevant features, reducing noise and improving generalization. Option A (PCA) reduces dimensionality but creates uninterpretable components and may lose feature relationships, not directly addressing irrelevant features.

Option B (collect more data) may help but does not solve the core issue of irrelevant features. Option C (normalization) only scales features, not reduce them, and logistic regression is not sensitive to scale if coefficients are interpreted carefully; overfitting is more likely due to too many features.

176
MCQmedium

A data scientist is analyzing a dataset with missing values in several features. The dataset is large (10 million rows) and stored in an S3 bucket as CSV files. The scientist wants to use AWS Glue to catalog the data and then use Amazon Athena to query it. However, the missing values are causing errors in downstream machine learning models. Which approach should the scientist take to handle missing values during exploratory data analysis?

A.Use Amazon SageMaker Data Wrangler to create a data flow that imputes missing values and export the transformed dataset to S3.
B.Use AWS Glue ETL jobs with a custom transformation script that uses the AWS Glue library to drop or impute missing values before writing to a new dataset.
C.Use Amazon Redshift Spectrum with an external table to query the data and use SQL COALESCE to handle missing values on the fly.
D.Use Amazon Athena to run SQL queries that impute missing values and write the results to a new table.
AnswerB

AWS Glue provides native transforms like DropNullFields and FillWithValue, and custom scripts allow handling missing values efficiently at scale.

Why this answer

AWS Glue ETL jobs can be used with custom scripts to handle missing values by either dropping rows or imputing values using built-in transforms or custom logic. This is ideal for large-scale datasets stored in S3 as CSV files. Glue integrates with the AWS Glue library for transforming data.

Option A (SageMaker Data Wrangler) is more suitable for interactive data preparation and visualization, but not for automated, large-scale ETL processing of 10 million rows.

Option C (Redshift Spectrum) is primarily a query engine that can query data in S3, but it does not provide built-in data cleaning capabilities for missing values; you would need to use SQL functions like COALESCE, but it's not the best approach for comprehensive ETL.

Option D (Athena) is also a query engine and cannot modify the underlying data; it can impute values in query results, but not write transformed data back to S3 as a cleaned dataset without additional steps.

177
MCQeasy

A data scientist is investigating an application that logs errors to Amazon CloudWatch Logs. The data scientist runs the CloudWatch Logs Insights query shown in the exhibit. The query returns no results, even though the data scientist knows errors have occurred. What is the most likely cause?

A.The stats count() function is misspelled.
B.The filter pattern is case-sensitive and the log messages use a different case for 'error'.
C.The query sorts by timestamp descending, which hides results.
D.The bin(5m) function is not supported in CloudWatch Logs Insights.
AnswerB

CloudWatch Logs Insights is case-sensitive; 'ERROR' will not match 'Error'.

Why this answer

CloudWatch Logs Insights queries are case-sensitive by default; the filter pattern 'ERROR' will not match log messages that use 'error' or 'Error'. Option A is incorrect because the stats count() function is spelled correctly in the query. Option C is incorrect because sorting by timestamp descending does not prevent results from being returned; it only affects the order.

Option D is incorrect because bin(5m) is a valid function in CloudWatch Logs Insights when there are logs within the time range.

178
MCQmedium

A company is storing customer transaction data in Amazon S3 as CSV files. A data scientist uses AWS Glue to crawl the data and create a table in the AWS Glue Data Catalog. When querying the table with Amazon Athena, the data scientist notices that some columns have NULL values where data should exist. The data scientist examines the raw CSV files and confirms the data is present. What is the most likely cause of the NULL values?

A.The CSV files have different schemas (e.g., different columns) across partitions.
B.Athena is configured to skip corrupted records, causing NULLs.
C.The Glue crawler incorrectly inferred the data type of the columns.
D.The CSV files use a custom delimiter that the Glue crawler does not recognize.
AnswerA

Schema evolution causes missing columns to appear as NULL when queried.

Why this answer

The most likely cause is that the CSV files have different schemas across partitions. When AWS Glue crawler infers the schema, it samples a subset of files. If partitions have different columns or column order, the inferred schema may not include columns present only in later partitions.

When Athena queries the table, it uses the schema from the Data Catalog; columns missing from the schema appear as NULL. Option A is correct. Option B is incorrect because Athena does not skip corrupted records by default; it would fail on parse errors.

Option C is incorrect because data type inference errors would cause different issues, such as type mismatches, not NULLs for existing data. Option D is incorrect because the Glue crawler can handle custom delimiters if configured; the issue here is schema mismatch, not delimiter recognition.

179
Multi-Selecthard

A data scientist is evaluating feature engineering options for a dataset containing a categorical variable 'education_level' with values: High School, Bachelor, Master, PhD. The target variable is continuous. Which THREE encoding methods are appropriate for this ordinal categorical variable? (Choose 3)

Select 3 answers
A.One-hot encoding
B.Target encoding (mean of target per category)
C.Hash encoding (using feature hashing)
D.Label encoding (e.g., High School=0, Bachelor=1, Master=2, PhD=3)
E.Binary encoding (convert to binary representation)
AnswersA, B, D

One-hot encoding is a safe option that does not assume any order, though it increases dimensionality.

Why this answer

Options A, B, and D are correct: One-hot encoding (A) can be used for ordinal variables, though it ignores order, it is still valid. Target encoding (B) captures the relationship with the target and respects ordinality. Label encoding (D) preserves the ordinal nature.

Option C (hash encoding) is incorrect because it is typically used for high-cardinality nominal variables, not ordinal, and may lose interpretability. Option E (binary encoding) is also incorrect because it is designed for nominal categories and does not maintain order.

180
MCQeasy

A data scientist wants to understand the statistical relationship between two categorical variables in a dataset. Which test is most appropriate?

A.Chi-squared test
B.Pearson correlation coefficient
C.Student's t-test
D.ANOVA test
AnswerA

Correct: Chi-squared test is used for association between categorical variables.

Why this answer

The chi-squared test is used to determine if there is a significant association between two categorical variables, which is exactly what the data scientist wants to understand. Option B (Pearson correlation coefficient) is incorrect because it measures linear relationship between two continuous variables. Option C (Student's t-test) is used to compare means of two groups, typically for continuous data.

Option D (ANOVA) is used to compare means across three or more groups, also for continuous data.

181
Multi-Selecthard

A data scientist is analyzing a dataset with several categorical features and a binary target. The scientist wants to check for association between each categorical feature and the target. Which THREE statistical tests are appropriate?

Select 3 answers
A.ANOVA
B.Pearson correlation coefficient
C.Chi-square test of independence
D.Mutual information
E.Cramér's V
AnswersC, D, E

Tests association between two categorical variables.

Why this answer

Options C, D, and E are correct. The chi-square test of independence is used to test for association between two categorical variables, such as a categorical feature and a binary target. Cramér's V is a measure of association derived from chi-square, indicating the strength of association.

Mutual information is a non-parametric measure that captures dependency between variables, including non-linear relationships, and is suitable for categorical data. Option A (ANOVA) is used for comparing means across groups and is appropriate for a continuous dependent variable, not a binary target. Option B (Pearson correlation coefficient) measures linear correlation between two continuous variables and is not suitable for categorical data.

182
MCQhard

A data scientist is performing EDA on a dataset of customer churn. The dataset includes a categorical feature 'Region' with 100 unique values. What is the best way to encode this feature for a tree-based model?

A.Replace each category with its frequency in the dataset
B.Use the feature as a categorical variable directly in the tree-based model
C.Label encode the feature (assign integers 0-99)
D.One-hot encode the feature
AnswerB

Many tree-based models (e.g., LightGBM, CatBoost) handle high-cardinality categoricals efficiently.

Why this answer

Many tree-based model implementations (e.g., LightGBM, CatBoost) support categorical features natively, handling high cardinality without encoding. Option A is wrong because frequency encoding can introduce target leakage if applied without proper cross-validation. Option C is wrong because label encoding imposes an ordinal relationship that the tree might misinterpret.

Option D is wrong because one-hot encoding with 100 categories creates many sparse columns, leading to inefficiency and potential overfitting.

183
Multi-Selecteasy

Which TWO of the following are common techniques for detecting outliers in a dataset?

Select 2 answers
A.Z-score
B.Interquartile range (IQR) method
C.Principal Component Analysis (PCA)
D.K-means clustering
E.Standard scaling
AnswersA, B

Z-score measures how many standard deviations a point is from the mean; values beyond a threshold (e.g., 3) are outliers.

Why this answer

Z-score identifies outliers based on standard deviations from the mean. IQR method uses quartile ranges to flag points outside 1.5*IQR. Standard scaling, PCA, and K-means are not primarily outlier detection methods.

184
MCQhard

An IAM policy is attached to a data scientist's role. The scientist is trying to list objects in the 'data-bucket' using Amazon Athena. The query fails with an access denied error. What is the MOST likely reason?

A.The policy does not allow s3:ListBucket on the bucket.
B.The policy has a syntax error.
C.The query is trying to read data from the 'sensitive/' prefix.
D.The s3:GetObject action is explicitly denied for all objects.
AnswerC

Deny overrides Allow for that prefix.

Why this answer

The IAM policy likely includes a Deny statement for the 'sensitive/' prefix, causing access denied when Athena attempts to read data from that location. Option A is incorrect because s3:ListBucket is typically required and allowed; the error is access denied rather than a forbidden error. Option B is incorrect because a syntax error would usually produce an invalid policy error, not an access denied error during query execution.

Option D is incorrect because if s3:GetObject were explicitly denied for all objects, the error would occur for all queries, but the issue is specific to the 'sensitive/' prefix.

185
MCQmedium

A data scientist is performing EDA on a dataset with a timestamp column. They want to detect seasonality. Which visualization is most appropriate?

A.Box plot of value grouped by month
B.Bar chart of average value per month
C.Line plot of value over time
D.Scatter plot of timestamp vs. value
AnswerC

Line plot of value over time directly visualizes the temporal trend, making seasonal patterns (e.g., repeating cycles) easily identifiable.

Why this answer

A line plot of value over time directly visualizes the temporal trend, making seasonal patterns (e.g., repeating cycles) easily identifiable. Option A (box plot of value grouped by month) shows the distribution per month but does not reveal the sequential order or cyclical pattern. Option B (bar chart of average value per month) averages out within-month variations and may obscure seasonality that occurs at finer granularity.

Option D (scatter plot of timestamp vs. value) can become cluttered with many points and does not connect observations in time, making it harder to detect seasonality.

186
Multi-Selecteasy

Which TWO of the following are common techniques for detecting outliers in a numerical feature?

Select 2 answers
A.Chi-square test
B.Standard deviation
C.Interquartile Range (IQR)
D.Z-score
E.Principal Component Analysis (PCA)
AnswersC, D

Outliers are defined as points beyond 1.5*IQR from Q1 or Q3.

Why this answer

Z-score and IQR are standard outlier detection methods. PCA can detect outliers but is not a common direct method. Chi-square is for categorical association.

Standard deviation alone is not a method.

187
MCQeasy

A data scientist is performing EDA on a dataset with 500,000 rows and 10 columns. The dataset is stored in an S3 bucket as CSV files. The scientist wants to generate summary statistics (mean, median, min, max) for all numeric columns. Which service allows the quickest ad-hoc analysis without provisioning any infrastructure?

A.AWS Glue ETL
B.Amazon Athena
C.Amazon SageMaker Data Wrangler
D.Amazon QuickSight
AnswerB

Amazon Athena can query data in S3 directly using SQL.

Why this answer

Amazon Athena can query data in S3 directly using SQL. Option A is wrong because AWS Glue ETL requires job setup. Option C is wrong because Amazon SageMaker Data Wrangler requires a notebook instance.

Option D is wrong because QuickSight is for visualization, not direct summary statistics.

188
MCQmedium

A data scientist is performing exploratory data analysis on a dataset with both numerical and categorical features. The scientist wants to visualize the pairwise relationships between numerical features and also see the distribution of each feature. Which type of plot should the scientist use?

A.Pair plot (scatter matrix) with histograms on the diagonal.
B.Box plot for each feature.
C.Heatmap of the correlation matrix.
D.Correlation matrix with numbers.
AnswerA

Correct. Pair plots display scatter plots for every pair of numerical features and histograms on the diagonal to show each feature's distribution.

Why this answer

A pair plot (scatter matrix) shows pairwise scatter plots for numerical features and histograms on the diagonal for distribution of each feature. Option B is incorrect because a box plot shows distribution of a single feature, not pairwise relationships. Option C is incorrect because a heatmap of the correlation matrix shows only correlation values, not distributions or actual data points.

Option D is incorrect because a correlation matrix with numbers only shows correlation coefficients, not individual feature distributions or pairwise scatter patterns.

189
MCQeasy

A data scientist needs to profile a large dataset in Amazon S3 to understand its schema, data types, and quality. Which AWS service can automatically generate a data profile with statistics and visualizations?

A.Amazon Athena
B.AWS Glue DataBrew
C.Amazon QuickSight
D.Amazon Redshift
AnswerB

DataBrew can profile data and generate statistics.

Why this answer

AWS Glue DataBrew provides data profiling capabilities, automatically generating a data profile with statistics and visualizations. Option A (Amazon Athena) is an interactive query service for analyzing data in S3 using standard SQL, but it does not generate data profiles. Option C (Amazon QuickSight) is a business analytics service for creating visualizations and dashboards, but it does not profile data automatically.

Option D (Amazon Redshift) is a data warehouse, not a data profiling service.

190
MCQeasy

A data scientist wants to visualize the correlation between a continuous feature and a binary target variable. Which plot is most appropriate?

A.Scatter plot with feature on x-axis and target on y-axis
B.Histogram of the feature
C.Box plot of the feature grouped by target class
D.Bar chart of target class counts
AnswerC

Box plot compares distributions across two groups.

Why this answer

A box plot displays the distribution of the continuous feature for each category of the binary target, allowing easy comparison of medians, spreads, and outliers. This reveals correlation: if the distributions differ notably between classes, the feature is likely correlated with the target. Option A is wrong because a scatter plot is typically used for two continuous variables, not a binary target.

Option B is wrong because a histogram shows the distribution of a single continuous variable, ignoring the target. Option D is wrong because a bar chart of target class counts only shows class frequency, not the relationship with the feature.

191
MCQmedium

A company is preparing a dataset for training a binary classification model. The dataset has a severe class imbalance (1% positive class). The data scientist wants to understand the impact of this imbalance on model performance before sampling. Which exploratory analysis step is MOST critical?

A.Compute the correlation matrix of all features with the target variable.
B.Check for missing values and outliers in the dataset.
C.Perform PCA and visualize the first two principal components colored by class.
D.Plot the distribution of each feature separately for the positive and negative classes.
AnswerD

Overlapping distributions indicate difficulty in classification.

Why this answer

The most critical step because plotting the distribution of each feature separately for the positive and negative classes allows the data scientist to visually assess class separability, overlap, and feature behavior under severe imbalance. This insight directly informs the impact of imbalance on model performance before any sampling. Options A, B, and C are less critical at this stage: correlation with the target (A) does not reveal class-level distributions; missing values and outliers (B) are important but not specific to understanding imbalance impact; PCA (C) is a dimensionality reduction technique that may obscure per-feature patterns and is not necessary for initial exploratory analysis of class distributions.

192
MCQeasy

A data scientist is working with a dataset that contains text reviews and a numeric rating (1-5). The goal is to predict the rating from the review text. During EDA, the scientist wants to check if there are any spelling errors or unusual characters. Which tool is BEST suited for this task?

A.Amazon SageMaker Data Wrangler with a custom transform for text cleaning.
B.Amazon Athena with SQL queries to find anomalies.
C.Amazon Comprehend to detect syntax and entities.
D.Amazon QuickSight to create word clouds.
AnswerC

Correct. Amazon Comprehend provides syntax analysis and entity detection, which can help identify unusual text patterns (e.g., misspelled words or odd characters) without custom coding. It is the most appropriate AWS AI service among the options for initial text inspection.

Why this answer

Amazon Comprehend is the best choice among the options because it is an AWS AI service that can detect syntax, entities, and key phrases in text. While it does not directly find spelling errors, it can identify unusual patterns or anomalies in text that may indicate misspellings or odd characters. SageMaker Data Wrangler is for tabular data, Athena is for SQL queries, and QuickSight is for visualization, none of which are specialized for text analysis in this context.

Exam trap

Candidates might think Amazon Comprehend can detect spelling errors directly, but it does not. It analyzes syntax and entities, which can help identify unusual patterns, but a custom solution or spell-check library would be needed for exact spelling correction.

193
MCQmedium

A data scientist is analyzing a dataset with missing values in several columns. The dataset contains customer demographic information and purchase history. Which approach should the data scientist take to handle missing values without introducing bias into the dataset?

A.Drop all rows with any missing values.
B.Impute missing values with the mean of each column.
C.Replace missing values with a constant, such as 0.
D.Use multiple imputation to estimate missing values.
AnswerD

Multiple imputation accounts for uncertainty and reduces bias.

Why this answer

Multiple imputation produces multiple estimates of missing values, accounting for the uncertainty in the imputation and reducing bias compared to simpler methods. Option A is wrong because dropping all rows with missing values can lead to loss of data and potential bias if missingness is not completely random. Option B is wrong because mean imputation can underestimate variance and distort relationships between variables.

Option C is wrong because replacing missing values with a constant (e.g., 0) introduces arbitrary values that can skew the data distribution.

194
MCQeasy

A data scientist is analyzing a dataset with many features and wants to identify which features are most correlated with the target variable. Which EDA technique should be used?

A.Box plots grouped by target
B.Scatter plot matrix
C.Histogram of each feature
D.Correlation matrix
AnswerD

Correlation matrix provides a compact view of pairwise correlations.

Why this answer

A correlation matrix displays pairwise Pearson correlation coefficients between all numeric features and the target variable, enabling quick identification of the most correlated features. Option A (box plots grouped by target) is useful for visualizing feature distributions across target categories but does not directly measure correlation strength. Option B (scatter plot matrix) can show pairwise relationships but becomes impractical with many features and lacks a single quantitative correlation measure.

Option C (histogram) only shows the distribution of a single feature, not its relationship with the target. Therefore, the correlation matrix is the appropriate EDA technique for identifying features most correlated with the target.

195
MCQhard

A data engineer is using AWS Glue to catalog a dataset with 200 columns. During exploratory data analysis, they run a crawler and then view the table schema in the AWS Glue Data Catalog. They notice that many columns are inferred as 'string' even though they contain numeric values. What is the most likely cause?

A.The data is stored in JSON format, which only supports string types.
B.The crawler sample size is too small, and the sampled rows contain non-numeric values.
C.The data is stored in Parquet format, which does not support numeric types.
D.The column names contain special characters that prevent type inference.
AnswerB

The crawler samples a subset; if the sample includes non-numeric values, it infers string.

Why this answer

The AWS Glue crawler samples a subset of rows to infer schema. If the sample size is too small or the sampled rows contain non-numeric values (e.g., headers, missing data, or text entries), the crawler may default to 'string' type for columns that are actually numeric. Options A, C, and D are incorrect: JSON files can contain numeric types, Parquet files support numeric types, and special characters in column names do not affect type inference.

196
MCQhard

During EDA, a data scientist discovers that two numerical features have a Pearson correlation coefficient of 0.95. Which action should the scientist take to avoid multicollinearity in a linear regression model?

A.Remove one of the features
B.Apply PCA to the two features
C.Use Ridge regression to penalize coefficients
D.Create polynomial features from the correlated pair
E.Apply min-max scaling to both features
AnswerA

Removing one feature eliminates multicollinearity and retains interpretability.

Why this answer

Pearson correlation of 0.95 indicates high multicollinearity, which can adversely affect linear regression by inflating standard errors. Removing one of the correlated features (Option A) is a straightforward solution to eliminate multicollinearity. Option B (PCA) reduces dimensionality but creates principal components that are linear combinations, losing interpretability; it also does not directly remove the original features.

Option C (Ridge regression) applies L2 regularization to shrink coefficients, which can mitigate multicollinearity but does not remove it; simply removing one feature is simpler. Option D (polynomial features) would introduce more correlated terms, worsening multicollinearity. Option E (min-max scaling) does not affect correlation.

Therefore, removing one feature is the best action.

197
MCQmedium

Refer to the exhibit. A data scientist is unable to query a table in Amazon Athena that is located in the 'my-data-bucket' S3 bucket. The IAM policy shown is attached to the scientist's role. What is the most likely reason for the failure?

A.The policy does not allow decrypting data encrypted with AWS KMS.
B.The policy does not allow athena:StartQueryExecution.
C.The policy does not allow s3:GetObject on the bucket.
D.The policy does not allow s3:PutObject to write query results to an S3 bucket.
AnswerD

Athena writes results to S3, requiring s3:PutObject.

Why this answer

Athena queries require permissions to write query results to an S3 bucket, typically via 's3:PutObject' on an output location. The policy only allows 's3:GetObject' and 's3:ListBucket' on the data bucket, but lacks any 's3:PutObject' permission, causing the failure. Option A is incorrect because the policy does not reference any KMS actions.

Option B is incorrect because 'athena:StartQueryExecution' is implicitly allowed (not denied), though it doesn't appear in the policy; Athena actions are not shown but the failure is due to S3 write permissions. Option C is incorrect because 's3:GetObject' is explicitly allowed on the bucket.

198
Multi-Selectmedium

A data scientist is performing EDA on a dataset with 1,000 features and 10,000 rows. The target is binary. The scientist wants to reduce dimensionality while preserving information related to the target. Which TWO methods are appropriate?

Select 2 answers
A.Principal Component Analysis (PCA)
B.Autoencoders
C.L1-regularized logistic regression
D.Mutual information-based feature selection
E.t-Distributed Stochastic Neighbor Embedding (t-SNE)
AnswersC, D

Can perform feature selection by shrinking coefficients to zero.

Why this answer

Options C and D are correct. L1-regularized logistic regression (option C) drives coefficients to zero for irrelevant features, effectively performing feature selection. Mutual information-based feature selection (option D) measures dependency between each feature and the target, selecting features with highest mutual information.

Option A (PCA) is unsupervised and may discard target-related variance. Option B (Autoencoders) is unsupervised and not directly target-aware. Option E (t-SNE) is for visualization, not feature selection.

199
MCQhard

A data scientist is working with a dataset containing text reviews. The goal is to classify sentiment. During EDA, they compute the word frequency distribution. They notice that the most frequent words are common stop words like 'the', 'and', 'a'. Which action should they take to improve the feature representation for modeling?

A.Use n-grams instead of unigrams to capture phrase patterns.
B.Add more stop words to the default list to remove even more common words.
C.Remove the stop words from the text before creating the bag-of-words representation.
D.Apply stemming to reduce words to their root forms.
AnswerC

Stop words are usually not informative for sentiment; removing them reduces noise.

Why this answer

The correct action is to remove stop words (option C) because stop words like 'the', 'and', 'a' are common across all documents and do not carry sentiment information. Removing them allows the model to focus on content words that are more indicative of sentiment. Option A (n-grams) captures phrase patterns but still includes stop words, so it does not address the issue.

Option B (adding more stop words) would remove even more words, potentially including some useful for sentiment, making it less effective than using a standard stop word list. Option D (stemming) reduces words to root forms but does not remove stop words, so it does not solve the problem of high-frequency stop words dominating the feature space.

200
MCQhard

A data engineer is exploring a dataset with a timestamp column and wants to resample the data to a consistent 1-hour frequency. The data is irregularly spaced. Which approach is most efficient using AWS services?

A.Use Amazon EMR with Spark
B.Use AWS Glue with built-in transforms
C.Use Amazon Athena with SQL window functions
D.Use Amazon SageMaker Processing with a custom script
AnswerD

Amazon SageMaker Processing jobs allow custom scripts (e.g., using pandas resample) to handle irregular time series, and they are fully managed.

Why this answer

Amazon SageMaker Processing jobs allow custom scripts (e.g., using pandas resample) to handle irregular time series, and they are fully managed. Option A is wrong because Amazon EMR with Spark requires cluster management and is more complex for simple resampling. Option B is wrong because AWS Glue with built-in transforms is more suited for batch ETL but may be overkill for this task.

Option C is wrong because Amazon Athena with SQL window functions is a query engine and cannot resample easily.

201
MCQhard

A data scientist is analyzing a dataset with 100,000 observations and 50 features. The scientist uses a Jupyter notebook on Amazon SageMaker. During EDA, the scientist runs a command to check for missing values and notices that 20% of the data in one feature is missing. The missing values are not random; they are correlated with another feature. Which imputation method is MOST appropriate?

A.Median imputation
B.Listwise deletion (remove rows with missing values)
C.Mean imputation
D.Multiple imputation by chained equations (MICE)
AnswerD

Models missing values using other features.

Why this answer

MICE uses multiple imputation based on other features, accounting for the correlation between the missing feature and another feature. Option A is wrong because median imputation ignores the correlation and simply fills with the median, which does not leverage relationships between features. Option B is wrong because listwise deletion removes rows with missing data, which reduces sample size and can introduce bias if missingness is not completely random.

Option C is wrong because mean imputation, like median imputation, ignores correlations and can distort relationships.

202
MCQmedium

A data scientist is exploring a dataset of customer transactions. The dataset has 1 million rows and 50 columns. The target variable is a binary flag indicating whether a customer churned. The data scientist runs a correlation matrix on all numerical features and finds that two features have a correlation coefficient of 0.98. Which action should be taken to improve model performance?

A.Create an interaction term between the two features.
B.Remove one of the two highly correlated features from the dataset.
C.Increase the regularization parameter (e.g., lambda) in the model.
D.Apply mean-centering to both features to reduce correlation.
AnswerB

Removing one feature eliminates multicollinearity, simplifying the model and improving interpretability.

Why this answer

Two features with a correlation coefficient of 0.98 are nearly perfectly multicollinear. This inflates the variance of coefficient estimates in linear models, making them unstable and reducing interpretability. Removing one of the highly correlated features is a standard dimensionality reduction technique that mitigates multicollinearity without significant information loss, as the remaining feature captures almost the same variance.

Exam trap

AWS often tests the misconception that regularization alone fixes multicollinearity, but regularization only penalizes coefficient magnitude, not the linear dependency between features.

How to eliminate wrong answers

Option A is wrong because creating an interaction term between two nearly perfectly correlated features would introduce even more severe multicollinearity (the interaction term will be highly correlated with the original features), worsening model stability. Option C is wrong because increasing the regularization parameter (e.g., lambda in L2 regularization) can shrink coefficients but does not eliminate the underlying multicollinearity; the model remains sensitive to small data changes and coefficient interpretation is still problematic. Option D is wrong because mean-centering only shifts the features' means to zero and does not change the correlation coefficient between them; it has no effect on multicollinearity.

203
MCQeasy

A data scientist needs to understand the distribution of a numeric feature in a dataset stored in Amazon S3. Which AWS service can be used to run a quick exploratory query without setting up a server?

A.Amazon Redshift
B.Amazon EMR
C.Amazon Athena
D.AWS Glue
AnswerC

Amazon Athena is serverless and allows SQL queries directly on data in S3.

Why this answer

Amazon Athena allows serverless SQL queries on data in S3. Option A (Amazon Redshift) is a data warehouse; Option B (Amazon EMR) requires cluster setup; Option D (AWS Glue) is for ETL.

204
MCQmedium

A data scientist is analyzing a time-series dataset and wants to check for stationarity. Which EDA technique is most appropriate?

A.Plot the autocorrelation function (ACF).
B.Use time-series cross-validation.
C.Perform the Augmented Dickey-Fuller (ADF) test.
D.Create a scatter plot of the series against its lag.
AnswerC

ADF test formally tests for unit root (non-stationarity).

Why this answer

The Augmented Dickey-Fuller (ADF) test is a formal statistical hypothesis test specifically designed to check for stationarity in a time series. It tests the null hypothesis that a unit root is present, indicating non-stationarity, against the alternative of stationarity. This makes it the most appropriate EDA technique for directly assessing stationarity.

Exam trap

AWS often tests the distinction between visual EDA techniques (like ACF plots) and formal statistical tests (like ADF), trapping candidates who confuse diagnostic plots with hypothesis testing for stationarity.

How to eliminate wrong answers

Option A is wrong because plotting the autocorrelation function (ACF) is a visual diagnostic for identifying autocorrelation patterns and model order (e.g., AR or MA terms), but it does not provide a formal statistical test for stationarity. Option B is wrong because time-series cross-validation is a model evaluation technique used to assess predictive performance, not a method for testing stationarity. Option D is wrong because a scatter plot of the series against its lag can reveal linear relationships and autocorrelation, but it lacks a formal hypothesis test and cannot definitively confirm or reject stationarity.

205
MCQeasy

A data scientist is analyzing a dataset with 500 features and 10,000 samples. After running a correlation matrix, they find that many feature pairs have correlation >0.95. What is the most appropriate next step to improve model performance?

A.Collect more training data to reduce the impact of correlated features.
B.Increase the regularization parameter in the model.
C.Apply principal component analysis (PCA) to reduce dimensionality.
D.Remove all features with correlation above 0.95.
AnswerC

PCA reduces multicollinearity by transforming correlated features into orthogonal components.

Why this answer

PCA reduces dimensionality by transforming correlated features into uncorrelated principal components, addressing multicollinearity while retaining most of the variance. Option A is wrong: collecting more data does not reduce correlation between features. Option B is wrong: increasing regularization (e.g., L2) can mitigate multicollinearity effects, but with 500 features and many highly correlated pairs, PCA is more effective as a dimensionality reduction technique.

Option D is wrong: removing all features with correlation >0.95 may discard useful information and is less systematic than PCA.

206
MCQhard

A team is performing exploratory data analysis on a dataset containing 10 million records stored in Amazon S3. They want to sample the data efficiently to build a representative subset for initial modeling. Which sampling method should they use to minimize bias and ensure the sample reflects the population distribution?

A.Stratified random sampling
B.Simple random sampling
C.Systematic sampling
D.Reservoir sampling
AnswerA

Stratified sampling ensures representation from all strata, reducing bias.

Why this answer

(Stratified random sampling) is correct because it divides the dataset into homogeneous subgroups (strata) and samples proportionally from each, ensuring all subgroups are represented and reducing bias. This is especially important when the data is imbalanced. Option B (Simple random sampling) is incorrect because it may underrepresent or miss rare subgroups, leading to biased samples.

Option C (Systematic sampling) is incorrect because it can introduce bias if the data has periodic patterns. Option D (Reservoir sampling) is incorrect because it is designed for streaming data where the total size is unknown, not for a static dataset of 10 million records in Amazon S3.

207
MCQeasy

A machine learning engineer is performing exploratory data analysis on a dataset containing customer transaction records. The dataset has missing values in the 'age' column and outliers in the 'amount' column. Which combination of techniques should the engineer use to handle these issues during EDA?

A.Impute missing age values with the median and cap outliers in 'amount' using the interquartile range (IQR) method.
B.Remove rows with missing age and apply log transformation to 'amount'.
C.Impute missing age values with a constant (e.g., 0) and cap outliers using mean ± 3*std.
D.Impute missing age values with the mean and remove outliers in 'amount' using z-score.
AnswerA

Median is robust; IQR handles outliers.

Why this answer

Median imputation is robust to outliers, and IQR-based capping is a standard method for handling outliers. Option B is wrong because removing rows with missing age can lead to data loss, and log transformation reduces skewness but does not handle outliers by capping. Option C is wrong because imputing with a constant like 0 is arbitrary and can bias the data, and capping using mean ± 3*std is sensitive to outliers.

Option D is wrong because mean imputation is sensitive to outliers, and removing outliers via z-score can discard valid data points.

208
Multi-Selecthard

A data scientist is analyzing a dataset and suspects the presence of outliers that could affect the mean and standard deviation. Which TWO methods are robust to outliers for measuring central tendency and dispersion?

Select 2 answers
A.Interquartile range (IQR)
B.Range
C.Standard deviation
D.Median
E.Mean
AnswersA, D

IQR is robust to outliers.

Why this answer

Median and interquartile range (IQR) are robust to outliers. Mean and standard deviation are sensitive to outliers. Range is also sensitive.

209
Multi-Selectmedium

A data scientist is performing exploratory data analysis on a dataset with 10,000 rows and 20 features. The target variable is binary. The data scientist observes that one feature has 15% missing values. Which TWO actions are appropriate to handle this missing data? (Choose TWO.)

Select 2 answers
A.Replace missing values with the mode of the feature.
B.Identify and remove outliers from the feature.
C.Use multiple imputation to fill in the missing values.
D.Delete all rows that contain missing values for this feature.
E.Drop the entire feature from the dataset.
AnswersC, D

Multiple imputation creates several plausible imputed datasets and combines results.

Why this answer

Multiple imputation is a robust statistical technique that accounts for uncertainty in missing values by creating multiple complete datasets, analyzing each, and pooling results. This is particularly appropriate for a dataset with 10,000 rows and 20 features, as it preserves the sample size and avoids bias that simpler methods might introduce.

Exam trap

AWS often tests the misconception that mode imputation (Option A) is a safe default for missing data, but it ignores feature relationships and can distort distributions, whereas multiple imputation is preferred for non-trivial missingness.

210
MCQmedium

During EDA, a data scientist finds that two features have a Pearson correlation coefficient of 0.95. What is the primary concern when using these features together in a linear regression model?

A.The model will underfit because of redundant information
B.Heteroscedasticity will be introduced
C.The model will overfit due to redundant features
D.Multicollinearity will make coefficient estimates unstable
AnswerD

High correlation between predictors leads to multicollinearity, increasing standard errors.

Why this answer

A Pearson correlation coefficient of 0.95 indicates strong multicollinearity between the two features. Multicollinearity inflates the variance of coefficient estimates, making them unstable and difficult to interpret. Option A is wrong because redundant information leads to multicollinearity, not underfitting; underfitting occurs when the model is too simple.

Option B is wrong because heteroscedasticity refers to non-constant variance of errors, not correlation between features. Option C is wrong because overfitting is more associated with model complexity and variance, not directly with redundant features; in fact, redundant features can cause numerical instability but not necessarily overfitting.

211
MCQhard

A data scientist is analyzing a dataset with high cardinality categorical features (e.g., user IDs with millions of unique values). They want to visualize the relationship between these categorical features and a continuous target variable. Which approach is most effective for EDA?

A.Group rare categories into an 'Other' category and use box plots
B.Apply one-hot encoding and use scatter plots
C.Use a bar chart with all categories on x-axis
D.Remove the categorical features from analysis
E.Apply feature hashing and visualize the hashed values
AnswerA

Grouping reduces cardinality and box plots effectively show relationship with target.

Why this answer

For high cardinality categorical features like user IDs with millions of unique values, directly visualizing all categories is infeasible. Grouping rare categories into an 'Other' category reduces cardinality, enabling effective comparison of the continuous target distribution across categories using box plots. This approach preserves meaningful information while avoiding clutter.

Option B (one-hot encoding) creates an excessively wide feature set unsuitable for simple visualization. Option C (bar chart with all categories) would be overcrowded and unreadable. Option D (removing features) discards potentially valuable information.

Option E (feature hashing) is more appropriate for modeling pipelines, not for intuitive EDA visualization. Thus, Option A is the most effective approach.

212
Multi-Selectmedium

Which THREE of the following are common issues that can be identified during exploratory data analysis? (Select THREE.)

Select 3 answers
A.Multicollinearity between features
B.High latency in API endpoints
C.Gradient vanishing in neural networks
D.Class imbalance in the target variable
E.Missing values in features
AnswersA, D, E

High correlation between features can be detected via correlation matrix.

Why this answer

Multicollinearity occurs when two or more features in a dataset are highly correlated, meaning they contain redundant information. During exploratory data analysis (EDA), correlation matrices and variance inflation factor (VIF) calculations can reveal this issue, which can destabilize linear regression models and inflate coefficient standard errors.

Exam trap

The MLS-C01 exam often tests the boundary between data-level issues (EDA) and model training issues, so candidates mistakenly select gradient vanishing (a deep learning optimization problem) or API latency (an operational concern) as EDA findings.

213
Multi-Selectmedium

A data scientist is performing EDA on a dataset with both numeric and categorical features. Which TWO techniques are appropriate for visualizing the relationship between a numeric feature and a binary categorical target?

Select 2 answers
A.Histogram
B.Stacked bar chart
C.Violin plot grouped by target
D.Box plot grouped by target
E.Scatter plot
AnswersC, D

Violin plots show distribution and density across categories.

Why this answer

Correct options are C (violin plot grouped by target) and D (box plot grouped by target). Both are effective for visualizing the distribution of a numeric feature across two categories of a binary target. A violin plot combines a box plot and a density plot, showing the full distribution shape, while a box plot displays medians, quartiles, and outliers.

Option A (histogram) shows distribution of a single numeric variable but does not directly compare groups. Option B (stacked bar chart) is for categorical vs categorical data. Option E (scatter plot) is for two numeric variables.

214
MCQhard

A data scientist is working with a dataset that has imbalanced classes (1% positive). They want to explore the data before modeling. Which visualization technique is most appropriate to understand the distribution of features with respect to the target class?

A.Box plots grouped by class
B.Parallel coordinates plot
C.Histograms overlaid by class
D.Scatter plot matrix
AnswerB

Parallel coordinates plot effectively displays patterns across high-dimensional data, allowing comparison of minority and majority class distributions.

Why this answer

Parallel coordinates plot can show feature patterns for minority vs majority class in high dimensions. Option A is wrong because box plots are univariate and do not show interactions between features. Option C is wrong because histograms are univariate and do not show interaction.

Option D is wrong because scatter plot matrices become cluttered with many features.

215
MCQeasy

A data scientist is exploring a dataset with a column 'transaction_date'. They want to create features for day of week and month. What is the correct AWS service to schedule a recurring ETL job for this transformation?

A.Amazon Athena
B.AWS Glue
C.Amazon SageMaker
D.AWS Lambda
AnswerB

Glue is a managed ETL service.

Why this answer

AWS Glue is a serverless ETL service that can be scheduled to run recurring jobs for data transformation, such as extracting day of week and month from a date column. Option A is wrong because Amazon Athena is an interactive query service, not an ETL scheduler. Option C is wrong because Amazon SageMaker is a machine learning platform, not an ETL service.

Option D is wrong because AWS Lambda can run code on a schedule but is not a full-fledged ETL service for recurring transformations of large datasets.

216
MCQeasy

A data scientist is exploring a dataset and wants to identify outliers in a numerical feature. The feature is not normally distributed. Which technique is robust to non-normal distributions?

A.Compute the Median Absolute Deviation (MAD) and flag values with MAD > 3.
B.Use the IQR method: flag values below Q1 - 1.5*IQR or above Q3 + 1.5*IQR.
C.Calculate the Z-score and flag values with |Z| > 3.
D.Flag values more than 3 standard deviations from the mean.
AnswerB

Does not assume normality; uses robust quartiles.

Why this answer

The IQR method, because it does not assume a normal distribution and uses quartiles to identify outliers. Option A (MAD) is robust but compares deviations from the median; however, the IQR method is more commonly used for non-normal data. Option C (Z-score) assumes normality.

Option D (flagging values more than 3 standard deviations from the mean) also assumes normality.

217
MCQhard

A data scientist is using Amazon Athena to query a CSV file stored in S3. The query fails with the error: 'HIVE_CANNOT_OPEN_SPLIT: Number of fields in line 1502 does not match number of fields in the first line.' What is the most likely cause?

A.The CSV file uses a different delimiter than comma.
B.The CSV file is missing a header row.
C.The CSV file is too large for Athena to process.
D.The CSV file has inconsistent number of columns in some rows.
AnswerD

The error indicates row 1502 has 5 fields while header has 4.

Why this answer

The error indicates that a row has more fields than the header, which is exactly what happens when the CSV file has inconsistent number of columns in some rows. Option A is incorrect because the error does not mention delimiter; a different delimiter would cause all rows to have wrong number of fields, not just some. Option B is incorrect because missing header would cause Athena to treat the first row as data, not cause mismatched field counts later.

Option C is incorrect because Athena can handle large files; the error is about schema mismatch, not file size.

218
MCQeasy

A data scientist has a dataset with 500 features and wants to reduce dimensionality for visualization. Which technique is most appropriate for identifying the two components that capture the most variance?

A.t-Distributed Stochastic Neighbor Embedding (t-SNE)
B.Linear Discriminant Analysis (LDA)
C.Principal Component Analysis (PCA)
D.K-means clustering
AnswerC

PCA projects data onto directions of maximum variance.

Why this answer

Principal Component Analysis (PCA) is a linear dimensionality reduction technique that finds the directions (principal components) of maximum variance in the data, making it ideal for identifying the two components that capture the most variance for visualization. Option A is incorrect because t-SNE is a non-linear technique focused on preserving local neighborhood structure, not on maximizing global variance. Option B is incorrect because Linear Discriminant Analysis (LDA) is a supervised method that requires class labels to separate classes, not to maximize variance.

Option D is incorrect because K-means clustering is an unsupervised algorithm for grouping data points, not a dimensionality reduction method.

219
MCQeasy

A data analyst is using Amazon SageMaker Studio to perform exploratory data analysis on a dataset stored in S3. The analyst wants to generate summary statistics and visualizations quickly. Which built-in feature of SageMaker Studio should the analyst use?

A.SageMaker Ground Truth
B.SageMaker Data Wrangler
C.SageMaker Autopilot
D.SageMaker Clarify
AnswerB

Data Wrangler provides visual EDA capabilities like summary stats and charts.

Why this answer

SageMaker Data Wrangler is a built-in visual data preparation tool in SageMaker Studio that provides summary statistics, histograms, and correlation matrices without writing code. Option A (SageMaker Ground Truth) is for data labeling, not EDA. Option C (SageMaker Autopilot) automates machine learning model building.

Option D (SageMaker Clarify) is for bias detection and model explainability.

220
MCQmedium

A data scientist is using Amazon SageMaker to train a model. The training dataset contains missing values in several features. The data scientist wants to impute missing values using the median of each feature. Which approach is most appropriate?

A.Drop all rows that contain missing values
B.Compute the median on the entire dataset, then split into training and test sets
C.Impute missing values with zero for all features before splitting
D.Compute the median of each feature on the training set only, then impute both training and test sets using that median
AnswerD

Computing the median on the training set only avoids data leakage, and applying that median to both training and test sets ensures consistent imputation without using test set information.

Why this answer

Computing the median on the training set only avoids data leakage, and applying that median to both training and test sets ensures consistent imputation without using test set information. Option A is incorrect because dropping rows with missing values discards potentially useful data and is not imputation. Option B is incorrect because computing the median on the entire dataset before splitting introduces data leakage, as the test set influences the imputation values.

Option C is incorrect because imputing with zero is arbitrary and does not use the median; also, doing it before splitting would use the entire dataset, causing leakage.

221
Multi-Selecthard

Which THREE are common techniques for detecting outliers in a univariate dataset? (Select THREE.)

Select 3 answers
A.Cook's distance
B.DBSCAN clustering
C.Z-score
D.Interquartile range (IQR) method
E.Modified Z-score using median absolute deviation (MAD)
AnswersC, D, E

Z-score measures how many standard deviations an observation is from the mean.

Why this answer

Options C, D, and E are correct. Z-score (C) identifies outliers by standard deviations from mean, IQR method (D) uses quartiles to detect outliers beyond 1.5×IQR, and Modified Z-score using MAD (E) is a robust alternative. Cook's distance (A) is a regression diagnostic for influential points, not univariate outlier detection.

DBSCAN (B) is a multivariate clustering algorithm.

222
Multi-Selecteasy

A data scientist is working with a dataset that contains both numerical and categorical features. The target variable is continuous. Which TWO EDA techniques should the scientist use to understand relationships between features and the target?

Select 2 answers
A.Generate a confusion matrix for the target variable.
B.Compute the silhouette score for each feature.
C.Create scatter plots of numerical features against the target variable.
D.Use box plots to compare target distribution across categorical feature categories.
E.Plot a histogram of the target variable.
AnswersC, D

Correct. Scatter plots reveal relationships between numerical features and a continuous target.

Why this answer

Scatter plots (C) are appropriate for visualizing relationships between numerical features and a continuous target. Box plots (D) are appropriate for comparing target distribution across categories of categorical features. Option A (confusion matrix) is used for classification, not regression.

Option B (silhouette score) is for evaluating clustering. Option E (histogram of target) is univariate and does not show feature-target relationships.

223
Multi-Selectmedium

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

Select 2 answers
A.Dropping columns with >50% missing values is always recommended.
B.Mean imputation preserves the variance of the original distribution.
C.If data are missing completely at random (MCAR), listwise deletion yields unbiased estimates.
D.Multiple imputation (MICE) is always the safest method regardless of missing data mechanism.
E.Imputing with the median is more robust to outliers than imputing with the mean.
AnswersC, E

Under MCAR, missingness is independent of data, so deletion is unbiased.

Why this answer

Options C and E are correct. Option C is correct because when data are Missing Completely at Random (MCAR), the missingness is independent of both observed and unobserved data, so listwise deletion (removing rows with missing values) does not introduce bias; the remaining sample is still a random subsample. Option E is correct because the median is not influenced by extreme values, making it a more robust imputation method compared to the mean, which can be skewed by outliers.

Option A is incorrect because dropping columns with >50% missing values is not always recommended; it depends on the importance of the variable and the analysis goals. Option B is incorrect because mean imputation reduces the variance of the imputed variable, as it forces imputed values to the center. Option D is incorrect because Multiple Imputation by Chained Equations (MICE) is not always the safest; it assumes data are Missing at Random (MAR) and can be complex or inappropriate for other missingness mechanisms.

224
MCQhard

A data scientist is performing EDA on a high-dimensional dataset with 500 features. They want to visualize the data in 2D to check for clusters. They first apply PCA and get a 2D projection that shows no clear structure. They suspect that the data lies on a non-linear manifold. Which of the following techniques should they try next?

A.Use Independent Component Analysis (ICA).
B.Use Linear Discriminant Analysis (LDA).
C.Apply PCA again with more components.
D.Use t-distributed Stochastic Neighbor Embedding (t-SNE).
AnswerD

t-SNE is a non-linear technique that preserves local structure and is widely used for visualizing high-dimensional data in 2D or 3D, making it ideal for detecting clusters in non-linear manifolds.

Why this answer

T-SNE is a non-linear dimensionality reduction technique specifically designed for visualization. Option A (ICA) is a linear method for separating independent components, not for capturing non-linear manifolds. Option B (LDA) is a supervised linear method that maximizes class separation, unsuitable for unsupervised non-linear structure.

Option C (PCA with more components) remains linear, so adding components does not help with non-linear manifolds.

225
MCQmedium

A data scientist is exploring a dataset and finds that the variance of a feature is 0. What should be done with this feature?

A.Remove the feature from the dataset
B.Create interaction terms with other features
C.Apply Min-Max scaling to normalize the feature
D.Impute missing values using the mean
AnswerA

Constant feature provides no predictive power.

Why this answer

When a feature has zero variance, it means all values are identical (constant). Such a feature provides no discriminative information for machine learning models and can be safely removed. Removing it reduces dimensionality without losing any information.

Option A is correct. Option B (creating interaction terms) is incorrect because interacting a constant with any feature yields a constant. Option C (min-max scaling) does not change the fact that the feature is constant; it remains constant after scaling.

Option D (imputing missing values) is irrelevant since zero variance does not imply missing values.

← PreviousPage 3 of 6 · 381 questions totalNext →

Ready to test yourself?

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