Courseiva

CCNA Exploratory Data Analysis Questions

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

226
MCQmedium

A machine learning engineer is performing exploratory data analysis on a dataset containing customer transactions. They notice that the target variable is highly imbalanced: 99% of samples belong to class 0 and 1% to class 1. Which technique should they use to address this imbalance before training a classification model?

A.Train the model on the raw data without any modification.
B.Apply SMOTE to generate synthetic samples for the minority class.
C.Use accuracy as the evaluation metric and train on the raw data.
D.Under-sample the majority class to match the minority class size.
AnswerB

SMOTE creates synthetic minority samples, helping balance the dataset.

Why this answer

SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic samples for the minority class, which helps balance the dataset and improves model performance on the minority class without losing information from the majority class. Option A is wrong: training on raw data without addressing imbalance will cause the model to be biased toward the majority class and perform poorly on the minority class. Option C is wrong: accuracy is not a suitable evaluation metric for imbalanced datasets because a model that always predicts the majority class will achieve 99% accuracy, masking poor performance on the minority class; instead, metrics like precision, recall, F1-score, or AUC should be used.

Option D is wrong: under-sampling the majority class to match the minority class size discards a large amount of data, potentially losing valuable patterns and reducing model performance.

227
MCQeasy

A data analyst is examining a scatter plot of two variables and notices a strong positive correlation. Which of the following is a valid conclusion?

A.The relationship is linear
B.One variable causes the other
C.The two variables are related, but causation cannot be inferred
D.The relationship can be used to accurately predict one variable from the other
AnswerC

Correlation does not imply causation.

Why this answer

A strong positive correlation indicates that the two variables are related, but correlation alone does not imply causation. Option A is incorrect because correlation does not necessarily imply a linear relationship; it could be non-linear or monotonic. Option B is incorrect because correlation does not imply causation.

Option D is incorrect because correlation does not guarantee accurate prediction; prediction requires a well-fitted model and additional validation.

228
MCQeasy

A data scientist wants to understand the distribution of a continuous feature before training a model. Which visualization is most appropriate?

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

A histogram is the most appropriate visualization for understanding the distribution of a continuous feature because it shows the frequency of data points within bins.

Why this answer

A histogram is the standard tool for showing the distribution of a single continuous variable. Option A is wrong because scatter plots compare two variables. Option B is wrong because box plots show summary statistics, not the full distribution shape.

Option D is wrong because bar charts are for categorical data.

229
MCQeasy

A data scientist is analyzing a dataset with 10,000 rows and 50 columns. The target variable is binary. Which technique is most appropriate for identifying the most important features for predicting the target?

A.Use t-SNE to reduce dimensionality and inspect clusters
B.Run K-means clustering and examine cluster centroids
C.Train a Random Forest classifier and use feature_importances_
D.Apply PCA and select components with highest variance
AnswerC

Random Forest provides feature importance scores based on impurity reduction.

Why this answer

The most appropriate technique for identifying the most important features for predicting a binary target is to train a Random Forest classifier and use the built-in feature_importances_ attribute (Option C). Random Forest is a supervised ensemble method that provides a ranking of feature importance based on how much each feature reduces impurity (e.g., Gini impurity) across all trees. Option A (t-SNE) is a nonlinear dimensionality reduction technique primarily used for visualization in 2D/3D; it does not provide feature importance.

Option B (K-means clustering) is an unsupervised clustering algorithm that does not use the target variable and cannot identify predictive features. Option D (PCA) is an unsupervised dimensionality reduction method that finds principal components maximizing variance, but these components are not directly interpretable as feature importance for a specific target variable.

230
Multi-Selectmedium

Which THREE techniques are commonly used for feature engineering in exploratory data analysis? (Select THREE.)

Select 3 answers
A.Extracting date/time components like day of week or hour.
B.Using principal component analysis (PCA) to create new features.
C.Applying one-hot encoding to numerical features.
D.Creating interaction features between variables.
E.Binning continuous variables into discrete intervals.
AnswersA, D, E

Temporal features often reveal patterns.

Why this answer

Extracting date/time components such as day of week, hour, or month from a timestamp is a standard feature engineering technique. It transforms a single datetime column into multiple categorical or cyclical features that can reveal temporal patterns like weekly seasonality or peak hours, which are often critical for time-series models.

Exam trap

The MLS-C01 exam often tests the distinction between feature engineering (creating new features from existing data) and dimensionality reduction (PCA) or encoding (one-hot encoding), leading candidates to mistakenly select PCA as a feature engineering technique when it is actually a preprocessing step for reducing feature space.

231
Multi-Selecthard

A data scientist is exploring a dataset with mixed data types (numeric, categorical, text). The dataset has 5 million rows. The scientist wants to understand the relationships between variables and identify potential data quality issues. Which THREE tools are suitable for this analysis?

Select 3 answers
A.AWS Glue DataBrew
B.AWS Data Pipeline
C.Amazon SageMaker Data Wrangler
D.Amazon Athena
E.Amazon Kinesis Data Analytics
AnswersA, C, D

Data profiling and visualization.

Why this answer

Options A, C, and D are correct. AWS Glue DataBrew can profile data, visualize distributions, and detect anomalies. Amazon SageMaker Data Wrangler provides interactive data preparation and visualization.

Amazon Athena can be used to run SQL queries for data quality checks. Option B (AWS Data Pipeline) is wrong because it is for workflow orchestration, not EDA. Option E (Amazon Kinesis Data Analytics) is wrong because it is for streaming data, not batch EDA.

232
MCQeasy

A data scientist is analyzing a dataset with 100 features and wants to identify which features are most correlated with the target variable. Which AWS service is most appropriate for this task?

A.Amazon QuickSight
B.Amazon Athena
C.AWS Glue DataBrew
D.Amazon SageMaker Data Wrangler
AnswerD

Data Wrangler provides data analysis and feature correlation within SageMaker Studio.

Why this answer

Amazon SageMaker Data Wrangler provides built-in data analysis and visualization capabilities, including correlation analysis, making it suitable for this task. Amazon QuickSight is a BI tool for dashboards, not for feature correlation analysis. Amazon Athena is a query service for data in S3, not for embedded data wrangling.

AWS Glue DataBrew is a visual data preparation tool, but SageMaker Data Wrangler is more directly suited for correlation analysis.

233
Multi-Selecthard

A data scientist is performing EDA on a dataset with 10 million rows. The dataset has a column 'income' with outliers. The data scientist wants to detect and handle outliers. Which THREE approaches are appropriate?

Select 3 answers
A.Calculate z-scores and flag values beyond 3 standard deviations
B.Apply min-max scaling to the column
C.Convert the column to one-hot encoding
D.Visualize the distribution with box plots
E.Use the interquartile range (IQR) to identify outliers
AnswersA, D, E

Z-score is a common method.

Why this answer

The correct approaches for detecting outliers in a dataset with 10 million rows are calculating z-scores (A), using IQR (E), and visualization with box plots (D). Z-scores flag values beyond 3 standard deviations, IQR identifies outliers as points below Q1-1.5*IQR or above Q3+1.5*IQR, and box plots provide a visual summary of the distribution. Min-max scaling (B) only transforms the data range and does not detect outliers.

One-hot encoding (C) is for categorical variables, not outlier detection. Thus options A, D, and E are correct.

234
MCQhard

A machine learning engineer is analyzing a dataset that contains a categorical feature 'country' with 200 unique values. The target variable is binary. The engineer wants to use this feature in a linear model. Which encoding method should be applied during EDA to prepare the data for modeling, considering the high cardinality?

A.Target encoding with cross-validation
B.Label encoding
C.Frequency encoding
D.One-hot encoding
AnswerA

Target encoding captures the relationship with the target, and cross-validation prevents data leakage.

Why this answer

Target encoding with cross-validation (Option A) is the correct choice for this scenario because it replaces each category in the high-cardinality feature 'country' with the mean of the target variable, effectively capturing the relationship with the target while avoiding the curse of dimensionality. Cross-validation is essential to prevent overfitting by computing the target means on out-of-fold data. One-hot encoding (Option D) would create 199 dummy variables, leading to high dimensionality and potential overfitting, making it unsuitable for linear models with limited data.

Label encoding (Option B) imposes an arbitrary ordinal relationship that the linear model would misinterpret. Frequency encoding (Option C) may not capture the relationship with the target and could lose predictive power.

235
Matchingmedium

Match each SageMaker feature to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Managed compute to train a model

Host a model for real-time inference

Run inference on a batch of data

Jupyter notebook for exploration

Run data processing scripts

Why these pairings

The correct matches are: Ground Truth for dataset labeling, Neo for model optimization, Debugger for training monitoring, and Autopilot for automated model building. Common confusions include swapping Ground Truth and Neo, or mixing Debugger with Autopilot.

236
MCQmedium

A data scientist is performing exploratory data analysis on a dataset with missing values. The dataset contains a column 'income' with 20% missing values. The income distribution is right-skewed. Which imputation method is most appropriate to preserve the skewness?

A.Impute with the mean income
B.Impute with the median income
C.Drop rows with missing income
D.Impute with the mode income
AnswerB

