Courseiva

CCNA Exploratory Data Analysis Questions

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

376
MCQhard

A data scientist is analyzing a dataset with missing values. The missing data mechanism is missing at random (MAR). Which imputation method is most appropriate to preserve relationships between variables?

A.Remove all rows with any missing values.
B.Use k-nearest neighbors imputation.
C.Use multiple imputation by chained equations (MICE).
D.Replace missing values with the mean of the column.
AnswerC

MICE models each variable with missing values conditional on others, suitable for MAR.

Why this answer

Multiple imputation by chained equations (MICE) is well-suited for missing at random (MAR) data as it models each variable with missing values conditional on other variables, preserving relationships. Option A (removing rows) reduces sample size and can introduce bias if data are not MCAR. Option B (KNN) assumes data are missing completely at random (MCAR) and may not handle MAR well.

Option D (mean imputation) reduces variance and distorts relationships.

377
MCQhard

A data scientist is analyzing a dataset with 1 million rows and 50 features. The scientist wants to detect outliers in a numerical feature 'transaction_amount' which has a long right tail. The scientist suspects that outliers are due to data entry errors and should be removed. Which outlier detection method is MOST robust for this scenario?

A.Interquartile range (IQR) with multiplier 1.5
B.Mahalanobis distance
C.Z-score with threshold 3
D.DBSCAN clustering
AnswerA

IQR method is non-parametric and robust to skewness.

Why this answer

The IQR method (Option A) is the most robust for detecting outliers in the 'transaction_amount' feature because it is based on quartiles and does not assume any underlying distribution, making it resistant to skew and extreme values. Z-score (Option C) is inappropriate because it assumes a normal distribution, which the long right tail violates. Mahalanobis distance (Option B) assumes multivariate normality and is not suited for univariate outlier detection.

DBSCAN (Option D) is computationally expensive on 1 million rows and is designed for density-based clustering, not for univariate outlier detection.

378
MCQhard

Refer to the exhibit. A data scientist runs the AWS CLI command shown to explore the contents of an S3 bucket. The command returns an empty array. However, the data scientist knows there are objects larger than 1000 bytes in the bucket. What is the most likely reason for the empty result?

A.The query syntax is incorrect; backticks should not be used
B.The command should use list-objects instead of list-objects-v2
C.The --query parameter is not supported by list-objects-v2
D.The AWS CLI is not configured with the correct region for the bucket
AnswerD

If the bucket is in a different region, the command returns no results.

Why this answer

The command syntax is correct: `--query 'Contents[?Size > `1000`]'` uses backticks for the numeric literal as per JMESPath. The empty result indicates the CLI could not find matching objects. Since the data scientist knows objects larger than 1000 bytes exist, the most likely cause is that the CLI is configured with a default region different from the bucket's region.

Running the command without an explicit `--region` parameter causes it to query the bucket in the wrong region, returning no results. Option A is incorrect because the backticks are valid. Option B is incorrect because `list-objects-v2` supports `--query`.

Option C is incorrect because `--query` is supported. Option D is correct because a region mismatch would cause the CLI to look for the bucket in the wrong location, resulting in an empty array even though the bucket contains objects.

379
MCQhard

A data scientist is performing EDA on a large dataset (10 TB) stored in S3. They need to compute summary statistics for each column. Which approach is most cost-effective and efficient?

A.Use an AWS Glue ETL job with PySpark to compute statistics
B.Use Amazon Athena with SQL queries
C.Download the dataset to an Amazon SageMaker Studio notebook and use pandas
D.Launch an Amazon EMR cluster and use Spark SQL
AnswerB

Athena is serverless, cost-effective, and efficient for ad-hoc queries.

Why this answer

Amazon Athena is a serverless query service that allows you to run SQL queries directly on data stored in S3, charging only for the data scanned per query. This makes it highly cost-effective and efficient for computing summary statistics on large datasets without needing to provision or manage infrastructure. Option A is wrong because AWS Glue ETL jobs with PySpark have startup overhead and are better suited for complex data transformation tasks rather than simple ad-hoc analysis.

Option C is wrong because downloading 10 TB to a SageMaker Studio notebook incurs high data transfer costs and requires substantial local storage, which is neither efficient nor cost-effective. Option D is wrong because launching an Amazon EMR cluster involves provisioning and managing compute resources, leading to higher costs and complexity for a straightforward statistical analysis that Athena can handle more simply.

380
MCQhard

A machine learning team is analyzing feature importance in a dataset with many categorical features. They plan to use a tree-based model. Which encoding method should they use to handle high-cardinality categorical features without creating too many dummy variables?

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

Target encoding replaces categories with the target mean, preserving information without increasing dimensionality.

Why this answer

Target encoding replaces categories with the mean of the target, which is efficient and works well with tree models. Option A is wrong because one-hot encoding creates many columns for high cardinality. Option B is wrong because label encoding imposes ordinality.

Option D is wrong because frequency encoding may not capture predictive information.

381
MCQmedium

A data analyst is performing exploratory data analysis on a dataset with 100 features. The analyst wants to identify which features contribute most to the variance in the data. Which technique should the analyst use?

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

PCA decomposes the data into components that capture the maximum variance.

Why this answer

Principal Component Analysis (PCA) is the correct technique because it is an unsupervised dimensionality reduction method that identifies the principal components, which are linear combinations of the original features that capture the maximum variance in the data. Option A (K-means) is incorrect because it is a clustering algorithm that groups data points, not used for analyzing feature variance. Option C (t-SNE) is incorrect because it is primarily used for visualizing high-dimensional data in lower dimensions but does not provide explicit variance contributions.

Option D (LDA) is incorrect because it is a supervised method that requires class labels and aims to maximize class separability, not variance.

← PreviousPage 6 of 6 · 381 questions total

Ready to test yourself?

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