0% found this document useful (0 votes)
9 views53 pages

Software Testing and Data Science Basics

The document contains a series of objective questions and answers related to software testing, debugging, and data science fundamentals. It covers topics such as the purpose of software testing, productivity in software engineering, quality in software, and various statistical concepts. Additionally, it includes descriptive questions on data science processes and challenges.

Uploaded by

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

Software Testing and Data Science Basics

The document contains a series of objective questions and answers related to software testing, debugging, and data science fundamentals. It covers topics such as the purpose of software testing, productivity in software engineering, quality in software, and various statistical concepts. Additionally, it includes descriptive questions on data science processes and challenges.

Uploaded by

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

SUBJECT CODE: 23UAD03 SUBJECT TITLE: Fundamentals of

Data Science
1 The main purpose of software testing is to

(a) Verify code correctness

(b) Improve documentation

(c) Train users

(d) Replace debugging

Answer a

2 Productivity in software engineering refers to

(a) The efficiency of producing quality software

(b) The number of errors in code

(c) The speed of hardware

(d) The size of the team

Answer b

3 Quality in software means

(a) Code runs without syntax errors

(b) Software meets customer requirements

(c) Software looks attractive

(d) Program executes slowly

Answer c

4 Testing focuses on

(a) Finding defects

(b) Avoiding tests

(c) Removing code

(d) Installing software

Answer d

5 Debugging focuses on

(a) Detecting errors

(b) Removing errors


(c) Avoiding documentation

(d) Designing interfaces

Answer a

6 Testing vs Debugging – Testing is to find defects, Debugging is to

(a) Ignore them

(b) Remove them

(c) Record them

(d) Postpone them

Answer b

A testing model defines


7
(a) The structure and process of testing activities

(b) The development cost

(c) The design architecture

(d) The coding pattern

Answer c

8 The V-Model of testing relates testing stages to

(a) Design stages

(b) Debugging

(c) Documentation

(d) Prototyping

Answer d

9 A software bug is

(a) A defect in code or logic

(b) A type of virus

(c) A testing tool

(d) A hardware error

Answer a

10 Syntax bugs occur due to


(a) Grammar mistakes in code

(b) Logic failure

(c) Hardware errors

(d) Wrong data entry

Answer b

11 The main purpose of software testing is to

(a) Verify code correctness

(b) Improve documentation

(c) Train users

(d) Replace debugging

Answer c

12 Productivity in software engineering refers to

(a) The efficiency of producing quality software

(b) The number of errors in code

(c) The speed of hardware

(d) The size of the team

Answer d

13 Quality in software means

(a) Code runs without syntax errors

(b) Software meets customer requirements

(c) Software looks attractive

(d) Program executes slowly

Answer a

14 Testing focuses on

(a) Finding defects

(b) Avoiding tests

(c) Removing code

(d) Installing software


Answer b

15
Debugging focuses on

(a) Detecting errors

(b) Removing errors

(c) Avoiding documentation

(d) Designing interfaces

16 Testing vs Debugging – Testing is to find defects, Debugging is to

(a) Ignore them

(b) Remove them

(c) Record them

(d) Postpone them

17 A testing model defines

(a) The structure and process of testing activities

(b) The development cost

(c) The design architecture

(d) The coding pattern

Answer a

18 The V-Model of testing relates testing stages to

(a) Design stages

(b) Debugging

(c) Documentation

(d) Prototyping

Answer b

19 A software bug is

(a) A defect in code or logic

(b) A type of virus

(c) A testing tool


(d) A hardware error

Answer c

20 Syntax bugs occur due to

(a) Grammar mistakes in code

(b) Logic failure

(c) Hardware errors

(d) Wrong data entry

Answer d

21 The main purpose of software testing is to

(a) Verify code correctness

(b) Improve documentation

(c) Train users

(d) Replace debugging

Answer a

22 Productivity in software engineering refers to

(a) The efficiency of producing quality software

(b) The number of errors in code

(c) The speed of hardware

(d) The size of the team

Answer b

23 Quality in software means

(a) Code runs without syntax errors

(b) Software meets customer requirements

(c) Software looks attractive

(d) Program executes slowly

Answer c

24 Testing focuses on
(a) Finding defects

(b) Avoiding tests

(c) Removing code

(d) Installing software

Answer d

25 Debugging focuses on

(a) Detecting errors

(b) Removing errors

(c) Avoiding documentation

(d) Designing interfaces

Answer a

26 Testing vs Debugging – Testing is to find defects, Debugging is to

(a) Ignore them

(b) Remove them

(c) Record them

(d) Postpone them

Answer b

27 A testing model defines

(a) The structure and process of testing activities

(b) The development cost

(c) The design architecture

(d) The coding pattern

Answer c

28 The V-Model of testing relates testing stages to

(a) Design stages

(b) Debugging
(c) Documentation

(d) Prototyping

Answer d
29 A software bug is

(a) A defect in code or logic

(b) A type of virus

(c) A testing tool

(d) A hardware error

Answer a

30 Syntax bugs occur due to

(a) Grammar mistakes in code

(b) Logic failure

(c) Hardware errors

(d) Wrong data entry

Answer b

31 The main purpose of software testing is to

(a) Verify code correctness

(b) Improve documentation

(c) Train users

(d) Replace debugging

Answer c

32 Productivity in software engineering refers to

(a) The efficiency of producing quality software

(b) The number of errors in code

(c) The speed of hardware

(d) The size of the team

Answer d

33 Quality in software means

(a) Code runs without syntax errors


(b) Software meets customer requirements

(c) Software looks attractive

(d) Program executes slowly

Answer a

34 Testing focuses on

(a) Finding defects

(b) Avoiding tests

(c) Removing code

(d) Installing software

Answer b

35 Debugging focuses on

(a) Detecting errors

(b) Removing errors

(c) Avoiding documentation

(d) Designing interfaces

Answer c

36 Testing vs Debugging – Testing is to find defects, Debugging is to

(a) Ignore them

(b) Remove them

(c) Record them

(d) Postpone them

Answer d

37 A testing model defines

(a) The structure and process of testing activities

(b) The development cost

(c) The design architecture

(d) The coding pattern

Answer a

38 The V-Model of testing relates testing stages to


(a) Design stages

(b) Debugging

(c) Documentation

(d) Prototyping

Answer b

39 A software bug is

(a) A defect in code or logic

(b) A type of virus

(c) A testing tool

(d) A hardware error

Answer c

40 Syntax bugs occur due to

(a) Grammar mistakes in code

(b) Logic failure

(c) Hardware errors

(d) Wrong data entry

Answer d

41

42

43

44

45

46

47

48
49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69
70

71

72

73

74

75

Unit 1 Descriptive Questions 5

1 Explain the need for Data Science in modern organizations.


2 Explain the purpose of building applications based on Data Science models.

3 What is data cleansing? Give two examples of common data issues it resolves.

4 Explain the role of setting the research goal in a Data Science project.

5 What is the first step in the Data Science process? Why is it important?

Unit 1 Descriptive Questions 10

