0% found this document useful (0 votes)
5 views19 pages

Module Wise Interview Guide Python

Uploaded by

Krishan Pal
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views19 pages

Module Wise Interview Guide Python

Uploaded by

Krishan Pal
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module Wise Interview Guide: Python

Programming (Detailed Answers)

MODULE 01: Python Installation & Setup


Q1. What is Python?
Python is a high-level, interpreted, and general-purpose programming
language. It is known for its simple syntax and readability. Python
supports multiple programming paradigms including procedural and
object-oriented programming. It is widely used in data science, web
development, automation, and AI. Its large community provides extensive
libraries and support.
Q2. Why is Python popular?
Python is popular due to its easy syntax and versatility. It allows faster
development with fewer lines of code. Python has extensive libraries and
frameworks. It is platform-independent and open-source. These features
make it suitable for beginners and professionals.
Q3. How do you install Python on Windows?
Python is installed by downloading it from the official website. During
installation, the option to add Python to PATH should be selected. After
installation, it can be verified using the command prompt. The installer
includes pip and IDLE. This makes setup simple for beginners.
Q4. What is PATH in Python installation?
PATH is an environment variable that allows the system to locate Python
from the command line. Adding Python to PATH enables running Python
commands globally. Without PATH, Python must be accessed using its full
directory. It simplifies development. It is recommended during installation.
Q5. What is IDLE?
IDLE is Python’s built-in development environment. It provides an
interactive shell and script editor. IDLE supports syntax highlighting and
debugging. It is mainly used by beginners. It helps in learning Python
basics easily.
Q6. What is pip?
pip is Python’s package manager used to install external libraries. It
downloads packages from the Python Package Index. pip simplifies
dependency management. It is included by default with Python. It is
widely used in development.
Q7. What is Python Interpreter?
The Python interpreter executes Python code line by line. It converts high-
level code into machine-readable form. Errors are detected during
execution. This makes debugging easier. Python is known as an interpreted
language because of this.
Q8. What are Python versions?
Python has two major versions: Python 2 and Python 3. Python 3 is the
latest and recommended version. Python 2 is no longer supported. New
libraries support Python 3 only. Hence Python 3 is preferred.
Q9. How do you check Python version?
The Python version can be checked using the command python --version.
This command shows the installed version. It helps verify correct
installation. Version checking avoids compatibility issues. It is a basic
troubleshooting step.
Q10. What are Python IDEs?
Python IDEs are tools used to write and run Python programs. Examples
include IDLE, PyCharm, VS Code, and Jupyter Notebook. IDEs provide
debugging and auto-completion. They improve productivity. Different
IDEs suit different purposes.

MODULE 02: Operators in Python