Median is robust to skewness and preserves the distribution shape.

Why this answer

The median is robust to the right-skewed distribution of income. Imputing with the median preserves the skewness and central tendency without being influenced by outliers, unlike the mean which would pull the imputed values toward the tail and reduce skewness. Option A is wrong because the mean is sensitive to outliers and would distort the distribution.

Option C is wrong because dropping rows reduces sample size and may bias the dataset. Option D is wrong because the mode is typically used for categorical data and is not meaningful for continuous skewed data.

237
Multi-Selecteasy

A data analyst is exploring a dataset with a binary target variable. Which TWO visualizations are most useful for understanding the relationship between a numerical feature and the target?

Select 2 answers
A.Pie chart of the feature
B.Bar chart of the feature
C.Histogram with overlaid target classes
D.Box plot grouped by target class
E.Scatter plot of the feature versus target
AnswersC, D

Shows how the feature distribution differs by class.

Why this answer

Options C and D are correct. A histogram with overlaid target classes (C) allows viewing the distribution of the feature for each class, highlighting separability. A box plot grouped by target class (D) shows median, spread, and outliers per class, useful for comparing distributions.

Option A (pie chart) is inappropriate for numerical features and binary targets. Option B (bar chart) is for categorical features, not numerical. Option E (scatter plot) requires two numerical variables; here the target is binary, so it would produce overlapping points and is less informative.

238
MCQeasy

A data scientist wants to understand the distribution of a categorical feature with 100 unique values. Which visualization is most appropriate?

A.Histogram
B.Bar chart
C.Scatter plot
D.Pie chart
AnswerB

Bar charts are ideal for displaying categorical frequencies.

Why this answer

A bar chart is the most appropriate visualization for displaying the distribution of a categorical feature with 100 unique values because it uses discrete bars to represent the frequency or proportion of each category. Unlike a histogram, which requires continuous numeric bins, a bar chart preserves the distinct categories and allows clear comparison of counts across all 100 levels.

Exam trap

The MLS-C01 exam often tests the distinction between histograms (for continuous data) and bar charts (for categorical data), and candidates mistakenly choose histogram because they confuse 'distribution' with 'numeric distribution' without recognizing the categorical nature of the feature.

How to eliminate wrong answers

Option A is wrong because a histogram is designed for continuous numeric data and groups values into bins, which is inappropriate for categorical features and would obscure the distinct categories. Option C is wrong because a scatter plot is used to visualize the relationship between two continuous variables, not the distribution of a single categorical feature. Option D is wrong because a pie chart, while usable for categorical data, becomes unreadable and misleading with 100 unique values due to overlapping small slices and difficulty comparing proportions; bar charts are far superior for many categories.

239
Multi-Selecteasy

Which TWO of the following are benefits of feature scaling for machine learning algorithms?

Select 2 answers
A.Eliminates the effect of outliers
B.Reduces the need for feature selection
C.Improves performance of decision tree algorithms
D.Faster convergence of gradient descent
E.Prevents features with larger magnitudes from dominating distance-based algorithms
AnswersD, E

Scaling ensures all features contribute equally to the gradient.

Why this answer

Feature scaling, typically via standardization (z-score) or min-max normalization, ensures that gradient descent converges faster. Without scaling, features with larger numerical ranges dominate the gradient updates, causing the algorithm to oscillate and require more iterations to reach the optimum. Scaling produces a more spherical contour of the loss function, allowing gradient descent to take more direct steps toward the minimum.

Exam trap

The trap here is that candidates often assume feature scaling universally improves all algorithms, but The MLS-C01 exam specifically tests that tree-based models (like decision trees) are scale-invariant, making option C a common distractor.

240
MCQhard

Refer to the exhibit. A data scientist runs the AWS CLI command shown and gets the output. The scientist wants to create an Athena table over all log files in the 'logs/2023/' prefix, including files smaller than 1000 bytes. Which approach achieves this?

A.Create the table using LOCATION 's3://my-bucket/logs/2023/' which includes all files under that prefix.
B.Create the table and add a WHERE clause to include small files.
C.Ask the S3 team to remove the size restriction on the bucket.
D.Modify the CLI command to remove the size filter and re-run it before creating the table.
AnswerA

The table location covers all files regardless of size.

Why this answer

Creating an Athena table with the LOCATION pointing to 's3://my-bucket/logs/2023/' will include all objects under that prefix, regardless of size. The CLI command's --query parameter only filters the output of the list-objects command, but does not impose any restriction on the data or the bucket. Option B is incorrect because a WHERE clause in Athena can only filter rows after the table is defined; it cannot include or exclude files from being read.

Option C is incorrect because S3 does not have a built-in size restriction on a bucket; the CLI command is just a client-side query. Option D is incorrect because the CLI command is independent; the table can be created directly without needing to modify the CLI command.

241
MCQmedium

An ML team is analyzing a time series dataset of daily website traffic. They notice a pattern where traffic spikes every Sunday. Which EDA technique should they use to confirm this seasonality?

A.Plot the time series data with a line plot
B.Compute autocorrelation at different lags
C.Create a scatter plot of traffic vs. day of week
D.Plot a histogram of the traffic values
AnswerA

A line plot over time directly reveals seasonal patterns.

Why this answer

A line plot of time series data visually displays trends and repeating patterns, making it the most direct way to confirm weekly seasonality. Option B (autocorrelation) can quantify periodicity but is less intuitive for simple confirmation; it is not a histogram. Option C (scatter plot of traffic vs. day of week) aggregates data by day, losing the sequential order needed to see seasonality over time.

Option D (histogram) shows value distribution, not time-dependent patterns.

242
MCQeasy

A data engineer is querying the AWS Glue Data Catalog table shown in the exhibit. The engineer runs an Athena query: SELECT * FROM transactions WHERE year=2023. The query returns results quickly. However, a subsequent query: SELECT * FROM transactions WHERE amount > 100 takes a long time. What is the most likely reason for the performance difference?

A.The data is compressed, and the first query benefits from compression.
B.The first query uses a partition column (year), allowing partition pruning, while the second query does not.
C.The data is stored in Parquet format, which is optimized for columnar access.
D.The second query is not optimized because it uses 'SELECT *'.
AnswerB

Partition pruning reduces data scanned.

Why this answer

The table is partitioned by year and month. The first query filters on a partition column (year), so Athena prunes partitions and scans only the relevant data. The second query filters on a non-partition column (amount), so Athena scans all partitions, resulting in a longer execution time.

Option A is incorrect because compression does not directly affect partition pruning; it reduces storage size but not scan time in this context. Option C is incorrect because the data format (Parquet) could help with columnar pruning, but the key difference here is partition pruning, not file format. Option D is incorrect because using SELECT * does not inherently cause slow performance; the lack of partition pruning is the main issue.

243
MCQmedium

A data scientist runs a SageMaker notebook and uses pandas to explore a dataset. The dataset contains 500,000 rows and 20 columns, including a 'timestamp' column. After loading the data into a DataFrame, the memory usage is unexpectedly high. What is the most likely cause?

A.The DataFrame created an index column on the timestamp field, doubling memory usage.
B.The default data types inferred by pandas are unnecessarily large for the actual data ranges.
C.The DataFrame only loaded a sample of the data, but the sample size was too large.
D.The CSV file was compressed, and pandas inflated it in memory.
AnswerB

Pandas uses int64/float64 by default, which can be optimized by downcasting.

Why this answer

When pandas reads a CSV without explicit dtypes, it infers data types. For numeric columns, it defaults to int64 (8 bytes per value) or float64 (8 bytes per value), even if the actual values could fit in smaller types (e.g., int8, int16). With 500,000 rows and 20 columns, such large types significantly increase memory usage.

Option A is wrong because pandas does not automatically create an index from the timestamp column; it assigns a default integer index. Option C is wrong because the entire dataset was loaded, not just a sample. Option D is wrong because the CSV is uncompressed; compression would not cause memory inflation after loading.

244
MCQhard

A team is analyzing a dataset with many categorical features that have high cardinality (e.g., ZIP code, user ID). They want to explore relationships between these features and a continuous target variable. Which approach is most appropriate for visualizing these relationships without overwhelming the viewer?

A.Group categories into top K levels and use a box plot for each group.
B.Compute a correlation matrix using Pearson correlation.
C.Create a scatter plot with each category as a different color.
D.Use a heatmap to show pairwise chi-square statistics.
AnswerA

Aggregating categories makes the plot interpretable.

Why this answer

When dealing with high-cardinality categorical features, grouping the most frequent categories into a manageable number (e.g., top 10) and using box plots per group allows for clear visualization of the relationship with a continuous target. This approach reduces clutter and highlights differences in distributions. Option B is incorrect because Pearson correlation is designed for continuous variables, not categorical ones.

Option C is incorrect: a scatter plot with color-coded categories becomes unreadable with many categories and does not effectively show distributional differences. Option D is incorrect because chi-square statistics assess association between two categorical variables, not between a categorical and a continuous variable.

245
MCQeasy

A data scientist is performing EDA on a dataset that contains customer demographics and purchase history. The dataset has a column 'age' with some values that are negative or unreasonably high (e.g., 200). The scientist wants to identify and handle these outliers. The scientist is using a SageMaker notebook with pandas. Which approach should the scientist take to effectively handle these outliers?

