Data Analyst Interview Questions and Answers

Last Updated : 24 Jul, 2026

A Data Analyst collects, cleans, analyzes, and interprets data to help organizations make informed business decisions. Preparing for a Data Analyst interview requires a strong understanding of data analysis concepts, SQL, statistics, Excel, Python, visualization tools, and problem-solving techniques. Here we have mentioned the top questions that are more likely to be asked by the interviewer during the interview process.

1. What do you mean by Data Analysis and why is it important?

Data analysis is the process of collecting, cleaning, transforming, and analyzing data to discover meaningful patterns, identify trends, and extract actionable insights that support informed decision-making. It helps organizations understand past performance, solve business problems, predict future outcomes, and make data-driven decisions.

  • Supports Better Decision-Making: Helps businesses make informed decisions based on data rather than assumptions.
  • Identifies Trends and Patterns: Reveals customer behavior, market trends, and hidden relationships in data.
  • Improves Business Performance: Optimizes processes, reduces costs, and increases operational efficiency.
  • Enables Predictive Insights: Helps forecast future demand, sales, or risks using historical data.
  • Detects Problems and Opportunities: Identifies anomalies, fraud, and areas for business growth.
  • Enhances Customer Experience: Analyzes customer preferences to improve products, services, and marketing strategies.

2. How do data analysts differ from data scientists?

Data Analysts and Data Scientists both work with data, but their roles and objectives differ.

Data Analyst

  • Focuses on descriptive and diagnostic analysis of historical data.
  • Cleans, analyzes, and visualizes data to identify trends and patterns.
  • Creates reports and dashboards to support business decisions.
  • Primarily uses SQL, Excel, Tableau, Power BI, Python, and R.
  • Answers questions such as "What happened?" and "Why did it happen?"
  • Goal: Provide actionable insights for business decision-making.

Data Scientist

  • Focuses on predictive and prescriptive analysis.
  • Develops machine learning and statistical models to predict future outcomes.
  • Performs feature engineering, model training, and evaluation.
  • Uses Python, R, SQL, TensorFlow, PyTorch, Scikit-learn, and big data tools.
  • Answers questions such as "What will happen?" and "What should we do?"
  • Goal: Build intelligent models and data-driven solutions.

3. How Data analysis is similar to Business Intelligence?

Data Analysis and Business Intelligence (BI) both help organizations make data-driven decisions by transforming raw data into meaningful insights.

  • They share common activities such as data collection, cleaning, analysis, visualization, and reporting.
  • However, BI primarily focuses on monitoring business performance and reporting historical data, while Data Analysis often goes deeper to uncover patterns, identify root causes, and support predictive analysis.

Similarities Between Data Analysis and Business Intelligence

  • Data-Driven Decision Making: Both use data to support informed business decisions.
  • Data Processing: Both involve collecting, cleaning, and transforming data before analysis.
  • Visualization: Both present insights through charts, dashboards, and reports.
  • Performance Monitoring: Both track key business metrics and KPIs.
  • Trend Analysis: Both identify patterns and trends in historical data.
  • Business Improvement: Both help optimize operations, improve efficiency, and identify growth opportunities.

4. What are the different tools mainly used for data analysis?

There are different tools used for data analysis. each has some strengths and weaknesses. Some of the most commonly used tools for data analysis are as follows:

  • Spreadsheet Software: Spreadsheet Software is used for a variety of data analysis tasks, such as sorting, filtering, and summarizing data. The top 3 mostly used Spreadsheet Software are Microsoft Excel, Google Sheets, LibreOffice Calc
  • Database Management Systems (DBMS): MySQL, PostgreSQL, Microsoft SQL Server, Oracle Database used to securely store, manage, and query large volumes of data.
  • Statistical Software: SAS (widely used across industries), SPSS (popular in social science research), Stata (managing, analyzing, and graphing data).
  • Programming Language: In data analysis, programming languages are used for deep and customized analysis.

5. What is Data Wrangling?

Data Wrangling is the process of cleaning, transforming, and organizing raw, messy, or unstructured data into a usable format. Its goal is to improve data quality and structure so it can support analysis, model building, and other data-driven tasks. Common tasks include:

  • Data Cleaning: Identify and remove the errors, inconsistencies, and missing values from the dataset.
  • Data Transformation: Transformed the structure, format, or values of data as per the requirements of the analysis. that may include scaling & normalization, encoding categorical values.
  • Data Integration: Combined two or more datasets, if that is scattered from multiple sources, and need of consolidated analysis.
  • Data Restructuring: Reorganize the data to make it more suitable for analysis. In this case, data are reshaped to different formats or new variables are created by aggregating the features at different levels.
  • Data Enrichment: Data are enriched by adding additional relevant information, this may be external data or combined aggregation of two or more features.
  • Quality Assurance: In this case, we ensure that the data meets certain quality standards and is fit for analysis.

6. What is the difference between descriptive and predictive analysis?

Descriptive and predictive analysis are the two different ways to analyze the data.

Descriptive Analysis

  • Analyzes historical data to summarize past events.
  • Identifies trends, patterns, and key performance metrics.
  • Uses aggregation, reporting, and visualization techniques.
  • Answers questions such as "What happened?"
  • Common tools include Excel, SQL, Power BI, Tableau, and Python.
  • Goal: Understand past performance and generate business insights.

Predictive Analysis

  • Uses historical data to forecast future outcomes.
  • Applies statistical techniques and machine learning algorithms.
  • Identifies future trends, risks, and opportunities.
  • Answers questions such as "What is likely to happen?"
  • Common techniques include Regression, Decision Trees, Random Forest, Time Series Forecasting, and Neural Networks.
  • Goal: Predict future events to support proactive decision-making.

7. What is univariate, bivariate, and multivariate analysis?

Univariate, Bivariate and multivariate are the three different levels of data analysis that are used to understand the data.

Univariate analysis

  • Involves the analysis of one variable at a time.
  • Used to understand the distribution and characteristics of a single variable.
  • Calculates summary statistics such as mean, median, mode, variance, and standard deviation.
  • Common visualizations include histograms, bar charts, box plots, and pie charts.
  • Goal: Summarize and describe a single variable.

Bivariate analysis

  • Involves the analysis of two variables.
  • Examines the relationship or association between them.
  • Helps identify correlation, trends, or differences.
  • Common techniques include correlation analysis, simple linear regression, t-tests, and chi-square tests.
  • Common visualizations include scatter plots, line charts, and grouped bar charts.
  • Goal: Understand how one variable relates to another.

Multivariate analysis

  • Involves the analysis of three or more variables simultaneously.
  • Identifies complex relationships and interactions among multiple variables.
  • Common techniques include multiple linear regression, logistic regression, PCA, clustering, and factor analysis.
  • Used for predictive modeling and decision-making.
  • Goal: Analyze the combined effect of multiple variables.

Some of the most popular data analysis and visualization tools are as follows:

  • Tableau: Powerful, easy-to-use tool for interactive dashboards and visualizations from a wide range of data sources.
  • Power BI: Microsoft's visualization tool, valued for its versatility and tight integration with other Microsoft products.
  • Qlik Sense: Known for speed/performance and ability to handle large datasets.
  • SAS: Used for advanced analytics, multivariate analysis, and BI.
  • IBM SPSS: Statistical software for analysis and reporting.
  • Google Data Studio (Looker Studio): Free, web-based tool that aggregates data from multiple sources (including Google Analytics) into shareable dashboards.

9. What are the steps you would take to analyze a dataset?

Data analysis involves a series of steps that transform raw data into relevant insights, conclusions, and actionable suggestions. While the specific approach will vary based on the context and aims of the study, here is an approximate outline of the processes commonly followed in data analysis:

  • Problem Definition or Objective: Make sure that the problem or question you're attempting to answer is stated clearly. Understand the analysis's aims and objectives to direct your strategy.
  • Data Collection: Collate relevant data from various sources. This might include surveys, tests, databases, web scraping,  and other techniques.
  • Data Preprocessing or Data Cleaning: In Data Preprocessing and Cleaning, we redefine the column's names or values, standardize the formats, and deal with the missing values.
  • Exploratory Data Analysis (EDA): EDA is a crucial step in Data analysis. In EDA, we apply various graphical and statistical approaches to systematically analyze and summarize the main characteristics, patterns, and relationships within a dataset.
  • Data Visualizations: It provides visual representation of complicated information and patterns in the data which enhances the understanding of data and helps in identifying the trends or patterns within a data.