Q1. What are operators in Python?
Operators are symbols that perform operations on variables and values.
They help in calculations and comparisons. Python supports multiple
operator types. Operators form expressions. They are essential for logic
and computation.
Q2. What are arithmetic operators?
Arithmetic operators perform mathematical calculations. Python supports
addition, subtraction, multiplication, division, modulus, and
exponentiation. These operators work on numeric data. They are
commonly used in formulas. Arithmetic operators are basic building
blocks.
Q3. What is division operator?
The division operator divides one number by another. It always returns a
float value. Python also supports floor division. Division is used in
mathematical computations. It is represented by /.
Q4. What is modulus operator?
The modulus operator returns the remainder of division. It is represented
by %. It is useful for checking even or odd numbers. Modulus is also used
in loops. It plays an important role in logic building.
Q5. What are comparison operators?
Comparison operators compare two values. They return True or False.
Examples include ==, !=, >, and >=. They are used in conditions.
Comparison operators help in decision-making.
Q6. What are logical operators?
Logical operators combine multiple conditions. Python provides and, or,
and not operators. They work with Boolean values. Logical operators
control program flow. They are widely used in if statements.
Q7. What is assignment operator?
Assignment operators assign values to variables. The basic operator is =.
Python also supports compound assignments. These operators update
values efficiently. They reduce code length.
Q8. What are compound assignment operators?
Compound assignment operators include +=, -=, *=, and /=. They combine
arithmetic and assignment. They simplify expressions. These operators
improve readability. They are frequently used in loops.
Q9. What is operator precedence?
Operator precedence determines the order of evaluation. Some operators
execute before others. It follows mathematical rules. Parentheses can
change precedence. Understanding precedence avoids logical errors.
Q10. What are bitwise operators?
Bitwise operators perform operations on bits. Examples include &, |, and
^. They are used in low-level programming. Bitwise operations are fast.
They are less common but powerful.
MODULE 03: Data Types in Python
Q1. What are data types in Python?
Data types specify the kind of value a variable stores. Python is
dynamically typed. The data type is assigned at runtime. Data types help
Python manage memory. They define valid operations.
Q2. What are numeric data types?
Numeric data types represent numbers. Python supports int, float, and
complex. Integers store whole numbers. Floats store decimal values.
Complex numbers are used in advanced mathematics.
Q3. What is int data type?
The int data type stores whole numbers. It supports positive and negative
values. Integers have unlimited precision. They are commonly used in
counting. int is widely used in programs.
Q4. What is float data type?
Float stores decimal numbers. It is used for precise calculations. Float
values are represented in decimal format. They are used in scientific
computations. Floating-point arithmetic has limitations.
Q5. What is complex data type?
Complex numbers consist of real and imaginary parts. They are written as
a+bj. Python supports complex arithmetic. They are used in engineering
fields. Complex data type is rarely used in basics.
Q6. What are sequence data types?
Sequence data types store ordered collections. Examples include strings,
lists, and tuples. They support indexing and slicing. Sequences allow
iteration. They are widely used.
Q7. What is string data type?
Strings store textual data. They are immutable in nature. Strings support
slicing and methods. They are enclosed in quotes. Strings are used for text
processing.
Q8. What is list data type?
Lists store ordered and mutable data. They can store mixed data types.
Lists support many built-in methods. They are widely used. Lists allow
dynamic modification.
Q9. What is tuple data type?
Tuples are ordered but immutable collections. Once created, they cannot
be modified. Tuples are faster than lists. They use less memory. Tuples are
used for fixed data.
Q10. What is Boolean data type?
Boolean data type stores True or False values. It is used in conditions.
Boolean values result from comparisons. They control program flow.
Boolean is essential in decision-making.

MODULE 04: Conditional Statements


Q1. What are conditional statements in Python?
Conditional statements are used to make decisions in a program. They
execute different code blocks based on conditions. Conditions evaluate to
True or False. They control program flow. They are fundamental in logic
building.
Q2. What is an if statement?
An if statement executes code when a condition is true. If the condition is
false, the block is skipped. It is the simplest conditional statement. It
improves decision-making. It is widely used in programs.
Q3. What is an else statement?
The else statement executes when the if condition is false. It provides an
alternate execution path. It ensures completeness in decision logic. else is
optional. It improves clarity in conditions.
Q4. What is an elif statement?
elif stands for else-if. It is used to check multiple conditions. Conditions
are evaluated sequentially. Only one block executes. It avoids deep
nesting.
Q5. What is a nested if statement?
Nested if means an if inside another if. It is used for multi-level decisions.
Conditions depend on previous checks. It increases complexity. Proper
indentation is required.
Q6. What is a conditional expression (ternary operator)?
A conditional expression allows decision-making in one line. It improves
code compactness. Used for simple conditions. It enhances readability.
Also called ternary operator.
Q7. What is indentation in Python?
Indentation defines code blocks in Python. It replaces braces used in other
languages. Incorrect indentation causes errors. It improves readability.
Python strictly enforces it.
Q8. What are relational conditions?
Relational conditions use comparison operators. They compare values.
They return Boolean results. Used in if statements. They control decision
flow.
Q9. Can conditions be combined in Python?
Yes, conditions can be combined using logical operators. Operators like
and, or, not are used. Combined conditions create complex logic. They
improve flexibility. Commonly used in real programs.
Q10. Why are conditional statements important?
Conditional statements make programs dynamic. They allow different
outputs for inputs. They control execution paths. Almost every application
uses them. They are core concepts.