A.Apply standard scaling to the 'age' column
B.Impute the outlier values with the mean of the column
C.Define reasonable bounds based on domain knowledge and filter or cap the outliers
D.Remove the 'age' column entirely
AnswerC

Domain knowledge provides logical bounds to handle outliers appropriately.

Why this answer

The most appropriate approach is to define reasonable bounds based on domain knowledge (e.g., 0-120) and filter out or cap the outliers. Option A is incorrect because standard scaling does not handle outliers; it will still be influenced by extreme values. Option B is incorrect because imputing with the mean can distort the distribution when outliers are present.

Option D is incorrect because removing the entire column discards valuable information.

246
MCQmedium

A data scientist is analyzing application logs in JSON format. Based on the exhibit, which EDA insight is most valuable for troubleshooting?

A.There is a recurring NullPointerException error.
B.All logs occurred at the same timestamp.
C.There is a connection timeout issue.
D.Most logs are at WARN level.
AnswerA

Three out of four logs are the same error, indicating a pattern.

Why this answer

The repeated NullPointerException error appears multiple times in the logs, indicating a recurring issue that is most valuable for troubleshooting. Option B is incorrect because the logs show different timestamps, not all the same. Option C is incorrect because connection timeout appears only once, while the NullPointerException is more frequent.

Option D is incorrect because the log levels vary, and the majority of logs are not at WARN level.

247
MCQhard

During EDA, a data scientist plots the distribution of a numeric feature and observes that it is right-skewed. The feature will be used as input to a linear model. Which transformation should the data scientist apply?

A.Square transformation
B.Log transformation
C.One-hot encoding
D.Standardization (Z-score)
AnswerB

Log transformation compresses the tail and reduces right skewness.

Why this answer

A right-skewed distribution indicates that the feature has a long tail on the right, which can violate the linear model assumption of normally distributed errors. The log transformation compresses the high values and expands the low values, making the distribution more symmetric and stabilizing variance, which improves linear model performance.

Exam trap

The MLS-C01 exam often tests the misconception that standardization or scaling fixes skewness, but candidates must remember that only shape-altering transformations like log or Box-Cox address non-normality, not just rescaling.

How to eliminate wrong answers

Option A is wrong because a square transformation amplifies skewness by increasing the spread of high values, making the distribution even more right-skewed. Option C is wrong because one-hot encoding is used for categorical features, not for transforming the distribution of numeric features. Option D is wrong because standardization (Z-score) centers and scales the data but does not change the shape of the distribution, so it does not address skewness.

248
Multi-Selectmedium

A data scientist is performing EDA on a dataset with mixed data types (numerical and categorical). Which TWO visualizations are most appropriate for understanding the distribution of categorical features?

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

Pie charts show proportions of categories.

Why this answer

Bar charts and pie charts are both effective for visualizing the distribution of categorical features. Bar charts display the count or frequency of each category, while pie charts show the relative proportions. Options A (histogram) and B (box plot) are designed for numerical data, and option D (scatter plot) is for the relationship between two numerical variables.

249
MCQeasy

A data analyst is exploring a dataset and notices that the target variable has a Poisson distribution. Which type of model is most appropriate for this target?

A.Poisson regression
B.Linear regression
C.Cox proportional hazards model
D.Logistic regression
AnswerA

Poisson regression models count data with Poisson distribution.

Why this answer

Poisson regression is the correct choice because it is specifically designed for modeling count data where the target variable follows a Poisson distribution, which is characterized by non-negative integer values and a variance equal to the mean. This aligns directly with the data analyst's observation of a Poisson-distributed target, making Poisson regression the most appropriate generalized linear model (GLM) for this scenario.

Exam trap

The trap here is that candidates may confuse Poisson regression with logistic regression or linear regression, mistakenly applying a model for binary outcomes or continuous data to count data, without recognizing that the Poisson distribution's unique properties require a specialized GLM.

How to eliminate wrong answers

Option B is wrong because linear regression assumes a normally distributed target variable with constant variance, which is violated when the target follows a Poisson distribution (count data with variance equal to the mean). Option C is wrong because Cox proportional hazards model is a survival analysis technique for time-to-event data with censoring, not for modeling a Poisson-distributed count target. Option D is wrong because logistic regression models binary or ordinal outcomes using a logit link function, not count data with a Poisson distribution.

250
MCQmedium

A data scientist runs the above AWS CLI command and gets the output. The object size is 1 GB. They try to open the CSV file in Amazon Athena but get an error. What is the most likely cause?

A.The file format is not supported by Athena
B.The file exceeds the maximum CSV file size that Athena can query without partitioning
C.The file is not compressed with gzip
D.The file is too large for Athena to query at all
AnswerB

Athena has a 100 MB limit for CSV files when not partitioned.

Why this answer

Amazon Athena has a default limit of 100 MB per CSV file when querying without partitioning. A 1 GB file exceeds this limit, causing an error. Option A is wrong because CSV is a supported file format in Athena.

Option C is wrong while gzip compression is supported, it is not required; the issue is file size, not compression. Option D is wrong because Athena can query large files, but only if they are properly partitioned or if the file size is within the per-file limit.

Exam trap

Athena's 100 MB per-file limit for CSV queries without partitioning is often overlooked; candidates may assume the file is too large overall, but partitioning allows much larger datasets.

251
MCQmedium

A data scientist is performing exploratory data analysis on a dataset containing customer transactions. The dataset has a column 'transaction_date' with timestamps in string format. Which AWS service can be used to parse the timestamps and extract features like day of week and hour?

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

AWS Glue provides built-in transformations for timestamp parsing and feature extraction.

Why this answer

AWS Glue provides built-in transformations to parse timestamps and extract date/time features. Option A is wrong because Amazon Athena is a query service, not a transformation service. Option B is wrong because Amazon SageMaker Studio is an IDE, not a data transformation service.

Option D is wrong because AWS Data Pipeline is a workflow orchestration service, not a timestamp parsing tool.

252
Multi-Selecteasy

A data analyst is performing exploratory data analysis on a dataset and notices that there are outliers in several numerical columns. Which TWO methods can the analyst use to identify outliers?

Select 2 answers
A.Create a scatter plot matrix to visually inspect.
B.Calculate z-scores and flag any data points with |z| > 3.
C.Use a box plot to visualize the interquartile range (IQR) and identify points outside the whiskers.
D.Compare the mean and median of each column.
E.Plot a histogram and look for gaps.
AnswersB, C

Calculating z-scores and flagging points with |z| > 3 is a standard statistical method for outlier detection, assuming the data is roughly normally distributed.

Why this answer

Options B and C are correct. Box plots use the IQR to identify outliers as points outside 1.5*IQR from the quartiles (option C). Z-scores identify outliers as points with |z| > 3, assuming a roughly normal distribution (option B).

Option A (scatter plot matrix) can help visualize outliers but is not a systematic detection method. Option D (comparing mean and median) provides insight into skewness but does not directly flag outliers. Option E (histogram) shows distribution shape but requires subjective judgment to identify outliers.

253
Drag & Dropmedium

Drag and drop the steps to create a data processing job using Amazon SageMaker Processing in the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

Processing requires script creation, data upload, job configuration, execution, and verification.

254
MCQmedium

A data scientist uses Amazon QuickSight to visualize a dataset and observes that a numerical feature has a skewness of 2.5 and a kurtosis of 8. Which transformation should they apply to make the distribution more normal?

A.Standardize the feature using Z-score normalization.
B.Apply a Box-Cox transformation with lambda=0.5.
C.Apply Min-Max scaling to the range [0,1].
D.Apply a log transformation.
AnswerD

Log transformation reduces right skewness.

Why this answer

Apply a log transformation. A skewness of 2.5 indicates a strong right skew (positive skew), and a kurtosis of 8 indicates heavy tails (leptokurtic). Log transformation is effective in reducing right skewness and making the distribution more symmetric, which is a common step toward normality.

Option A (Z-score normalization) standardizes the data but does not change the shape of the distribution. Option B (Box-Cox with lambda=0.5) is a square root transformation, which is less effective than log for high skewness; Box-Cox typically requires choosing an optimal lambda, and lambda=0 would be a log transform. Option C (Min-Max scaling) rescales the range but does not affect skewness or kurtosis.

255
MCQmedium

A data scientist is working with a dataset that contains both numerical and categorical features. During EDA, they want to understand the relationship between a categorical feature with 10 unique values and the target variable. Which visualization is most appropriate?

A.Heatmap
B.Box plot
C.Histogram
D.Scatter plot
AnswerB

Box plot shows target distribution across categories.

Why this answer

A box plot is appropriate here because it displays the distribution of a numerical target variable across different categories of a categorical feature, allowing comparison of medians, quartiles, and outliers for each of the 10 categories. Option A is incorrect because a heatmap is typically used to show the correlation between numerical variables or the intensity of two categorical variables, not the relationship between a categorical feature and a target. Option C is incorrect because a histogram shows the distribution of a single numerical variable and cannot incorporate categorical groupings.