10. What is data cleaning?

Data cleaning is the process of identifying and correcting (or removing) inaccurate or misleading records to improve data quality for analysis and modeling. It typically addresses:

  • Inconsistencies: Variations in formats, column names, data types, or naming conventions.
  • Duplicate entries: Records that can bias analysis by inflating counts or skewing statistics.
  • Missing values: Handled by removing rows/columns or filling them with estimated values.
  • Outliers: Data points that deviate drastically from the norm, which may reflect data-collection errors and can bias results if not addressed.

11. How do you handle missing data in a dataset?

Missing data can bias analysis and reduce model accuracy if not handled correctly. Common approaches include:

  • Deletion: Listwise deletion (drop the row) or pairwise deletion when missing values are minimal and appear random.
  • Imputation: Fill missing values with the mean/median (numerical) or mode (categorical). More advanced options include KNN imputation, regression imputation, or multiple imputation (MICE).
  • Flagging: Add a binary indicator column marking which values were missing useful when the fact that data is missing is itself informative.
  • Forward/backward fill: Common in time series data propagate the last or next known value forward/backward.
  • Domain-based defaults: Fill using business logic (e.g., 0 units for customers with no purchases).

12. What is the importance of exploratory data analysis (EDA) in data analysis?

Exploratory data analysis (EDA) is the process of investigating and understanding the data through graphical and statistical techniques.

EDA is a non-parametric approach in data analysis, which means it does take any assumptions about the dataset. EDA is important for a number of reasons that are as follows:

  • Reveals patterns, distributions, and relationships between variables.
  • Assesses data quality via univariate statistics (mean, median, mode, quartile range, distribution plots).
  • Reveals relationships between variables via bivariate/multivariate analysis (regression, correlation, covariance, scatter plots).
  • Identifies the most influential features using correlation/covariance analysis.
  • Identifies outliers (e.g., via box plots) for further statistical treatment.

13. What is Time Series analysis?

Time Series analysis is a statistical technique used to analyze and interpret data points collected at specific time intervals. Time series data is the data points recorded sequentially over time.

The key components of Time Series analysis are as follows:

  • Trend: The data's long-term movement or direction over time. Trends can be upward, downward, or flat.
  • Seasonality: Patterns that repeat at regular intervals, such as daily, monthly, or yearly cycles.
  • Cyclical Patterns: Longer-term trends that are not as regular as seasonality, and are frequently associated with economic or business cycles.
  • Irregular Fluctuations: Unpredictable and random data fluctuations that cannot be explained by trends, seasonality, or cycles.
  • Auto-correlations: The link between a data point and its prior values. It quantifies the degree of dependence between observations at different time points.

14. What is Feature Engineering?

Feature engineering is the process of selecting, transforming, and creating features from raw data in order to build more effective and accurate machine learning models. The primary goal of feature engineering is to identify the most relevant features or create the relevant features by combining two or more features using some mathematical operations from the raw data .

  • Feature Selection: Identifying the most relevant features based on correlation with the target variable.
  • Feature Creation: Generating new features by aggregating or transforming existing ones to capture patterns not visible in the raw data.
  • Transformation: Scaling/modifying features (e.g., Min-Max scaling, Z-score normalization, log transformation).
  • Feature Encoding: Converting categorical features into numeric form (e.g., One-Hot Encoding, ordinal/label encoding), since most ML algorithms require numerical input.

15. What is data normalization, and why is it important?

Data normalization is the process of transforming numerical data into standardised range. The objective of data normalization is scale the different features (variables) of a dataset onto a common scale, which make it easier to compare, analyze, and model the data.

  • Min-Max Scaling: Scales the data to a range between 0 and 1 using the formula:
    (x - min) / (max - min)
  • Z-Score Normalization (Standardization): Scales data to have a mean of 0 and a standard deviation of 1 using the formula: 
    (x - mean) / standard_deviation
  • Robust Scaling: Scales data by removing the median and scaling to the interquartile range(IQR) to handle outliers using the formula: 
    (X - Median) / IQR
  • Unit Vector Scaling: Scales each data point to have a Euclidean norm (length) (||X||) of 1 using the formula: 
    X / ||X||

16. What are the main libraries you would use for data analysis in Python?

For data analysis in Python, many great libraries are used due to their versatility, functionality, and ease of use. Some of the most common libraries are as follows:

  • NumPy: A core Python library for numerical computations. It supports arrays, matrices, and a variety of mathematical functions, making it a building block for many other data analysis libraries.
  • Pandas: A well-known data manipulation and analysis library. It provides data structures (like as DataFrames) that make to easily manipulate, filter, aggregate, and transform data.
  • SciPy: SciPy is a scientific computing library. It offers a wide range of statistical, mathematical, and scientific computing functions.
  • Matplotlib: Matplotlib is a library for plotting and visualization. It provides a wide range of plotting functions, making it easy to create beautiful and informative visualizations.
  • Seaborn: Seaborn is a library for statistical data visualization. It builds on top of Matplotlib and provides a more user-friendly interface for creating statistical plots.
  • Scikit-learn: A powerful machine learning library. It includes classification, regression, clustering, dimensionality reduction, and model evaluation tools.
  • Statsmodels: A statistical model estimation and interpretation library. It covers a wide range of statistical models, such as linear models and time series analysis.

17. What's the difference between structured and unstructured data?

Structured and Unstructured Data are two major types of data based on how they are organized.

Structured Data

  • Organized in a predefined schema (rows and columns).
  • Stored in relational databases (RDBMS).
  • Easy to search, query, and analyze using SQL.
  • Highly organized and consistent.
  • Common examples include customer records, sales transactions, employee databases, and banking records.
  • Goal: Efficient storage, retrieval, and analysis of structured information.

Unstructured Data

  • Does not follow a predefined schema.
  • Stored in file systems, data lakes, or NoSQL databases.
  • Requires specialized techniques such as NLP, Computer Vision, or Machine Learning for analysis.
  • More difficult to search and process than structured data.
  • Common examples include emails, PDFs, social media posts, images, videos, audio recordings, and documents.
  • Goal: Store and analyze complex data containing rich information.

18. How can pandas be used for data analysis?

Pandas is one of the most widely used Python libraries for data analysis. It has powerful tools and data structure which is very helpful in analyzing and processing data. Some of the most useful functions of pandas which are used for various tasks involved in data analysis are as follows:

  • Data Loading: Import data from various file formats (CSV, Excel, SQL, etc.) into a Pandas DataFrame using functions like read_csv(), read_excel(), and read_sql().
  • Data Exploration: Quickly inspect and summarize the dataset using functions such as head(), tail(), info(), and describe().
  • Data Cleaning: Handle missing values, duplicates, and incorrect data types using functions like fillna(), drop_duplicates(), and astype().
  • Data Transformation: Modify and reshape data by filtering, selecting, creating columns, and applying custom transformations using loc, iloc, apply(), and map().
  • Data Aggregation: Group data and compute summary statistics such as sum(), mean(), count(), and max() using groupby().
  • Time Series Analysis: Analyze and manipulate date and time data using functions like resample(), shift(), and datetime operations.
  • Merging and Joining: Combine multiple datasets based on common columns or indexes using merge(), join(), and concat().

19. What is the difference between pandas Series and pandas DataFrames?

Pandas Series and Pandas DataFrame are the two primary data structures in the Pandas library. A Series is a one-dimensional labeled array that stores a single column of data, whereas a DataFrame is a two-dimensional labeled table consisting of multiple rows and columns, where each column is a Pandas Series.

Pandas Series

  • A one-dimensional labeled array.
  • Stores data of a single column.
  • Has an index and corresponding values.
  • Can hold data of any type (integers, strings, floats, etc.).
  • Suitable for representing a single feature or column.
  • Goal: Store and manipulate one-dimensional data.

Pandas DataFrame

  • A two-dimensional labeled data structure.
  • Consists of multiple rows and columns.
  • Each column is a Pandas Series.
  • Columns can have different data types.
  • Similar to a spreadsheet or SQL table.
  • Goal: Store and analyze tabular data efficiently.

20. What is One-Hot-Encoding?