MODULE 05: Looping Statements


Q1. What is looping in Python?
Looping is a technique used to execute a block of code repeatedly. It helps
reduce code duplication and automates repetitive tasks. Loops are
commonly used in data processing and iteration. Python mainly provides
for and while loops. Looping improves efficiency and readability.
Q2. What is a for loop in Python?
A for loop is used to iterate over a sequence such as a list, tuple, string, or
range. It executes the loop body once for each element. The number of
iterations is usually known in advance. For loops are simple and easy to
understand. They are widely used in Python programs.
Q3. What is the range() function?
The range() function generates a sequence of numbers. It is commonly
used with for loops. It can take start, stop, and step values. The range
function is memory efficient. It is mostly used for controlled looping.
Q4. What is a while loop?
A while loop executes a block of code as long as a condition remains true.
It is used when the number of iterations is not known beforehand. The
condition is checked before each iteration. Improper conditions can cause
infinite loops. Careful condition handling is required.
Q5. What is the break statement?
The break statement terminates the loop immediately. It stops further
iterations even if the condition is true. It is usually used with conditional
checks. Break improves efficiency by avoiding unnecessary looping. It
gives better control over loops.
Q6. What is the continue statement?
The continue statement skips the current iteration of the loop. Control
moves to the next iteration immediately. It is useful when certain
conditions need to be skipped. Continue helps simplify logic. It improves
loop flexibility.
Q7. What is the pass statement?
The pass statement is a null statement in Python. It performs no action. It
is used as a placeholder where a statement is syntactically required. Pass
avoids syntax errors. It is helpful during program development.
Q8. What are nested loops?
Nested loops are loops inside another loop. They are used when working
with multi-dimensional data. Each iteration of the outer loop triggers the
inner loop. Nested loops increase complexity. They are commonly used in
matrix operations.
Q9. What is an infinite loop?
An infinite loop is a loop that never ends. It occurs when the loop
condition always remains true. Infinite loops can freeze programs. They
are usually caused by logical errors. Proper conditions prevent infinite
loops.
Q10. Why are loops important in Python?
Loops reduce repetition in code. They automate repetitive tasks efficiently.
Loops are essential for data traversal and processing. Almost all real-world
programs use loops. They are a fundamental programming concept.

MODULE 06: Lists in Python


Q1. What is a list in Python?
A list is an ordered and mutable collection of elements. It can store
multiple values of different data types. Lists are created using square
brackets. They support indexing and slicing. Lists are one of the most
commonly used data structures in Python.
Q2. How do you create a list?
A list is created by placing elements inside square brackets separated by
commas. An empty list can also be created. Lists can contain mixed data
types. Nested lists are allowed. List creation is simple and flexible.
Q3. What is list indexing?
List indexing is used to access elements using their position. Indexing
starts from zero. Negative indexing accesses elements from the end. It
retrieves a single element at a time. Indexing is fast and efficient.
Q4. What is list slicing?
List slicing is used to extract a portion of a list. It uses start and end index
values. The original list remains unchanged. Slicing helps in working with
subsets of data. It improves flexibility in data handling.
Q5. What is append() method?
The append() method adds a single element at the end of a list. It modifies
the original list. It is commonly used to grow lists dynamically. append()
accepts only one argument. It is simple and efficient.
Q6. What is extend() method?
The extend() method adds multiple elements to a list. It appends elements
from another list or sequence. The original list is modified. It is faster than
adding elements one by one. extend() improves efficiency.
Q7. What is insert() method?
The insert() method adds an element at a specified index. Existing
elements are shifted to the right. It allows precise placement of elements. It
modifies the list. insert() provides positional control.
Q8. What is remove() method?
The remove() method deletes the first occurrence of a specified value. The
value must exist in the list. It modifies the original list. If the value is not
found, an error occurs. It is used for selective deletion.
Q9. What is sort() method?
The sort() method arranges list elements in ascending or descending order.
It modifies the list directly. Sorting works on comparable elements. It
helps organize data. Sorting improves readability and analysis.
Q10. What is list comprehension?
List comprehension provides a concise way to create lists. It combines
loops and conditions in a single line. It improves code readability. It is
often faster than traditional loops. It is widely used in Python.

