Courseiva

CCNA Exploratory Data Analysis Questions

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

301
MCQeasy

A data analyst wants to check for duplicate rows in a dataset stored in S3. Which AWS service can be used to run a SQL query to count duplicates without moving the data?

A.Amazon Athena
B.Amazon Redshift Spectrum
C.Amazon SageMaker Studio
D.AWS Glue
AnswerA

Athena can run SQL queries on S3 data to count duplicates.

Why this answer

Amazon Athena is a serverless interactive query service that allows running standard SQL queries directly on data stored in Amazon S3, without needing to move the data. It can easily count duplicate rows using SQL GROUP BY and HAVING clauses. Option B (Amazon Redshift Spectrum) is wrong because although it can query data in S3, it requires an active Redshift cluster, which is unnecessary for this simple ad-hoc query.

Option C (AWS Glue) is wrong because Glue is an ETL service for data preparation and cataloging, not a query engine. Option D (Amazon SageMaker Studio) is wrong because it is an integrated development environment for machine learning, not a SQL query service.

302
Multi-Selecteasy

During EDA, a data scientist generates a pairplot of the dataset and observes that two features have a Pearson correlation coefficient of 0.95. Which TWO conclusions can the scientist draw from this observation? (Choose 2)

Select 2 answers
A.The two features may be multicollinear
B.The two features have a strong linear relationship
C.The two features move in opposite directions
D.The two features are statistically independent
E.One feature causes the other
AnswersA, B

High correlation between features can cause multicollinearity in regression models.

Why this answer

Options A and B are correct because a Pearson correlation coefficient of 0.95 indicates a very strong positive linear relationship between the two features. This strong linear relationship suggests potential multicollinearity if both features are used as predictors in a linear model. Option C is incorrect because a positive correlation means the features move in the same direction, not opposite.

Option D is wrong because a high correlation implies dependence, not statistical independence. Option E is incorrect because correlation does not imply causation; it only measures the strength and direction of a linear relationship.

303
MCQeasy

During EDA, a data scientist creates a scatter matrix of numerical features and notices that some features have a funnel-shaped pattern (variance increases with the mean). What is the appropriate transformation to stabilize variance?

A.Apply log transformation.
B.Standardize the features using Z-scores.
C.Apply a sine transformation.
D.Apply Box-Cox transformation with lambda=0.
AnswerA

Log transformation stabilizes variance when variance increases with mean.

Why this answer

A funnel-shaped pattern in a scatter matrix indicates heteroscedasticity, where variance increases with the mean. The log transformation is appropriate because it compresses the scale of the data, making the variance more constant across the range of values, which stabilizes variance for right-skewed or multiplicative data.

Exam trap

The MLS-C01 exam often tests the distinction between transformations that stabilize variance (log, Box-Cox) versus those that only standardize (Z-scores) or are domain-specific (sine), and candidates may incorrectly choose Box-Cox with lambda=0 thinking it is a separate technique, missing that the log transformation is the canonical answer for funnel-shaped heteroscedasticity.

How to eliminate wrong answers

Option B is wrong because standardizing using Z-scores centers and scales the data to unit variance but does not address the relationship between variance and mean; it assumes homoscedasticity and can amplify heteroscedasticity. Option C is wrong because a sine transformation is periodic and used for cyclical or angular data, not for stabilizing variance in funnel-shaped patterns. Option D is wrong because Box-Cox with lambda=0 is equivalent to the log transformation only when the data is positive, but the Box-Cox transformation is a family of power transformations; specifying lambda=0 directly is redundant and the question asks for the appropriate transformation, not a specific parameterization.

304
MCQmedium

A data engineer is exploring a dataset with 1 million rows and 50 features. They notice that some features have missing values. The 'Age' column has 5% missingness, and 'Income' has 20% missingness. The target variable is 'LoanDefault' (binary). The engineer wants to impute missing values. Which of the following strategies is most appropriate?

A.Impute missing 'Age' with median and 'Income' with median.
B.Impute missing 'Age' with mode and 'Income' with mode.
C.Use a k-NN model to predict missing values.
D.Drop all rows with missing values.
AnswerA

Median is robust to outliers and suitable for skewed distributions.

Why this answer

Median imputation is robust to outliers and appropriate for numerical features like Age and Income. Using median preserves the central tendency without being affected by extreme values. Option B is incorrect because mode is suitable for categorical features, not continuous numerical ones.

Option C is incorrect because k-NN imputation, while possible, is more complex and typically used after simpler methods in EDA. Option D is incorrect because dropping rows with missing values would discard a significant portion of the dataset (up to 25% if missingness is independent), which is not ideal for initial analysis.

305
MCQmedium

An ML engineer runs the AWS CLI command above to list files in a training data bucket. The engineer notices that the three CSV files have different sizes but the same number of columns. What is the MOST likely cause of the size variation?

A.The files are compressed with different algorithms.
B.Some files have duplicate headers.
C.The files contain a different number of rows.
D.The files have different column data types.
AnswerC

Row count directly affects file size.

Why this answer

Different numbers of rows directly affect file size. Options A and B are incorrect: compression algorithms would cause size differences but the files are CSV and likely uncompressed; duplicate headers would cause schema inconsistency, but the question states same number of columns. Option D is incorrect because different column data types do not necessarily cause size variation; they could still have same number of rows.

306
MCQeasy

A machine learning engineer is analyzing feature distributions in a dataset and notices that one feature has a long tail. Which transformation is most appropriate to reduce skewness and make the distribution more normal?

A.Apply one-hot encoding
B.Apply a log transformation
C.Apply min-max normalization
D.Apply standardization (Z-score)
AnswerB

Log transformation compresses the long tail and reduces skewness.

Why this answer

Log transformation is the most appropriate technique to reduce right skewness (long tail) and make the distribution closer to normal. One-hot encoding is used for categorical variables, not for transforming skewed numerical features. Min-max normalization scales features to a range but does not change the shape of the distribution.

Standardization (Z-score) centers the data and scales by standard deviation, but also does not reduce skewness.

307
MCQhard

A data scientist is working with a dataset containing geospatial coordinates (latitude and longitude) of customer locations. The scientist wants to engineer features such as distance to the nearest store, and cluster customers into regions. Which AWS service is best suited for performing geospatial analysis and clustering during exploratory data analysis?

A.Amazon SageMaker with custom Python scripts using scikit-learn and Geopy
B.Amazon Athena with PostGIS extensions
C.AWS Glue with geospatial transforms
D.Amazon Location Service
AnswerA

SageMaker allows custom code for distance calculations and clustering using libraries like scikit-learn.

Why this answer

Amazon SageMaker notebooks allow custom Python scripts using libraries like scikit-learn for clustering (e.g., K-Means) and Geopy for distance calculations, making it ideal for geospatial feature engineering and clustering during EDA. Option B is incorrect: Amazon Athena with PostGIS is for querying geospatial data, not for iterative analysis or clustering. Option C is incorrect: AWS Glue is an ETL service, not suited for interactive exploration and clustering.

Option D is incorrect: Amazon Location Service provides maps and location tracking APIs, not a platform for analytical clustering.

308
MCQeasy

A data scientist is visualizing the distribution of a numerical feature that is heavily right-skewed. Which visualization technique is most appropriate?

A.Histogram with linear scale
B.Scatter plot
C.Box plot with log scale
D.Q-Q plot
AnswerC

Box plot with log scale handles skewness and shows outliers.

Why this answer

A box plot with log scale is effective for skewed data as it shows outliers and distribution shape after transformation. Histogram with log scale also works. KDE is similar to histogram.

Q-Q plot checks normality. Scatter plot is for two variables.

309
MCQeasy

A data scientist runs a SQL query on an Amazon Athena table and notices that the query scans a large amount of data. Which approach would reduce the amount of data scanned without changing the SQL logic?

A.Partition the table on a column that is frequently used in WHERE clauses.
B.Convert the data from CSV to JSON format.
C.Store the data in Parquet format without partitioning.
D.Use GZIP compression on the data files.
AnswerA

Partitioning prunes data and reduces scanned bytes.

Why this answer

Partitioning the table on a column that is frequently used in WHERE clauses allows Athena to prune partitions and only scan the relevant data, reducing the amount of data scanned. Option B (JSON) does not reduce scan because it is not columnar. Option C (Parquet without partitioning) is columnar and can reduce scan through column pruning, but without partitioning it still scans entire columns.

Option D (GZIP) compresses data but Athena decompresses and scans the full file size, so no reduction in scanned data.

310
MCQhard

A machine learning engineer is analyzing a dataset with high cardinality categorical features. They want to reduce the number of categories by grouping rare categories into an 'Other' category. Which Amazon SageMaker processing job capability is best suited for this task?

A.Amazon SageMaker Processing
B.Amazon SageMaker Data Wrangler
C.AWS Glue Studio
D.Amazon SageMaker Autopilot
AnswerA

Processing jobs allow custom scripts for flexible data transformation.