1 Describe the **complete Data Science process** starting from defining the
problem to presenting results and building applications.
2 Explain **the challenges faced in the Data Science lifecycle**, such as
handling big data, missing values, and model deployment.
3 Explain **exploratory data analysis (EDA)**, including tools, techniques, and
the type of insights it provides.
4 Elaborate on the **facets of data** (volume, variety, velocity, veracity, and
value) with examples.
5 Discuss the **benefits and uses of Data Science** in business, healthcare, and
education sectors.
Unit 2 Objective Questions 1
1 A frequency distribution shows the of each value in a dataset.
(a) Probability
(b) Occurrence
(c) Mean
(d) Median
Answer b
2 An outlier is a data point that
(a) Lies far from other data points
(b) Is exactly the median
(c) Is the most frequent
(d) Is always the mean
Answer a
3 Relative frequency distribution shows
(a) Only relative positions
(b) Proportion of each value
(c) Only outliers
(d) The sum of all data points
Answer b
4 Cumulative frequency distribution shows
(a) Accumulated frequencies up to each class
(b) Relative frequencies
(c) Only outliers
(d) The class midpoints
Answer a
5 Frequency distributions for nominal data use
(a) Categories without order
(b) Continuous intervals
(c) Ranked scores
(d) Numerical ranges
Answer a
6 The mean is the of a dataset.
(a) Difference between extremes
(b) Middle value
(c) Sum divided by number of observations
(d) Most frequent value
Answer c
7 The median is the
(a) Sum of all values
(b) Middle value when data is ordered
(c) Most frequent value
(d) Standard deviation
Answer b
8 The mode is the
(a) Highest value
(b) Most frequent value
(c) Middle value
(d) Average
Answer b
9 Relative frequency is calculated as
(a) Total ÷ frequency
(b) Frequency ÷ total observations
(c) Mode ÷ median
(d) Cumulative frequency ÷ mean
Answer b
10 Cumulative frequency for the last class is always
(a) Zero
(b) Median
(c) Total number of observations
(d) Mode
Answer c
11 A histogram is used for
(a) Nominal data only
(b) Continuous data
(c) Ranked data only
(d) Qualitative labels
Answer b
12 A bar chart is used to show
(a) Outliers
(b) Nominal data
(c) Continuous intervals
(d) Mean and median
Answer b
13 The average for ranked data is often calculated using
(a) Median
(b) Mode
(c) Mean of classes
(d) Outlier
Answer a
14 An extreme value affecting the mean is called
(a) Median
(b) Class interval
(c) Mode
(d) Outlier
Answer d
15 The formula for mean is
(a) Maximum value ÷ minimum value
(b) Sum of values ÷ number of values
(c) Frequency ÷ total
(d) Median × Mode
Answer b
16 When data are qualitative, the appropriate measure of central tendency is
(a) Standard deviation
(b) Mean
(c) Median
(d) Mode
Answer d
17 The median is preferred over mean when data has
(a) Outliers
(b) No variance
(c) Equal frequency
(d) Nominal categories
Answer a
18 Frequency polygon is drawn using
(a) Mode only
(b) Nominal categories
(c) Midpoints of classes
(d) Median only
Answer c
19 In cumulative frequency, “less than” ogive shows
(a) Percentiles
(b) Frequencies of outliers
(c) Median
(d) Cumulative frequencies up to class limits
Answer d
20 Outliers can be detected using
(a) Histogram only
(b) Pie charts
(c) Box plots
(d) Median only
Answer c
21 Relative frequency distribution always sums to
(a) Mode
(b) 1
(c) 0
(d) Mean
Answer b
22 A simple frequency table contains
(a) Median and mode only
(b) Data values and their frequencies
(c) Mean only
(d) Outliers only
Answer b
23 Graphs used to interpret distributions include
(a) Histogram, bar chart, and pie chart
(b) Line only
(c) Scatter only
(d) Flatter Only
Answer a
24 The median of a data set with even number of observations is
(a) Maximum value
(b) Middle value only
(c) Average of the two middle values
(d) Minimum value
Answer c
25 Mode may not exist if
(a) No value repeats
(b) Frequency is large
(c) Median exists
(d) Data is continuous
Answer a
26 Cumulative frequency helps in
(a) Bar chart only
(b) Determining percentiles
(c) Calculating mean only
(d) Detecting mode
Answer b
27 For nominal data, the best measure of central tendency is
(a) Median
(b) Range
(c) Mode
(d) Mean
Answer c
28 Skewed distributions affect
(a) Mean more than median
(b) Median only
(c) Frequency table
(d) Mode only
Answer a
29 Frequency distributions summarize
(a) Large data sets
(b) Nominal values only
(c) Graphs only
(d) Single observations
Answer a
30 Relative frequency distribution is useful for
(a) Detecting mode
(b) Comparing datasets of different sizes
(c) Finding maximum
(d) Calculating median only
Answer b
31 A boxplot displays
(a) Histogram only
(b) Median, quartiles, and outliers
(c) Frequency polygon
(d) Mean only
Answer b
32 For ordinal (ranked) data, the best average is
(a) Median
(b) Mode
(c) Standard deviation
(d) Mean
Answer a
33 Graphs for frequency distributions are important to
(a) Delete data
(b) Calculate sum only
(c) Visualize patterns and spread
(d) Store data
Answer c
34 Mean is sensitive to
(a) Mode
(b) Median
(c) Outliers
(d) Nominal data
Answer c
35 The range is calculated as
(a) Maximum – Minimum
(b) Median × Mode
(c) Frequency ÷ Total
(d) Mean – Median
Answer a
36 Pie charts represent
(a) Proportions of categories
(b) Continuous data
(c) Outliers only
(d) Median only
Answer a
37 The cumulative relative frequency is
(a) Outliers only
(b) Sum of relative frequencies up to a class
(c) Mean only
(d) Mode only
Answer b
38 Outliers can distort
(a) Median
(b) Mode
(c) Mean
(d) Nominal labels
Answer c
39 Frequency distribution for continuous data uses
(a) Text labels
(b) Nominal categories
(c) Intervals
(d) Rank only
Answer c
40 Mode is most useful for data.
(a) Qualitative
(b) Ranked
(c) Continuous
(d) Interval
Answer a
41 Median divides data into
(a) Four parts
(b) Maximum and minimum
(c) Two equal halves
(d) Ten parts
Answer c
42 A histogram represents
(a) Frequency of continuous intervals
(b) Nominal labels only
(c) Percentiles only
(d) Only median
Answer a
43 Frequency polygon is useful to
(a) Compare multiple distributions
(b) Find median only
(c) Find mode only
(d) Create pie chart
Answer a
44 Cumulative frequency “greater than” ogive helps determine
(a) Percentiles above a value
(b) Mode only
(c) Median only
(d) Nominal data
Answer a
45 Relative frequency distribution can be expressed as
(a) Fraction or percentage
(b) Only frequency
(c) Median only
(d) Mode only
Answer a
46 Median is suitable for data.
(a) Ordinal (ranked)
(b) Pie chart
(c) Nominal
(d) Binary only
Answer a
47 Outliers can be identified using
(a) Z-scores
(b) Median only
(c) Histogram only
(d) Pie chart
Answer a
48 Mode may be used for data.
(a) Continuous
(b) Interval only
(c) Nominal
(d) Rank only
Answer c
49 Mean can be affected by
(a) Extreme values
(b) Mode
(c) Bar chart
(d) Median
Answer a
50 In relative frequency distribution, all frequencies sum to
(a) Zero
(b) 1 or 100%
(c) Mean
(d) Mode
Answer b
51 Cumulative frequency is the sum of
(a) Median
(b) Maximum only
(c) All previous frequencies
(d) Outliers only
Answer c
52 Frequency distributions are useful because they
(a) Delete data
(b) Summarize large data sets
(c) Calculate only mode
(d) Create pie charts only
Answer b
53 For qualitative data, the measure of central tendency is usually
(a) Median
(b) Range
(c) Mode
(d) Mean
Answer c
54 Outliers can be handled by
(a) Removal or adjustment
(b) Histogram only
(c) Mode only
(d) Mean only
Answer a
55 The cumulative frequency of the last class equals
(a) Total number of observations
(b) Mode
(c) Median
(d) Zero
Answer a
56 Frequency distribution tables include
(a) Only mode
(b) Classes and frequencies
(c) Outliers only
(d) Only median
Answer b
57 The best average for highly skewed data is
(a) Range
(b) Mean
(c) Mode
(d) Median
Answer d
58 58. In graphs, bar width represents
(a) Mean
(b) Frequency
(c) Median
(d) Categories
Answer d
59 Mean is most suitable for data.
(a) Interval or ratio
(b) Pie chart only
(c) Nominal
(d) Ordinal
Answer a
60 Pie chart is not suitable for data.
(a) Continuous
(b) Nominal
(c) Ranked
(d) Categorical
Answer a
61 Frequency distribution is useful in
(a) Data deletion
(b) Data summarization
(c) Bar chart creation only
(d) Nominal label removal
Answer b
62 Median is less affected by
(a) Class interval
(b) Outliers
(c) Mode
(d) Mean
Answer b
63 For ranked data, averages used are
(a) Median or mean ranks
(b) Mode only
(c) Nominal only
(d) Pie chart
Answer a
64 Frequency distribution helps identify
(a) Pie chart only
(b) Outliers, central tendency, and spread
(c) Median only
(d) Only mean
Answer b
65 A stem-and-leaf plot is used to
(a) Show mean only
(b) Display frequency distribution
(c) Show mode only
(d) Show outliers only
Answer b
66 Relative frequency can be converted into
(a) Percentage
(b) Median
(c) Mode
(d) Mean
Answer a
67 In a histogram, the height of each bar represents
(a) Median
(b) Class midpoint
(c) Frequency
(d) Mode
Answer c
68 Cumulative frequency graph is also called
(a) Histogram
(b) Ogive
(c) Box plot
(d) Pie chart
Answer b
69 Mode is preferred for
(a) Categorical data
(b) Continuous data
(c) Interval data only
(d) Ranked data only
Answer a
70 Median is calculated as the of ordered data.
(a) Middle value
(b) Mode
(c) Maximum
(d) Mean
Answer a
71 Frequency distribution is most useful when data is
(a) Large and complex
(b) Small only
(c) Nominal only
(d) Ranked only
Answer a
72 Outliers can distort
(a) Mean and standard deviation
(b) Graph only
(c) Mode only
(d) Median only
Answer a
73 The mid-value of each class is called
(a) Mode
(b) Frequency
(c) Class mark
(d) Median
Answer c
74 Cumulative frequency can be used to calculate
(a) Percentiles and quartiles
(b) Only mean
(c) Pie chart
(d) Only mode
Answer a
75 For qualitative data, the average is
(a) Range
(b) Mode
(c) Mean
(d) Median
Answer b
Unit 2 Descriptive Questions 5
1 Define frequency distribution and explain its purpose with an example.
2 Explain the process of constructing a frequency table from raw data.
3 Draw a simple bar chart and histogram for the following dataset: {3, 5, 2, 5, 7,
3, 4}.
4 Differentiate between cumulative frequency and relative frequency.
5 Explain relative frequency distribution. Provide a simple example using a
dataset of your choice.
Unit 2 Descriptive Questions 10
1 1. Discuss the various types of frequency distributions (simple, relative,
cumulative) and explain how they are constructed with an example dataset
2 Explain the construction and interpretation of a histogram and cumulative
frequency curve (ogive) with a suitable dataset.
3 Explain the calculation and interpretation of averages for ranked (ordinal) data.
Provide a numerical example.
4 Discuss different types of graphs used in statistics (bar chart, histogram,
frequency polygon, pie chart) and explain which type is suitable for which kind
of data.
5 Discuss how outliers affect the mean, median, and mode. Include examples and
graphical illustrations.
6 Describe and interpret the measures of central tendency (mean, median, mode)
with examples for both numerical and qualitative data.
Unit 3 Objective Questions 1
1 A normal distribution is
(a) Symmetrical bell-shaped curve
(b) Skewed curve
(c) Uniform distribution
(d) Bimodal distribution
Answer a
2 In a normal curve, the mean, median, and mode are
(a) Different
(b) Same
(c) Random
(d) Zero only
Answer b
3 The total area under the normal curve is
(a) 0.5
(b) 1
(c) 2
(d) 0
Answer b
4 A z-score represents
(a) Number of standard deviations from the mean
(b) Sum of deviations
(c) Median value
(d) Mode of distribution
Answer a
5 A positive z-score indicates the score is
(a) Below the mean
(b) Equal to the mean
(c) Above the mean
(d) Maximum
Answer c
6 A negative z-score indicates the score is
(a) Above the mean
(b) Below the mean
(c) Equal to the mean
(d) Maximum
Answer b
7 To find the proportion of scores above a value, we use
(a) Z-table
(b) Scatter plot
(c) Mean only
(d) Median only
Answer a
8 To find the score corresponding to a percentile, we use
(a) Z-score formula
(b) Mean only
(c) Standard deviation only
(d) Frequency table
Answer a
9 The empirical rule states that approximately 68% of data lies within
(a) ±1 standard deviation
(b) ±2 standard deviations
(c) ±3 standard deviations
(d) Zero
Answer a
10 Approximately 95% of data lies within in a normal distribution.
(a) ±1 SD
(b) ±2 SD
(c) ±3 SD
(d) ±4 SD
Answer b
11 Approximately 99.7% of data lies within
(a) ±1 SD
(b) ±2 SD
(c) ±3 SD
(d) ±4 SD
Answer c
12 The z-score formula is
(a) z = (X – μ)/σ
(b) z = (X + μ)/σ
(c) z = σ/(X – μ)
(d) z = μ/(X – σ)
Answer a
13 A scatter plot is used to
(a) Show relationship between two variables
(b) Show histogram
(c) Show mean only
(d) Show mode
Answer a
14 Positive correlation is indicated by
(a) Downward slope
(b) Upward slope
(c) Horizontal line
(d) Random points
Answer b
15 Negative correlation is indicated by
(a) Downward slope
(b) Upward slope
(c) Horizontal line
(d) Random points
Answer a
16 Correlation coefficient (r) ranges from
(a) -1 to +1
(b) 0 to 2
(c) -2 to +2
(d) 0 to 1
Answer a
17 If r = 0, the relationship is
(a) Perfect positive
(b) Perfect negative
(c) No correlation
(d) Strong correlation
Answer c
18 If r = 1, the correlation is
(a) Perfect negative
(b) Perfect positive
(c) Zero
(d) Weak
Answer b
19 If r = -1, the correlation is
(a) Perfect positive
(b) Perfect negative
(c) Zero
(d) Weak
Answer b
20 The sign of r indicates
(a) Strength
(b) Direction
(c) Mean
(d) Variance
Answer b
21 The magnitude of r indicates
(a) Direction
(b) Strength
(c) Mean
(d) Standard deviation
Answer b
22 The computational formula for r is
(a) Sum of products of deviations divided by nσxσy
(b) Sum of squares only
(c) Mean difference
(d) Median difference
Answer a
23 In a scatter plot, points closely packed along a line indicate
(a) Strong correlation
(b) Weak correlation
(c) No correlation
(d) Random data
Answer a
24 In a scatter plot, points closely packed along a line indicate
(a) Strong correlation
(b) Weak correlation
(c) No correlation
(d) Random data
Answer a
25 In a normal distribution, the tails extend
(a) To infinity
(b) Up to ±3 SD only
(c) Up to ±2 SD only
(d) Nowhere
Answer a
26 The area under the curve to the left of the mean is
(a) 0.25
(b) 0.5
(c) 0.75
(d) 1
Answer b
27 The standard normal distribution has mean
(a) 0
(b) 1
(c) μ
(d) σ
Answer a
28 The standard normal distribution has standard deviation
(a) 0
(b) 1
(c) μ
(d) σ
Answer b
29 To convert X to z, we subtract
(a) σ
(b) μ
(c) r
(d) 1
Answer b
30 A z-score of 0 corresponds to
(a) Mean
(b) Median
(c) Mode
(d) Minimum
Answer a
31 Z-scores allow comparison across
(a) Different distributions
(b) Same distribution only
(c) Nominal data
(d) Categorical data
Answer a
32 If r > 0, the variables
(a) Increase together
(b) One decreases, one increases
(c) Are independent
(d) Random
Answer a
33 If r < 0, the variables
(a) Increase together
(b) Decrease together
(c) One increases, one decreases
(d) Independent
Answer c
34 Perfect correlation is indicated by
(a) r = 0
(b) r = ±1
(c) r = 0.5
(d) r = -0.5
Answer b
35 Correlation coefficient is dimensionless because it is
(a) Ratio of covariances to standard deviations
(b) Sum of deviations
(c) Median difference
(d) Sum of squares
Answer a
36 Positive correlation indicates
(a) Inverse relationship
(b) Direct relationship
(c) No relationship
(d) Random relationship
Answer b
37 Negative correlation indicates
(a) Direct relationship
(b) Inverse relationship
(c) No relationship
(d) Weak relationship
Answer b
38 A scatter plot showing random points indicates
(a) Strong correlation
(b) Weak or no correlation
(c) Perfect correlation
(d) Negative correlation
Answer b
39 The empirical rule for ±1 SD includes
(a) 50% of data
(b) 68% of data
(c) 95% of data
(d) 99.7% of data
Answer b
40 The empirical rule for ±2 SD includes
(a) 50%
(b) 68%
(c) 95%
(d) 99.7%
Answer c
41 The empirical rule for ±3 SD includes
(a) 68%
(b) 95%
(c) 99.7%
(d) 50%
Answer c
42 Z-scores help detect
(a) Outliers
(b) Correlation
(c) Mean
(d) Scatter
Answer a
43 Standardizing a score converts it to
(a) Raw score
(b) Z-score
(c) Mean
(d) Median
Answer b
44 The formula to find X from z is
(a) X = μ + zσ
(b) X = μ – zσ
(c) X = z – μ
(d) X = z + μ
Answer a
45 In correlation, x and y are called
(a) Variables
(b) Constants
(c) Coefficients
(d) Deviations
Answer a
46 Scatter plots are useful to identify
(a) Patterns, trends, and relationships
(b) Mean only
(c) Median only
(d) Standard deviation only
Answer a
47 Correlation coefficient is positive if
(a) Both variables increase together
(b) One increases, one decreases
(c) Variables are independent
(d) Variables are categorical
Answer a
48 A correlation coefficient of 0.8 indicates
(a) Weak positive
(b) Strong positive
(c) Strong negative
(d) Zero
Answer b
49 A correlation coefficient of -0.6 indicates
(a) Weak negative
(b) Strong negative
(c) Strong positive
(d) Zero
Answer b
50 Z-scores can be
(a) Positive only
(b) Negative only
(c) Positive or negative
(d) Zero only
Answer c
51 Area under the normal curve to the right of mean is
(a) 0.25
(b) 0.5
(c) 0.75
(d) 1
Answer b
52 Z-tables provide
(a) Probabilities associated with z-scores
(b) Mean
(c) Median
(d) Standard deviation
Answer a
53 To find the percentile rank of a score, we use
(a) Z-score formula
(b) Mean only
(c) Median only
(d) Standard deviation only
Answer a
54 A negative correlation indicates that as x increases, y
(a) Increases
(b) Decreases
(c) Remains constant
(d) Random
Answer b
55 The closer r is to ±1, the
(a) Stronger the relationship
(b) Weaker the relationship
(c) Random the data
(d) No relationship
Answer a
56 The formula for computational correlation coefficient involves
(a) Sum of products of deviations from mean
(b) Sum of squared deviations only
(c) Mean difference only
(d) Median difference only
Answer a
57 Correlation coefficient does not determine
(a) Direction
(b) Strength
(c) Causation
(d) Linear relationship
Answer c
58 In a scatter plot, tightly packed points along a line indicate
(a) Weak correlation
(b) Strong correlation
(c) Zero correlation
(d) Random pattern
Answer b
59 Z-scores allow comparison between
(a) Scores from different distributions
(b) Same distribution only
(c) Nominal variables
(d) Categorical variables
Answer a
60 The standard normal distribution has mean and standard deviation.
(a) 1, 0
(b) 0, 1
(c) μ, σ
(d) 0, μ
Answer b
61 Z-score helps identify how far a value is from
(a) Median
(b) Mean
(c) Mode
(d) Range
Answer b
62 Positive correlation is associated with a slope.
(a) Downward
(b) Upward
(c) Horizontal
(d) Random
Answer b
63 Negative correlation is associated with a slope.
(a) Horizontal
(b) Upward
(c) Downward
(d) Random
Answer c
64 A correlation coefficient of 0 indicates
(a) Perfect positive correlation
(b) No linear relationship
(c) Strong negative correlation
(d) Weak positive correlation
Answer b
65 Z-score formula requires
(a) Mean and standard deviation
(b) Median only
(c) Mode only
(d) Variance only
Answer a
66 Z-score converts a raw score to
(a) Standard deviation units
(b) Mean units
(c) Median units
(d) Frequency units
Answer a
67 A scatter plot with points forming a downward trend indicates
(a) Positive correlation
(b) Negative correlation
(c) No correlation
(d) Randomness
Answer b
68 The computational formula of correlation coefficient is sometimes called
(a) Pearson formula
(b) Spearman formula
(c) Z-score formula
(d) Mean formula
Answer a
69 Correlation coefficient of +1 indicates
(a) Perfect negative correlation
(b) Perfect positive correlation
(c) No correlation
(d) Weak correlation
Answer b
70 Correlation coefficient of -1 indicates
(a) Weak positive
(b) Perfect negative
(c) No correlation
(d) Strong positive
Answer b
71 In a standard normal distribution, a z-score of +2 represents
(a) 2 SD below the mean
(b) 2 SD above the mean
(c) Mean
(d) Median
Answer b
72 Z-scores are useful for identifying
(a) Relative position of scores
(b) Mean only
(c) Median only
(d) Mode only
Answer a
73 Scatter plot is a graphical representation of
(a) Single variable
(b) Two variables
(c) Mean only
(d) Median only
Answer b
74 A correlation coefficient close to zero indicates
(a) Strong correlation
(b) Weak or no linear relationship
(c) Perfect correlation
(d) Positive slope only
Answer b
75 Z-scores allow comparison between scores with
(a) Same mean and SD
(b) Different scales and distributions
(c) Nominal only
(d) Categorical only
Answer b
Unit 3 Descriptive Questions 5
1 Define normal distribution and explain its key characteristics.
2 Explain how to find the proportion of scores above or below a certain
value using a normal curve.
3 What is a scatter plot? How does it help in analyzing data?
4 Differentiate between positive and negative correlation with
examples.
5 Explain the concept of linear relationship in a scatter plot.
Unit 3 Descriptive Questions 10
1 Explain the calculation and interpretation of z-scores with a step-by-step
example.
2 Discuss correlation in quantitative data. Explain the meaning of positive,
negative, and zero correlation. Provide a scatter plot diagram.
3 Compare z-scores and percentiles. Explain how each measure provides
information about the position of a score.
4 Explain how the correlation coefficient is interpreted in terms of strength and
direction. Include examples of weak, moderate, and strong correlations.
5 Explain how scatter plots help in identifying patterns, trends, and outliers in
data.
6 Discuss applications of correlation analysis in fields like finance, psychology,
or health sciences.
Unit 4 Objective Questions 1
1 The mean of a normal distribution is 50 and the standard deviation is 5. What is
the Z-score for a value of 60?
a) 2
b) 1
c) -2
d) 0
Answer a
2 In a standard normal distribution, the mean is always:
a) 1
b) 0
c) 100
d) Depends on the data
Answer b
3 The total area under the normal curve equals:
a) 1
b) 0.5
c) 100
d) 0
Answer a
4 A negative Z-score indicates that the value is:
a) Above the mean
b) Below the mean
c) Equal to the mean
d) Above and Equal the mean
Answer b
5 If Z = 0, the corresponding value is:
a) The mean
b) The mode
c) The median
d) Both mean and median
Answer d
6 The normal curve is:
a) Symmetrical
b) Skewed left
c) Skewed right
d) Irregular
Answer a
7 About 68% of the data in a normal distribution lies within:
a) ±1 SD from the mean
b) ±2 SD
c) ±3 SD
d) ±4 SD
Answer a
8 If a score’s Z value is 1.5, it means the score is:
a) 1.5 units above the mean
b) 1.5 standard deviations above the mean
c) 1.5% above mean
d) 1.5 units below the mean
Answer b
9 Which of the following is not a property of the normal curve?
a) Symmetrical about the mean
b) Mean = Median = Mode
c) Total area = 0
d) Bell-shaped
Answer c
10 A Z-score of -2.0 corresponds to:
a) 2 SD above mean
b) 2 SD below mean
c) Mean value
d) Median Value
Answer b
11 The probability that a standard normal variable is less than 0 is:
a) 0.25
b) 0.5
c) 1
d) 0
Answer b
12 What is the correlation coefficient denoted by?
a) b
b) r
c) c
d) p
Answer b
13 The range of the correlation coefficient (r) is:
a) 0 to +1
b) -1 to +1
c) -2 to +2
d) 0 to 1
Answer b
14 When r = 0, it means:
a) No correlation
b) Perfect positive correlation
c) Perfect negative correlation
d) Perfect non negative correlation
Answer a
15 A scatter plot is used to:
a) Show frequency
b) Show relationship between two quantitative variables
c) Compare averages
d) Display percentages
Answer b
16 When the scatter plot points lie close to a straight upward line, it indicates:
a) Weak negative correlation
b) Strong positive correlation
c) No correlation
d) Strong negative correlation
Answer b
17 The formula for a Z-score is:
a) (X + μ) / σ
b) (X - μ) / σ
c) (μ - X) / σ
d) (X / σ) + μ
Answer b
18 A correlation coefficient of -0.9 indicates:
a) Strong positive relation
b) Weak positive relation
c) Strong negative relation
d) No relation
Answer c
19 n a normal distribution, approximately 95% of the values lie within:
a) ±1 SD
b) ±2 SD
c) ±3 SD
d) ±4 SD
Answer b
20 Which value of r indicates the strongest relationship?
a) -0.98
b) 0.60
c) -0.45
d) 0.25
Answer a
21 The line that best fits data points in a scatter plot is called:
a) Regression line
b) Mean line
c) Trend line
d) Z-line
Answer a
22 If r² = 0.64, the correlation coefficient is:
a) 0.8
b) -0.8
c) ±0.8
d) 0.64
Answer c
23 The computational formula for Pearson’s correlation coefficient (r) includes:
a) ΣX², ΣY², ΣXY
b) Σ(X+Y), ΣZ
c) ΣX/ΣY
d) Mean and Median
Answer a
24 If the correlation coefficient is +1, then:
a) Perfect negative correlation
b) No correlation
c) Perfect positive correlation
d) Random relation
Answer c
25 The mean of Z-scores for any dataset is always:
a) 1
b) 0
c) Equal to SD
d) 2
Answer b
26 26. Which method combines DataFrames based on common columns?
a) `[Link]()`
b) `[Link]()`
c) `append()`
d) `join()`
Answer b
27 How can you reset the index of a DataFrame?
a) `df.reset_index()`
b) `[Link]()`
c) `df.index_reset()`
d) `df.set_index()`
Answer a
28 What does `[Link](arr)` do?
a) Checks for NaN values
b) Replaces NaN values
c) Counts NaN values
d) Deletes NaN values
Answer a
29 Which method groups by multiple columns?
a) `[Link](['A','B'])`
b) `[Link](['A','B'])`
c) `df.group_by(['A','B'])`
d) `[Link](['A'])`
Answer a
30 How to get column names of a DataFrame?
a) `[Link]`
b) `[Link]`
c) `[Link]`
d) `[Link]()`
Answer a
31 31. `[Link]()` provides:
a) Summary statistics
b) Column data types
c) Null values count
d) All rows of df
Answer a
32 Which is used to rename columns?
a) `[Link](columns={'old':'new'})`
b) `[Link]()`
c) `df.rename_index()`
d) `df.set_columns()`
Answer a
33 To select a single row by label, you use:
a) `[Link][3]`
b) `[Link][3]`
c) `df[3]`
d) Both a and b
Answer a
34 To select a row by integer position, you use:
a) `[Link][3]`
b) `[Link][3]`
c) `df[3]`
d) `[Link][3]`
Answer b
35 `[Link][0,'col']` is used for:
a) Accessing a single value
b) Slicing multiple rows
c) Selecting a column
d) Filtering rows
Answer a
36 36. Which of the following fills missing values with the column mean?
a) `[Link]([Link]())`
b) `[Link](0)`
c) `[Link]()`
d) `[Link]([Link], 0)`
Answer a
37 Which of the following performs an inner join?
a) `[Link](df1, df2, how='inner')`
b) `[Link]([df1, df2])`
c) `[Link](df2)`
d) `[Link](df2)`
Answer a
38 How to sort a DataFrame by multiple columns?
a) `df.sort_values(['A','B'])`
b) `[Link](['A','B'])`
c) `[Link](['A','B'])`
d) `df.sort_index(['A','B'])`
Answer a
39 Which of the following creates a new DataFrame from a dictionary?
a) `[Link]({'a':[1,2]})`
b) `[Link]({'a':[1,2]})`
c) `[Link]({'a':[1,2]})`
d) `[Link]([1,2])`
Answer a
40 How can you drop duplicate rows?
a) `df.drop_duplicates()`
b) `df.drop_repeats()`
c) `[Link]()`
d) `[Link]()`
Answer a
41 41. What is the output of `[Link]()`?
a) Maximum value in array
b) Index of maximum value
c) Mean of array
d) Minimum value
Answer a
42 What does `[Link](arr, axis=0)` compute?
a) Sum along columns
b) Sum along rows
c) Total sum
d) Element-wise sum
Answer a
43 Which is true about `[Link](arr1, arr2)`?
a) Matrix multiplication
b) Element-wise multiplication
c) Adds arrays
d) Transposes arr1
Answer a
44 How can you get the data type of a NumPy array?
a) `[Link]`
b) `[Link]`
c) `[Link]`
d) `[Link]`
Answer a
45 . `[Link]()` returns:
a) Correlation matrix
b) Count of nulls
c) Column names
d) Covariance
Answer a
46 Which method concatenates along columns?
a) `[Link]([df1,df2], axis=1)`
b) `[Link]([df1,df2], axis=0)`
c) `[Link](df2)`
d) `[Link](df2)`
Answer a
47 How do you create a multi-index DataFrame?
a) `[Link].from_arrays([arr1, arr2])`
b) `[Link].from_tuples()`
c) Both a and b
d) `[Link](arr1)`
Answer c
48 Which method counts the number of non-null entries?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
49 How can you rename an index in pandas?
a) `[Link](index={0:'first'})`
b) `[Link]({0:'first'})`
c) `df.set_index('first')`
d) `df.rename_index({0:'first'})`
Answer a
50 How to select all rows where col > 5?
a) `df[df['col']>5]`
b) `[Link]>5`
c) `[Link](df['col']>5)`
d) Both a and c
Answer d
51 How to merge DataFrames using outer join?
a) `[Link](df1, df2, how='outer')`
b) `[Link]([df1,df2], axis=1)`
c) `[Link](df2)`
d) `[Link](df1, df2)`
Answer a
52 Which function reshapes a 1D array into 2D?
a) `[Link](2,3)`
b) `[Link](arr,(2,3))`
c) `[Link](arr,(2,3))`
d) All of the above
Answer d
53 What does `[Link][:,1:3]` select?
a) Rows 1 to 3
b) Columns 1 and 2
c) Column 3 only
d) All rows and columns 1-3
Answer b
54 Which method calculates cumulative sum?
a) `[Link]()`
b) `[Link]()`
c) `[Link](df)`
d) `[Link]()`
Answer a
55 How to find unique values in a pandas column?
a) `df['col'].unique()`
b) `df['col'].distinct()`
c) `[Link](df['col'])`
d) Both a and c
Answer d
56 56. What does `[Link]([a,b])` do?
a) Stacks arrays vertically
b) Stacks arrays horizontally
c) Concatenates as 1D array
d) Stacks arrays non vertically
Answer a
57 Which method pivots columns into rows?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
58 How can you iterate over DataFrame rows?
a) `[Link]()`
b) `[Link]()`
c) Both a and b
d) `[Link]()`
Answer c
59 How to drop a column from DataFrame?
a) `[Link]('col', axis=1)`
b) `df.drop_column('col')`
c) `[Link]('col')`
d) `[Link]('col')`
Answer a
60 `[Link]([a,b])` requires:
a) Same shape along all axes except concatenation axis
b) Same data type only
c) Same number of elements
d) No restrictions
Answer a
61 61. `[Link]()` does:
a) Converts columns to rows (long format)
b) Converts rows to columns
c) Flattens DataFrame
d) Aggregates data
Answer a
62 [Link]()` does:
a) Converts rows to columns (wide format)
b) Flattens DataFrame
c) Aggregates data
d) Drops NaN values
Answer a
63 Which function computes standard deviation?
a) `[Link](arr)`
b) `[Link]()`
c) Both a and b
d) `[Link](arr)`
Answer c
64 How to convert a DataFrame column to a NumPy array?
a) `df['col'].values`
b) `[Link](df['col'])`
c) `df['col'].to_numpy()`
d) All of the above
Answer d
65 Which pandas function performs one-hot encoding?
a) `pd.get_dummies(df['col'])`
b) `[Link]()`
c) `[Link]()`
d) `[Link](df['col'])`
Answer a
66 66. How can you get top 5 rows of a DataFrame?
a) `[Link](5)`
b) `[Link](5)`
c) `[Link](5)`
d) `[Link](5)`
Answer a
67 . `[Link](5)` returns:
a) Last 5 rows
b) First 5 rows
c) Last 10 rows
d) Random 5 rows
Answer a
68 Which of the following removes duplicate rows based on a column?
a) `df.drop_duplicates(['col'])`
b) `[Link]('col')`
c) `df.remove_duplicates('col')`
d) `[Link]('col')`
Answer a

69 `[Link]('col>5')` is equivalent to:


a) `df[df['col']>5]`
b) `[Link][df['col']>5]`
c) Both a and b
d) None
Answer c
70 `np.c_[arr1,arr2]` does:
a) Column-wise concatenation
b) Row-wise concatenation
c) Flatten arrays
d) None
Answer a
71 71. How can you fill NaN with forward fill method?
a) `[Link](method='ffill')`
b) `[Link](method='bfill')`
c) `[Link]([Link],0)`
d) `[Link]()`
Answer a
72 Which of the following calculates median?
a) `[Link](arr)`
b) `[Link]()`
c) Both a and b
d) `[Link](arr)`
Answer c
73 How to pivot table by 'A' as index and 'B' as values?
a) `df.pivot_table(index='A', values='B')`
b) `[Link](index='A', values='B')`
c) Both a and b
d) `[Link]('A')['B']`
Answer c
74 Which method removes all rows where any column is NaN?
a) `[Link](how='any')`
b) `[Link](how='all')`
c) `[Link](0)`
d) `[Link]([Link],0)`
Answer a
75 What is the output of `[Link](arr>0)`?
a) True if all elements >0
b) False if any element <=0
c) Boolean
d) All of the above
Answer d
Unit 4 Descriptive Questions 5
1 Define a NumPy array. How is it different from a Python list?

2 Differentiate between `concat()` and `merge()` in pandas.


3 What is a pivot table? How does it differ from `groupby()`?
4 How can missing data be handled in pandas? Explain `dropna()` and `fillna()`.
5 How do you calculate basic aggregations like sum, mean, and standard
deviation on a NumPy array?
6 Explain the difference between `[Link]()`, `[Link]()`, and `[Link]()`.
Unit 4 Descriptive Questions 10
1 1. Explain the different types of arrays in NumPy, including structured arrays,
and discuss their applications.
2 Discuss various aggregation functions in NumPy and pandas with examples.
3 Explain data indexing and selection in pandas, including `loc`, `iloc`, boolean
indexing, and slicing
4 How can missing data affect analysis? Discuss strategies in pandas for
handling missing data.
5 Explain hierarchical indexing (MultiIndex) in pandas with a detailed example,
including indexing, selection, and slicing.
6 Compare and contrast `concat()`, `merge()`, and `join()` operations in pandas.
Include use cases.
Unit 5 Objective Questions 1
1 1. Which function is used to create a basic plot in Matplotlib?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
2 What does `[Link]()` do?
a) Displays the figure
b) Creates a new figure
c) Saves the figure
d) Plots a line
Answer a
3 Which function is used to plot scatter plots?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
4 How can you add a title to a Matplotlib plot?
a) `[Link]("My Plot")`
b) `[Link]("My Plot")`
c) `[Link]("My Plot")`
d) `[Link]("My Plot")`
Answer a
5 Which function adds x-axis label?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
6 How do you create multiple lines in a single plot?
a) Call `[Link]()` multiple times before `[Link]()`
b) Use `[Link]()`
c) Use `plt.plot_multi()`
d) Use `[Link]()`
Answer a
7 How can you add a legend to a plot?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
8 Which parameter changes line color in `[Link]()`?
a) `color`
b) `c`
c) Both a and b
d) `linewidth`
Answer c
9 Which parameter changes line style in `[Link]()`?
a) `linestyle`
b) `ls`
c) Both a and b
d) `marker`
Answer c
10 Which function is used to plot bar charts?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
11 11. Which function is used for horizontal bar charts?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
12 How can you add error bars in a plot?
a) `[Link]()`
b) `[Link](error=True)`
c) `[Link](error=True)`
d) `[Link](error=True)`
Answer a
13 Which function plots histograms?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
14 . In `[Link]()`, which parameter controls the number of bins?
a) `bins`
b) `n_bins`
c) `nbins`
d) `range`
Answer a
15 How do you normalize a histogram?
a) `density=True`
b) `norm=True`
c) `normalized=True`
d) `scale=True`
Answer a
16 Which function is used to plot a 2D density plot?
a) `[Link]()`
b) `plt.hist2d()`
c) `[Link]()`
d) Both a and b
Answer d
17 What does `[Link]()` do?
a) Draws contour lines
b) Draws filled contour
c) Plots a histogram
d) Plots scatter points
Answer a
18 Which function creates filled contour plots?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `plt.hist2d()`
Answer a
19 How can you change the marker style in a scatter plot?
a) `marker='o'`
b) `m='x'`
c) `ms='*'`
d) `markerstyle='+'`
Answer a
20 Which function sets axis limits?
a) `[Link]()` and `[Link]()`
b) `plt.axis_limits()`
c) `plt.set_limits()`
d) `[Link]()`
Answer a
21 Which function sets both axes limits at once?
a) `[Link]([xmin,xmax,ymin,ymax])`
b) `plt.set_axis()`
c) `[Link]()`
d) `plt.axes_limits()`
Answer a
22 Which parameter in `[Link]()` controls point size?
a) `s`
b) `size`
c) `markersize`
d) `ms`
Answer a
23 How do you add a grid to a plot?
a) `[Link](True)`
b) `plt.show_grid()`
c) `plt.add_grid()`
d) `[Link]()`
Answer a
24 Which function plots 3D line plots?
a) `ax.plot3D()`
b) `plt.plot3D()`
c) `[Link]()`
d) `ax.scatter3D()`
Answer a
25 Which module is required for 3D plotting?
a) `from mpl_toolkits.mplot3d import Axes3D`
b) `import matplotlib_3d`
c) `import mpl3d`
d) `from matplotlib import plot3d`
Answer a
26 How can you create a 3D scatter plot?
a) `ax.scatter3D(x,y,z)`
b) `plt.scatter3D(x,y,z)`
c) `[Link](x,y,z)`
d) `ax.plot3D(x,y,z)`
Answer a
27 Which function plots 3D surface plots?
a) `ax.plot_surface(X,Y,Z)`
b) `ax.plot3D(X,Y,Z)`
c) `[Link](X,Y,Z)`
d) `plt.plot_surface(X,Y,Z)`
Answer a
28 How can you change the figure size?
a) `[Link](figsize=(8,6))`
b) `[Link]=(8,6)`
c) `[Link]=(8,6)`
d) `plt.set_size(8,6)`
Answer a
29 How can you save a plot to a file?
a) `[Link]('[Link]')`
b) `[Link]('[Link]')`
c) `[Link]('[Link]')`
d) `[Link]('[Link]')`
Answer a
30 How do you change font size of labels?
a) `[Link]('X', fontsize=12)`
b) `[Link]('Y', fontsize=12)`
c) Both a and b
d) `[Link]('Title', font=12)`
Answer c
31 How can you plot multiple subplots in a figure?
a) `[Link]()`
b) `[Link]()`
c) Both a and b
d) `[Link]()`
Answer c
32 Which function sets tick labels?
a) `[Link]()` and `[Link]()`
b) `plt.set_ticks()`
c) `[Link]()`
d) `plt.tick_labels()`
Answer a
33 Which parameter in `[Link]()` changes line width?
a) `linewidth`
b) `lw`
c) Both a and b
d) `ls`
Answer c
34 How to add text annotations to a plot?
a) `[Link](x,y,'label')`
b) `[Link]('label', xy=(x,y))`
c) Both a and b
d) `[Link]('text')`
Answer c
35 Which function plots stacked bar charts?
a) `[Link]()` with `bottom` parameter
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
36 36. How can you plot a histogram with density?
a) `[Link](data, density=True)`
b) `[Link](data, normed=True)`
c) `[Link](data, bins=10)`
d) `[Link](data, histtype='step')`
Answer a
37 Which parameter in `[Link]()` changes histogram color?
a) `color`
b) `c`
c) Both a and b
d) `facecolor`
Answer c

38 What does `[Link]()` do?


a) Creates a step plot
b) Creates a histogram
c) Creates scatter plot
d) Creates contour plot
Answer a
39 How do you plot error bars in scatter plot?
a) `[Link](x,y,yerr=errors)`
b) `[Link](x,y,errors)`
c) `[Link](x,y,errors)`
d) `[Link](x,y,errors)`
Answer a
40 Which function plots hexbin plots?
a) `[Link](x,y)`
b) `[Link](x,y)`
c) `[Link](x,y)`
d) `plt.hist2d(x,y)`
Answer a
41 41. Which function plots 2D histograms?
a) `plt.hist2d(x,y)`
b) `[Link](x,y)`
c) `[Link](x,y)`
d) `[Link](x,y)`
Answer a
42 Which function is used to show a color bar?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
43 How can you visualize a matrix as an image?
a) `[Link](matrix)`
b) `[Link](matrix)`
c) Both a and b
d) `[Link](matrix)`
Answer c
44 How do you create filled 3D contour plots?
a) `[Link](X,Y,Z)`
b) `[Link](X,Y,Z)`
c) Both a and b
d) `ax.plot_surface(X,Y,Z)`
Answer c
45 Which parameter in `[Link]()` changes color of points?
a) `c`
b) `color`
c) Both a and b
d) `col`
Answer c
46 46. How can you adjust transparency in scatter plots?
a) `alpha`
b) `opacity`
c) `transparency`
d) `facecolor`
Answer a
47 Which function plots polar charts?
a) `[Link]()`
b) `[Link]()`
c) `plt.plot_polar()`
d) `[Link]()`
Answer a
48 Which function plots pie charts?
a) `[Link]()`
b) `[Link]()`
c) `[Link]()`
d) `[Link]()`
Answer a
49 How do you plot geographic data in Matplotlib?
a) Using `Basemap` or `Cartopy`
b) Using `[Link]()`
c) Using `[Link]()`
d) Using `plt.scatter_geo()`
Answer a
50 Which function sets figure background color?
a) `[Link](facecolor='color')`
b) `[Link](bgcolor='color')`
c) `[Link](background='color')`
d) `[Link](color='color')`
Answer a
51 51. How do you plot 3D wireframe?
a) `ax.plot_wireframe(X,Y,Z)`
b) `ax.plot_surface(X,Y,Z)`
c) `ax.plot3D(X,Y,Z)`
d) `plt.plot_wireframe(X,Y,Z)`
Answer a
52 How do you change figure DPI?
a) `[Link](dpi=100)`
b) `[Link](resolution=100)`
c) `[Link](dpi=200)`
d) Both a and c
Answer d
53 Which parameter in `[Link]()` changes histogram type?
a) `histtype`
b) `type`
c) `style`
d) `kind`
Answer a
54 How do you plot horizontal error bars?
a) `[Link](x,y,xerr=errors)`
b) `[Link](x,y,yerr=errors)`
c) `[Link](x,y,xerr=errors)`
d) `[Link](x,y,xerr=errors)`
Answer a
55 Which function plots a contour map from grid data?
a) `[Link](X,Y,Z)`
b) `[Link](X,Y,Z)`
c) Both a and b
d) `[Link](Z)`
Answer c
56 56. How can you add grid lines with dashed style?
a) `[Link](linestyle='--')`
b) `[Link](dash=True)`
c) `[Link](style='--')`
d) `[Link](ls='-')`
Answer a
57 . How do you set equal aspect ratio?
a) `[Link]('equal')`
b) `[Link]('square')`
c) `[Link]('equal')`
d) `[Link]('same')`
Answer a
58 How do you create a stacked histogram?
a) `[Link](data, stacked=True)`
b) `[Link](data, stack=True)`
c) `[Link](stacked=True)`
d) `[Link](data, stacked=False)`
Answer a
59 Which function changes figure resolution?
a) `[Link](dpi=300)`
b) `[Link](dpi=300)`
c) Both a and b
d) `plt.set_dpi()`
Answer c
60 How can you plot filled area under a curve?
a) `plt.fill_between(x,y1,y2)`
b) `[Link](x,y)`
c) `[Link](x,y)`
d) `plt.plot_area(x,y)`
Answer a

61 Which function displays images with custom colormap?


a) `[Link](data, cmap='viridis')`
b) `[Link](data, colormap='viridis')`
c) `[Link](data, cmap='viridis')`
d) `[Link](data, cmap='viridis')`
Answer a
62 How can you rotate x-axis labels?
a) `[Link](rotation=45)`
b) `[Link](angle=45)`
c) `[Link](rotation=45)`
d) `[Link](angle=45)`
Answer a
63 Which function creates a logarithmic plot?
a) `[Link]()`
b) `[Link]()`
c) `[Link](log=True)`
d) `[Link]()`
Answer a
64 How do you create a twin axes plot?
a) `ax2 = [Link]()`
b) `ax2 = [Link]()`
c) Both a and b
d) `[Link]()`
Answer c
65 How can you plot multiple histograms in one plot?
a) Call `[Link]()` multiple times before `[Link]()`
b) Use `[Link](list_of_data)`
c) Use `[Link](data, multiple=True)`
d) Both a and b
Answer d
66 66. Which function creates contour labels?
a) `[Link](contour)`
b) `plt.label_contour(contour)`
c) `[Link](contour)`
d) `plt.contour_label(contour)`
Answer a
67 How do you plot a 3D triangular surface?
a) `ax.plot_trisurf(X,Y,Z)`
b) `ax.plot_surface(X,Y,Z)`
c) `ax.plot3D(X,Y,Z)`
d) `[Link](X,Y,Z)`
Answer a
68 How can you reverse x-axis?
a) `[Link]().invert_xaxis()`
b) `[Link](max,min)`
c) Both a and b
d) `[Link](reverse)`
Answer c
69 How do you reverse y-axis?
a) `[Link]().invert_yaxis()`
b) `[Link](max,min)`
c) Both a and b
d) `[Link](reverse)`
Answer c
70 How can you set figure tight layout?
a) `plt.tight_layout()`
b) `[Link](tight=True)`
c) `[Link](tight=True)`
d) `[Link]()`
Answer a
71 How do you overlay contour on an image?
a) `[Link](X,Y,Z)` over `[Link]()`
b) `[Link]()` over `[Link]()`
c) Both a and b
d) `[Link](contour)`
Answer c
72 Which function plots a 3D bar chart?
a) `ax.bar3D()`
b) `[Link]()`
c) `plt.bar3D()`
d) `ax.plot3D()`
Answer a
73 How can you plot polar bar charts?
a) `[Link](theta, r, width=0.1)` in polar axes
b) `plt.polar_bar(theta, r)`
c) `plt.bar_polar(theta, r)`
d) `[Link](theta, r, polar=True)`
Answer a
74 How do you display color gradients in scatter plots?
a) `[Link](x,y,c=values,cmap='viridis')`
b) `[Link](x,y,color=values)`
c) `[Link](x,y,colors=values)`
d) `[Link](x,y,cmap='viridis')`
Answer a
75 Which function plots a
3D contour?
a) `ax.contour3D(X,Y,Z)`
b) `ax.plot3D(X,Y,Z)`
c) `[Link](X,Y,Z)`
d) `[Link](X,Y,Z)`
Answer a
Unit 5 Descriptive Questions 5
1 Define Matplotlib. Explain its basic usage for plotting line graphs.
2 How do you create a scatter plot in Matplotlib? Give an example.

3 Explain the purpose of error bars and how to visualize them in a plot.
4 What is a histogram? How do you control the number of bins in a histogram?
5 How can you normalize a histogram to display density instead of counts?
Unit 5 Descriptive Questions 10
1 Explain in detail the various types of plots available in Matplotlib, including
line, scatter, bar, histogram, density, and contour plots, with examples.
2 Describe how to annotate and add legends, titles, and axis labels in Matplotlib
plots effectively.
3 Explain how to combine multiple plots in a single figure using subplots.
Include examples with different plot types.
4 Compare and contrast line plots, scatter plots, density plots, and contour plots
in terms of their use cases.
5 Describe the creation and customization of histograms and density plots.
Include explanation of bins, density, and color options.
6 Explain 2D contour and filled contour plots. Show how they are used to
represent density or surface data.

You might also like