Option D is incorrect because a scatter plot visualizes the relationship between two numerical variables, making it unsuitable when one variable is categorical.

256
MCQhard

A data scientist is analyzing a dataset with a large number of missing values in several columns. The dataset is stored in an Amazon S3 bucket and is about 5 TB in size. The scientist wants to understand the pattern of missingness (e.g., is it missing completely at random, missing at random, or not missing at random) before deciding on an imputation strategy. The scientist has access to AWS Glue DataBrew and Amazon SageMaker Studio. Which approach should the scientist take to best understand the missing data patterns?

A.Use Amazon SageMaker Data Wrangler to create a flow and analyze missingness visually
B.Use AWS Glue DataBrew's data quality and missing data reports
C.Use AWS Glue ETL jobs with PySpark to compute missingness statistics
D.Use Amazon Athena to run queries to find missing values per column
AnswerB

DataBrew's reports visualize missing data patterns and correlations.

Why this answer

AWS Glue DataBrew provides built-in missing data reports that include visualizations such as heatmaps and bar charts to identify patterns of missingness and help determine whether data is MCAR, MAR, or NMAR. Option A is incorrect because SageMaker Data Wrangler, while useful for data preparation, does not have native missingness pattern analysis. Option C is incorrect because AWS Glue ETL jobs require custom PySpark code and are less efficient for exploratory analysis compared to DataBrew's automated reports.

Option D is incorrect because while Amazon Athena can query missing values, it lacks pattern analysis capabilities.

257
Multi-Selecthard

Which TWO of the following are best practices for exploratory data analysis when using Amazon SageMaker Data Wrangler? (Select TWO.)

Select 2 answers
A.Store all intermediate results in Amazon Athena for querying.
B.Use Data Wrangler's built-in data visualizations to explore feature distributions and relationships.
C.Use Amazon EMR to run Spark jobs for data profiling.
D.Always export the data to Amazon QuickSight for analysis before transformation.
E.Export the Data Wrangler flow as a Jupyter notebook to share with the team.
AnswersB, E

Built-in visualizations enable quick EDA.

Why this answer

Data Wrangler's built-in visualizations allow for quick exploration of feature distributions and relationships without leaving the tool, making it a best practice for EDA. Exporting the Data Wrangler flow as a Jupyter notebook enables reproducibility and sharing with the team. Storing intermediate results in Athena (A) is not a best practice specific to Data Wrangler; it adds overhead.

Using EMR for data profiling (C) is unnecessary since Data Wrangler includes profiling capabilities. Exporting data to QuickSight before transformation (D) is not recommended; analysis should be done within Data Wrangler's transformation steps.

258
Multi-Selecthard

A machine learning team is analyzing a dataset with 10,000 rows and 200 features. They suspect data leakage due to time-based features. Which THREE EDA checks should they perform?

Select 3 answers
A.Plot distribution of each feature in training vs. test sets
B.Apply PCA and check if first two components separate train/test
C.Check whether the dataset is sorted by time and if any feature uses future information
D.Compare feature correlations with target in training and test sets
E.Perform k-means clustering on the whole dataset
AnswersA, C, D

Plotting the distribution of each feature in training vs. test sets helps detect data leakage if the distributions differ significantly (e.g., train contains future data).

Why this answer

Plotting the distribution of each feature in training vs. test sets helps detect data leakage if the distributions differ significantly (e.g., train contains future data). Option C is correct because checking if the dataset is sorted by time and if any feature uses future information directly addresses time-based leakage. Option D is correct because comparing feature correlations with the target in training and test sets can reveal leakage if correlations are abnormally high in training due to future data.

Option B is wrong because PCA is a dimensionality reduction technique and does not directly detect leakage. Option E is wrong because k-means clustering is an unsupervised method and not suitable for leakage detection in this context.

259
Multi-Selectmedium

Which TWO actions are appropriate during exploratory data analysis when you discover that a categorical feature has 50 unique values (high cardinality)?

Select 2 answers
A.Group rare categories into a single 'Other' category.
B.Apply one-hot encoding to create 50 dummy variables.
C.Apply label encoding to assign integers to each category.
D.Drop the feature entirely.
E.Use feature hashing (hashing trick) to reduce dimensionality.
AnswersA, E

Reduces cardinality while keeping most information.

Why this answer

Options A and E are correct. A: Grouping rare categories into an 'Other' category reduces cardinality while preserving information, which is appropriate for high-cardinality categorical features. E: Feature hashing (hashing trick) transforms high-cardinality features into a fixed-size vector, reducing dimensionality.

Option B is incorrect because one-hot encoding with 50 categories creates many sparse columns, which can be problematic for model performance and memory. Option C is incorrect because label encoding implies an ordinal relationship, which may not exist, and can mislead models. Option D is incorrect because dropping the feature may lose important information; other techniques like grouping or hashing are preferable.

260
MCQhard

A data scientist is analyzing a dataset with a binary target variable. The dataset is highly imbalanced (99% negative class). Which metric is most appropriate for evaluating the model's performance during exploratory data analysis?

A.Accuracy
B.Precision
C.F1 Score
D.Area Under the ROC Curve (AUC-ROC)
AnswerD

AUC-ROC is insensitive to class imbalance and provides a global measure of performance.

Why this answer

In highly imbalanced datasets (99% negative class), accuracy is misleading because a model that predicts the majority class always achieves 99% accuracy. Precision focuses on false positives and is threshold-dependent. F1 score balances precision and recall but is sensitive to the chosen threshold and may not reflect overall performance.

AUC-ROC evaluates the model's ability to distinguish between classes across all thresholds and is robust to class imbalance, making it the most appropriate metric for initial model evaluation.

261
MCQhard

The exhibit shows an Athena query result from a table. What is the output of the query?

A.3, 3, 4
B.2, 3, 3
C.2, 4, 4
D.2, 4, 3
AnswerC

Correct counts: col2 non-null=2, rows=4, distinct col1=4.

Why this answer

The query returns COUNT(col2)=2 (only rows 1 and 3 have non-null col2), COUNT(*)=4 (total rows), COUNT(DISTINCT col1)=4 (distinct values A, B, C, D). Option A is wrong because COUNT(col2) is 2, not 3. Option B is wrong because COUNT(*) is 4, not 3.

Option D is wrong because COUNT(DISTINCT col1) is 4, not 3.

262
MCQmedium

An Athena query SELECT COUNT(*) FROM table WHERE col1 IS NULL returns the value 5000. What does this value represent?

A.The total number of rows in the table
B.The number of rows where col1 is NULL
C.The number of rows where col1 is not NULL
D.The number of distinct values in col1
AnswerB

The query counts rows where col1 IS NULL, and the result '5000' is that count.

Why this answer

The exhibit shows the result of an Athena query that counts the number of rows where col1 is NULL. The value 5000 is that count. Therefore, Option B is correct.

Option A is incorrect because the query does not count total rows; it filters for NULLs. Option C is incorrect because the query counts NULL rows, not non-NULL. Option D is incorrect because the query does not use DISTINCT to count distinct values.

263
MCQhard

A data scientist is exploring a dataset with 500 features and 10,000 samples. The data scientist computes the pairwise correlation matrix and finds that many features have correlations above 0.9. The data scientist wants to reduce the dataset to 50 features while preserving as much variance as possible. Which technique should be used?

A.Remove all but one feature from each group of highly correlated features.
B.Apply Principal Component Analysis (PCA) and keep the top 50 principal components.
C.Use Linear Discriminant Analysis (LDA) to project to 50 dimensions.
D.Use t-Distributed Stochastic Neighbor Embedding (t-SNE) to reduce to 50 dimensions.
AnswerB

PCA finds orthogonal directions of maximum variance and can reduce dimensionality effectively.

Why this answer

Principal Component Analysis (PCA) is the correct technique because it performs an orthogonal linear transformation that projects the original 500 features into a new coordinate system where the axes (principal components) are ordered by the variance they capture. By keeping the top 50 principal components, the data scientist retains the maximum possible variance in the reduced 50-dimensional space, directly addressing the goal of preserving variance while handling high multicollinearity.

Exam trap

The MLS-C01 exam often tests the distinction between unsupervised variance-preserving techniques (PCA) and supervised or visualization-specific techniques (LDA, t-SNE), leading candidates to mistakenly choose LDA for dimensionality reduction without recognizing its supervised nature and dimension limit.

How to eliminate wrong answers

Option A is wrong because simply removing all but one feature from each group of highly correlated features is a heuristic that does not guarantee preserving maximum variance; it discards potentially useful information and does not leverage the correlation structure to create new, uncorrelated features. Option C is wrong because Linear Discriminant Analysis (LDA) is a supervised technique that requires class labels to maximize class separability, not variance preservation, and it can project to at most (number of classes - 1) dimensions, which is typically far fewer than 50. Option D is wrong because t-Distributed Stochastic Neighbor Embedding (t-SNE) is a non-linear, stochastic dimensionality reduction technique primarily used for visualization of high-dimensional data in 2 or 3 dimensions; it does not preserve global variance structure and is not suitable for reducing to 50 dimensions while retaining maximum variance.

264
Matchingmedium