Why this answer

Amazon SageMaker Processing allows you to run custom data processing scripts (e.g., using pandas) that can handle grouping rare categories into 'Other' based on frequency thresholds. Option B (Data Wrangler) is a visual tool that may not offer the same level of customization for complex grouping logic. Option C (AWS Glue Studio) is a visual ETL tool but lacks tight integration with SageMaker and may be less efficient for this specific task.

Option D (Autopilot) is designed for automated model building, not custom data processing.

311
MCQeasy

Refer to the exhibit. A data scientist lists files in an S3 bucket. The dataset is split into train, test, and validation sets. What is the most likely issue with this data split?

A.The files are not partitioned by date.
B.The training file is missing a header row.
C.The training set is smaller than the test set, which is unusual.
D.The test file should be in JSON format.
AnswerC

Typically training set is largest.

Why this answer

The training set (1024 bytes) is smaller than the test set (2048 bytes), which is unusual. Typically training set should be larger. Option A (missing header) cannot be inferred; Option B (CSV format) is fine; Option D (partitioning) is not evident.

312
MCQmedium

A data scientist is analyzing a dataset containing customer reviews. The data scientist wants to understand the most common words used in positive and negative reviews. Which AWS service is most suitable for this task?

A.Amazon Rekognition
B.Amazon Comprehend
C.Amazon Polly
D.Amazon Transcribe
AnswerB

Comprehend provides sentiment analysis and key phrase extraction.

Why this answer

Amazon Comprehend can perform sentiment analysis and extract key phrases. Option A is wrong because Amazon Rekognition is for image/video analysis. Option C is wrong because Amazon Polly is a text-to-speech service.

Option D is wrong because Amazon Transcribe is for speech-to-text.

313
MCQmedium

A data scientist is analyzing a dataset with a target variable that is highly imbalanced (only 1% positive class). The goal is to build a binary classifier. During exploratory data analysis, which metric is MOST appropriate to evaluate the performance of different sampling strategies before model training?

A.Root Mean Squared Error (RMSE)
B.Area Under the Receiver Operating Characteristic Curve (AUC ROC)
C.F1 score
D.Accuracy
AnswerB

AUC ROC is threshold-independent and robust to class imbalance.

Why this answer

The most appropriate metric during exploratory data analysis for evaluating sampling strategies with imbalanced data is AUC ROC, as it is independent of the class distribution and measures the model's ability to distinguish between positive and negative classes regardless of the threshold. Option A (RMSE) is used for regression tasks, not classification. Option C (F1 score) depends on a specific threshold and can be affected by sampling changes.

Option D (Accuracy) is misleading for imbalanced datasets because a high accuracy can be achieved by predicting the majority class.

314
MCQmedium

Refer to the exhibit. A data scientist plans to read this CSV file into memory for exploratory data analysis using pandas. The instance has 8 GB of RAM. What is the MOST likely issue the scientist will encounter?

A.The file contains too many rows for pandas to handle
B.The file is too large to load into memory on this instance
C.The file is not in CSV format despite the ContentType
D.The file is not accessible because of insufficient permissions
AnswerB

1 GB CSV file may require >8 GB RAM when loading into pandas.

Why this answer

The file size is approximately 1 GB (1073741824 bytes = 1 GB), and pandas typically requires 3-5x the file size in memory for CSV parsing, which would exceed the 8 GB RAM. Option A is wrong because pandas can handle 10 million rows; the issue is memory, not row count. Option C is wrong because the ContentType is text/csv, so it is indeed CSV format.

Option D is wrong because there is no indication of permission issues (HTTP 200).

315
MCQeasy

A team has a dataset with 500 features and wants to reduce dimensionality. During EDA, they compute the variance of each feature. Which finding would most likely lead to feature removal?

A.Some features have high correlation with each other
B.Some features have negative covariance with the target
C.Some features have very high variance
D.Some features have near-zero variance
AnswerD

Near-zero variance means the feature has very little variation across samples, providing almost no discriminative power. Removing such features reduces dimensionality without significant loss of information.

Why this answer

Features with near-zero variance have little to no information content and are often redundant for modeling. Removing them reduces dimensionality without significant loss. Option A is incorrect: high correlation between features suggests multicollinearity, but variance is not the direct measure; correlation is addressed by other techniques like PCA.

Option B is incorrect: negative covariance with the target indicates an inverse relationship, which can be informative. Option C is incorrect: high variance often indicates useful information, though it may warrant scaling; it is not a reason for removal.

316
MCQmedium

A data scientist runs the above AWS CLI command. What does the command do?

A.It lists objects larger than 1,000,000 bytes under the data/ prefix.
B.It counts the number of objects larger than 1 MB.
C.It lists objects created after January 2023.
D.It lists objects larger than 1 MB in size.
AnswerA

The --query filters Size > '1000000', which is 1,000,000 bytes.

Why this answer

The AWS CLI command `aws s3api list-objects --bucket your-bucket --prefix data/ --query 'Contents[?Size > `1000000`].[Key]'` lists the keys (names) of objects in the bucket under the 'data/' prefix whose size is greater than 1,000,000 bytes. The `--query` uses JMESPath to filter objects where Size > 1000000 and then projects the Key field. Option B is incorrect because it states 'counts', but the command returns keys, not a count.

Option C is incorrect because it filters by size, not by date. Option D is incorrect because 1,000,000 bytes is not exactly 1 MB (which is 1,048,576 bytes), so the description 'larger than 1 MB' is inaccurate; the command uses bytes, not MB.

317
MCQeasy

A data scientist is reviewing a dataset and notices that the distribution of a numerical feature is heavily right-skewed with a long tail. Which visualization is most appropriate to assess the distribution?

A.Box plot
B.Line chart
C.Scatter plot
D.Histogram with a logarithmic scale on the x-axis
AnswerD

Log scale helps visualize skewed distributions.

Why this answer

A histogram with a logarithmic scale on the x-axis can effectively display the distribution of a heavily right-skewed numerical feature by compressing the long tail and making the shape more interpretable. Option A (box plot) is less suitable because it shows quartiles and outliers but not the full distribution shape. Option B (line chart) is used for time series or trends, not for distribution assessment.

Option C (scatter plot) is for visualizing relationships between two variables, not a single variable's distribution.

318
MCQhard

An ML engineer is performing EDA on a dataset of customer transactions. The dataset has 1 million rows and 20 columns, including a 'transaction_amount' column. The engineer notices that 5% of the transaction amounts are negative, which are data entry errors. The rest are positive. Which approach is most appropriate for handling these negative values during EDA?

A.Impute the negative values with the median of positive transaction amounts.
B.Remove rows with negative transaction amounts from the dataset.
C.Take the absolute value of the negative transaction amounts.
D.Cap the negative values at zero.
AnswerB

Removing erroneous data points cleans the dataset without introducing bias.

Why this answer

Removing rows with negative transaction amounts is the most appropriate approach during EDA. The negative values are data entry errors, not legitimate transactions. Removing them cleans the dataset without introducing bias from imputation or transformation.

Option A is incorrect because imputing negative values with the median would treat the errors as missing data, but they are not missing; they are erroneous. This could distort the distribution. Option C is incorrect because taking absolute values would convert errors into positive values, adding noise and misrepresenting the data (e.g., a negative $100 error becomes a legitimate $100 transaction).

Option D is incorrect because capping negative values at zero would create a spike at zero and distort the distribution, treating errors as valid zero amounts. Therefore, removal is the cleanest approach for erroneous data.

319
MCQhard

A data scientist is trying to upload a CSV file to an S3 bucket using the AWS CLI without specifying server-side encryption. The upload fails with an AccessDenied error. Based on the bucket policy exhibit, what is the most likely cause?

A.The upload request did not specify the required server-side encryption.
B.The bucket does not exist.
C.The data scientist does not have any permissions to the bucket.
D.The data scientist used the wrong AWS region.
AnswerA

The condition requires s3:x-amz-server-side-encryption to be AES256.

Why this answer

The bucket policy requires that all PutObject requests include the x-amz-server-side-encryption header with value 'AES256'. Since the data scientist did not specify any encryption, the request was denied with AccessDenied. Option B is wrong because the error is AccessDenied, not NoSuchBucket.

Option C is wrong because the data scientist may have permissions but the condition on encryption is not met. Option D is wrong because region mismatch would give a different error.

320
MCQhard

A data scientist is performing exploratory data analysis on a high-dimensional dataset with 500 features. The scientist wants to visualize the data in 2D to check for clusters. Which dimensionality reduction technique should the scientist use that preserves global structure and is computationally efficient for large datasets?

A.t-SNE
B.Linear Discriminant Analysis (LDA)
C.PCA
D.UMAP
AnswerC

PCA is linear, fast, and preserves global variance.

Why this answer

PCA is a linear dimensionality reduction technique that preserves global structure (variance) and is computationally efficient for large datasets. Option A is wrong because t-SNE is non-linear, slower, and focuses on preserving local structure, not global. Option B is wrong because LDA is a supervised technique that requires class labels, and it is not typically used for unsupervised exploration of clusters.