One-hot encoding is a technique used for converting categorical data into a format that machine learning algorithms can understand. Categorical data is data that is categorized into different groups, such as colors, nations, or zip codes.

  • To one-hot encode a categorical variable, we generate a new binary variable for each potential value of the category variable.
  • For example, if the category variable is "color" and the potential values are "red," "green," and "blue," then three additional binary variables are created: "color_red," "color_green," and "color_blue." Each of these binary variables would have a value of 1 if the matching category value was present and 0 if it was not.

21. What is a boxplot and how it's useful in data science?

A boxplot is a graphic representation of data that shows the distribution of the data. It is a standardized method of the distribution of a data set based on its five-number summary of data points: the minimum, first quartile [Q1], median, third quartile [Q3], and maximum.

Boxplot-Geeksforgeeks
Boxplot

It's especially useful for detecting outliers by visualizing how data points are distributed relative to the quartiles.

22. How do you detect and treat outliers in a dataset?

Outliers are data points that differ significantly from the rest of the data and can distort statistical summaries and model performance.

Detection methods:

  • Visualization: Box plots, scatter plots, and histograms to visually spot points far from the bulk of the data.
  • Z-score method: Points with |Z| > 3 (more than 3 standard deviations from the mean) are typically flagged.
  • IQR method: Points below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are considered outliers.

Treatment options:

  • Removal, if the outlier results from a data entry or measurement error.
  • Capping/Winsorizing, replacing extreme values with a defined boundary value.
  • Transformation, using log or square-root transforms to reduce the impact of extreme values.
  • Keeping them, if they represent genuine, important variation (e.g., fraud detection) — in that case, use robust statistical methods instead of removing them.

23. What is the difference between descriptive and inferential statistics?

Descriptive statistics and inferential statistics are the two main branches of statistics.

Descriptive Statistics

  • Summarizes and organizes data using numerical measures and visualizations.
  • Describes the characteristics of the available dataset.
  • Does not make predictions or generalizations beyond the data.
  • Common measures include mean, median, mode, range, variance, and standard deviation.
  • Common visualizations include histograms, bar charts, box plots, and pie charts.
  • Goal: Understand and summarize the data.

Inferential Statistics

  • Uses sample data to make conclusions about an entire population.
  • Estimates population parameters and tests hypotheses.
  • Helps make predictions and support decision-making.
  • Common techniques include hypothesis testing, confidence intervals, regression, ANOVA, and chi-square tests.
  • Accounts for uncertainty using probability.
  • Goal: Draw conclusions or make predictions about a population.

24. What are measures of central tendency?

Measures of central tendency are the statistical measures that represent the centre of the data set. It reveals where the majority of the data points generally cluster. The three most common measures of central tendency are:

  • Mean: The mean, also known as the average, is calculated by adding up all the values in a dataset and then dividing by the total number of values.
  • Median: The median is the middle value in a data set when it is arranged in ascending or descending order.
  • Mode: The mode is the value that appears most frequently in a dataset. A dataset can have no mode (if all values are unique) or multiple modes (if multiple values have the same highest frequency). The mode is useful for categorical data and discrete distributions.

25. What are the Measures of dispersion?

Measures of dispersion, also known as measures of variability or spread, indicate how much the values in a dataset deviate from the central tendency.

  • Range: Difference between the highest and lowest values.
  • Variance: Average of the squared deviations from the mean: σ² = Σ(X − μ)² / N
  • Standard Deviation: Square root of the variance, expressed in the same units as the data.
  • Mean Absolute Deviation (MAD): Average of the absolute differences from the mean — less sensitive to extreme values than variance/standard deviation.
  • Percentiles: Indicate the relative position of a value within a dataset (what percentage of values fall below it).
  • Interquartile Range (IQR): Range from the 25th to the 75th percentile — measures the spread of the middle 50% of data and is robust to outliers.
  • Coefficient of Variation (CV): Ratio of standard deviation to mean, expressed as a percentage — useful for comparing variability across datasets with different units or scales.

26. What is a probability distribution?

A probability distribution is a mathematical function that estimates the probability of different outcomes in a random experiment or process.

  • Discrete Probability Distribution: The random variable takes distinct, separate values (e.g., binomial, Poisson, hypergeometric distributions).
  • Continuous Probability Distribution: The random variable can take any value within a range, described by a probability density function (e.g., normal, exponential, uniform distributions).

27. What are normal distributions?

A normal distribution, also known as a Gaussian distribution, is a specific type of probability distribution with a symmetric, bell-shaped curve. The data in a normal distribution clustered around a central value i.e mean, and the majority of the data falls within one standard deviation of the mean.

  • The curve gradually tapers off towards both tails, showing that extreme values are becoming
  • Normal distributions are a fundamental concept that supports many statistical approaches and helps researchers understand the behaviour of data and variables in a variety of scenarios.

28. What is the central limit theorem?

The Central Limit Theorem (CLT) is a fundamental concept in statistics that states that, under certain conditions, the distribution of sample means approaches a normal distribution as sample size rises, regardless of the the original population distribution.

The Central Limit Theorem has three main assumptions:

  1. The samples must be independent. This means that the outcome of one sample cannot affect the outcome of another sample.
  2. The samples must be random. This means that each sample must be drawn from the population in a way that gives all members of the population an equal chance of being selected.
  3. The sample size must be large enough. The CLT typically applies when the sample size is greater than 30.

29. What are the null hypothesis and alternative hypotheses?

In statistics, the null and alternate hypotheses are two mutually exclusive statements regarding a population parameter. A hypothesis test analyzes sample data to determine whether to accept or reject the null hypothesis.

  • Null Hypothesis (H_0  ): The null hypothesis is a statement regarding the status quo representing no difference or effect after the phenomena unless there is strong evidence to the contrary.
  • Alternate Hypothesis (H_a \text{ or } H_1  ): The alternate hypothesis is a statement that disregards the status quo means supports the difference or effect. The researcher tries to prove the hypothesis.

30. What is a p-value, and what does it mean?

A p-value, which stands for "probability value," is a statistical metric used in hypothesis testing to measure the strength of evidence against a null hypothesis.

  • When the null hypothesis is considered to be true, it measures the chance of receiving observed outcomes (or more extreme results).
  • In layman's words, the p-value determines whether the findings of a study or experiment are statistically significant or if they might have happened by chance.
  • The p-value is a number between 0 and 1, which is frequently stated as a decimal or percentage.
  • If the null hypothesis is true, it indicates the probability of observing the data (or more extreme data).

31. What is the significance level?

The significance level, often denoted as α (alpha), is a critical parameter in hypothesis testing and statistical analysis. It defines the threshold for determining whether the results of a statistical test are statistically significant.

If the p-value is less than the significance level, we reject the null hypothesis and conclude that there is a statistically significant difference between the groups.

  • If p-value ≤ α: Reject the null hypothesis. This indicates that the results are statistically significant, and there is evidence to support the alternative hypothesis.
  • If p-value > α: Fail to reject the null hypothesis. This means that the results are not statistically significant, and there is insufficient evidence to support the alternative hypothesis.

32. Describe Type I and Type II errors in hypothesis testing.

In hypothesis testing, When deciding between the null hypothesis (H0) and the alternative hypothesis (Ha), two types of errors may occur. These errors are known as Type I and Type II errors, and they are important considerations in statistical analysis.

  • Type I error (False Positive, α): Rejecting a true null hypothesis. Example: concluding a new medicine works when it doesn't. Its probability equals the significance level, α.
  • Type II Error (False Negative, β): Failing to reject a false null hypothesis. Example: concluding a new medicine doesn't work when it actually does. Its probability is denoted β.

33. What is a confidence interval, and how does it is related to point estimates?

The confidence interval is a statistical concept used to estimates the uncertainty associated with estimating a population parameter (such as a population mean or proportion) from a sample. It is a range of values that is likely to contain the true value of a population parameter along with a level of confidence in that statement.

  • Point estimate: A point estimate is a single that is used to estimate the population parameter based on a sample. ]
  • Confidence interval: A confidence interval, on the other hand, is a range of values built around a point estimate to account for the uncertainty in the estimate. It is typically expressed as an interval with an associated confidence level (e.g., 95% confidence interval). T\

For example, A 95% confidence interval indicates that you are 95% confident that the real population parameter falls inside the interval. A 95% confidence interval for the population mean (μ) can be expressed as :