Match each ML model evaluation concept to its definition.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Model performs well on training data but poorly on unseen data

Model fails to capture underlying patterns in data

Error from wrong assumptions in the learning algorithm

Error from sensitivity to small fluctuations in training data

Balance between underfitting and overfitting

Why these pairings

Precision, Recall, F1 Score, and ROC AUC are key evaluation metrics. Common confusions include swapping Accuracy, Specificity, and Precision definitions.

265
MCQhard

A company uses Amazon SageMaker to train a regression model. After training, the data scientist notices that the training loss decreases but validation loss increases after a few epochs. Which EDA technique could have helped predict this behavior?

A.Create box plots of each feature to identify outliers
B.Plot learning curves showing training and validation loss over epochs
C.Generate residual plots to check heteroscedasticity
D.Plot confusion matrix on the validation set
AnswerB

Learning curves plot training and validation loss over epochs; when validation loss starts increasing while training loss continues decreasing, it signals overfitting.

Why this answer

Plotting learning curves, which show training and validation loss over epochs, is the correct EDA technique to detect overfitting. The divergence where training loss decreases but validation loss increases is a clear sign of overfitting. Option A (box plots) helps identify outliers but does not directly indicate overfitting.

Option C (residual plots) checks for homoscedasticity in regression, not overfitting. Option D (confusion matrix) is used for classification, not regression.

266
Multi-Selectmedium

A data scientist is using Amazon SageMaker to perform exploratory data analysis on a dataset with missing values and outliers. Which TWO actions should the scientist take to understand the data quality? (Choose TWO.)

Select 2 answers
A.Build a scatterplot matrix to visualize pairwise relationships
B.Use histograms to visualize the distribution of each numerical feature
C.Plot a confusion matrix to assess class separation
D.Create a correlation matrix to identify redundant features
E.Generate summary statistics using df.describe() in a SageMaker notebook
AnswersB, E

Histograms reveal outliers, skewness, and missing data patterns (e.g., zero counts).

Why this answer

Histograms show the distribution of numerical features, helping to identify skewness and outliers. Option E is correct because summary statistics like df.describe() provide count, mean, min, max, and quartiles, which reveal missing values (via count) and outliers (via min/max). Option A is incorrect because a scatterplot matrix visualizes pairwise relationships but does not directly show missing values or outliers.

Option C is incorrect because a confusion matrix is used for evaluating classification model performance, not for data exploration. Option D is incorrect because a correlation matrix shows relationships between features but does not highlight missing values or outliers.

267
Multi-Selectmedium

Which THREE techniques are commonly used to detect outliers in a dataset? (Select THREE.)

Select 3 answers
A.Interquartile range (IQR)
B.k-means clustering
C.Principal component analysis (PCA)
D.Z-score
E.Isolation Forest
AnswersA, D, E

IQR is a common statistical method to detect outliers by identifying data points beyond 1.5 times the IQR from the quartiles.

Why this answer

Options A, D, and E are correct. Z-score and IQR are standard statistical methods for identifying outliers. Isolation Forest is a machine learning algorithm specifically designed for anomaly detection.

Option B (k-means clustering) is incorrect because it is a clustering algorithm, not typically used for outlier detection. Option C (PCA) is incorrect because principal component analysis is used for dimensionality reduction, though it can be used in some outlier detection contexts, it is not one of the three most common techniques.

268
MCQhard

A team is using Amazon SageMaker Data Wrangler to perform exploratory data analysis on a large dataset stored in S3. The dataset contains missing values, outliers, and categorical variables with high cardinality. The team wants to understand data distributions and relationships before modeling. Which combination of Data Wrangler features should they use?

A.Generate a data quality report, view histograms, and create scatter plots for selected features.
B.Drop rows with missing values and visualize box plots for numerical features.
C.Use imputation to handle missing values and one-hot encoding for categorical features.
D.Generate a data quality report and a correlation heatmap.
AnswerA

Data quality report provides summary statistics and missing values; histograms and scatter plots show distributions and relationships.

Why this answer

SageMaker Data Wrangler provides built-in features for exploratory data analysis, including data quality reports (with summary statistics and missing value analysis), histograms for distribution visualization, and scatter plots to explore relationships between features. These are ideal for understanding distributions and correlations early in the pipeline. Option B is incorrect because dropping rows is a data cleaning transformation, not an EDA step, and box plots alone are insufficient for understanding relationships.

Option C is incorrect because imputation and one-hot encoding are data preparation transformations applied after EDA. Option D is incorrect because while Data Wrangler generates a data quality report, it does not directly include correlation heatmaps; scatter plots (as in A) are a more direct way to assess relationships.

269
MCQhard

A data scientist is performing exploratory data analysis on a large dataset stored in Amazon S3 (100 GB, CSV format, 500 columns). The dataset contains customer transaction records with features such as transaction amount, timestamp, customer ID, and numerous categorical variables (e.g., product category, payment method, location). The scientist wants to understand the distribution of transaction amounts across different product categories and identify any outliers. They have an Amazon SageMaker notebook instance with a ml.t3.medium instance and are using pandas. However, when trying to load the entire dataset into a DataFrame using pd.read_csv('s3://bucket/data.csv'), the notebook crashes with a memory error. Additionally, the scientist suspects that some categorical columns have high cardinality (e.g., product category has thousands of unique values), and there are missing values in several columns. What is the MOST efficient approach to perform the EDA without modifying the original dataset or using additional AWS services? Options: A) Use the SageMaker SDK to launch a parallel processing job with PySpark and read the data into a Spark DataFrame, then compute statistics and visualize with matplotlib. B) Use pandas with chunksize parameter to iterate through the dataset in chunks, compute per-chunk statistics, and aggregate results; for high-cardinality columns, use value_counts() with dropna=False and then plot the top 20 categories. C) Use the S3 Select API to filter rows and columns before loading into pandas, reducing the data size; then use pandas for EDA. D) Use SageMaker Data Wrangler to import the dataset, create a flow to handle missing values and reduce cardinality, and export a sample to the notebook for analysis.

A.Use the SageMaker SDK to launch a parallel processing job with PySpark and read the data into a Spark DataFrame, then compute statistics and visualize with matplotlib.
B.Use the S3 Select API to filter rows and columns before loading into pandas, reducing the data size; then use pandas for EDA.
C.Use SageMaker Data Wrangler to import the dataset, create a flow to handle missing values and reduce cardinality, and export a sample to the notebook for analysis.
D.Use pandas with chunksize parameter to iterate through the dataset in chunks, compute per-chunk statistics, and aggregate results; for high-cardinality columns, use value_counts() with dropna=False and then plot the top 20 categories.
AnswerD

Directly solves memory issue by chunking; handles high cardinality by limiting to top categories; no extra services needed.

Why this answer

It addresses the memory issue by reading the data in chunks using the chunksize parameter, allowing processing without loading the entire dataset into memory. It computes per-chunk statistics and aggregates them, which is efficient for EDA. For high-cardinality categorical columns, it uses value_counts() with dropna=False to capture missing values, and then plots the top 20 categories, which is manageable and insightful.

This approach stays within pandas and the existing SageMaker notebook without requiring additional services or changing the dataset. Option A is incorrect because launching a separate PySpark job adds complexity and extra cost, and is not the most efficient for an ad-hoc EDA. Option B (S3 Select) can reduce the data volume but cannot natively perform complex aggregations like distribution across categories without pulling all rows; it is more suited for simple filtering.

Option C (SageMaker Data Wrangler) is a separate service that requires additional setup and is overkill for this simple EDA task; it also modifies the workflow and is not the most efficient for immediate analysis.

270
MCQhard

A data scientist creates the above IAM policy and attaches it to a role used by an Amazon SageMaker notebook instance. When trying to save a file to the S3 bucket, the operation fails. What is the missing permission?

A.kms:Decrypt
B.s3:ListBucket
C.kms:GenerateDataKey
D.s3:GetObject
AnswerC

If the bucket uses SSE-KMS, PutObject requires kms:GenerateDataKey to encrypt the object.

Why this answer

(kms:GenerateDataKey) because the S3 bucket is likely encrypted with a KMS key. When SageMaker writes an object to an encrypted bucket, it needs permission to call kms:GenerateDataKey to generate a data key for encryption. Option A (kms:Decrypt) is for decryption, not encryption.

Option B (s3:ListBucket) allows listing objects, not writing. Option D (s3:GetObject) allows reading objects, not writing. The error when saving indicates missing encryption permissions.

Exam trap

The missing permission is often kms:GenerateDataKey for writing to KMS-encrypted buckets, not s3:PutObject which is already granted.

271
MCQhard

A data scientist is examining a dataset for a binary classification problem. The target variable has a 1:1000 imbalance. Which technique should be used to assess model performance during exploratory data analysis?

A.Area under the Precision-Recall curve
B.F1 score
C.Area under the ROC curve
D.Cohen's kappa
AnswerA

PR AUC is sensitive to class imbalance and focuses on the positive class.

Why this answer