Option D is wrong because UMAP is non-linear and can be slower than PCA; while it preserves both local and global structure to some extent, it is not as computationally efficient as PCA for very large datasets.

321
Multi-Selecthard

A data scientist is analyzing a large dataset of images stored in Amazon S3. The dataset is used to train a computer vision model. Which THREE EDA steps are appropriate for this image dataset?

Select 3 answers
A.Compute the distribution of image dimensions (height and width).
B.Check for corrupted or unreadable image files.
C.Decompose the time series of image timestamps to detect seasonality.
D.Visualize a sample of images from each class to verify labels.
E.Perform tokenization and stop word removal on image filenames.
AnswersA, B, D

Computing the distribution of image dimensions (height and width) helps identify variations in input size, which is important for resizing or padding decisions.

Why this answer

The appropriate EDA steps for an image dataset include analyzing image dimensions (A) to understand size variability and potential resizing needs, checking for corrupted or unreadable files (B) to ensure data integrity, and visualizing sample images per class (D) to verify label accuracy and detect labeling errors. Option C (time series decomposition) is irrelevant because timestamps, while possibly present, are not a primary focus of standard image EDA; it would be relevant for time-series data. Option E (tokenization and stop word removal) applies to text data, not images.

322
MCQeasy

A machine learning team is reviewing a dataset for a regression problem. They notice that the target variable has a right-skewed distribution. Which transformation should they consider applying to the target variable to improve model performance?

A.Apply StandardScaler to the target variable.
B.Apply MinMaxScaler to the target variable.
C.Apply log transformation to the target variable.
D.Apply one-hot encoding to the target variable.
AnswerC

Log transformation reduces right skewness.

Why this answer

Log transformation is commonly applied to right-skewed data to make it more normally distributed, which can improve model performance. Option A (StandardScaler) is for scaling, not skewness. Option B (MinMaxScaler) also doesn't address skewness.

Option D (One-hot encoding) is for categorical variables.

323
Multi-Selecthard

During EDA of a dataset for a regression problem, a data scientist notices that the target variable has a right-skewed distribution. Which THREE transformations are appropriate to address this skewness? (Choose THREE.)

Select 3 answers
A.Log transformation
B.StandardScaler (z-score normalization)
C.Box-Cox transformation
D.Yeo-Johnson transformation
E.Min-Max scaling
AnswersA, C, D

Log transformation compresses large values, reducing right skew.

Why this answer

Options A, C, and D are correct. Log transformation, Box-Cox transformation, and Yeo-Johnson transformation are effective methods for reducing right skewness in the target variable. Option B (StandardScaler) standardizes features to have zero mean and unit variance, but does not reduce skewness.

Option E (Min-Max scaling) scales features to a fixed range, but does not affect the shape of the distribution.

324
MCQmedium

A company stores sensor data in Amazon S3. A data scientist wants to explore the data using SQL without moving it. Which AWS service should they use?

A.Amazon EMR
B.Amazon Redshift
C.Amazon QuickSight
D.Amazon Athena
AnswerD

Athena queries data directly in S3 using SQL.

Why this answer

Amazon Athena is the correct choice because it is a serverless interactive query service that allows you to analyze data directly in Amazon S3 using standard SQL without any data movement or infrastructure management. Athena uses Presto under the hood and charges only for the data scanned per query, making it ideal for ad-hoc exploratory analysis on sensor data stored in S3.

Exam trap

The trap here is that candidates often confuse Amazon Athena with Amazon EMR or Redshift, thinking they need a full cluster or data warehouse for SQL queries, but Athena is specifically designed for serverless, direct S3 querying with no data movement.

How to eliminate wrong answers

Option A is wrong because Amazon EMR is a managed big data platform that requires provisioning and managing clusters (e.g., Hadoop, Spark), which involves moving or processing data in a separate compute layer, not querying it directly in S3 with SQL without setup. Option B is wrong because Amazon Redshift is a data warehouse that requires loading data from S3 into its own storage before querying, violating the 'without moving it' requirement. Option C is wrong because Amazon QuickSight is a business intelligence (BI) visualization tool, not a SQL query engine; it can connect to Athena but cannot directly run SQL queries on S3 data on its own.

325
Multi-Selecthard

A data scientist is analyzing a dataset with many missing values. The scientist wants to decide on an imputation strategy. Which THREE considerations are important for choosing the imputation method?

Select 3 answers
A.The mechanism of missingness (MCAR, MAR, MNAR).
B.The class imbalance of the target variable.
C.The percentage of missing values in each feature.
D.The distribution of the feature (e.g., skewed, normal).
E.The feature importance according to a random forest model.
AnswersA, C, D

Determines whether imputation is valid.

Why this answer

The three correct considerations are: missing data mechanism (MCAR/MAR/MNAR) which determines whether imputation can be unbiased; percentage of missing values in each feature, which affects the reliability of imputation and whether deletion is preferable; and feature distribution (e.g., skewed, normal), which guides the choice between mean, median, or model-based imputation. Option B (class imbalance) is a consideration for classification models, not imputation. Option E (feature importance) is not a standard criterion for choosing imputation methods.

326
MCQhard

A data engineer is performing exploratory data analysis on a large dataset stored in Amazon S3 (10 TB in CSV format). The dataset has 2000 columns and 50 million rows. The engineer needs to compute summary statistics (mean, median, standard deviation) for each numeric column and identify missing values. Which approach is MOST cost-effective and time-efficient?

A.Use Amazon Redshift Spectrum to query the data directly from S3.
B.Load the data into Amazon SageMaker Data Wrangler and compute statistics interactively.
C.Convert the data to Apache Parquet format, then use Amazon Athena to run SQL queries for statistics.
D.Use AWS Glue ETL to compute statistics and write results to S3.
AnswerC

Parquet reduces data scanned, and Athena is cost-effective for ad-hoc queries.

Why this answer

Using Amazon Athena with columnar formats like Parquet after converting from CSV reduces query costs and improves performance. Option A (Redshift Spectrum) requires setting up a Redshift cluster, which is overkill. Option B (SageMaker Data Wrangler) may struggle with 2000 columns.

Option D (AWS Glue ETL) is more expensive and slower for simple statistics.

327
Multi-Selectmedium

Which TWO are appropriate techniques for detecting outliers in a dataset during exploratory data analysis?

Select 2 answers
A.Z-score method (assuming normal distribution)
B.One-hot encoding
C.Principal component analysis (PCA)
D.t-SNE
E.Interquartile range (IQR) method
AnswersA, E

Z-score identifies outliers based on standard deviations.

328
MCQmedium

In exploratory data analysis, a data scientist notices that the distribution of a feature 'income' is heavily right-skewed. Which transformation is most appropriate to reduce skewness?

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

Log transformation reduces right skew.

Why this answer

Log transformation is the most appropriate technique to reduce right skewness in a feature like 'income' because it compresses the long tail of high values while expanding the lower end, making the distribution more symmetric. This is particularly effective for income data, which often follows a log-normal distribution, and is a standard preprocessing step in machine learning to improve model performance.

Exam trap

The trap here is that candidates confuse scaling techniques (which change range or variance) with transformations that alter distribution shape, leading them to pick standardization or min-max scaling as a fix for skewness.

How to eliminate wrong answers

Option A is wrong because standardization (z-score) centers and scales the data to have mean 0 and standard deviation 1, but it does not change the shape of the distribution, so skewness remains. Option B is wrong because a square transformation amplifies larger values even more, which would worsen right skewness rather than reduce it. Option C is wrong because min-max scaling linearly rescales the data to a fixed range (e.g., [0,1]), which preserves the original distribution shape and does not address skewness.

329
MCQhard

A data scientist is analyzing a dataset for a binary classification problem. The dataset has 10,000 samples and 200 features. After splitting into training (80%) and test (20%), the data scientist trains a decision tree classifier and achieves 100% accuracy on the training set but only 55% on the test set. Which step should the data scientist take first to address this issue?

A.Use cross-validation to evaluate model performance
B.Collect more training data
C.Add more features to the model
D.Prune the decision tree to reduce complexity
AnswerD

Why D is correct

Why this answer

The large discrepancy between training and test accuracy indicates overfitting, and pruning the decision tree (e.g., limiting max_depth) reduces overfitting. Option A is wrong because cross-validation is a technique to evaluate model performance but does not directly fix overfitting. Option B is wrong because more data may help but is not the first step; also data is limited.

Option C is wrong because more features may worsen overfitting.

330
Multi-Selecthard

A data scientist is performing EDA on a dataset with 1 million rows and 50 features. The dataset includes a column 'user_id' with unique identifiers, a column 'event_date' with timestamps, and other columns. Which TWO actions should the data scientist take to understand data quality issues?