MODULE 07: Tuples in Python


Q1. What is a tuple?
A tuple is an ordered and immutable collection of elements. Once created,
its elements cannot be changed. Tuples use less memory than lists. They
are faster to access. Tuples are used for fixed data.
Q2. How do you create a tuple?
Tuples are created using parentheses with comma-separated values. A
single-element tuple requires a trailing comma. Tuples can contain mixed
data types. Nested tuples are allowed. Creation is simple.
Q3. What is tuple indexing?
Tuple indexing accesses elements using their position. Indexing starts from
zero. Negative indexing is supported. Tuples also allow slicing. Indexing
provides fast access.
Q4. What are tuple methods?
Tuples support limited methods because they are immutable. The main
methods are count() and index(). count() returns frequency of an element.
index() returns the position of an element. These methods are simple and
useful.
Q5. What is tuple slicing?
Tuple slicing extracts a portion of a tuple. It uses start and end indices. The
result is a new tuple. Original tuple remains unchanged. Slicing is useful
for partial data access.
Q6. What is tuple unpacking?
Tuple unpacking assigns tuple elements to multiple variables. The number
of variables must match elements. It improves code readability. Commonly
used in function returns. It reduces code length.
Q7. Difference between list and tuple?
Lists are mutable, while tuples are immutable. Lists use more memory.
Tuples are faster and safer. Lists have more built-in methods. Choice
depends on use case.
Q8. Can tuples store mixed data types?
Yes, tuples can store mixed data types. They can hold integers, strings, and
even lists. Order of elements is preserved. This makes tuples flexible. Data
remains protected due to immutability.
Q9. Are tuples hashable?
Tuples are hashable if all elements are immutable. They can be used as
dictionary keys. Lists are not hashable. Hashing improves lookup speed.
This makes tuples useful in mappings.
Q10. Where are tuples commonly used?
Tuples are used to return multiple values from functions. They store
constant data. Used as dictionary keys. Applied in configuration settings.
They ensure data integrity.

MODULE 08: Dictionary in Python


Q1. What is a dictionary in Python?
A dictionary is a mutable data structure that stores data in key–value pairs.
Each key is unique and used to access its value. Dictionaries are unordered
in concept but preserve insertion order in modern Python. They provide
fast data retrieval. Dictionaries are widely used to represent structured
data.
Q2. How do you create a dictionary?
A dictionary is created using curly braces with key–value pairs separated
by colons. Keys must be immutable, while values can be of any type. An
empty dictionary can also be created. Dictionaries can store mixed data
types. Creation is simple and flexible.
Q3. How do you access values in a dictionary?
Dictionary values are accessed using their keys. The get() method is safer
because it avoids errors if a key does not exist. Direct key access may raise
an error. Dictionary lookup is fast. It is commonly used in data processing.
Q4. What are common dictionary methods?
Common dictionary methods include keys(), values(), items(), get(), and
update(). These methods help in accessing and modifying data. They
simplify dictionary operations. Dictionary methods support iteration. They
improve code efficiency.
Q5. What is the update() method?
The update() method adds new key–value pairs or modifies existing ones.
It can also merge another dictionary. If a key already exists, its value is
overwritten. The original dictionary is modified. update() is useful for bulk
updates.
Q6. What is dictionary comprehension?
Dictionary comprehension provides a concise way to create dictionaries. It
uses expressions and loops in a single line. It improves readability and
performance. It is faster than traditional loops. It is useful in data
transformation.
Q7. Are dictionary keys unique?
Yes, dictionary keys must be unique. If duplicate keys are used, the last
value overwrites the previous one. This ensures one-to-one mapping. Key
uniqueness avoids ambiguity. It maintains data integrity.
Q8. Are dictionaries ordered in Python?
In modern Python versions, dictionaries preserve insertion order. Earlier
versions were unordered. Order preservation improves iteration
consistency. It helps in predictable output. This feature is widely used.
Q9. Difference between list and dictionary?
Lists store ordered elements accessed by index. Dictionaries store data
accessed by keys. Dictionary lookup is faster. Lists are suitable for
sequences. Choice depends on data structure needs.
Q10. Where are dictionaries used?
Dictionaries are used in JSON data, APIs, and configuration files. They
represent real-world entities. Used in databases and mappings. Fast access
makes them popular. They are essential in Python programming.