(\bar{x} - \text{Margin of error}, \bar{x} + \text{Margin of error})

where x̄ is the point estimate (sample mean), and the margin of error is calculated using the standard deviation of the sample and the confidence level.

34. What is A/B testing, and how would you evaluate the results?

A/B testing (split testing) is a controlled experiment used to compare two versions A (control) and B (variant) of a product, webpage, or feature to see which performs better on a defined metric (e.g., conversion rate, click-through rate).

  1. Define a clear hypothesis and success metric.
  2. Randomly split users into control and treatment groups.
  3. Run the experiment long enough / with a large enough sample to reach statistical power.
  4. Analyze results using hypothesis testing (e.g., a two-sample t-test or a z-test for proportions) to compute a p-value.
  5. Compare the p-value against the chosen significance level (α), and examine the confidence interval and effect size to judge practical (not just statistical) significance.

35. What is ANOVA in Statistics?

ANOVA, or Analysis of Variance, is a statistical technique used for analyzing and comparing the means of two or more groups or populations to determine whether there are statistically significant differences between them or not. ANOVA works by partitioning the total variance in the data into two components:

  • Between-group variance: It analyzes the difference in means between the different groups or treatment levels being compared.
  • Within-group variance: It analyzes the variance within each individual group or treatment level.

Depending on the investigation's design and the number of independent variables, ANOVA has numerous varieties:

  • One-Way ANOVA: Compares the means of three or more independent groups or levels of a single categorical variable.
  • Two-Way ANOVA: Compare the means of two or more independent groups while taking into account the impact of a two independent categorical variables (factors).
  • Multivariate Analysis of Variance (MANOVA): Compare the means of multiple dependent variables.

36. What is a correlation?

Correlation is a statistical term that analyzes the degree of a linear relationship between two or more variables. It estimates how effectively changes in one variable predict or explain changes in another.C

The correlation between two variables is represented by correlation coefficient, denoted as "r". The value of "r" can range between -1 and +1, reflecting the strength of the relationship:

  • Positive correlation (r > 0): As one variable increases, the other tends to increase. The greater the positive correlation, the closer "r" is to +1.
  • Negative correlation (r < 0): As one variable rises, the other tends to fall. The closer "r" is to -1, the greater the negative correlation.
  • No correlation (r = 0): There is little or no linear relationship between the variables.

37. What is the difference between correlation and causation?

Correlation and Causation describe relationships between variables, but they are not the same.

Correlation

  • Measures the strength and direction of the relationship between two variables.
  • A positive, negative, or zero correlation may exist.
  • Does not imply that one variable causes the other.
  • Commonly measured using the Pearson correlation coefficient (r), whose value ranges from -1 to +1.
  • Used to identify patterns and relationships in data.
  • Goal: Determine whether variables are related.

Causation

  • Indicates a cause-and-effect relationship between two variables.
  • A change in one variable directly leads to a change in the other.
  • Typically established through controlled experiments, randomized trials, or causal inference methods.
  • Requires evidence beyond statistical correlation.
  • Used to determine the impact of one variable on another.
  • Goal: Identify the true cause of an outcome.

38. What are the differences between Z-test, T-test and F-test?

Z-test, T-test, and F-test are statistical hypothesis tests used to compare datasets and make inferences about populations.

Z-test

  • Used to compare population means.
  • Suitable when the sample size is large (typically n ≥ 30) or the population standard deviation is known.
  • Based on the Z-distribution (Normal Distribution).
  • Commonly used for hypothesis testing involving means and proportions.
  • Goal: Determine whether there is a significant difference between population means.

T-test

  • Used to compare the means of one or two groups.
  • Suitable when the sample size is small (typically n < 30) and the population standard deviation is unknown.
  • Based on the Student's t-distribution.
  • Types include One-sample t-test, Independent two-sample t-test, Paired t-test
  • Goal: Test whether the difference between sample means is statistically significant.

F-test

  • Used to compare the variances of two or more groups.
  • Based on the F-distribution.
  • Commonly used in Analysis of Variance (ANOVA) to determine whether multiple group means differ significantly.
  • Also used to compare statistical models.
  • Goal: Determine whether group variances or multiple group means differ significantly.

39. What is linear regression, and how do you interpret its coefficients?

Linear regression fits a linear equation to observed data to model the relationship between a dependent variable (target) and one or more independent variables (predictors/features).

A simple linear regression model can be represented as:

Y = \beta_0 + \beta_1X + \epsilon