With a 1:1000 class imbalance, the positive class is extremely rare. The Area Under the Precision-Recall curve (AUPRC) focuses on the performance of the positive class and is sensitive to changes in precision and recall, making it a robust metric for imbalanced datasets. Unlike ROC AUC, which can be overly optimistic when negatives dominate, AUPRC provides a realistic assessment of model performance on the minority class.

Exam trap

The trap here is that candidates often default to ROC AUC as the universal metric for classification, not realizing that in extreme imbalance, ROC AUC can be misleadingly high because the false positive rate is diluted by the vast number of true negatives.

How to eliminate wrong answers

Option B (F1 score) is wrong because it is a threshold-dependent metric that evaluates a single point on the precision-recall curve, not the overall performance across all thresholds, and it can be misleading when comparing models without a fixed threshold. Option C (Area under the ROC curve) is wrong because ROC AUC is insensitive to class imbalance; it treats false positive rate (which is dominated by the majority class) equally, often yielding deceptively high scores even when the model fails to identify the minority class. Option D (Cohen's kappa) is wrong because it measures inter-rater agreement adjusted for chance, which is not a standard metric for binary classification model evaluation and does not specifically address the imbalance problem.

272
Multi-Selecteasy

A data scientist wants to identify outliers in a dataset. Which TWO techniques are commonly used for outlier detection during EDA?

Select 2 answers
A.Box plot
B.Heatmap
C.Z-score analysis
D.Bar chart
E.Pearson correlation coefficient
AnswersA, C

Box plots show outliers as points outside the whiskers.

Why this answer

Box plots (A) visually identify outliers as points beyond the whiskers (typically 1.5×IQR). Z-score analysis (C) flags data points with an absolute Z-score greater than 3, indicating they are far from the mean. Heatmaps (B) show correlations between variables, not outliers.

Pearson correlation (E) measures linear relationships, not outliers. Bar charts (D) display categorical frequencies and do not detect outliers.

273
MCQeasy

A data scientist is performing exploratory data analysis on a dataset stored in Amazon S3 using Amazon SageMaker Studio. The dataset has missing values in several columns. Which approach is the MOST efficient way to handle missing values within SageMaker Studio?

A.Run a Jupyter notebook on a local machine to clean the data and upload back to S3.
B.Use SageMaker Data Wrangler to impute missing values with mean, median, or mode.
C.Use AWS Glue to run a find-and-replace operation.
D.Write a custom Python script using pandas to drop rows with missing values.
AnswerB

Data Wrangler provides a visual interface for imputation.

Why this answer

SageMaker Data Wrangler provides a visual interface to handle missing values efficiently within SageMaker Studio, allowing imputation with mean, median, or mode without writing custom code. Option A is inefficient because it requires moving data out of SageMaker. Option C uses an external service (AWS Glue) which adds complexity and overhead.

Option D, while possible, is less efficient than using Data Wrangler's built-in capabilities.

274
Multi-Selecteasy

Which TWO of the following are appropriate techniques for detecting outliers in a univariate continuous dataset? (Select TWO.)

Select 2 answers
A.Z-score method
B.IQR (Interquartile Range) method
C.Box plot visualization
D.Pearson correlation coefficient
E.K-means clustering
AnswersA, B

Z-scores beyond a threshold (e.g., 3) indicate outliers.

Why this answer

Options A and B are correct. Z-score method flags points beyond a threshold (e.g., 3 standard deviations) from the mean. IQR-based outlier detection identifies points beyond 1.5*IQR from the quartiles.

Option C is wrong because box plots visualize outliers but are not a detection technique per se; they rely on IQR. Option D is wrong because Pearson correlation is bivariate and not used for univariate outlier detection. Option E is wrong because K-means clustering is typically used for multivariate data and not a standard univariate outlier detection method.

275
MCQhard

A data scientist is exploring a dataset with 200 features. They compute the pairwise correlation matrix and notice that many features have correlations above 0.95. They want to reduce redundancy before modeling. Which of the following techniques is most appropriate for identifying and removing highly correlated features?

A.Compute mutual information between each feature and the target.
B.Apply PCA and keep the first 50 components.
C.Use Lasso regression to select features.
D.Perform hierarchical clustering on the correlation matrix and select one feature per cluster.
AnswerD

This systematically removes redundancy while retaining representative features.

Why this answer

Hierarchical clustering on correlations groups correlated features; then one can select a representative from each cluster. Option A is wrong because mutual information with the target does not capture pairwise redundancy among features. Option B is wrong because PCA creates new features but does not remove original ones.

Option C is wrong because Lasso regression performs feature selection but may not handle multicollinearity well and does not directly identify redundant groups.

276
MCQhard

A team is building a model to predict house prices. They have a dataset with features like 'SquareFootage', 'Bedrooms', 'YearBuilt', and 'Neighborhood'. They notice that 'SquareFootage' has a few extreme values (e.g., 50,000 sq ft) that are likely data entry errors. They want to handle these outliers without losing all the data. Which of the following approaches is most robust?

A.Cap 'SquareFootage' at the 99th percentile value.
B.Replace extreme values with the mean of 'SquareFootage'.
C.Apply log transformation to 'SquareFootage'.
D.Remove rows where 'SquareFootage' is above 3 standard deviations from the mean.
AnswerA

Capping limits extremes while retaining the records.

Why this answer

Capping 'SquareFootage' at the 99th percentile limits extreme values while retaining most data points, making it robust against data entry errors. Option B is incorrect because replacing extreme values with the mean distorts the distribution and can bias the model. Option C is incorrect because a log transformation does not fix data entry errors; it only changes the scale.

Option D is incorrect because removing rows with values above 3 standard deviations from the mean may discard valid data points and is not robust when the data contains errors.

277
MCQmedium

A data scientist is building a regression model to predict house prices. The dataset includes a feature 'zip_code' with 1,000 unique values. What is the best way to handle this categorical feature in the exploratory data analysis phase?

A.One-hot encode the zip_code feature
B.Apply target encoding using the mean house price per zip code
C.Replace zip_code with the frequency of each zip code in the dataset
D.Use label encoding: assign each zip code a unique integer
AnswerB

Target encoding uses the mean house price per zip code, effectively capturing the relationship between zip code and the target while keeping dimensionality low.

Why this answer

Target encoding (option B) is the best approach for high-cardinality categorical features like zip_code. It captures the relationship between the category and the target variable (house price) without creating an excessive number of dummy variables. One-hot encoding (option A) would create 1,000 columns, leading to high dimensionality and sparsity.

Label encoding (option D) implies an ordinal relationship, which does not exist for zip codes. Frequency encoding (option C) may not capture price variation well because two zip codes with the same frequency could have very different average prices.

278
Multi-Selectmedium

A data engineer is exploring a large dataset in Amazon Athena. The dataset is partitioned by date and stored in Parquet format. The engineer wants to check the number of distinct values in a column for a specific date range. Which THREE practices reduce query cost and improve performance?

Select 3 answers
A.Use the COUNT(DISTINCT column) function.
B.Filter the query with a WHERE clause on the partition column.
C.Use ORDER BY to sort the results.
D.Use SELECT * to retrieve all columns.
E.Ensure the table is columnar (Parquet) to reduce I/O.
AnswersA, B, E

Efficiently counts distinct values without fetching all rows.

Why this answer

Options A, B, and E are correct. Using COUNT(DISTINCT column) (A) is a precise way to count distinct values, and while it scans the column, it avoids fetching unnecessary data. Filtering with a WHERE clause on the partition column (B) limits the data scanned to only the relevant partitions, significantly reducing cost and improving performance.

Using a columnar format like Parquet (E) reduces I/O by reading only the required columns. Option C (ORDER BY) is incorrect because it requires sorting the entire result set, increasing processing time and cost. Option D (SELECT *) is incorrect as it retrieves all columns, negating the benefits of columnar storage and increasing data scanned.

279
Multi-Selecthard

A data scientist is performing exploratory data analysis on a time-series dataset of website traffic. The dataset contains hourly page views for the past two years. The scientist wants to analyze seasonality and trends. Which THREE techniques are appropriate for this analysis? (Choose THREE.)

Select 3 answers
A.Moving average smoothing
B.Box plot by month
C.Time series decomposition (additive or multiplicative)
D.Linear regression on time index
E.Autocorrelation (ACF) plot
AnswersA, C, E

Smoothing reveals underlying trend.

Why this answer

Decomposition separates time series into trend, seasonal, and residual components. Autocorrelation plot (ACF) helps identify seasonality. Moving average smooths to reveal trends.

Linear regression is not typical for seasonal decomposition. Box plot by month can show seasonal patterns but is less common for trend.

280
MCQmedium

A data scientist is analyzing a dataset and finds that the target variable has a bimodal distribution. Which preprocessing step is most appropriate before modeling?

A.Standardize the target variable to have mean 0 and variance 1.
B.Remove outliers from the target variable.
C.Consider clustering to separate the two modes and model them separately.
D.Apply a log transformation to the target variable.
AnswerC

Bimodal distribution may indicate two subpopulations.

Why this answer

Bimodal distributions indicate two distinct underlying groups. Clustering can separate the modes, allowing separate models for each cluster, which often improves performance. Option A is incorrect because standardizing does not change distribution shape.

Option B is incorrect because removing outliers would not address bimodality; outliers are extreme values, not necessarily related to modes. Option D is incorrect because log transformation is for skewed unimodal distributions, not bimodal.

281
MCQmedium

A data scientist ran an AWS Glue ETL job that failed with the error shown. What is the most likely cause?

A.The CSV file has a header mismatch
B.The DataFrame does not have a column named 'age'
C.The schema is evolving incorrectly
D.The data type of 'age' is incompatible
AnswerB

Correct: The error states 'age' is not in the input columns.

Why this answer

The error message indicates that the column 'age' is not found in the DataFrame, which only contains columns [id, name, salary]. Option A is incorrect because the error is about a missing column, not a header mismatch. Option C is incorrect because schema evolution would add a column, not cause a missing column error.

Option D is incorrect because there is no indication of a data type issue; the error is about column existence.

282
MCQeasy

A machine learning engineer is analyzing a text classification dataset with 50,000 documents. Which EDA step is most important to understand the vocabulary size and frequency distribution?

A.Compute TF-IDF matrix
B.Plot frequency of each word in a bar chart
C.Generate bigram collocations
D.Plot histogram of document lengths
AnswerB

Plotting the frequency of each word in a bar chart directly shows the vocabulary size and the frequency distribution (e.g., Zipfian distribution). This EDA step helps decide vocabulary cutoff by identifying very rare words that can be removed.

Why this answer

Plotting the frequency of each word in a bar chart directly shows the vocabulary size and the frequency distribution (e.g., Zipfian distribution). This EDA step helps decide vocabulary cutoff by identifying very rare words that can be removed. Option A is wrong because TF-IDF is a feature transformation, not an exploratory step.

Option C is wrong because bigram collocations are for detecting phrases, not for basic word frequency. Option D is wrong because document length distribution pertains to the number of words per document, not vocabulary size or word frequency.

283
MCQmedium

A data scientist is performing EDA on a time series dataset of daily website visits. The scientist wants to identify any seasonality patterns. Which visualization is most appropriate?

A.Correlation matrix of visits with lagged versions of itself.
B.Scatter plot of visits against the day of the month.
C.Histogram of daily visit counts.
D.Line plot with day on x-axis and visits on y-axis, highlighting weekends.
AnswerD

Reveals periodic patterns over time.

Why this answer

A line plot with day on the x-axis and visits on the y-axis, with weekends highlighted, can reveal weekly seasonality patterns. Option A (correlation matrix with lags) can detect autocorrelation but is not a direct visualization of seasonality. Option B (scatter plot vs day of month) could show monthly patterns but is less effective for daily seasonality and does not preserve time order as clearly as a line plot.

Option C (histogram) shows distribution, not temporal patterns. Therefore, option D is best.

284
Multi-Selectmedium

A data scientist is performing EDA on a dataset with a binary target variable. Which THREE techniques can help assess the relationship between a continuous feature and the target?

Select 3 answers
A.Scatter plot against another continuous feature
B.KDE plot grouped by target
C.Histogram colored by target
D.Bar chart of feature values
E.Box plot grouped by target
AnswersB, C, E

KDE plots show smoothed density per class.

Why this answer

Box plots (comparing distributions for each class), histograms (overlay or side-by-side), and KDE plots (probability density) are all effective for visualizing the relationship between a continuous feature and a binary target. Option A (scatter plot) requires two continuous variables. Option D (bar chart) is for categorical features.

285
MCQmedium

A data scientist is exploring a dataset with a large number of features. The scientist suspects that some features are redundant because they are highly correlated with each other. Which technique should the scientist use during EDA to identify and remove such redundant features?

A.Chi-square test
B.Principal Component Analysis (PCA)
C.Correlation matrix heatmap
D.Variance Inflation Factor (VIF)
AnswerD

VIF measures how much the variance of a regression coefficient is inflated due to multicollinearity.

Why this answer

Variance Inflation Factor (VIF) quantifies multicollinearity by measuring how much the variance of a coefficient is inflated due to correlation with other features. Features with high VIF (typically >5 or >10) are considered highly correlated and can be removed. Option A is incorrect because chi-square test is used for testing independence between categorical variables, not for identifying redundant features.

Option B is incorrect because PCA reduces dimensionality by creating new uncorrelated features, but it does not directly identify which original features are redundant. Option C is incorrect because while a correlation matrix heatmap can show pairwise correlations, it does not account for multicollinearity among multiple features; VIF is more comprehensive.

286
MCQhard

A data scientist is analyzing a dataset with a large number of categorical features. The target variable is binary. Which technique should the scientist use to assess the relationship between each categorical feature and the target?

A.ANOVA
B.Point-biserial correlation
C.Cramér's V
D.Chi-square test of independence
AnswerD

Chi-square tests association between two categorical variables.

Why this answer

The chi-square test of independence is appropriate for testing association between categorical features and a binary target. ANOVA is for continuous target. Mutual information measures dependency but is not a hypothesis test.

Point-biserial correlation is for continuous and binary. Cramér's V is a measure of association after chi-square.

287
MCQhard

A machine learning team is building a model to predict customer churn. The dataset has 20 features and 50,000 rows. After initial EDA, they notice that the target variable 'churn' is highly imbalanced (5% churn, 95% non-churn). Which EDA step should the team prioritize to address this imbalance before model training?

A.Remove outliers in the majority class to balance the dataset.
B.Analyze the distribution of each feature separately for churn and non-churn groups.
C.Perform stratified cross-validation to ensure balanced folds.
D.Apply Principal Component Analysis (PCA) to reduce noise.
AnswerB

This helps identify which features differentiate the classes and informs whether resampling or cost-sensitive methods are needed.

Why this answer

During EDA for an imbalanced dataset, it is crucial to compare feature distributions between churn and non-churn groups to identify which features separate the classes. Option A is wrong because removing outliers from the majority class is not a standard EDA step and can introduce bias. Option C is wrong because stratified cross-validation is a model evaluation technique applied during training, not an EDA step.

Option D is wrong because PCA is a dimensionality reduction technique that does not address class imbalance.

288
MCQeasy

During EDA, a data scientist finds that a feature has a skewness value of 2.5. What does this indicate about the data distribution?

A.The distribution is right-skewed
B.The distribution is symmetric
C.The distribution is left-skewed
D.The distribution has no outliers
AnswerA

Positive skewness indicates a long right tail.

Why this answer

A skewness value of 2.5 is positive and greater than 1, indicating a highly right-skewed (positively skewed) distribution, where the tail extends to the right. Option A correctly identifies this. Option B is wrong because symmetric distributions have skewness near 0.

Option C is wrong because left-skewed distributions have negative skewness. Option D is wrong because skewness measures asymmetry, not necessarily the presence of outliers.

289
MCQhard

A data scientist is working on a predictive maintenance project for a manufacturing company. Sensor data is collected every second from 100 machines and stored in an Amazon S3 bucket as Parquet files, partitioned by machine_id and date. The dataset is massive (10 TB) and contains over 2000 features per machine. The data scientist needs to perform exploratory data analysis to identify which features are most predictive of machine failure. They have access to Amazon SageMaker Studio with a SageMaker Data Wrangler flow. The initial data exploration is taking too long due to the volume of data. The data scientist wants to speed up the analysis without losing accuracy in feature selection. Which course of action is most appropriate?

A.Switch to using Amazon EMR with Spark to perform distributed feature selection on the full dataset
B.Reduce the data to a single partition by concatenating all files and use only one machine's data
C.Use SageMaker Data Wrangler to create a stratified sample by machine_id and date, then analyze the sample
D.Use Amazon Athena to query a random sample of rows from the dataset
AnswerC

Correct: Stratified sampling preserves distribution of key variables and reduces data size.

Why this answer

SageMaker Data Wrangler supports stratified sampling, which preserves the distribution of machine failure across machine_id and date, allowing for faster exploratory data analysis while maintaining representativeness for feature selection. Option A is incorrect because distributed processing with EMR on the full dataset may still be slow and is unnecessary when sampling can capture the signal. Option B is incorrect because using only one machine's data loses cross-machine variability and may bias feature selection.

Option D is incorrect because random sampling does not guarantee preservation of time series order or failure distribution, potentially compromising analysis accuracy.

290
MCQmedium

A data engineer runs a SQL query on Amazon Athena to explore a dataset stored in S3 as CSV. The query returns zero rows for a column that should have numeric values. Which step should the engineer take to diagnose the issue?

A.Verify that the S3 bucket has encryption enabled.
B.Run an AWS Glue crawler to update the table schema.
C.Add a partition to the table for the date column.
D.Check the table schema in AWS Glue Data Catalog to ensure the column data type is correct.
AnswerD

Incorrect data type can cause Athena to return null values.

Why this answer

Checking the table schema in the AWS Glue Data Catalog helps identify data type mismatches. If Athena returns zero rows for a numeric column, it may be because the column's data type in the catalog is incorrect (e.g., string instead of int). Fixing the schema to match the actual data allows Athena to parse the values correctly.

Option A is incorrect because encryption does not affect query results. Option B is incorrect because running a crawler will only re-infer the schema, which may not solve the issue if the underlying data format is inconsistent. Option C is incorrect because partitioning is unrelated to data type issues.

291
MCQhard

A data scientist is analyzing clickstream data from a website. The data is stored in Amazon S3 as JSON files, each containing nested arrays. The scientist needs to flatten the nested structures and compute user session durations. Which approach is most efficient for this EDA task?

A.Use Amazon EMR with Apache Spark to process the data.
B.Use Amazon Athena with JSON SerDe to query the data and compute session duration with SQL.
C.Use AWS Glue DataBrew to flatten the JSON and create new columns for session duration.
D.Use Amazon QuickSight to visualize the raw data without flattening.
AnswerC

DataBrew is built for data preparation and can handle nested JSON visually.

Why this answer

AWS Glue DataBrew provides a visual interface to flatten nested JSON and compute derived metrics like session duration without writing code. Option A (EMR with Apache Spark) is more complex and requires writing code. Option B (Athena with JSON SerDe) can query but requires SQL that handles arrays.

Option D (QuickSight) is visualization only and cannot flatten or compute session duration.

292
MCQhard

A company stores customer transaction data in Amazon S3. A data scientist needs to perform exploratory data analysis using Amazon SageMaker. The dataset is 500 GB in CSV format. Which approach is most cost-effective and time-efficient for initial data profiling?

A.Use Amazon S3 Select to sample rows directly from S3
B.Load the entire dataset into a SageMaker notebook instance and use pandas
C.Convert the data to Parquet format and then use Athena to query
D.Use AWS Glue ETL to transform the data and then analyze in Athena
AnswerA

S3 Select allows efficient querying of a subset without full data movement.

Why this answer

Amazon S3 Select can query a subset of rows directly from S3 without loading the entire dataset, enabling quick and cost-effective profiling. Option B is incorrect because loading the full 500 GB into a SageMaker notebook instance is expensive and time-consuming. Option C is incorrect because converting to Parquet format adds overhead that is unnecessary for initial profiling.

Option D is incorrect because using AWS Glue ETL to transform the entire dataset before analysis is not cost-effective for initial data exploration.

293
MCQmedium

A data scientist is performing EDA on a dataset containing customer transaction records. The dataset includes columns: 'transaction_id', 'customer_id', 'transaction_amount', 'transaction_date', and 'product_category'. The data scientist wants to check for duplicate transactions and identify any suspicious patterns, such as multiple transactions from the same customer on the same day with the same amount. The dataset has 5 million rows. The data scientist is using a SageMaker Studio notebook with a ml.t3.medium instance. The data is stored in S3. What is the most efficient way to perform this analysis?

A.Use a SageMaker Spark processing job with PySpark to aggregate and detect duplicates.
B.Use Amazon Athena to run SQL queries to find duplicates.
C.Load the entire dataset into a pandas DataFrame and use groupby operations.
D.Use AWS Glue DataBrew to create a profile and manually inspect.
AnswerA

Spark can handle large data efficiently.

Why this answer

SageMaker Spark processing jobs distribute the workload across multiple nodes, allowing efficient handling of the 5-million-row dataset within the memory limits of the ml.t3.medium instance. Option B (Athena) is less efficient due to query costs and the need for external setup, and it may not be as flexible for custom duplicate detection logic. Option C (pandas) would likely cause out-of-memory errors on the small instance.

Option D (DataBrew) is designed for profiling and basic transformations, not for custom duplicate analysis.

294
MCQeasy

A data scientist is performing exploratory data analysis on a dataset with missing values. They want to understand the distribution of each feature and identify outliers. Which AWS service can be used to create visualizations such as histograms and box plots without writing any code?

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

QuickSight provides code-free visualizations like histograms and box plots.

Why this answer

Amazon QuickSight is a serverless, machine learning-powered business intelligence service that allows users to create interactive dashboards and visualizations without writing code. Option A is wrong because Amazon EMR is a big data platform, not primarily for visualization. Option B is wrong because AWS Glue is used for ETL, not visualization.

Option C is correct. Option D is wrong because Amazon SageMaker Studio requires coding for custom visualizations. Option E is wrong because Amazon Athena is a query service, not a visualization tool.

295
MCQhard

A machine learning engineer is performing exploratory data analysis on a large dataset stored in Amazon S3 using AWS Glue. The dataset contains a mix of numeric and categorical features. The engineer wants to efficiently compute summary statistics (e.g., mean, median, standard deviation) for the numeric columns. Which AWS service or feature should the engineer use to achieve this with minimal setup?

A.Launch an Amazon EMR cluster and use Spark.
B.Use AWS Glue DataBrew to profile the dataset.
C.Use Amazon Athena to run SQL queries on the data.
D.Use Amazon SageMaker Data Wrangler.
AnswerB

DataBrew provides an easy interface for profiling and statistics.

Why this answer

AWS Glue DataBrew provides a visual interface to profile data and compute summary statistics without writing code. Option A is wrong because launching an Amazon EMR cluster requires setup and management, which is not minimal. Option C is wrong because Amazon Athena requires writing SQL queries and does not automatically compute summary statistics.

Option D is wrong because Amazon SageMaker Data Wrangler is a good tool but requires more configuration than DataBrew for simple summary statistics.

296
MCQmedium

A data analyst is working with a time series dataset that shows increasing variance over time. To stabilize the variance before modeling, which transformation is most appropriate?

A.First-order differencing
B.Box-Cox transformation
C.Log transformation
D.Min-max scaling
AnswerC

Log transformation is specifically used when variance increases with the mean; it compresses the scale and stabilizes variance, making it the most appropriate choice.

Why this answer

The log transformation (option C) is appropriate when variance increases with the mean, which is common in time series data. It compresses the scale and stabilizes variance. First-order differencing (A) is used to remove trend or seasonality, not to stabilize variance.

The Box-Cox transformation (B) can also stabilize variance, but it is a more general family that includes log as a special case; however, log is simpler and often preferred when the data are positive. Min-max scaling (D) rescales to a fixed range but does not address changing variance.

297
Multi-Selectmedium

A data scientist is exploring a dataset containing customer transaction records. The target variable is 'churn' (1 = churned, 0 = not churned). Which TWO actions should the scientist take to understand the data distribution and prepare for modeling?

Select 2 answers
A.Apply Principal Component Analysis (PCA) to reduce dimensionality.
B.Train a gradient boosting model to identify important features.
C.Plot the frequency of the target variable to check for class imbalance.
D.Check for missing values in each column and decide on an imputation strategy.
E.Convert categorical variables into one-hot encoded vectors.
AnswersC, D

Essential to detect imbalance.

Why this answer

Visualizing class imbalance and identifying missing values are fundamental EDA steps. Option A (PCA) is for dimensionality reduction, not initial EDA. Option B (gradient boosting) is modeling, not EDA.

Option E (one-hot encoding) is for categorical variables, but not an EDA action. The correct actions are C and D.

298
Multi-Selecthard

Which THREE of the following are best practices for feature engineering during EDA? (Select THREE.)

Select 3 answers
A.Remove all outliers from the dataset
B.Standardize all features to have zero mean and unit variance
C.Apply log transformation to highly skewed features
D.Create interaction features between numeric variables
E.Encode categorical variables using one-hot encoding
AnswersC, D, E

Log transformation reduces skewness.

Why this answer

Applying a log transformation to highly skewed features helps normalize their distribution, reducing the impact of extreme values and making the data more suitable for many machine learning algorithms that assume normally distributed features. This is a common technique during exploratory data analysis (EDA) to stabilize variance and improve model performance, especially for linear models and neural networks.

Exam trap

The MLS-C01 exam often tests the misconception that all preprocessing steps, like outlier removal and standardization, should be performed during EDA, when in fact EDA is for understanding data distributions and relationships, while transformations and scaling are part of data preprocessing that may follow EDA based on insights gained.

299
MCQeasy

A data scientist is performing EDA on a dataset with 1,000 features. The goal is to select the most important features for a regression model. Which technique can be used to rank feature importance quickly?

A.Calculate the correlation coefficient of each feature with the target
B.Use t-SNE to visualize feature relationships
C.Run k-means clustering and use cluster centroids
D.Apply Principal Component Analysis (PCA) and examine component loadings
AnswerA

Quick and provides a ranking.

Why this answer

Correlation analysis with the target variable is a quick way to rank features. Option B (t-SNE) is used for visualization, not feature ranking. Option C (k-means clustering) is an unsupervised clustering method and does not provide feature importance.

Option D (PCA) component loadings show variance contribution but are not a direct ranking of feature importance to the target.

300
MCQmedium

A data scientist is working with a dataset that contains a feature with many outliers. Which transformation should the scientist apply to reduce the impact of outliers?

A.Min-max scaling
B.Log transformation
C.Standardization (z-score)
D.Binning
AnswerB

Log transformation reduces skewness and dampens outlier effects.

Why this answer

Log transformation compresses the range of values and reduces the impact of outliers. Standardization (z-score) does not reduce outlier impact. Min-max scaling is sensitive to outliers.

Square root transformation is less effective than log for large outliers. Binning loses information.

← PreviousPage 4 of 6 · 381 questions totalNext →

Ready to test yourself?

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