MODULE 09: Random Module in Python


Q1. What is the random module?
The random module is a built-in Python module used to generate random
numbers. It supports random integers, floats, and selections. It is used in
games and simulations. The module provides pseudo-random values. It is
part of the standard library.
Q2. What does the random() function do?
The random() function returns a floating-point number between 0 and 1.
The value includes 0 but excludes 1. It is commonly used in probability-
based programs. Results are unpredictable. It is useful in simulations.
Q3. What is randint() function?
The randint() function generates a random integer between two given
numbers. Both limits are included. It is commonly used in games and
testing. It returns an integer value. It is easy to use.
Q4. What is randrange() function?
The randrange() function returns a randomly selected number from a
range. It works similarly to the range() function. It supports step values. It
is memory efficient. It is used in loops and sampling.
Q5. What is choice() function?
The choice() function selects a random element from a sequence. It works
with lists, tuples, and strings. It is used in random sampling. It improves
randomness. Common in game logic.
Q6. What is shuffle() function?
The shuffle() function randomly rearranges the elements of a list. It
modifies the original list. It is used in card games and simulations. It
ensures randomness. It works only on mutable sequences.
Q7. What is seed() function?
The seed() function initializes the random number generator. It allows
repeatable results. Same seed produces the same sequence. It is useful for
testing. It controls randomness behavior.
Q8. Are random numbers truly random?
Random numbers generated by Python are pseudo-random. They are
produced by algorithms. With the same seed, results are predictable. They
are sufficient for most applications. True randomness requires hardware
sources.
Q9. Where is the random module used?
The random module is used in games, simulations, and machine learning.
It is used in sampling techniques. Helpful in testing programs. Used in
probability models. Adds variability to programs.
Q10. Why is the random module important?
The random module introduces unpredictability. It helps simulate real-
world scenarios. It avoids bias in sampling. Used in many domains. It is
essential for probabilistic applications.

MODULE 10: NumPy


Q1. What is NumPy?
NumPy is a Python library used for numerical and scientific computing. It
provides support for multi-dimensional arrays and matrices. NumPy is
faster than Python lists. It includes many mathematical functions. It is
widely used in data science and machine learning.
Q2. What is a NumPy array?
A NumPy array is a collection of elements of the same data type. It is
stored in contiguous memory. Arrays support fast mathematical operations.
They are more efficient than lists. NumPy arrays are called ndarrays.
Q3. How do you create a NumPy array?
A NumPy array is created using the array() function. Python lists or tuples
are passed as input. Arrays can be one-dimensional or multi-dimensional.
Creation is fast and simple. Arrays support vectorized operations.
Q4. What is array indexing in NumPy?
Array indexing is used to access elements of an array. Indexing starts from
zero. NumPy supports multi-dimensional indexing. Negative indexing is
allowed. It helps retrieve specific values efficiently.
Q5. What is array slicing in NumPy?
Array slicing extracts a subset of an array. It uses start and end indices.
Slicing does not copy data. It is memory efficient. Slicing is commonly
used in data analysis.
Q6. What are basic mathematical operations in NumPy?
NumPy supports element-wise addition, subtraction, multiplication, and
division. These operations are faster than loops. Broadcasting allows
operations on different shapes. Mathematical functions are optimized. This
improves performance.
Q7. What is broadcasting in NumPy?
Broadcasting allows NumPy to perform operations on arrays of different
shapes. Smaller arrays are stretched logically. It avoids explicit loops.
Broadcasting improves speed. It simplifies code structure.
Q8. What is reshape() function?
The reshape() function changes the shape of an array. The total number of
elements remains unchanged. It is used to convert data structures.
reshape() does not modify data values. It is useful in machine learning.
Q9. What are common NumPy statistical functions?
NumPy provides functions like sum(), mean(), median(), and std(). These
functions perform fast statistical calculations. They operate on arrays.
They are widely used in EDA. They simplify numerical analysis.
Q10. Why is NumPy important?
NumPy improves computation speed. It efficiently handles large datasets.
Many libraries depend on NumPy. It supports scientific computing. It is a
core library in Python.