Where:

  • Y: Dependent variable or Target
  • X: Independent variables
  • \beta_0  is the intercept (i.e value of Y when X =0)
  • \beta_1  is the coefficient for the independent variable X, representing the change in Y for a one-unit change in X.
  • \epsilon  is represents the error term (i.e Difference between the actual and predicted value from the linear relationship.

40. What is DBMS?

  • DBMS stands for Database Management System. It is software designed to manage, store, retrieve, and organize data in a structured manner.
  • It provides an interface or a tool for performing CRUD operations into a database.
  • It serves as an intermediary between the user and the database, allowing users or applications to interact with the database without the need to understand the underlying complexities of data storage and retrieval.

41. What are the basic SQL CRUD operations?

SQL CRUD stands for CREATE, READ(SELECT), UPDATE, and DELETE statements in SQL Server. C

1. CREATE

It is used to create the table and insert the values in the database. The commands used to create the table are as follows:

INSERT INTO employees (first_name, last_name, salary)
VALUES ('Pawan', 'Gunjan', 50000);

2. READ

Used to retrive the data from the table

SELECT * FROM employees;

3. UPDATE

Used to modify the existing records in the database table

UPDATE employees
SET salary = 55000
WHERE last_name = 'Gunjan';

4. DELETE

Used to remove the records from the database table

DELETE FROM employees
WHERE first_name = 'Pawan';

42. What is the difference between DELETE, TRUNCATE, and DROP in SQL?

DELETE, TRUNCATE, and DROP are SQL commands used to remove data, but they differ in what they remove and how they work.

DELETE

  • Removes specific rows or all rows from a table.
  • Supports the WHERE clause to delete selected records.
  • Deletes rows one at a time, making it slower for large tables.
  • Can be rolled back if executed within a transaction.
  • Does not reset the identity/auto-increment value.
  • The table structure remains unchanged.
  • Goal: Delete selected records while preserving the table.

TRUNCATE

  • Removes all rows from a table.
  • Does not support the WHERE clause.
  • Faster than DELETE because it deallocates data pages instead of deleting rows individually.
  • Resets the identity/auto-increment value in most database systems.
  • The table structure remains unchanged.
  • Can generally be rolled back in transactional database systems, though behavior is DBMS-dependent.
  • Goal: Quickly remove all records while keeping the table.

DROP

  • Permanently removes the entire table.
  • Deletes both data and table structure (schema).
  • Removes indexes, constraints, and associated metadata.
  • The table no longer exists after execution.
  • To use the table again, it must be recreated.
  • Can generally be rolled back in transactional database systems, though behavior is DBMS-dependent.
  • Goal: Completely remove a database object.

43. What is the SQL statement used to insert new records into a table?

We use the 'INSERT' statement to insert new records into a table. The 'INSERT INTO' statement in SQL is used to add new records (rows) to a table.

Example:

INSERT INTO Customers (CustomerName, City, Country)
VALUES ('Shivang', 'Noida', 'India');

44. How do you filter records using the WHERE clause in SQL?

We can filter records using the 'WHERE' clause by including 'WHERE' clause in 'SELECT' statement, specifying the conditions that records must meet to be included.

Example : In this example, we are fetching the records of employee where job title is Developer.

SELECT * FROM employees
WHERE job_title = 'Developer';

45. How can you sort records in ascending or descending order using SQL?

We can sort records in ascending or descending order by using 'ORDER BY; clause with the 'SELECT' statement. The 'ORDER BY' clause allows us to specify one or more columns by which you want to sort the result set, along with the desired sorting order i.e ascending or descending order.

Example: This statement selects all customers from the 'Customers' table, sorted ascending by the 'Country'

SELECT * FROM Customers
ORDER BY Country ASC;

Syntax for sorting records in descending order

Example: This statement selects all customers from the 'Customers' table, sorted descending by the 'Country' column

SELECT * FROM Customers
ORDER BY Country DESC;

46. Explain the purpose of the GROUP BY clause in SQL.

The purpose of GROUP BY clause in SQL is to group rows that have the same values in specified columns. It is used to arrange different rows in a group if a particular column has the same values with the help of some functions.

Example: This SQL query groups the 'CUSTOMER' table based on age by using GROUP BY

SELECT AGE, COUNT(Name)
FROM CUSTOMERS
GROUP BY AGE;

47. How do you perform aggregate functions like SUM, COUNT, AVG, and MAX/MIN in SQL?

An aggregate function groups together the values of multiple rows as input to form a single value of more significant meaning. It is also used to perform calculations on a set of values and then returns a single result. Some examples of aggregate functions are SUM, COUNT, AVG, and MIN/MAX.

1. SUM: It calculates the sum of values in a column.

Example: In this example, we are calculating sum of costs from cost column in PRODUCT table.

SELECT SUM(Cost)
FROM Products;

2. COUNT: It counts the number of rows in a result set or the number of non-null values in a column.

Example: Ij this example, we are counting the total number of orders in an "orders" table.

SELECT COUNT(*)
FROM Orders;

3. AVG: It calculates the average value of a numeric column.

Example: In this example, we are finding average salary of employees in an "employees" table.

SELECT AVG(Price)
FROM Products;

4. MAX: It returns the maximum value in a column.

Example: In this example, we are finding the maximum temperature in the 'weather' table.

SELECT MAX(Price)
FROM Orders;

5. MIN: It returns the minimum value in a column.

Example: In this example, we are finding the minimum price of a product in a "products" table.

SELECT MIN(Price)
FROM Products;

48. What is an SQL join operation? Explain different types of joins (INNER, LEFT, RIGHT, FULL).

SQL Join operation is used to combine data or rows from two or more tables based on a common field between them. The primary purpose of a join is to retrieve data from multiple tables by linking records that have a related value in a specified column. There are different types of join i.e, INNER, LEFT, RIGHT, FULL. These are as follows:

1. INNER JOIN: The INNER JOIN keyword selects all rows from both tables as long as the condition is satisfied. This keyword will create the result-set by combining all rows from both the tables where the condition satisfies i.e the value of the common field will be the same.

Example:

SELECT customers.customer_id, orders.order_id
FROM customers
INNER JOIN orders
ON customers.customer_id = orders.customer_id;

2. LEFT JOIN: A LEFT JOIN returns all rows from the left table and the matching rows from the right table.

Example:

SELECT departments.department_name, employees.first_name
FROM departments
LEFT JOIN employees
ON departments.department_id = employees.department_id;

3. RIGHT JOIN: RIGHT JOIN is similar to LEFT JOIN. This join returns all the rows of the table on the right side of the join and matching rows for the table on the left side of the join.

Example:

SELECT employees.first_name, orders.order_id
FROM employees
RIGHT JOIN orders
ON employees.employee_id = orders.employee_id;

4. FULL JOIN: FULL JOIN creates the result set by combining the results of both LEFT JOIN and RIGHT JOIN. The result set will contain all the rows from both tables.

Example:

SELECT customers.customer_id, orders.order_id
FROM customers
FULL JOIN orders
ON customers.customer_id = orders.customer_id;

  • To retrieve data from multiple related tables, we generally use 'SELECT' statement along with help of 'JOIN' operation by which we can easily fetch the records from the multiple tables.
  • Basically, JOINS are used when there are common records between two tables.
  • There are different types of joins i.e. INNER, LEFT, RIGHT, FULL JOIN. In the above question, detailed explanation is given regarding JOIN so you can refer that.

50. What is a subquery in SQL? How can you use it to retrieve specific data?

A subquery is a query nested inside another query — commonly in the WHERE, HAVING, or FROM clause — and can be used with SELECT, INSERT, UPDATE, or DELETE statements.

Example 1: Subquery in the SELECT Clause

SELECT customer_name,
(SELECT COUNT(*) FROM orders WHERE orders.customer_id = customers.customer_id) AS order_count
FROM customers;

Example 2: Subquery in the WHERE Clause

SELECT employee_name, salary
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);

51. Can you give an example of using a subquery in combination with IN or EXISTS?

1. Using a Subquery with IN

SELECT f_name, l_name

FROM geeks_data

WHERE dept IN (SELECT dep_name FROM geeks_dept WHERE dept_id = 1);

2. Using a Subquery with EXISTS

SELECT DISTINCT store_t

FROM store

WHERE EXISTS (SELECT * FROM city_store WHERE city_store.store_t = store.store_t);

52. What is the purpose of the HAVING clause in SQL? How is it different from the WHERE clause?

The WHERE and HAVING clauses are both used to filter data in SQL, but they are applied at different stages of query execution. The main differences between HAVING and WHERE clauses are as follows:

WHERE Clause

  • Filters individual rows before grouping or aggregation.
  • Executed before the GROUP BY clause.
  • Cannot use aggregate functions such as SUM(), AVG(), COUNT(), MIN(), or MAX() directly.
  • Can be used with SELECT, UPDATE, and DELETE statements.
  • Goal: Filter records before aggregation.

HAVING Clause

  • Filters groups of rows after the GROUP BY operation.
  • Executed after the GROUP BY clause.
  • Can use aggregate functions such as SUM(), AVG(), COUNT(), MIN(), and MAX().
  • Typically used with the GROUP BY clause.
  • Goal: Filter aggregated results.

53. How do you use the UNION and UNION ALL operators in SQL?

In SQL, the UNION and UNION ALL operators are used to combine the result sets of multiple SELECT statements into a single result set. These operators allow you to retrieve data from multiple tables or queries and present it as a unified result. However, there are differences between the two operators:

1. UNION Operator:

The UNION operator returns only distinct rows from the combined result sets. It removes duplicate rows and returns a unique set of rows. It is used when you want to combine result sets and eliminate duplicate rows.

Example:

select name, roll_number
from student
UNION
select name, roll_number
from marks

2. UNION ALL Operator:

The UNION ALL operator returns all rows from the combined result sets, including duplicates. It does not remove duplicate rows and returns all rows as they are. It is used when you want to combine result sets but want to include duplicate rows.
Example:

select name, roll_number
from student
UNION ALL
select name, roll_number
from marks

54. Explain the concept of database normalization and its importance.

Database Normalization is the process of reducing data redundancy in a table and improving data integrity. It is a way of organizing data in a database. It involves organizing the columns and tables in the database to ensure that their dependencies are correctly implemented using database constraints.

It is important because of the following reasons:

  • It eliminates redundant data.
  • It reduces the chances of data error.
  • The normalization is important because it allows the database to take up less disk space.
  • It also helps in increasing the performance.
  • It improves the data integrity and consistency.

55. Can you list and briefly describe the normal forms (1NF, 2NF, 3NF) in SQL?

Normalization can take numerous forms, the most frequent of which are 1NF (First Normal Form), 2NF (Second Normal Form), and 3NF (Third Normal Form). Here's a quick rundown of each:

First Normal Form (1NF)

  • In 1NF, each table cell should contain only a single value, and each column should have a unique name. 1
  • NF helps in eliminating duplicate data and simplifies the queries.
  • It is the fundamental requirement for a well-structured relational database.
  • 1NF eliminates all the repeating groups of the data and also ensures that the data is organized at its most basic granularity.

Second Normal Form (2NF)

  • In 2NF, it eliminates the partial dependencies, ensuring that each of the non-key attributes in the table is directly related to the entire primary key.
  • This further reduces data redundancy and anomalies.
  • The Second Normal form (2NF) eliminates redundant data by requiring that each non-key attribute be dependent on the primary key.
  • In 2NF, each column should be directly related to the primary key, and not to other columns.

Third Normal Form (3NF)

  • Third Normal Form (3NF) builds on the Second Normal Form (2NF) by requiring that all non-key attributes are independent of each other.
  • This means that each column should be directly related to the primary key, and not to any other columns in the same table.

56. Explain window functions in SQL. How do they differ from regular aggregate functions?

Window functions perform calculations across a set ("window") of rows related to the current row — defined via OVER() — without collapsing the result into a single row per group, unlike regular aggregates.

Example: SELECT department, AVG(salary) OVER(PARTITION BY department ORDER BY employee_id) AS avg_salary

FROM employees;