Select 2 answers
A.Analyze missing value patterns across columns
B.Check for duplicate rows based on 'user_id' and 'event_date'
C.Drop the 'user_id' column to reduce dimensionality
D.Use PCA to reduce dimensions and visualize
E.Train a random forest model to identify feature importance
AnswersA, B

Missing value analysis is key for data quality.

Why this answer

Analyzing missing value patterns (A) is a fundamental EDA step to identify data quality issues such as incomplete records. Checking for duplicate rows based on 'user_id' and 'event_date' (B) helps ensure data integrity, as duplicates can skew analysis. Option C (dropping 'user_id') is premature; identifier columns can be useful for deduplication and merging.

Option D (PCA) is a dimensionality reduction technique used later, not for initial data quality checks. Option E (training a model) is part of modeling, not EDA.

331
MCQeasy

A data scientist needs to understand the distribution of a continuous variable in a large dataset stored in Amazon S3. Which AWS service is most appropriate for quickly generating summary statistics and visualizations?

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

Correct: QuickSight can directly connect to S3 and create interactive dashboards with summary statistics.

Why this answer

Amazon QuickSight is a business analytics service that easily connects to S3 data to create interactive visualizations, dashboards, and summary statistics like histograms, making it ideal for this task. Amazon Athena is a query service for running SQL on S3, but it does not generate visualizations. Amazon SageMaker Studio is a machine learning IDE for building and training models, not for quick ad-hoc analysis.

AWS Glue is a serverless data integration service for ETL, not for analysis or visualization.

332
Multi-Selectmedium

Which THREE actions are valid steps in exploratory data analysis when working with a new dataset? (Choose three.)

Select 3 answers
A.Check the data types of each column.
B.Generate descriptive statistics (mean, std, min, max).
C.Fit a linear regression model to identify important features.
D.Split the dataset into training and test sets.
E.Create histograms for numerical features.
AnswersA, B, E

Understanding data types is essential.

Why this answer

Options A, B, and E are correct. A: Checking data types is fundamental in EDA to understand the nature of each variable. B: Generating descriptive statistics (mean, std, min, max) provides a quick summary of central tendency, dispersion, and range for numerical features.

E: Creating histograms helps visualize the distribution of numerical features, revealing skewness, outliers, or patterns. Option C is incorrect because fitting a linear regression model is a modeling step, not part of EDA. Option D is incorrect because splitting the dataset into training and test sets is for model validation, not for initial data exploration.

333
Multi-Selecthard

A data scientist is analyzing a dataset with high multicollinearity. Which TWO techniques can help identify and address multicollinearity?

Select 2 answers
A.Plot a correlation matrix
B.Apply Lasso regression
C.Use Recursive Feature Elimination (RFE)
D.Use Principal Component Analysis (PCA)
E.Compute Variance Inflation Factor (VIF)
AnswersD, E

Correct: PCA creates uncorrelated components.

Why this answer

Correct options: D and E. Variance Inflation Factor (VIF) (E) is a key metric for detecting multicollinearity by measuring how much the variance of a coefficient increases due to collinearity. PCA (D) addresses multicollinearity by transforming correlated features into orthogonal components.

Option A is incorrect because a correlation matrix only shows pairwise correlations and may miss higher-order multicollinearity. Option B is incorrect because Lasso regression performs feature selection by shrinking coefficients but does not directly identify multicollinearity. Option C is incorrect because Recursive Feature Elimination (RFE) is a feature selection method that does not detect multicollinearity.

334
Multi-Selectmedium

A data scientist is exploring a dataset with 50 features. Which TWO EDA techniques are most effective for detecting multicollinearity?

Select 2 answers
A.Box plots of each feature
B.Variance Inflation Factor (VIF) analysis
C.Scatter plots of each feature pair
D.Histograms of each feature
E.Correlation matrix visualized as heatmap
AnswersC, E

Scatter plots of each pair of features allow visual inspection of linear relationships, making them effective for detecting multicollinearity.

Why this answer

Options C and E are the most effective EDA techniques for detecting multicollinearity. Scatter plots of each pair of features (C) allow visual inspection of linear relationships between features. A correlation matrix displayed as a heatmap (E) provides a quantitative measure of pairwise correlations, making it easy to spot high correlations indicative of multicollinearity.

Option A (box plots) shows univariate distributions and does not reveal relationships between features. Option B (VIF analysis) is a formal statistical test for multicollinearity, but it is not typically considered an EDA technique; EDA focuses on visual exploration. Option D (histograms) similarly only show univariate distributions.

335
MCQmedium

A data scientist is exploring a dataset with 10 million rows and 500 features. The target variable is binary. The dataset is stored in an Amazon S3 bucket. The data scientist wants to quickly identify which features have the highest correlation with the target variable. Which approach is MOST efficient?

A.Use Amazon SageMaker Data Wrangler to import the dataset from S3 and generate a correlation matrix.
B.Use Amazon QuickSight to create scatter plots for each feature vs. target.
C.Use Amazon Athena with SQL queries to compute correlation coefficients.
D.Use AWS Glue ETL to compute pairwise correlations and output to Amazon Redshift.
AnswerA

Data Wrangler provides interactive data exploration and correlation analysis.

Why this answer

Amazon SageMaker Data Wrangler can directly import the dataset from S3 and generate a correlation matrix efficiently without needing to write custom code, making it the most efficient approach for identifying feature correlations with the target variable. Option B is incorrect because using Amazon QuickSight to create scatter plots for each of the 500 features would be time-consuming and not scalable. Option C is incorrect because Amazon Athena uses SQL queries which are not designed to compute correlation coefficients efficiently across a large number of features.

Option D is incorrect because AWS Glue ETL is intended for data transformation pipelines and is not suitable for quick interactive correlation analysis.

336
MCQmedium

A data scientist is working with a dataset that contains a 'Price' column. After plotting a histogram, they observe that the distribution is right-skewed with many extreme high values. They plan to use a linear model that assumes normally distributed errors. Which of the following transformations should they apply to the 'Price' column to make it more normally distributed?

A.Apply log transformation (log(Price)).
B.Apply square transformation (Price^2).
C.Apply min-max scaling to the 'Price' column.
D.Bin the 'Price' values into equal-width intervals.
AnswerA

Log transformation compresses the tail and makes the distribution more symmetric.

Why this answer

Log transformation is commonly applied to right-skewed data to reduce skewness and make the distribution more normal, which is suitable for linear models assuming normally distributed errors. Option B (square transformation) exacerbates skewness, making it worse. Option C (min-max scaling) only rescales the data to a fixed range and does not change the shape of the distribution.

Option D (binning) discards information and does not transform the distribution to be normal.

337
MCQhard

A data scientist is analyzing a dataset with a target variable that is highly imbalanced (99% negative class, 1% positive class). The dataset has 10 million rows. The goal is to train a binary classifier. Which technique should be applied during exploratory data analysis to best address the imbalance?

A.Assign higher class weights to the minority class
B.Random undersampling of the majority class
C.Synthetic Minority Oversampling Technique (SMOTE)
D.Collect more data for the minority class
AnswerB

Feasible for large datasets and can balance classes.

Why this answer

Random undersampling of the majority class is a practical approach for large datasets like 10M rows to reduce class imbalance during EDA. Option A (assign higher class weights) is a modeling technique applied during training, not during EDA. Option C (SMOTE) generates synthetic samples but can be computationally expensive for 10M rows.

Option D (collect more data) does not guarantee a balanced distribution and may not be feasible.

338
MCQmedium

A data scientist is working with a dataset that includes a 'timestamp' column. They want to create features that capture seasonality. Which feature engineering approach is most appropriate?

A.Bin timestamps into fixed intervals.
B.Convert timestamp to Unix epoch seconds.
C.Extract hour of day and apply sine/cosine transformation.
D.One-hot encode the timestamp column.
AnswerC

Sine/cosine encoding preserves cyclic nature.

Why this answer

Extracting hour of day and applying sine and cosine transformations captures the cyclic nature of time (e.g., midnight wrapping around to the next day). Option A (binning into fixed intervals) loses granularity and does not preserve cyclicity. Option B (converting to Unix epoch seconds) loses the cyclic pattern.

Option D (one-hot encoding) creates many sparse features and does not capture order or cycles.

339
Multi-Selectmedium

A data scientist is exploring a dataset with many features and suspects that some features are highly correlated. Which TWO methods can the scientist use to detect and handle multicollinearity before building a linear regression model?

Select 2 answers
A.Apply Principal Component Analysis (PCA) and use all components.
B.Standardize all features to have zero mean and unit variance.
C.Compute Variance Inflation Factor (VIF) for each feature and remove features with VIF > 10.
D.Use stepwise feature selection.
E.Use Ridge regression (L2 regularization) to shrink coefficients.
AnswersC, E

VIF detects multicollinearity; removing high VIF features reduces it.

Why this answer