MODULE 11: Pandas


Q1. What is Pandas?
Pandas is a Python library used for data manipulation and analysis. It
provides flexible data structures. Pandas simplifies data cleaning. It is built
on NumPy. It is widely used in data science.
Q2. What is a Series in Pandas?
A Series is a one-dimensional labeled data structure. It can store any data
type. Each value has an index. Series support vectorized operations. It is
similar to a column in a table.
Q3. What is a DataFrame?
A DataFrame is a two-dimensional data structure. It stores data in rows
and columns. DataFrames can handle mixed data types. They are similar to
spreadsheets. DataFrames are core Pandas objects.
Q4. How do you create a DataFrame?
A DataFrame can be created from dictionaries, lists, or files. The
DataFrame() function is used. Data can also be read from CSV files.
Creation is flexible. It supports structured data.
Q5. What is read_csv() function?
The read_csv() function reads CSV files into a DataFrame. It handles large
datasets efficiently. It supports many parameters. It is widely used in data
loading. It simplifies file handling.
Q6. What are head() and tail() functions?
The head() function displays the first few rows of data. The tail() function
displays the last few rows. They help preview datasets. Default output is
five rows. They are useful in EDA.
Q7. What is info() function?
The info() function provides a summary of the DataFrame. It shows
column names and data types. It displays non-null counts. It shows
memory usage. It is useful for data inspection.
Q8. What is filtering in Pandas?
Filtering is selecting data based on conditions. It uses Boolean
expressions. It extracts required rows. Filtering improves data analysis. It
is a common operation.
Q9. What is groupby() function?
The groupby() function groups data based on column values. It performs
aggregation operations. Used for summarization. It is powerful for
analysis. Widely used in reports.
Q10. Why is Pandas important?
Pandas simplifies data handling. It speeds up analysis. It integrates with
NumPy. Used in real-world projects. It is essential for data analysis.

MODULE 12: Matplotlib


Q1. What is Matplotlib?
Matplotlib is a Python library for data visualization. It creates plots and
charts. Used for exploratory data analysis. Supports static visuals. Widely
used in data science.
Q2. What is a line plot?
A line plot displays data points connected by lines. It shows trends over
time. Common in time series analysis. Simple and effective. Frequently
used in reports.
Q3. What is a bar plot?
A bar plot compares different categories. It displays rectangular bars.
Useful for comparison. Easy to interpret. Widely used in visualization.
Q4. What is a scatter plot?
A scatter plot shows the relationship between two variables. Each point
represents a value. Used to identify correlation. Common in machine
learning. Easy to understand.
Q5. What is a histogram?
A histogram represents data distribution. It groups data into bins. Used to
analyze frequency. Helps detect skewness. Common in EDA.
Q6. What is xlabel() function?
The xlabel() function labels the x-axis. It improves readability. Provides
context to plots. Used in visualization. Enhances interpretation.
Q7. What is ylabel() function?
The ylabel() function labels the y-axis. It describes the values plotted.
Improves clarity. Essential for understanding graphs. Commonly used.
Q8. What is title() function?
The title() function adds a title to the plot. It explains what the plot
represents. Improves presentation. Used in reports. Important for clarity.
Q9. What is legend() function?
The legend() function explains plot elements. Used when multiple datasets
are plotted. Improves clarity. Avoids confusion. Helpful in comparisons.
Q10. Why is Matplotlib important?
Matplotlib helps visualize data. It makes patterns visible. Supports data
analysis. Used in EDA and reports. Essential for insights.