Aggregate Functions

  • Combine multiple rows into a single summarized value.
  • Return one result per group (or one overall result if GROUP BY is not used).
  • Often used with the GROUP BY clause.
  • Common aggregate functions include SUM() , AVG() , COUNT() , MIN() , MAX().

57. What are RANK(), DENSE_RANK(), and ROW_NUMBER(), and how do they differ?

ROW_NUMBER(), RANK(), and DENSE_RANK() are SQL window functions used to assign rankings to rows based on a specified ordering.

ROW_NUMBER()

  • Assigns a unique sequential number to each row.
  • Every row gets a different number, even if values are the same.
  • Commonly used for pagination and removing duplicate records.
  • Goal: Assign a unique position to every row.

RANK()

  • Assigns the same rank to rows with equal values.
  • Skips the next rank(s) after a tie.
  • Commonly used in competitions and ranking reports.
  • Goal: Rank rows while accounting for ties.

DENSE_RANK()

  • Assigns the same rank to rows with equal values.
  • Does not skip the next rank after a tie.
  • Produces consecutive rankings.
  • Goal: Rank rows without gaps in the ranking sequence.

58. What are primary keys and foreign keys in SQL? Why are they important?

Primary keys and foreign keys are two fundamental concepts in SQL that are used to build and enforce connections between tables in a relational database management system (RDBMS).

  • Primary key: Primary keys are used to ensure that the data in the specific column is always unique. In this, a column cannot have a NULL value. The primary key is either an existing table column or it's specifically generated by the database itself according to a sequence.
  • Foreign key: Foreign key is a group of column or a column in a database table that provides a link between data in given two tables. Here, the column references a column of another table.

59. What is an index in SQL, and how does it affect query performance?

An index is a database object that speeds up data retrieval, similar to an index in a book — it creates a data structure (typically a B-tree) that lets the database engine locate rows without scanning the entire table.

  • Benefits: Significantly speeds up SELECT queries involving WHERE, JOIN, or ORDER BY on indexed columns.
  • Trade-offs: Indexes use extra storage and slow down write operations (INSERT, UPDATE, DELETE), since the index must also be updated.
  • Types: A clustered index determines the physical order of data on disk (only one per table); a non-clustered index is a separate structure pointing to the data (multiple allowed per table).

60. Describe the concept of a database transaction. Why is it important to maintain data integrity?

  • Database transactions is a set of operations executed as a single logical unit of work, ensuring the database remains in a consistent state even after failures or concurrent access.
  • Transactions enforce the ACID properties — Atomicity, Consistency, Isolation, and Durability — which are essential for maintaining accurate, consistent, and reliable data in complex, concurrent environments.

61. Explain how NULL values are handled in SQL queries, and how you can use functions like IS NULL and IS NOT NULL.

In SQL, NULL is a special value that usually represents that the value is not present or absence of the value in a database column. SQL provides IS NULL and IS NOT NULL operators to work with NULL values.

1. IS NULL: IS NULL operator is used to check whether an expression or column contains a NULL value.

Syntax: SELECT column_name(s) FROM table_name WHERE column_name IS NULL;

Example: In the below example, the query retrieves all rows from the employee table where the middle name contains NULL values.

SELECT * FROM employees WHERE mid_name IS NULL;

2. IS NOT NULL: IS NOT NULL operator is used to check whether an expression or column does not contain a NULL value.

Syntax:SELECT column_name(s) FROM table_name WHERE column_name IS NOT NULL;

Example: In the below example, the query retrieves all rows from the employee table where the first name does not contains NULL values.

SELECT * FROM employees WHERE first_name IS NOT NULL;

62. What is the difference between normalization and denormalization in database design.

Normalization is used in a database to reduce the data redundancy and inconsistency from the table. Denormalization is used to add data redundancy to execute the query as quick as possible.

Normalization

  • Organizes data into multiple related tables.
  • Eliminates data redundancy and duplicate data.
  • Improves data integrity and consistency.
  • Reduces insert, update, and delete anomalies.
  • Requires more JOIN operations during queries.
  • Common normal forms include 1NF, 2NF, 3NF, BCNF, etc.
  • Goal: Minimize redundancy and maintain data consistency.

Denormalization

  • Combines related tables into fewer tables.
  • Introduces controlled data redundancy.
  • Reduces the number of JOIN operations.
  • Improves read/query performance.
  • Increases storage requirements and the risk of data inconsistency.
  • Commonly used in data warehouses, reporting systems, and OLAP databases.
  • Goal: Optimize query performance.

63. What are Pivot Tables in Excel, and how are they used in data analysis?

A Pivot Table is an interactive Excel tool for quickly summarizing, aggregating, and analyzing large datasets without writing formulas. You drag fields into Rows, Columns, Values, and Filters areas to reorganize data dynamically. Data analysts commonly use pivot tables to:

  • Summarize sales, revenue, or counts by category, region, or time period.
  • Quickly compute aggregates like SUM, AVERAGE, COUNT, and MAX/MIN.
  • Cross-tabulate two or more categorical variables.
  • Pair with Pivot Charts for fast visual summaries.
  • Drill down into the detail behind a summarized figure.

64. What is the difference between VLOOKUP, HLOOKUP, and INDEX-MATCH in Excel?

VLOOKUP, HLOOKUP, and INDEX-MATCH are Excel functions used to search and retrieve data.

VLOOKUP

  • Searches for a value vertically in the first column of a table.
  • Returns a value from a specified column in the same row.
  • Requires the lookup value to be in the leftmost column.
  • May break if columns are inserted or deleted because it uses a column index.
  • Goal: Retrieve data using a vertical lookup.

HLOOKUP

  • Searches for a value horizontally in the first row of a table.
  • Returns a value from a specified row in the same column.
  • Requires the lookup value to be in the top row.
  • Less commonly used than VLOOKUP.
  • Goal: Retrieve data using a horizontal lookup.

INDEX-MATCH

  • Combines the INDEX() and MATCH() functions.
  • MATCH() finds the position of the lookup value, and INDEX() returns the corresponding value.
  • Can look up values in any direction (left, right, up, or down).
  • More flexible and efficient than VLOOKUP and HLOOKUP, especially for large datasets.
  • Not affected by inserting or deleting columns.
  • Goal: Perform flexible and robust lookups.

65. What are some common Excel functions used by data analysts?

  • Conditional logic: IF, IFS, IFERROR
  • Conditional aggregation: COUNTIF/COUNTIFS, SUMIF/SUMIFS, AVERAGEIF/AVERAGEIFS
  • Text functions: LEFT, RIGHT, MID, TRIM, CONCATENATE/TEXTJOIN
  • Date functions: TODAY, DATEDIF, EOMONTH
  • Lookup functions: VLOOKUP, INDEX/MATCH, XLOOKUP
  • Logical functions: AND, OR

66. Explain the difference between a dimension and a measure in Tableau.

In Tableau, dimensions and measures are two fundamental types of fields used for data visualization and analysis. They serve distinct purposes and have different characteristics:

Dimensions

  • Represent categorical or descriptive data.
  • Used to group, filter, and label data.
  • Usually contain text, dates, or IDs.
  • Displayed as blue (discrete) fields by default in Tableau.
  • Examples: Customer Name, Product Category, Region, Order Date.
  • Goal: Categorize and organize data.

Measures

  • Represent numerical data.
  • Used for calculations and aggregations such as SUM, AVG, COUNT, MIN, and MAX.
  • Displayed as green (continuous) fields by default in Tableau.
  • Examples: Sales, Profit, Quantity, Discount.
  • Goal: Analyze and measure business performance.

67. What are the dashboard, worksheet, Story, and Workbook in Tableau?

Tableau is a robust data visualization and business intelligence solution that includes a variety of components for producing, organizing, and sharing data-driven insights. Here's a rundown of some of Tableau's primary components:

  • Dashboard: A collection of worksheets/visualizations combined on a single page for an interactive, holistic view, supporting filters and actions.
  • Worksheet: The fundamental building block for a single visualization — charts, tables, graphs — created by dragging fields onto the canvas.
  • Story: A sequence of worksheets/dashboards arranged into a narrative, useful for guiding viewers through data-driven insights.
  • Workbook: The top-level file that holds worksheets, dashboards, and stories, along with data connections, parameters, and calculated fields.

68. Name the different products of Tableau .