Options C and E are correct. Variance Inflation Factor (VIF) is a standard metric to detect multicollinearity; removing features with VIF > 10 reduces multicollinearity. Ridge regression (L2 regularization) can also handle multicollinearity by shrinking coefficients, which stabilizes estimates even when predictors are correlated.

Option A is incorrect because PCA reduces dimensionality but the resulting components are orthogonal, not the original features, and using all components does not address multicollinearity among the original predictors. Option B is incorrect because standardizing features only changes their scale, not their correlations. Option D is incorrect because stepwise selection does not directly detect or mitigate multicollinearity; it can even produce unstable models if collinearity is present.

340
MCQmedium

A machine learning engineer trains a binary classifier on an imbalanced dataset where the positive class represents 1% of the data. After training, the model achieves 99% accuracy but only 10% recall on the positive class. Which metric should the engineer focus on to evaluate the model's performance on the minority class?

A.F1 score
B.Accuracy
C.AUC-ROC
D.Precision
AnswerA

F1 score considers both precision and recall, giving a better measure for imbalanced data.

Why this answer

(F1 score) is the correct metric because it balances precision and recall, providing a single measure that is robust to class imbalance. With only 1% positive class, accuracy (Option B) is misleadingly high due to the majority class. AUC-ROC (Option C) can still be high even if recall is low, as it evaluates ranking rather than absolute performance.

Precision (Option D) only considers the proportion of correct positive predictions, ignoring false negatives, which is not suitable when recall is poor. The F1 score captures both aspects, making it the best choice for evaluating minority class performance in this scenario.

341
MCQhard

A data scientist is trying to list objects in an S3 bucket named 'my-bucket' using the AWS CLI command: `aws s3 ls s3://my-bucket/`. The command fails with an access denied error. The IAM policy attached to the scientist's role is shown in the exhibit. What is the most likely cause of the failure?

A.The condition on the ListBucket action requires all objects to have the tag 'data-type'='training', which may not be satisfied.
B.The IAM policy does not include the s3:ListBucket action.
C.The policy does not grant access to the bucket because it uses 'my-bucket' instead of the full ARN.
D.The condition should use 'StringLike' instead of 'StringEquals'.
AnswerA

The condition on ListBucket is problematic and may cause denial.

Why this answer

The IAM policy includes the s3:ListBucket action with a condition that uses s3:ExistingObjectTag to require each object to have the tag 'data-type' set to 'training'. However, the ListBucket operation lists all objects in the bucket, and the condition is evaluated against each object. If any object in the bucket does not have this tag, the request fails with an access denied error.

Option B is incorrect because the policy does include s3:ListBucket. Option C is incorrect because the bucket name 'my-bucket' is a valid resource identifier; the full ARN is not required. Option D is incorrect because the StringEquals operator is valid for this condition key; the issue is the condition's requirement, not the operator.

342
MCQhard

A team is analyzing a dataset with many categorical features. They notice that one feature has 1,000 unique values but a long tail where most values appear only once. Which encoding method is most appropriate to avoid overfitting?

A.Target encoding
B.Label encoding
C.One-hot encoding
D.Count encoding
AnswerD

Count encoding replaces categories with their frequency, reducing dimensionality and handling rare values.

Why this answer

Count encoding uses the frequency of each category as its encoded value, which captures information for rare categories without increasing dimensionality. One-hot encoding (C) would create 1,000 columns, leading to high dimensionality and potential overfitting. Target encoding (A) uses the target variable mean, which can cause overfitting especially with rare categories.

Label encoding (B) imposes an arbitrary ordinal relationship, which is inappropriate for nominal categorical features.

Exam trap

Candidates may assume one-hot encoding is always safe, but with high cardinality it creates many dummy features, increasing the risk of overfitting on rare categories.

343
MCQmedium

An organization stores streaming data in Amazon Kinesis Data Streams. A data analyst wants to perform real-time exploratory data analysis on the incoming data to detect anomalies. Which AWS service should the analyst use to run SQL queries on the streaming data?

A.Amazon Kinesis Data Analytics
B.Amazon SageMaker
C.AWS Glue
D.Amazon Athena
AnswerA

Kinesis Data Analytics supports SQL queries on streaming data for real-time analysis.

Why this answer

Amazon Kinesis Data Analytics enables running SQL queries on streaming data in real-time, which is exactly what the data analyst needs for real-time exploratory data analysis and anomaly detection. Option B (Amazon SageMaker) is incorrect because it is a machine learning service for building and training models, not for running SQL on streaming data. Option C (AWS Glue) is incorrect because it is a serverless ETL service for batch processing, not real-time SQL.

Option D (Amazon Athena) is incorrect because it is an interactive query service for analyzing data in S3 using SQL, but it is designed for batch queries on static data, not streaming data.

344
MCQmedium

A data scientist is analyzing a dataset with missing values. The missing data is not random and is correlated with other features. Which imputation method is most appropriate to minimize bias?

A.Last observation carried forward
B.Multiple imputation using MICE
C.Listwise deletion
D.Mean imputation
AnswerB

Correct: MICE models missing values using other features, suitable for non-random missingness.

Why this answer

Multiple Imputation by Chained Equations (MICE) accounts for relationships between features and preserves variability. Option A is wrong because last observation carried forward is only appropriate for time series data where missing values are filled with the previous observation; it does not handle non-random missing data correlated with other features. Option C is wrong because listwise deletion reduces sample size and may introduce bias when data is not missing completely at random.

Option D is wrong because mean imputation can bias estimates and reduce variability, especially when missingness is related to other features.

345
MCQmedium

A data scientist is analyzing a dataset with missing values in a numeric column. The missing rate is 30% and the data is not missing completely at random. Which imputation method should the data scientist avoid to minimize bias?

A.Mean imputation
B.Model-based imputation using linear regression
C.k-Nearest Neighbors imputation
D.Multiple imputation using chained equations
AnswerA

Mean imputation can introduce bias and reduce variance, especially when data is not missing completely at random.

Why this answer

Mean imputation (Option A) should be avoided when data is not missing completely at random (NMAR) because it can introduce bias by underestimating variance and distorting the relationships between variables. Options B (model-based imputation), C (k-NN imputation), and D (multiple imputation) are more robust for non-random missing data as they account for patterns in the data and produce less biased estimates.

346
Multi-Selectmedium

A data scientist is exploring a dataset with 50 features and a binary target. The data scientist computes the correlation matrix and finds that two features, X1 and X2, have a correlation coefficient of 0.95. Which TWO actions should the data scientist consider? (Choose 2.)

Select 2 answers
A.Apply a log transformation to X1 and X2.
B.Remove one of the highly correlated features from the dataset.
C.Apply Principal Component Analysis (PCA) to the feature set.
D.Create an interaction term between X1 and X2.
E.Impute missing values for X1 and X2.
AnswersB, C

Removing one feature reduces multicollinearity.

Why this answer

Removing one of the highly correlated features reduces multicollinearity, which can stabilize model coefficients and improve interpretability. Option C is correct: Principal Component Analysis (PCA) transforms the correlated features into a set of uncorrelated components, effectively addressing multicollinearity. Option A is incorrect: Log transformation is used to handle skewness or scale differences, not correlation between features.

Option D is incorrect: Creating an interaction term would add a new feature that is highly correlated with the original ones, potentially increasing multicollinearity. Option E is incorrect: Imputing missing values is unrelated to feature correlation; missing value imputation addresses data completeness, not multicollinearity.

347
MCQmedium

A data scientist is working with a dataset containing 10,000 observations and 100 features. The scientist wants to detect outliers in the dataset. Which method is most appropriate for outlier detection in a high-dimensional space?

A.Use Z-score to identify points beyond 3 standard deviations
B.Use Isolation Forest
C.Use Mahalanobis distance
D.Use interquartile range (IQR) for each feature
AnswerB

Isolation Forest is designed for high-dimensional data and does not assume distribution.

Why this answer

Isolation Forest is the most appropriate method for outlier detection in high-dimensional space because it isolates anomalies by randomly splitting features, making it effective for high-dimensional data without assuming any underlying distribution. Option A is wrong because Z-score assumes normality and is univariate, unsuitable for high-dimensional data. Option C is wrong because Mahalanobis distance assumes multivariate normality and can be computationally expensive and sensitive to high dimensionality.

Option D is wrong because IQR is univariate and does not capture interactions between features in high-dimensional spaces.

348
MCQhard

A data scientist uses Amazon SageMaker Data Wrangler to explore a dataset. The target column is 'price' (continuous). Which EDA analysis would best help decide between linear regression and tree-based models?

A.Compute variance inflation factor (VIF) for features
B.Check linear relationships between features and target
C.Detect outliers using Z-score
D.Identify class imbalance in the target
AnswerB

Checking linear relationships (e.g., scatter plots of features vs. target) helps determine whether linear regression is appropriate or if tree-based models (which capture non-linear patterns) would perform better.

Why this answer