MODULE 13: Exploratory Data Analysis (EDA)


Q1. What is Exploratory Data Analysis (EDA)?
Exploratory Data Analysis is the process of analyzing datasets to
understand their main characteristics. It uses summary statistics and
visualizations. EDA helps identify patterns and trends. It also detects
anomalies and errors. EDA is performed before modeling.
Q2. Why is EDA important?
EDA improves understanding of data structure. It helps detect missing
values and outliers. EDA guides feature selection. It improves data quality.
It leads to better model performance.
Q3. What are missing values?
Missing values are absent or undefined data entries. They occur due to
data collection issues. Missing values affect analysis accuracy. They must
be handled properly. Common in real datasets.
Q4. How do you handle missing values?
Missing values can be removed or filled. Mean, median, or mode can be
used for imputation. Choice depends on data type. Pandas provides built-in
methods. Proper handling improves results.
Q5. What are outliers?
Outliers are extreme values different from other observations. They may
result from errors or variability. Outliers distort analysis. They affect
statistical results. They must be detected carefully.
Q6. What is a box plot?
A box plot is a graphical representation of data distribution. It shows
quartiles and median. It helps detect outliers. Commonly used in EDA.
Simple and effective visualization.
Q7. What are summary statistics?
Summary statistics describe data numerically. They include mean, median,
mode, and standard deviation. They provide an overview of the dataset.
Used in EDA. Help understand data behavior.
Q8. What is data distribution?
Data distribution shows how values are spread. It indicates skewness and
spread. Histograms are commonly used. Understanding distribution helps
modeling. It guides transformations.
Q9. What is correlation?
Correlation measures the relationship between variables. It ranges from -1
to +1. Positive values indicate direct relation. Negative values indicate
inverse relation. Used in feature selection.
Q10. Why is EDA required before machine learning?
EDA ensures clean and meaningful data. It avoids poor model inputs. It
helps choose appropriate algorithms. Improves prediction accuracy. It is a
critical preprocessing step.

MODULE 14: Descriptive Data Analysis


Q1. What is descriptive data analysis?
Descriptive data analysis summarizes historical data. It explains what has
happened. Uses statistical measures. It provides meaningful insights. It is
the foundation of data analytics.
Q2. What is mean?
Mean is the average of all data values. It is calculated by dividing sum by
count. Mean is sensitive to outliers. It is commonly used. It represents
central tendency.
Q3. What is median?
Median is the middle value of a dataset. It is not affected by extreme
values. Median is useful for skewed data. It represents central position. It
is widely used.
Q4. What is mode?
Mode is the most frequently occurring value. It is useful for categorical
data. A dataset can have multiple modes. Mode shows popularity. It is easy
to calculate.
Q5. What is range?
Range is the difference between maximum and minimum values. It shows
data spread. It is a simple variability measure. Sensitive to extreme values.
Easy to compute.
Q6. What is variance?
Variance measures how far values spread from the mean. It uses squared
deviations. Larger variance means more spread. Used in statistics.
Important variability measure.
Q7. What is standard deviation?
Standard deviation is the square root of variance. It measures data
dispersion. It is easier to interpret than variance. Widely used in analysis.
Shows consistency of data.
Q8. Why is data visualization important?
Visualization converts data into graphical form. It makes patterns easy to
understand. Reduces complexity. Helps in decision-making. Essential in
data analysis.
Q9. Difference between descriptive and inferential analysis?
Descriptive analysis summarizes existing data. Inferential analysis predicts
future outcomes. Descriptive uses complete data. Inferential uses samples.
Both serve different purposes.
Q10. Why is descriptive analysis important?
It provides a clear overview of data. Helps understand trends and patterns.
Supports business decisions. Forms the base for advanced analysis. Used
in all domains.

You might also like