✅ Data Analyst Mock Interview Questions with Answers 📊🎯
1️⃣ Q: Explain the difference between a primary key and a foreign key.
A:
• Primary Key: Uniquely identifies each record in a table; cannot be null.
• Foreign Key: A field in one table that refers to the primary key of another table; establishes a relationship between the tables.
2️⃣ Q: What is the difference between WHERE and HAVING clauses in SQL?
A:
• WHERE: Filters rows before grouping.
• HAVING: Filters groups after aggregation (used with GROUP BY).
3️⃣ Q: How do you handle missing values in a dataset?
A: Common techniques include:
• Imputation: Replacing missing values with mean, median, mode, or a constant.
• Removal: Removing rows or columns with too many missing values.
• Using algorithms that handle missing data: Some machine learning algorithms can handle missing values natively.
4️⃣ Q: What is the difference between a line chart and a bar chart, and when would you use each?
A:
• Line Chart: Shows trends over time or continuous values.
• Bar Chart: Compares discrete categories or values.
• Use a line chart to show sales trends over months; use a bar chart to compare sales across different product categories.
5️⃣ Q: Explain what a p-value is and its significance.
A: The p-value is the probability of obtaining results as extreme as, or more extreme than, the observed results, assuming the null hypothesis is true. A small p-value (typically ≤ 0.05) indicates strong evidence against the null hypothesis.
6️⃣ Q: How would you deal with outliers in a dataset?
A:
• Identify Outliers: Using box plots, scatter plots, or statistical methods (e.g., Z-score).
• Treatment:
• Remove Outliers: If they are due to errors or anomalies.
• Transform Data: Using techniques like log transformation.
• Keep Outliers: If they represent genuine data points and provide valuable insights.
7️⃣ Q: What are the different types of joins in SQL?
A:
• INNER JOIN: Returns rows only when there is a match in both tables.
• LEFT JOIN (or LEFT OUTER JOIN): Returns all rows from the left table, and the matching rows from the right table. If there is no match, the right side will contain NULL values.
• RIGHT JOIN (or RIGHT OUTER JOIN): Returns all rows from the right table, and the matching rows from the left table. If there is no match, the left side will contain NULL values.
• FULL OUTER JOIN: Returns all rows from both tables, filling in NULLs when there is no match.
8️⃣ Q: How would you approach a data analysis project from start to finish?
A:
• Define the Problem: Understand the business question you're trying to answer.
• Collect Data: Gather relevant data from various sources.
• Clean and Preprocess Data: Handle missing values, outliers, and inconsistencies.
• Explore and Analyze Data: Use statistical methods and visualizations to identify patterns.
• Draw Conclusions and Make Recommendations: Summarize your findings and provide actionable insights.
• Communicate Results: Present your analysis to stakeholders.
👍 Tap ❤️ for more!
Post #959
5.52K
- ❤ 13
- 🔥 2
- 👏 2