Checking linear relationships (e.g., scatter plots of features vs. target) helps determine whether linear regression is appropriate or if tree-based models (which capture non-linear patterns) would perform better. Option A (VIF) is used to detect multicollinearity, which affects linear regression but does not directly guide model selection between linear and tree models. Option C (Z-score) identifies outliers, which is important but not the primary factor for deciding between these model types.

Option D (class imbalance) is relevant for classification problems, not regression.

349
MCQmedium

A company uses Amazon SageMaker Data Wrangler to perform exploratory data analysis. They want to detect outliers in a numerical column using the Interquartile Range (IQR) method. Which transformation should they apply in Data Wrangler?

A.Impute
B.Normalize
C.Handle outliers
D.Binning
AnswerC

This transform supports IQR method.

Why this answer

Amazon SageMaker Data Wrangler provides a 'Handle outliers' transform that supports IQR-based outlier detection. Option A (Impute) is used to fill missing values, not detect outliers. Option B (Normalize) scales data to a standard range.

Option D (Binning) groups continuous values into intervals. Therefore, the correct transform to apply for IQR outlier detection is 'Handle outliers'.

350
Multi-Selectmedium

A data scientist is exploring a dataset with skewed numerical features. Which THREE transformations can help make the features more normally distributed?

Select 3 answers
A.Min-max scaling
B.Standardization (Z-score)
C.Yeo-Johnson transformation
D.Box-Cox transformation
E.Log transformation
AnswersC, D, E

Correct: Yeo-Johnson works for both positive and negative values.

Why this answer

Correct options: C, D, E. Yeo-Johnson transformation (C), Box-Cox transformation (D), and log transformation (E) are all effective for making skewed numerical features more normally distributed. Option A, min-max scaling, only rescales the feature to a fixed range and does not change the distribution shape.

Option B, standardization (Z-score), centers and scales the data but does not alter skewness.

351
Multi-Selecteasy

During EDA, a data scientist notices that a numeric feature 'age' has values ranging from 0 to 150, but expects adult ages between 18-100. Which TWO steps should the scientist take to investigate?

Select 2 answers
A.Remove all rows with age > 100
B.Compute summary statistics (min, max, percentiles)
C.Apply log transformation to normalize the distribution
D.Impute age values outside 18-100 with the mean
E.Create a box plot to visualize outliers
AnswersB, E

Correct because it helps identify the range and potential outliers.

Why this answer

Computing summary statistics (min, max, percentiles) helps identify the range and potential outliers in the 'age' feature. Option E is correct because a box plot visualizes the distribution and clearly shows outliers, allowing the data scientist to investigate further. Option A is incorrect because removing rows with age > 100 without understanding the context may discard valid data (e.g., errors or special cases).

Option C is incorrect because log transformation changes the scale but does not help in identifying outliers; it is used to handle skewed distributions. Option D is incorrect because imputing age values outside 18-100 with the mean would distort the distribution and is not appropriate for investigating outliers; it should only be considered after understanding the nature of the outliers.

352
MCQeasy

A data scientist is exploring a dataset and wants to check for missing values. Which method is most appropriate to identify the percentage of missing values per column?

A.Use Amazon S3 Select to query missing values
B.Use Amazon Athena to run a SELECT COUNT(*) query
C.Use Amazon QuickSight to create a missing value dashboard
D.Use AWS Glue Crawler to detect missing values
E.Use pandas .isnull().sum() in a SageMaker notebook
AnswerE

This is a direct and efficient way to count missing values per column.

Why this answer

Using pandas .isnull().sum() in a SageMaker notebook is the most appropriate method because it directly provides the count (and thus the percentage when divided by total rows) of missing values per column, which is a standard exploratory data analysis technique. Option A is incorrect because Amazon S3 Select is used for filtering and retrieving subsets of data from S3 objects, not for computing missing values. Option B is incorrect because while Amazon Athena can run SQL queries like SELECT COUNT(*), it is less direct for per-column missing value analysis and requires a schema.

Option C is incorrect because Amazon QuickSight is a visualization tool, not designed for programmatic missing value detection. Option D is incorrect because AWS Glue Crawler discovers schema and partitions, not missing values.

353
MCQmedium

A machine learning engineer is examining a dataset containing text reviews. They want to convert the text into numerical features for a model. During EDA, they notice that the word 'the' appears in almost every review, while words like 'excellent' appear rarely. Which of the following techniques should they use to reduce the impact of very common words?

A.Apply TF-IDF transformation.
B.Remove stopwords from the text.
C.Use word2vec embeddings.
D.Use a bag-of-words representation.
AnswerA

TF-IDF downweights common words across documents, reducing their impact.

Why this answer

TF-IDF transformation downweights common words (like 'the') and emphasizes rare but informative words (like 'excellent'). Option B (removing stopwords) is insufficient because it does not adjust for frequency beyond removing a predefined list; TF-IDF handles frequency weighting. Option C (word2vec embeddings) captures semantic relationships but does not specifically reduce the impact of common words.

Option D (bag-of-words) does not perform any weighting, so common words dominate.

354
MCQeasy

A data scientist is exploring a dataset with 100 features. The goal is to build a binary classification model. The dataset is highly imbalanced with 95% negative class and 5% positive class. The data scientist wants to understand the relationship between features and the target. Which technique is most appropriate for initial exploratory analysis?

A.Remove the minority class samples and analyze the majority class only.
B.Use stratified sampling to create a balanced subset for visualization and correlation analysis.
C.Use random sampling to select 10% of the data for EDA.
D.Apply SMOTE to the dataset before performing EDA.
AnswerB

Stratified sampling preserves the proportion of each class and ensures the minority class is included in the analysis.

Why this answer

Stratified sampling preserves the class proportions, ensuring that the minority class (5% positive) is adequately represented in the subset for visualization and correlation analysis. Option A is wrong because removing the minority class would prevent any analysis of the target relationship. Option C is wrong because random sampling could miss the rare positive class entirely, leading to biased insights.

Option D is wrong because SMOTE is a synthetic data generation technique intended for training, not for initial exploratory analysis.

355
MCQhard

A data scientist is performing EDA on a dataset with 100 features. They want to identify which features are most predictive of the target using a model-agnostic method. Which technique should they use?

A.Pearson correlation matrix
B.L1 regularization
C.SHAP values
D.Permutation feature importance
AnswerD

Permutation importance works with any model and measures drop in performance when a feature is shuffled.

Why this answer

Permutation feature importance is the correct model-agnostic method because it measures the increase in prediction error after permuting a feature's values, breaking the relationship with the target, and works with any model. Pearson correlation (A) is bivariate and only captures linear relationships. L1 regularization (B) is model-specific to linear models and embeds feature selection within the model.

SHAP values (C) are model-specific as they rely on game theory and require model outputs for calculation.

356
MCQmedium

A data scientist is performing EDA and observes that a feature 'purchase_amount' has many zeros and a long tail of positive values. What type of model would be appropriate for this target variable?

A.Zero-inflated negative binomial regression.
B.Linear regression after log transformation.
C.Logistic regression on binary indicator of purchase.
D.Poisson regression.
AnswerA

Zero-inflated negative binomial regression handles both the excess zeros and the overdispersion common in such data.

Why this answer

Zero-inflated negative binomial regression models are designed for count data with a high frequency of zeros, which matches the 'purchase_amount' feature having many zeros and a long tail of positive values. Option B is incorrect: Log transformation does not handle the zero-inflation problem; zeros become undefined or need adjustment. Option C is incorrect: Logistic regression is for binary outcomes, not continuous or count data.

Option D is incorrect: Poisson regression accommodates count data but assumes the variance equals the mean and does not handle excess zeros; zero-inflation violates this assumption.

357
Multi-Selecteasy

A data scientist is exploring a dataset with a binary target variable. Which TWO metrics are appropriate for evaluating the balance of the target classes? (Choose two.)

Select 2 answers
A.Count plot of the target variable
B.Histogram of a feature
C.Scatter plot of two features colored by target
D.value_counts() on the target column
E.Correlation matrix of all features
AnswersA, D

Count plot shows frequency of each class.

Why this answer

Options A and D are correct. A count plot directly visualizes the frequency of each class in the target variable, making it easy to assess balance. Similarly, value_counts() returns the exact count of each class, providing a numeric measure of balance.

Option B (histogram) is designed for continuous variables; while it can depict the counts of two categories, it is not the standard or most appropriate method for evaluating binary class balance. Option C (scatter plot) is used to explore relationships between two numeric features and does not show class distribution. Option E (correlation matrix) measures linear relationships between numeric features and is irrelevant for assessing target class balance.

358
MCQhard

A data scientist is analyzing a dataset with 500 features and 100,000 observations. The target variable is binary. The dataset contains highly correlated features and some categorical variables with high cardinality. Which combination of techniques should the data scientist use to reduce dimensionality while preserving interpretability for EDA?

A.Apply Principal Component Analysis (PCA) to all features and then train a model on the top 50 components.
B.Use mutual information to select top features and apply label encoding to categorical variables.
C.Use chi-squared test to select top features and one-hot encode categorical variables.
D.Apply correlation-based feature selection to remove highly correlated pairs, then use target encoding for high-cardinality categorical variables.
AnswerD