The different products of Tableau are as follows :

  • Tableau Desktop: Primary authoring tool for creating visualizations and dashboards.
  • Tableau Server: Enterprise platform for secure internal sharing and collaboration.
  • Tableau Online: Cloud-based version of Tableau Server.
  • Tableau Public: Free version for publishing visualizations publicly on the web.
  • Tableau Prep: Tool for cleaning, shaping, and combining data before analysis.
  • Tableau Mobile: App extending Tableau access to phones/tablets.
  • Tableau Reader: Free app for viewing/interacting with workbooks shared by Desktop users.
  • Tableau Prep Builder: Advanced data preparation tool with more comprehensive cleaning/transformation features.

69. What is the difference between joining and blending in Tableau?

In Tableau, joining and blending are ways for combining data from various tables or data sources. However, they are employed in various contexts and have several major differences:

Joining

  • Combines tables from the same data source (or compatible sources) before analysis.
  • Performed at the row level using common fields.
  • Supports join types such as Inner, Left, Right, and Full Outer Join.
  • Creates a single unified data source.
  • Generally provides better performance for related tables.
  • Goal: Merge related tables into one dataset.

Blending

  • Combines data from multiple data sources.
  • Each data source is queried separately, and results are combined in the visualization.
  • Uses a primary and a secondary data source linked by common fields.
  • Useful when data cannot be joined directly.
  • May be slower for large datasets.
  • Goal: Analyze data from different sources together.

70. What is the difference between a discrete and a continuous field in Tableau?

In Tableau, fields can be classified as discrete or continuous, and the categorization determines how the field is utilized and shown in visualizations. The following are the fundamental distinctions between discrete and continuous fields in Tableau:

Discrete Fields

  • Represent categorical or distinct values.
  • Display data as headers or labels.
  • Divide the view into separate categories.
  • Shown as blue fields in Tableau.
  • Common examples: Region, Category, Customer Name, Month (Discrete).
  • Goal: Categorize and group data.

Continuous Fields

  • Represent numeric values or continuous ranges.
  • Display data on an axis.
  • Used to show trends and distributions.
  • Shown as green fields in Tableau.
  • Common examples: Sales, Profit, Quantity, Date (Continuous).
  • Goal: Measure and analyze numerical data.

71. Explain the difference between live connections and extracts.

In Tableau, There are two ways to attach data to visualizations: live connections and data extracts (also known as extracts). Here's a rundown of the fundamental distinctions between the two:

Live Connection

  • Connects directly to the original data source.
  • Always displays the latest available data.
  • Queries are executed on the source database in real time.
  • Performance depends on the database and network speed.
  • Best suited for real-time reporting and dashboards.
  • Goal: Access up-to-date data directly from the source.

Extract

  • Stores a snapshot of the data in Tableau's optimized extract format.
  • Provides faster query performance.
  • Does not automatically reflect changes in the source data.
  • Requires manual or scheduled refreshes.
  • Best suited for large datasets, offline analysis, and faster dashboards.
  • Goal: Improve performance and enable offline analysis.

72. What Are the Different Joins in Tableau?

Tableau allows you to make many sorts of joins to mix data from numerous tables or data sources. Tableau's major join types are:

  • Inner Join: An inner join returns only the rows that have matching values in both tables. Rows that do not have a match in the other table are excluded from the result.
  • Left Join: A left join returns all the rows from the left table and matching rows present in the right table. If there is no match in the right table, null values are included in the result.
  • Right Join: A right join returns all the rows from the right table and matching rows present in the left table. If there is no match in the left table, null values are included.
  • Full Outer Join: A full outer join returns all the rows where there is a match in either the left or right table. It includes all the rows from both tables and fills in null values where there is no match.

73. How can we create a calculated field in Tableau?

You may use calculated fields in Tableau to make calculations or change data based on your individual needs. Calculated fields enable you to generate new values, execute mathematical operations, use conditional logic, and many other things. Here's how to add a calculated field to Tableau:

  • Open the Tableau workbook or the data source.
  • In the "data" pane on the left, right-click anywhere and choose "Create Calculated Field".
  • In the calculated field editor, write your custom calculation using fields, functions, and operators.
  • Click "OK" to save the calculated field.

74. What are the different data aggregation functions used in Tableau?

Tableau has many different data aggregation functions used in tableau:

  • SUM: calculates the sum of the numeric values within a group or partition.
  • AVG: Computes the average of the numeric values.
  • MIN: Determines the minimum value.
  • MAX: Determines the maximum value.
  • COUNT: Count the number of records or non-null values.
  • VAR: Computes the variance of the sample population.
  • VARP: Computes the variance of the entire population.
  • STEDV: Compute the standard deviation of the sample population.
  • STEDVP: Calculate the standard deviation of the entire population.

75. What is the Difference Between .twbx And .twb?

The Difference Between .twbx And .twb are as follows:

.twb

  • It represents a tableau workbook, focusing on the layout and visualization details created in the tableau desktop.
  • It only contains the references to the location of the data source rather than the actual data itself. .twb files are less in size due to their lightweight nature.
  • Recievers of .twb files must have access to the associated data source in order for the workbook to operate properly.

.twbx

  • It is known as tableau packaged workbooks, provide a comprehensive solution for sharing tableau workbooks.
  • They include both actual data source and the workbook layout, including any custom calculations and visualizations.
  • This embedded data ensures that recipients can open and view the workbook independently of the original data source. However, .twbx files tend to be larger due to the included data.

76. What are the different data types used by Tableau?

  • Tableau supports the following core data types: String (Text), Number (Integer/Decimal), Date, Date & Time, Boolean, and Geographic values.
  • Fields can also carry special roles like Cluster/Mixed groupings created through analysis, but these are derived roles rather than base data types.

77. What is a Parameter in Tableau?

  • The parameter is a dynamic control that allows a user to input a single value or choose from a predefined list of values.
  • In Tableau, dashboards and reports, parameters allow for interactivity and flexibility by allowing users to change a variety of visualization-related elements without having to perform substantial editing or change the data source.

78. What Are the Filters? Name the Different types of Filters available in Tableau.

Filters are the crucial tools for data analysis and visualization in Tableau. Filters let you set the requirements that data must meet in order to be included or excluded, giving you control over which data will be shown in your visualizations. 

  • Extract Filter: These are used to filter the extracted data from the main data source.
  • Data Source Filter: These filters are used to filter data at the data source level, affecting all worksheets and dashboards that use the same data source.
  • Dimension Filter: These filters are applied to the qualitative field and a non-aggregated filter.
  • Context Filter: These filters are used to define a context to your data, creating a temporary subset of data based on the filter conditions.
  • Measure Filter: These filters can be used in performing different aggregation functions. They are applied to quantitative fields.
  • Table Calculation Filter: These filters are used to view data without filtering any hidden data. They are applied after the view has been created.

79. What are Sets and Groups in Tableau?

The difference between Sets and Groups in Tableau are as follows:

Sets

  • Sets are used to build custom data subsets based on predefined conditions or standards.
  • They give you the ability to dynamically segment your data, which facilitates the analysis and visualization of particular subsets.
  • Sets can be categorical or numeric and can be built from dimensions or measures. They are flexible tools that let you compare subsets, highlight certain data points, or perform real-time calculations.

Groups

  • Groups are used to combine people (dimension values) into higher level categories.
  • They do this by grouping comparable values into useful categories, which simplifies complex data.
  • Group members are fixed and do not alter as a result of the data since groups are static. Groups, which are typically constructed from dimensions, are crucial for classifying and labeling data points.

80. Explain the different types of charts available in Tableau with their significance.

