MS-DS Master of Data science Exploratory Data Analysis Questions and Answers — Questions and Answers
Question 1: A data scientist is analyzing a dataset of housing prices and wants to understand the distribution of the 'price' variable, including its central tendency, spread, and the presence of potential outliers. Which of the following visualization techniques is most suitable for this univariate analysis?
- Scatter Plot
- Box Plot (Correct answer)
- Correlation Matrix
- Bar Chart
Correct answer: Box Plot
A Box Plot is the most suitable choice as it provides a five-number summary of the data (minimum, first quartile, median, third quartile, and maximum), which effectively displays the central tendency (median), spread (interquartile range), and skewness. It is specifically designed to highlight outliers, which are shown as individual points beyond the whiskers. A scatter plot is used for bivariate analysis to show relationships between two variables. A correlation matrix also shows relationships between multiple variables, not the distribution of a single one. A bar chart is typically used for categorical data, not for visualizing the distribution of a continuous variable like price.
Question 2: During Exploratory Data Analysis of a retail dataset, you create a correlation matrix for variables such as 'customer_age', 'items_purchased', 'time_spent_minutes', and 'total_spend'. You observe a correlation coefficient of +0.85 between 'time_spent_minutes' and 'total_spend'. What is the correct interpretation of this finding?
- There is a strong negative linear relationship between time spent and total spend.
- There is no discernible linear relationship between the two variables.
- There is a strong positive linear relationship, indicating that as time spent increases, total spend tends to increase. (Correct answer)
- The relationship is causal; spending more time in the store causes customers to spend more money.
Correct answer: There is a strong positive linear relationship, indicating that as time spent increases, total spend tends to increase.
A correlation coefficient of +0.85 indicates a strong positive linear relationship. The positive sign means that as one variable increases, the other tends to increase as well. The magnitude (0.85) is close to 1, signifying a strong relationship. Correlation does not imply causation; while the two variables are related, we cannot conclude from this coefficient alone that one causes the other. A strong negative relationship would have a coefficient closer to -1. A value near 0 would indicate no linear relationship.
Question 3: You are tasked with exploring a high-dimensional dataset with over 100 features to understand its underlying structure and to simplify it for future modeling. Which EDA technique is primarily used for dimensionality reduction by transforming a large set of variables into a smaller one that still contains most of the information?
- Cluster Analysis
- Box-Cox Transformation
- Principal Component Analysis (PCA) (Correct answer)
- Outlier Detection using Z-scores
Correct answer: Principal Component Analysis (PCA)
Principal Component Analysis (PCA) is a dimensionality reduction technique used to transform a large set of correlated variables into a smaller set of uncorrelated variables called principal components, while retaining most of the original information (variance). This makes it ideal for simplifying high-dimensional data during EDA. Cluster analysis is for grouping similar data points, Box-Cox is for transforming data to a normal distribution, and Z-scores are for identifying outliers, not for dimensionality reduction.
Question 4: A data analyst is performing EDA on a dataset and is currently focused on examining the relationship between two variables at a time. For instance, they are creating scatter plots of 'Age' vs. 'Income' and box plots of 'Education Level' vs. 'Income'. What type of analysis is being performed?
- Univariate Analysis
- Multivariate Analysis
- Predictive Analysis
- Bivariate Analysis (Correct answer)
Correct answer: Bivariate Analysis
Bivariate analysis is the exploration of the relationship between two different variables in a dataset. Creating scatter plots and comparing distributions across categories (like a box plot of a continuous variable against a categorical one) are classic examples of bivariate techniques. Univariate analysis looks at a single variable at a time. Multivariate analysis examines three or more variables simultaneously. Predictive analysis is a step that typically comes after EDA and involves building models.
Question 5: Which of the following statements best distinguishes between Feature Engineering and Feature Selection within the context of data analysis?
- Feature engineering is the process of removing irrelevant features, while feature selection is about creating new, more informative features.
- Feature engineering involves transforming raw data into useful features, while feature selection is the process of choosing the most relevant existing features for a model. (Correct answer)
- Both terms are synonymous and refer to the process of preparing data for a machine learning model.
- Feature selection uses algorithms like PCA to reduce dimensions, whereas feature engineering focuses on handling missing values.
Correct answer: Feature engineering involves transforming raw data into useful features, while feature selection is the process of choosing the most relevant existing features for a model.
Feature engineering is the creative process of transforming raw data and creating new features from existing ones to better represent the underlying problem to the model (e.g., creating 'age' from 'date_of_birth'). Feature selection, on the other hand, is the process of selecting a subset of the most relevant features (from the original or engineered set) to use in a model, often to reduce complexity and prevent overfitting.
Question 6: A financial analyst is using a box plot to analyze the daily returns of a stock. They notice that the median line within the box is located much closer to the first quartile (Q1) than to the third quartile (Q3), and the upper whisker is significantly longer than the lower whisker. What does this suggest about the distribution of the stock's daily returns?
- The distribution is perfectly symmetrical.
- The distribution is negatively skewed (skewed left).
- The distribution is positively skewed (skewed right). (Correct answer)
- The distribution has no outliers.
Correct answer: The distribution is positively skewed (skewed right).
When the median is closer to the first quartile (Q1) and the upper whisker is longer, it indicates that the majority of the data is concentrated on the lower end, with a long tail extending towards the higher values. This pattern is characteristic of a positively skewed, or right-skewed, distribution. A symmetrical distribution would have the median centered in the box and whiskers of similar length. A negatively skewed distribution would show the opposite pattern, with the median closer to Q3 and a longer lower whisker.
A data scientist is analyzing a dataset of housing prices and wants to understand the distribution of the 'price' variable, including its central tendency, spread, and the presence of potential outliers.
Which of the following visualization techniques is most suitable for this univariate analysis?