Correlation filter reduces redundancy; target encoding converts categoricals to numeric without increasing dimensionality.

Why this answer

Correlation-based feature selection removes highly correlated features, reducing redundancy without distorting the original feature space, and target encoding converts high-cardinality categorical variables into numeric values based on the target mean, which preserves interpretability and avoids dimensionality explosion. Option A is incorrect because PCA reduces interpretability by transforming features into principal components and does not handle categorical variables directly. Option B is incorrect because mutual information is a feature selection method, but label encoding for high-cardinality categoricals can impose arbitrary ordinal relationships.

Option C is incorrect because chi-squared test requires categorical features and is not suitable for high-dimensional numerical data; also, one-hot encoding high-cardinality categoricals leads to a drastic increase in dimensionality.

359
MCQeasy

During exploratory data analysis, a data scientist notices that a categorical feature 'city' has over 1,000 unique values. The dataset has 10,000 rows. Which technique should the scientist consider to reduce the cardinality of this feature?

A.Apply label encoding to assign numeric labels.
B.Group low-frequency categories into a single 'other' category.
C.Apply one-hot encoding to all categories.
D.Apply frequency encoding to replace each category with its frequency.
AnswerB

Grouping rare categories reduces cardinality effectively.

Why this answer

Grouping rare categories into an 'other' bucket is a common technique to reduce cardinality. Option A (label encoding) assigns numeric labels but still has 1000 unique values. Option B (grouping into 'other') reduces cardinality.

Option C (one-hot encoding) would create too many columns. Option D (frequency encoding) replaces categories with frequency but still has 1000 values.

360
MCQhard

A data scientist is working on a customer churn prediction project for a telecom company. The dataset contains 50,000 records with 25 features, including 'tenure' (number of months customer stayed), 'monthly_charges', 'total_charges', 'contract_type' (month-to-month, one year, two year), 'payment_method', and a target 'churn' (Yes/No). The data is stored in an S3 bucket as a single CSV file. The scientist uses Amazon SageMaker Data Wrangler to perform EDA. After importing the data, the scientist notices that the 'total_charges' column has many missing values (about 20% of rows). The scientist suspects that missing values occur only for customers with tenure = 0 (new customers). After verifying that suspicion, the scientist wants to handle the missing values appropriately. Which course of action should the scientist take?

A.Use a regression model to predict total_charges based on other features.
B.Impute missing total_charges with the mean of non-missing values.
C.Drop all rows with missing total_charges to avoid bias.
D.Impute missing total_charges with 0, since missing values correspond to customers with tenure=0.
AnswerD

Given the pattern, total_charges should be 0 for new customers; imputing with 0 preserves data integrity.

Why this answer

If total_charges is missing only for tenure=0, it means those customers have not been billed yet, so total_charges should be 0. Imputing with 0 is appropriate. Option A is wrong because dropping rows with missing total_charges would remove all new customers, biasing the dataset.

Option B is wrong because imputing with mean would assign incorrect values to new customers. Option C is wrong because using a model to predict missing values is overkill and may introduce error when the true value is known to be 0.

361
MCQhard

A machine learning engineer is evaluating a dataset for building a fraud detection model. The dataset has 1 million transactions, but only 500 are fraudulent. The engineer wants to understand the distribution of fraudulent vs. non-fraudulent transactions over time. Which EDA visualization is most suitable?

A.Bar chart of transaction count per day with colors for fraud status
B.Scatter plot of transactions over time colored by fraud status
C.Box plot of transaction amount per month grouped by fraud status
D.Line plot of daily fraud rate and non-fraud rate
AnswerD

Why D is correct

Why this answer

A time series line plot with two lines (fraud vs. non-fraud) shows temporal patterns. Option A is wrong because bar chart of counts per day is less effective for two categories. Option B is wrong because scatter plot with 1 million points is overwhelming.

Option C is wrong because box plot shows distribution per time period but not temporal trend.

362
MCQhard

A data scientist is analyzing a dataset with many categorical features. The target variable is binary. Which statistical test should be used to assess the association between each categorical feature and the target?

A.Pearson correlation coefficient
B.Chi-squared test of independence
C.ANOVA
D.Kolmogorov-Smirnov test
AnswerB

Chi-squared tests association between categorical variables.

Why this answer

The Chi-squared test of independence is the appropriate test to assess association between two categorical variables. Here, both the features (categorical) and the target (binary, which is categorical) are categorical, making the Chi-squared test the correct choice. Option A (Pearson correlation) is for continuous variables, not categorical.

Option C (ANOVA) compares means across groups for a continuous target, but our target is binary (categorical). Option D (Kolmogorov-Smirnov test) compares distributions of continuous variables, not categorical. Therefore, B is correct.

363
MCQhard

Refer to the exhibit. A data scientist is running an Amazon EMR Spark job for exploratory data analysis on a large dataset. The job fails with the error shown. What is the most appropriate action to resolve this?

A.Reduce the number of worker nodes.
B.Convert the input data to Parquet format.
C.Increase the executor memory in Spark configuration.
D.Increase the driver memory.
AnswerC

More memory per executor prevents heap overflow.

Why this answer

The error message indicates an OutOfMemoryError in the Spark executors. Increasing executor memory (option C) directly addresses this by providing more heap space for data processing. Option A (fewer nodes) reduces total cluster memory, worsening the problem.

Option B (Parquet format) can improve I/O performance but does not resolve insufficient memory allocation. Option D (increase driver memory) only helps the driver process, not the executors.

364
MCQmedium

A data scientist is exploring log files stored in S3. They ran the above AWS CLI command. What does the output indicate about the data, and what EDA step should be taken next?

A.All log files are about 150KB-200KB in size.
B.There are 3 objects in the bucket under the prefix.
C.There are 3 log files larger than 100KB in the specified prefix.
D.The prefix 'logs/2023/' contains exactly 3 objects.
AnswerC

The command filters by size >100000 bytes and returns keys and sizes.

Why this answer

The command `aws s3api list-objects-v2 --bucket <bucket> --prefix logs/2023/ --query 'Contents[?Size > `100000`].[Key,Size]' --output text` lists objects under the specified prefix with a size greater than 100000 bytes (≈100 KB). The output shows three objects, indicating there are three log files larger than 100 KB. Option A is incorrect because the output does not provide exact size ranges (e.g., 150KB-200KB); it only indicates files exceeding 100 KB.

Option B is incorrect because the command filters by size, so it does not count all objects in the bucket under the prefix. Option D is incorrect because it states the prefix contains exactly three objects, but the command only returns objects larger than the threshold; there may be additional smaller objects not shown.

365
Multi-Selecthard

Which THREE techniques are commonly used to detect multicollinearity in a dataset during exploratory data analysis?

Select 3 answers
A.Heatmap of missing values
B.Eigenvalue analysis from PCA
C.Correlation matrix
D.Variance Inflation Factor (VIF)
E.Scatter matrix of all features
AnswersB, C, D

Near-zero eigenvalues indicate linear dependencies.

Why this answer

Options B, C, and D are correct. B: Eigenvalue analysis from PCA can detect multicollinearity; if some eigenvalues are near zero, it indicates high multicollinearity. C: Correlation matrix shows pairwise correlations between features; high correlation coefficients (e.g., >0.8) indicate collinearity.

D: Variance Inflation Factor (VIF) quantifies how much a feature's variance is inflated due to multicollinearity; VIF >10 is often considered problematic. Option A is incorrect because a heatmap of missing values visualizes missing data, not relationships between features. Option E is incorrect because a scatter matrix shows pairwise scatter plots, which can reveal linear relationships but is not a quantitative measure for multicollinearity.

366
MCQmedium

A machine learning engineer is exploring a dataset with 50 features. Some features are highly correlated. Which technique should the engineer use to reduce dimensionality while preserving variance?

A.Principal Component Analysis (PCA)
B.Factor Analysis
C.t-Distributed Stochastic Neighbor Embedding (t-SNE)
D.Linear Discriminant Analysis (LDA)
AnswerA

PCA reduces dimensionality by finding components that maximize variance.

Why this answer

PCA (Principal Component Analysis) is the standard technique for dimensionality reduction by projecting data onto principal components that capture maximum variance. LDA is supervised and aims to separate classes. t-SNE is for visualization. Autoencoders can reduce dimensionality but are more complex.

Factor analysis assumes latent factors.

367
Multi-Selecthard

Which THREE are valid reasons to perform feature scaling during exploratory data analysis?

Select 3 answers
A.To improve performance of distance-based algorithms like KNN.
B.To change the shape of the feature distribution.
C.To increase the number of features.
D.To ensure features have zero mean and unit variance.
E.To reduce the effect of outliers by clipping values.
AnswersA, D, E

Distance algorithms are sensitive to scale.

368
MCQeasy