Tableau offers a wide range of charts and different visualizations to help users explore and present the data effectively. Some of the charts in Tableau are:

  • Bar Chart: They are useful for comparing categorical data and can be used show the distribution of data across categories or to compare value between categories.
  • Line Chart: Line chart are excellent for showing trends and changes over time. They are commonly used for time series data to visualize how single measure changes over time.
  • Area Chart: They are same as line chart but the area under the line is colored in area chart. They are used with different multiple variables in data to demonstrate the differences between the variables.
  • Pie Chart: It shows parts of a whole. They are useful for illustrating the distribution of data where each category corresponds to a share of the total.
  • Tree Maps: They show hierarchical data as nested rectangles. They are helpful for illustrating hierarchical structures, such as organizational or file directories.
  • Bubble chart: Bubble charts are valuable for visualizing and comparing data points with three different attributes. They are useful when you want to show relationships, highlight data clusters, etc.
  • Scatter Plot: They are used to display the relationship between two continuous variables. They help find correlations, clusters or outliers in the data.
  • Density Map: Density maps are used to represent the distribution and concentration of data points or values within a 2D space.
  • Heat Map: Heat maps are used to display data on a grid, where color represents values. They are useful for visualizing large datasets and identifying patterns.
  • Symbol Map: Symbol maps are used to represent geographic data by placing symbols or markers on a map to convey information about specific locations.
  • Gannt Chart: Gantt charts are used for project management to visualize tasks, their durations, and dependencies over time.
  • Bullet Graph: They are used for tracking progress towards a goal. They provide a compact way to display a measure, target and performance ranges.
  • Box Plot(Box and Whisker) : They are used to display the distribution of data and identify outliers. They show median, quartiles, and potential outliers.

81. How can you create a map in Tableau?

The key steps to create a map in Tableau are:

  • Open your tableau workbook and connect to a data source containing geographic information.
  • Drag the relevant geographic dimensions onto the "Rows" and "Columns" shelves.
  • Use a marks card to adjust marker shapes, colour and sizes. Apply size encoding and color based on the data values.
  • Add background images, reference lines, or custom shapes to enhance the map, optionally.
  • Save and explore your map by zooming, panning and interacting with map markers. Use it to analyze the spatial data, identify trends and gain insights from the data.

82. How can we create a doughnut chart in Tableau?

The key steps to create a doughnut chart in tableau:

  • Build a pie chart using your dimension and measure.
  • Duplicate the sheet, then combine both as a Dual Axis chart.
  • Synchronize the axes so both pies share the same scale.
  • On the second pie, create a blank circle (remove labels/headers), set its opacity to 0%, and set its color to transparent/white to form the doughnut "hole."
  • Adjust size and formatting for a clean, readable result.

83. How can we create a Dual-axis chart in Tableau?

The key steps to create a dual-axis chart in tableau are as follows:

  • Connect with the data source. Create a chart by dragging and dropping the dimension and measure into "column" and "rows" shelf, respectively.
  • Duplicate the chart by right click on the chart and select "Duplicate". This will create the duplicate of the chart.
  • In the duplicated chart, change the measure you want to display by dragging the new measure to the "columns" or "rows" shelf, replacing the existing measure.
  • In the second chart, assign the measure to different axis by clicking on the "dual-axis". This will create two separate axes on the chart.
  • Right click on one of the axes and select "synchronize axis". Adjust formatting, colors and labels as needed. You now have a dual-axis chart.

84. What is a Gantt Chart in Tableau?

  • A Gantt Chart has horizontal bars and sets out on two axes.
  • The tasks are represented by Y-axis, and the time estimates are represented by the X-axis.
  • Gantt Chart is a visual representation of project schedules, timelines or task durations. To illustrate tasks, their start and end dates, and their dependencies, this common form of chat is used in project management.
  • Gantt charts are a useful tool in tableau for tracking and analyzing project progress and deadlines since you can build them using a variety of dimensions and measures.

85. What is the Difference Between Treemaps and Heat Maps?

Treemaps and Heat Maps are both data visualization techniques used to represent large datasets, but they differ in how they display information.

Treemap

  • Displays data as nested rectangles.
  • The size of each rectangle represents a quantitative value.
  • The color can represent another measure or category.
  • Best for visualizing part-to-whole relationships and hierarchical data.
  • Goal: Compare the proportion of categories within a whole.

Heat Map

  • Displays data in a grid or matrix.
  • Uses color intensity to represent the magnitude of values.
  • Rectangle sizes remain the same; only the color changes.
  • Best for identifying patterns, trends, and high/low values.
  • Goal: Highlight value variations using colors.

86. What is the blended axis in Tableau?

When two measures share the same scale, they can be combined onto a single, shared axis using a blended axis — useful for direct comparison. If the two measures have very different scales, however, using a blended axis can create a misleading impression of their relative trends.

87. What is the Level of Detail (LOD) Expression in Tableau?

A Level of Detail Expression is a powerful feature that allows you to perform calculations at various levels of granularity within your data visualization regardless of the visualization's dimensions and filters.

  • Fixed LOD: The calculation remains fixed at a specified level of detail, regardless of dimensions or filters in the view.
  • Include LOD: The calculation considers the specified dimensions and any additional dimensions in the view.
  • Exclude LOD: The calculation excludes the specified dimensions from the view's context.

88. How to handle Null, incorrect data types and special values in Tableau?

Handling null values, erroneous data types, and unusual values is an important element of Tableau data preparation. The following are some popular strategies and recommended practices for coping with data issues:

  • NULLs: Filter them out (right-click the field → Filter → exclude nulls), or use ZN()/IFNULL() in calculated fields to substitute a value.
  • Incorrect data types: Adjust data types in the Data pane, use calculated fields, or use Tableau's Data Interpreter.
  • Special values: Use data transformation tools (split, replace), calculated fields, or data blending as needed.

89. How can we create a Dynamic webpage in Tableau?

To create dynamic webpages with interactive tableau visualizations, you can embed tableau dashboard or report into a web application or web page. It provides embedding options and APIs that allows you to integrate tableau content into a web application.

  • Go to the dashboard and click the webpage option in the 'Objects'.
  • In the dialog box that displays, don't enter a URL and then click 'OK'.
  • choose 'Action' by clicking on the dashboard menu. Click on the 'Add Action' in action and select 'Go to URL' .
  • Enter the 'URL' of the webpage and click on the arrow next to it. Click 'OK'.

90. What are the KPI or Key Performance Indicators in Tableau?

Key Performance Indicators or KPI are the visual representations of the significant metrics and performance measurements that assist organizations in monitoring their progress towards particular goals and objectives. KPIs offer a quick and simple approach to evaluate performance, spot patterns, and make fact-based decisions.

91. what is a context filter in Tableau?

Context filter is a feature that allows you to optimize performance and control data behavior by creating a temporary data subset based on a selected filter.

When you designate a filter as a context filter, tableau creates a smaller temporary table containing only the data that meets the criteria of that particular filter.

This decrease in data capacity considerably accelerates processing and rendering for visualization, which is especially advantageous for huge datasets.

When handling several filters in a workbook, context filters are useful because they let you select the order in which filters are applied, ensuring a sensible filtering process.

92.How can you create a dynamic title in a Tableau worksheet?

You can create a dynamic title for a worksheet by using parameters, calculated fields and dashboards. Here are some steps to achieve this:

  • Creating a Parameter: Go to data pane, right click on it and select "Create Parameter". Choose the data type for the parameter.
  • Create a calculated field: Now create a calculated field that will be used to display the dynamic title.Create a new worksheet. Drag and drop the calculated field you created in the "Title" shelf of the worksheet.
  • Create a Dashboard: Go to the "dashboard" and add a parameter control and connect it to the worksheet and then select parameter control in the dashboard. This will allow the parameter control to change parameter value dynamically. 

93. What is data source filtering, and how does it impact performance?

Data Source filtering is a method used in reporting and data analysis applications like Tableau to limit the quantity of data obtained from a data source based on predetermined constraints or criteria.

  • It affects performance by lowering the amount of data that must be sent, processed, and displayed, which may result in a quicker query execution time and better visualization performance.
  • It involves applying filters or conditions at the data source level, often within

To link R and Tableau, we can use R integration features provided by Tableau. Here are the steps to do so:

  • Install R, then install and start the Rserve package (install.packages("Rserve")).
  • In Tableau Desktop, go to Help → Settings and Performance → Manage External Service Connection.
  • Under External Service, select "R integration," enter the server host/port/credentials, and test the connection.

95. How do you export Tableau visualizations to other formats, such as PDFs or images?

Exporting tableau visualizations to other formats such as PDF or images, is a common task for sharing or incorporating your visualizations into reports or presentations. Here are the few steps to do so:

  • Open the tableau workbook and select the visualization you want to export.
  • Go to the "File" menu, select "Export".
  • After selecting "Export" a sub menu will appear with various export options. Choose the format you want to export to. (PDF, image, etc.,)
  • Depending on the chosen export format, you may have some configuration options that you can change according to the needs.
  • Specify the directory or the folder where you want to save the exported fie and name it.
  • Once the settings are configured, click on "save" or "Export".
Comment