A data scientist is analyzing a dataset and notices that the distribution of a continuous feature is heavily right-skewed. Which transformation is most likely to make the distribution more symmetric?

A.Log transformation (natural log)
B.Min-Max scaling
C.One-hot encoding
D.Square transformation
AnswerA

Log transformation compresses high values, reducing right skew.

Why this answer

Log transformation is commonly used to reduce right skewness by compressing the range of large values. Option B is wrong because Min-Max scaling only rescales the data to a fixed range and does not alter the distribution shape, so it cannot reduce skewness. Option C is wrong because one-hot encoding is designed for categorical features and does not apply to continuous features.

Option D is wrong because a square transformation (power >1) amplifies larger values more than smaller ones, which would increase right skewness rather than reduce it.

369
MCQeasy

A data scientist wants to understand the relationship between a categorical feature with 3 levels and a continuous target variable. Which visualization is most appropriate?

A.Correlation matrix
B.Line chart
C.Box plot grouped by category
D.Scatter plot
AnswerC

Box plots compare distributions across categories.

Why this answer

A box plot grouped by category (Option C) is the most appropriate visualization because it directly compares the distribution of a continuous target variable across the three levels of a categorical feature. It displays median, quartiles, and potential outliers for each group, making it ideal for understanding central tendency, spread, and skewness in a side-by-side comparison.

Exam trap

The trap here is that candidates often confuse the purpose of a scatter plot (for two continuous variables) with the need to compare a continuous variable across categories, leading them to choose Option D instead of recognizing that a grouped box plot is the standard tool for this task.

How to eliminate wrong answers

Option A is wrong because a correlation matrix is used to quantify linear relationships between continuous variables, not between a categorical feature and a continuous target. Option B is wrong because a line chart is designed to show trends over a continuous or time-ordered axis, not to compare distributions across discrete categories. Option D is wrong because a scatter plot visualizes the relationship between two continuous variables; it cannot effectively display a categorical feature with only three levels without overplotting or requiring jittering, and it does not summarize distributional properties like median or quartiles.

370
MCQmedium

A data scientist is troubleshooting access to an S3 bucket. The following IAM policy is attached to their role. What is the likely result when they try to list objects in the 'confidential' folder? ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::example-bucket" }, { "Effect": "Deny", "Action": "s3:*", "Resource": "arn:aws:s3:::example-bucket/confidential/*", "Condition": { "StringNotEquals": { "aws:SourceVpce": "vpce-12345678" } } } ] } ```

A.Access is allowed because the Allow statement grants s3:ListBucket.
B.Access is denied unconditionally.
C.Access is allowed only if the request uses HTTPS.
D.Access is denied if the request does not originate from the specified VPC endpoint.
AnswerD

The condition requires the request to come from vpce-12345678 to allow access.

Why this answer

The Deny statement explicitly denies s3:* actions on the `confidential` folder unless the request originates from the specified VPC endpoint (using the `aws:SourceVpce` condition). If the request does not come from that VPC endpoint, it will be denied. Option A is wrong because the Deny overrides the Allow.

Option B is wrong because the Deny is conditional, not unconditional. Option C is wrong because the condition is about the VPC endpoint, not the use of HTTPS.

371
MCQhard

A data scientist is performing EDA on a dataset with 1,000 features and 10,000 rows. The target variable is binary. After checking for multicollinearity, the scientist finds many pairs of features with correlation > 0.95. Which action should be taken to prepare the data for modeling?

A.Apply PCA to all features to decorrelate them.
B.Standardize all features using StandardScaler.
C.For each highly correlated pair, remove one feature based on domain knowledge or higher correlation with target.
D.Randomly drop half of the correlated features.
AnswerC

This reduces redundancy while retaining predictive power.

Why this answer

When features are highly correlated (e.g., > 0.95), they introduce multicollinearity, which can destabilize coefficient estimates in linear models and reduce interpretability. Removing one feature from each correlated pair based on domain knowledge or its correlation with the target variable preserves predictive power while reducing redundancy. This approach is more targeted than PCA, which transforms features into uncorrelated components but sacrifices interpretability and may not align with the binary target.

Exam trap

The MLS-C01 exam often tests the misconception that PCA is the default solution for multicollinearity, but the trap here is that PCA transforms features into uninterpretable components, whereas removing correlated features directly preserves the original feature space and domain relevance.

How to eliminate wrong answers

Option A is wrong because PCA decorrelates features by projecting them onto orthogonal components, but it does not remove features—it creates new synthetic features that are linear combinations of the originals, losing interpretability and potentially discarding target-specific information. Option B is wrong because standardizing features (e.g., using StandardScaler) only scales them to zero mean and unit variance, which does not address multicollinearity; it is a preprocessing step for algorithms sensitive to feature scales, not a remedy for correlated features. Option D is wrong because randomly dropping half of the correlated features ignores the relationship between features and the target variable, which can discard informative predictors and degrade model performance; a principled selection based on domain knowledge or target correlation is required.

372
MCQeasy

A data scientist is performing EDA on a dataset with both numerical and categorical features. Which technique is best for detecting multicollinearity among numerical features?

A.Chi-square test of independence
B.Box plots for each numerical feature
C.Correlation matrix with heatmap
D.Pair plot
AnswerC

Correlation matrix shows pairwise linear correlations, indicating multicollinearity.

Why this answer

A correlation matrix quantifies linear relationships between numerical features, and a heatmap visualizes these correlations, making it effective for detecting multicollinearity. Option A is wrong because the chi-square test of independence is used for categorical variables, not numerical features. Option B is wrong because box plots show distributions and outliers, not relationships between features.

Option D is wrong because pair plots provide a visual scatter plot matrix but do not offer a quantitative measure of multicollinearity like a correlation matrix does.

373
Multi-Selecthard

A data scientist is analyzing a dataset with a continuous target variable and suspects that the relationship between a predictor and the target is non-linear. Which THREE techniques can the scientist use to explore and model this non-linearity?

Select 3 answers
A.Apply logistic regression to binarize the target.
B.Compute the Pearson correlation coefficient between the predictor and target.
C.Add polynomial features (e.g., x^2, x^3) and check if model performance improves.
D.Fit a decision tree regressor and examine feature importance.
E.Create a scatter plot and overlay a LOESS (local regression) smooth curve.
AnswersC, D, E

Polynomial features capture non-linearity in linear models.

Why this answer

Options C, D, and E are correct. Adding polynomial features (e.g., x^2, x^3) allows a linear model to capture non-linear relationships. Decision tree regressors naturally model non-linear interactions between predictors and the target.

A scatter plot with a LOESS smooth curve visually reveals non-linear patterns in the data. Option A (logistic regression) is incorrect because it is for binary classification, not for exploring non-linearity with a continuous target. Option B (Pearson correlation) only measures linear relationships, so it is not suitable for detecting non-linearity.

374
MCQeasy

A machine learning team is analyzing a dataset with numerical features. They compute the pairwise correlation matrix and find that two features, 'X1' and 'X2', have a correlation coefficient of 0.98. The team plans to train a linear regression model. Which of the following actions should the team take to avoid multicollinearity issues?

A.Perform PCA on the dataset to reduce dimensionality.
B.Add an interaction term between X1 and X2 to the model.
C.Standardize both features using Z-score normalization.
D.Remove one of the two highly correlated features.
AnswerD

This directly addresses multicollinearity by eliminating redundancy.

Why this answer

Removing one of the highly correlated features reduces multicollinearity. Option A is wrong because PCA creates new uncorrelated features but is not necessary for just two correlated features. Option B is wrong because adding an interaction term between X1 and X2 would actually increase multicollinearity.

Option C is wrong because standard scaling does not address correlation between features.

375
MCQmedium

A company is building a classification model and discovers that the target variable is imbalanced: 95% of samples belong to class A and 5% to class B. The data scientist needs to understand the distribution of numeric features for each class. Which approach is most appropriate?

A.Run a t-test for each feature to determine statistical significance between classes.
B.Generate box plots for each feature using Amazon QuickSight.
C.Use Amazon SageMaker Data Wrangler to create histograms for each feature, grouped by class label.
D.Compute the correlation matrix between features and the target.
AnswerC

Histograms grouped by class provide a clear view of feature distributions across classes.

Why this answer

The most appropriate approach for understanding the distribution of numeric features for each class is to use histograms grouped by the class label. Amazon SageMaker Data Wrangler (option C) can generate these histograms, providing a clear visual comparison of how each numeric feature is distributed across class A and class B. This is especially useful with imbalanced data (95% vs 5%) because it reveals differences in shape, central tendency, and spread without being influenced by class frequencies.

Option A (t-test) tests for statistical significance but does not visualize the distribution. Option B (box plots) can show summary statistics but not the full distribution shape as effectively as histograms. Option D (correlation matrix) measures linear relationships with the target but does not show per-class feature distributions.

← PreviousPage 5 of 6 · 381 questions totalNext →

Ready to test yourself?

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