0% found this document useful (0 votes)
2 views

ctp_mft

The document contains a quiz with questions related to statistics, hypothesis testing, and Python programming. It covers topics such as means, medians, modes, types of errors in hypothesis testing, and various Python functionalities including file handling and object-oriented programming concepts. Each question is multiple-choice, providing options for answers.

Uploaded by

dhanrajkrbksc
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)
2 views

ctp_mft

The document contains a quiz with questions related to statistics, hypothesis testing, and Python programming. It covers topics such as means, medians, modes, types of errors in hypothesis testing, and various Python functionalities including file handling and object-oriented programming concepts. Each question is multiple-choice, providing options for answers.

Uploaded by

dhanrajkrbksc
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
You are on page 1/ 30

Quiz 1

(1)The arithmetic mean of the numbers 5, 7, 9, 11


a) 8
b) 9
c) 10
d) 11
(2) The geometric mean of 4 and 16 is:
a) 8
b) 10
c) 12
d) 14
(3) The harmonic mean is best used when:
a) Data points are close in value
b) Data points are widely varying
c) Data points represent rates or ratios
d) Data points are evenly spaced
(4) The median of the dataset 2, 3, 5, 7, 11 is:
a) 3
b) 5
c) 7
d) 11
(5) The mode is defined as the:
a) Average of the data
b) Middle value of the data
c) Most frequently occurring value in the data
d) Sum of the data
(6) If a dataset has an odd number of values, the median is:
a) The average of the middle two values
b) The middle value
c) The mean value
d) None of the above
(7) In a perfectly symmetric distribution, the mean, median, and mode
are:
a) Equal
b) Unequal
c) Unrelated
d) Always zero
(8) The standard deviation is a measure of:
a) Central tendency
b) Dispersion
c) Skewness
d) Kurtosis
(9) Variance is the square of the:
a) Mean
b) Standard Deviation
c) Median
d) Range
(10) Quartiles divide the data into:
a) Two equal parts
b) Three equal parts
c) Four equal parts
d) Five equal parts
(11). Hypothesis testing is used to:
a) Summarize data
b) Determine if there is enough evidence to reject a null hypothesis
c) Measure central tendency
d) Calculate probabilities

(12). The null hypothesis in hypothesis testing is:


a) The hypothesis that there is a significant effect
b) The hypothesis that there is no significant effect
c) The hypothesis that the effect is positive
d) Always accepted if the p-value is less than alpha

(13). A Type I error in hypothesis testing occurs when:


a) The null hypothesis is true, but we reject it
b) The null hypothesis is false, but we fail to reject it
c) The alternative hypothesis is true, but we reject it
d) The alternative hypothesis is false, but we fail to reject it

(14). The alternative hypothesis in hypothesis testing is:


a) The hypothesis that there is no effect
b) The hypothesis that there is an effect or difference
c) Always tested directly
d) Always accepted if the p-value is less than alpha
(15). The following is true about a Type II error in hypothesis testing
a) It occurs when the null hypothesis is true, but we reject it
b) It occurs when the null hypothesis is false, but we fail to reject it
c) It is the same as the significance level
d) It is less serious than a Type I error

(16). The critical value in hypothesis testing is:


a) The value that defines the boundary for rejecting the null
hypothesis
b) The probability of making a Type II error
c) The sample mean
d) The p-value threshold for rejecting the null hypothesis

(17). The level of significance (alpha) in hypothesis testing is typically


set at:
a) 0.01
b) 0.05
c) 0.10
d) 0.15

(18). The following increases the power of a statistical test


a) Increasing the sample size
b) Decreasing the effect size
c) Increasing the significance level (alpha)
d) Reducing the sample variance

(19). In hypothesis testing, the alternative hypothesis is:


a) Accepted when the p-value is greater than alpha
b) Rejected when the p-value is less than alpha
c) A statement of no effect or no difference
d) What the researcher is trying to prove

(20). If the p-value is very small (e.g., 0.001), it suggests:


a) Strong evidence against the null hypothesis
b) Weak evidence against the null hypothesis
c) No evidence against the null hypothesis
d) Evidence that the null hypothesis is true
(21). Why is Python preferred in Data Science
a) It is the only programming language available
b) It has a rich set of libraries and tools for data analysis
c) It is the fastest programming language
d) It is only used for web development

(22). Python is a high-level, interpreted programming language.


(TRUE/FALSE)

(23). What are reserved words in Python


a) Names you can give to variables
b) Keywords with special meaning in the language
c) Comments in code
d) Built-in functions

(24). Identifiers in Python can start with a number. (TRUE/FALSE)

(25). Which data type is mutable in Python


a) Strings
b) Tuples
c) Lists
d) Integers

(26). What is the output of the expression type(3.14) in Python


a) <class 'int'>
b) <class 'float'>
c) <class 'str'>
d) <class 'complex'>

(27). How do you convert a string s to an integer in Python


a) int(s)
b) float(s)
c) str(s)
d) dict(s)

(28).Operator is used for exponentiation in Python


a) *
b) **
c) ^
d) //

(29). Strings in Python are immutable. (TRUE/FALSE)

(30).The method would you use to convert all characters in a string


to uppercase
a) upper()
b) lower()
c) capitalize()
d) title()
(31). Which measure of central tendency is calculated by summing all
values and dividing by their count
a) Median
b) Mode
c) Arithmetic Mean
d) Geometric Mean

(32)What is the relationship among mean, median, and mode in a


perfectly symmetric data distribution
a) Mean > Median > Mode
b) Mean = Median = Mode
c) Mean < Median < Mode
d) None of these
Answer: b) Mean = Median = Mode

(33).Which property does the arithmetic mean possess


a) It minimizes the sum of absolute deviations.
b) It minimizes the sum of squared deviations.
c) It maximizes the range of data.
d) It is always equal to the mode.
Answer: b) It minimizes the sum of squared deviations.

(34).How is the standard deviation related to variance


a) Variance is the square root of the standard deviation.
b) Standard deviation is the square of the variance.
c) Standard deviation is the square root of variance.
d) Variance and standard deviation are unrelated.
Answer: c) Standard deviation is the square root of variance.

(35).In grouped data, the mode can be found using:


a) Midpoint of the largest class interval
b) Class boundaries
c) Mode formula involving the modal class
d) Sum of frequencies
Answer: c) Mode formula involving the modal class

2. Testing of Hypothesis
(36).What is the probability of making a Type I error
a) Confidence level
b) Level of significance
c) Power of the test
d) Type II error
Answer: b) Level of significance n

(37).What is the purpose of a null hypothesis (


𝐻
0
H
0

(38). in hypothesis testing


a) To propose a new theory
b) To state no significant effect or relationship exists
c) To test the sampling method
d) To calculate variance

(39).Which test is used to compare the means of two independent


small samples
a) Z test
b) F test
c) t test
d) Chi-Square test
(40).What is the main assumption of ANOVA
a) Data follows a normal distribution.
b) Data is skewed.
c) Samples have unequal variances.
d) None of these.
(41). Which of the following is an essential Python library for data
science
a) NumPy
b) Scikit-learn
c) Pandas
d) All of the above

(42).Which data type is mutable in Python


a) String
b) Tuple
c) List
d) Set

(43).What is the purpose of the random.randint(a, b) function


a) Generates a random float between 0 and 1
b) Generates a random integer between a and b (inclusive)
c) Generates a random even number
d) Generates random numbers without bounds
(44).Which of the following is a decision-making statement in Python
a) for loop
b) if statement
c) while loop
d) Function call
(45).Which keyword is used to define a user-defined function in
Python
a) function
b) def
c) lambda
d) define
Quiz 2
(1) How do you import a module named mymodule in Python
a) include mymodule
b) import mymodule
c) load mymodule
d) define mymodule
(2) What is the file extension of a Python module
a) .txt
b) .docx
c) .py
d) .html
(3) What command would you use to list all functions in a module
math
a) dir(math)
b) help(math)
c) list(math)
d) info(math)
(4) How do you write text to a file in Python
a) file.write(text)
b) file.read(text)
c) file.append(text)
d) file.print(text)
(5) Which method is used to read all lines of a file into a list
a) file.readlines()
b) file.read()
c) file.readline()
d) file.list()
(6) How do you check if a file named data.txt exists in the current
directory
a) os.exists('data.txt')
b) os.path.exists('data.txt')
c) os.isfile('data.txt')
d) os.file.exists('data.txt')

(7) What will the following code do python with open('file.txt', 'r') as
f: content = f.read()
a) Write to the file file.txt
b) Read the contents of file.txt
c) Delete the file file.txt
d) Close the file file.txt
(8) Which method is used to create a new directory
a) os.mkdir()
b) os.create()
c) os.makedir()
d) os.newdir()
(9) What does the os.listdir() function do
a) Lists all files in a directory
b) Deletes all files in a directory
c) Moves files between directories
d) Reads the content of a file
(10) How do you delete a file named oldfile.txt
a) os.delete('oldfile.txt')
b) os.remove('oldfile.txt')
c) os.kill('oldfile.txt')
d) os.del('oldfile.txt')

(11) What is a class in object-oriented programming

a) A blueprint for creating objects

b) A function that returns a value

c) A type of loop in programming

d) A built-in data type in Python

(12) Which keyword is used to define a class in Python

a) def
b) class

c) object

d) new

(13) An object is a collection of data and methods that act on the


data. (True/False)

(14) Which method is automatically called when an object is


created in Python

a) __str__

b) __init__

c) __new__

d) __del__

(15) What is data hiding in OOP

a) Encapsulating data to prevent direct access

b) Using functions to modify data

c) Storing data in files

d) Encrypting data

(16) Which of the following is used to indicate a private attribute in


Python
a) attr

b) _attr

c) __attr

d) attr_

(17) Data abstraction refers to providing only essential


information to the outside world. (True/False)

(18) Which of the following is an example of data abstraction

a) Hiding internal data structures

b) Writing comments in code

c) Using loops to iterate

d) Using the print function

(19) What is inheritance in OOP

a) A mechanism to create a new class from an existing class

b) A function that returns multiple values

c) A type of loop

d) A way to store data

(20) Inheritance allows the reuse of existing code. (True/False)

(21).What is a module in Python


a) A built-in function
b) A collection of Python files
c) A file containing Python code (functions, classes, or variables)
d) A third-party package

(22).Which keyword is used to include a module in Python


a) include
b) import
c) module
d) package

(23).How do you import only a specific function from a module


a) import module.function
b) from module import function
c) include function from module
d) import function

(24).Where are Python packages stored


a) .lib directory
b) .modules directory
c) A directory containing an __init__.py file
d) System memory

(25).What is the purpose of the __name__ == "__main__" statement


a) To indicate the file is a module
b) To prevent code execution when the module is imported
c) To define the entry point of the script
d) Both b and c
(26).Which mode opens a file for both reading and writing in Python
a) r
b) w
c) r+
d) rw

(27).What does the readlines() method do


a) Reads the entire file as a string
b) Reads the file and returns a list of lines
c) Writes multiple lines to a file
d) Closes the file

(28).How do you check if a file exists in Python


a) os.filecheck()
b) os.path.isfile()
c) file.exists()
d) path.isfile()

(29).What is the default mode when opening a file using open()


a) w
b) r
c) a
d) r+

(30).Which of these methods is used to delete a file in Python


a) os.remove()
b) os.delete()
c) file.delete()
d) os.rmdir()

31. Exception Handling


What is the base class for all exceptions in Python
a) BaseException
b) Error
c) Exception
d) RuntimeError

(32).Which block must always accompany a try block


a) else
b) except
c) finally
d) with

(33).What does the finally block do


a) Executes only when an exception occurs
b) Executes whether or not an exception occurs
c) Skips execution if no exception occurs
d) Re-raises the caught exception

(34).How do you raise a user-defined exception in Python


a) throw Exception
b) raise Exception
c) catch Exception
d) def Exception()

(35).Which statement is correct about Python exceptions


a) All exceptions must be caught to execute code.
b) Exceptions cannot be nested.
c) Multiple except blocks can be used for a try block.
d) Python does not support user-defined exceptions.

(36).What is the purpose of a constructor in a class


a) To define methods
b) To initialize an object’s attributes
c) To delete an object
d) To inherit from another class

(37).How is a constructor defined in Python


a) init()
b) __constructor__()
c) __init__()
d) create()

(38).Which keyword is used to inherit a class in Python


a) inherits
b) extend
c) super
d) None of the above

(39).What is data abstraction


a) Hiding details of data implementation from the user
b) Restricting access to methods
c) Using a public class for all attributes
d) None of these

(40).Which access specifier allows data hiding in Python


a) Public
b) Private
c) Protected
d) All of these

(41).How do you create a private variable in Python


a) Prefix the variable name with _
b) Prefix the variable name with __
c) Use private keyword
d) Define it inside a private method

(42).Which concept allows an object to have multiple forms


a) Inheritance
b) Abstraction
c) Polymorphism
d) Encapsulation

(43).What is an object in Python


a) A blueprint of a class
b) An instance of a class
c) A function within a class
d) A built-in Python module

(44).What is method overriding in inheritance


a) Defining a new method in the subclass
b) Overriding a method in the parent class with a new
implementation in the child class
c) Using a method from the parent class without modification
d) Using multiple parent classes
(45).Which of the following refers to binding data and methods into a
single unit
a) Polymorphism
b) Abstraction
c) Encapsulation
d) Inheritance

Long Questions

Unit 1: Statistical Measures and Data Representation


1. Differentiate between arithmetic mean, geometric mean, and
harmonic mean, and provide examples where each is best suited.
2. Explain how to calculate the median for raw and grouped data,
using examples to interpret the outcomes.
3. Discuss the distinction between mode, mean, and median, and
identify cases where mode serves as the most suitable measure.
4. Use examples to demonstrate the relationship among mean,
median, and mode in positively skewed datasets.
5. Outline the key properties of standard deviation and explain why
it is considered better than range for measuring variability.
6. Define the coefficient of variation, describe its calculation, and
explain its importance in analyzing datasets.
7. Clarify the concept of covariance and its differences from
correlation, with an example to interpret covariance values.
8. Describe quartiles, interquartile range, and quartile deviation, and
explain their significance in summarizing data.
9. Compare various graphical methods for representing single-
dimensional data, highlighting their strengths and weaknesses.
10. Provide a step-by-step explanation for constructing and
interpreting a box plot, with a focus on detecting outliers.
11. In a normal distribution, discuss the relevance of mean, median,
and mode, and their relationship to one another.
12. Demonstrate the procedure for finding the median in datasets
with an even number of observations, with examples.
13. Show how to calculate quartile deviation and interquartile range
for a dataset and interpret the results.
14. Illustrate covariance calculation through a numerical example
and explain the meaning of its sign.
15. Explain the role of visual data representation in statistics and
compare different methods with examples.
________________________________________
Unit 2: Hypothesis Testing and Statistical Inference
1. Define Type I and Type II errors in hypothesis testing and discuss
their effects on conclusions drawn from tests.
2. Summarize the process of hypothesis testing, from formulating
hypotheses to interpreting p-values, emphasizing the role of
significance levels.
3. Discuss the meaning of p-values in hypothesis testing and explain
how they guide decisions about rejecting null hypotheses.
4. Outline the steps and assumptions of a t-test for comparing two
independent samples, explaining their importance.
5. Highlight the role of confidence intervals in hypothesis testing and
describe the insights they offer about population parameters.
6. Explain the impact of significance levels (alpha) on the likelihood
of Type I and Type II errors in statistical tests.
7. Define critical values in hypothesis testing and describe how they
influence decisions regarding hypotheses.
8. Explain how p-values are used to assess statistical significance and
interpret the implications of a low p-value.
9. Compare parametric and non-parametric tests, detailing scenarios
where each is appropriate and their key distinctions.
10. Discuss the purpose of ANOVA, its steps, and how it differs from
t-tests in analyzing multiple groups.
11. Provide an example of interpreting hypothesis test results in a
real-world scenario and their influence on decision-making.
12. Describe how to set up and interpret a hypothesis test for a
population proportion, considering key assumptions.
13. Discuss the role of assumptions in hypothesis testing, the
consequences of violations, and potential remedies.
14. Explain the connection between confidence intervals and
hypothesis testing, with examples of their complementary use.
15. Present a real-world case where hypothesis testing is applied,
describing the setup, execution, and interpretation of results.
________________________________________
Unit 3: Python for Data Science
1. Discuss why Python is a popular choice in Data Science, outlining
its advantages over other programming languages.
2. Explain the significance of libraries like NumPy, Pandas, and
Matplotlib in Data Science, with practical examples of their
applications.
3. Explore Python's built-in data types, providing examples of
operations and methods for each.
4. Describe the process of type conversion in Python, illustrating it
with examples.
5. Provide an overview of Python operators, explaining their usage
with relevant examples.
6. Compare for and while loops in Python, including examples to
highlight their differences. Discuss how loop control statements like
break, continue, and pass function.
7. Explain how user-defined functions enhance code modularity and
reusability, using examples to illustrate their use.
8. Discuss function arguments in Python, detailing different types
with examples.
9. Describe default arguments in Python functions, their definition,
and benefits, with examples. Additionally, explain the role of
comments in improving code readability and maintenance.
10. Explore the math module in Python, showcasing common
functions and their practical applications.
11. Explain how to define and call functions in Python, and discuss
how to pass and return values with examples. Also, compare the use
of tuples versus lists, illustrating their advantages.
12. Define dictionaries in Python, explaining how they differ from
other structures, and provide examples of operations. Similarly,
describe sets, their features, and operations with examples.
13. Discuss the importance of exception handling in Python, and
provide examples of common techniques for managing exceptions.
14. Introduce lambda functions in Python, comparing them with
regular functions, and highlight their usage through examples.
15. Explain file handling in Python, with examples of reading from
and writing to files using common techniques.

Unit 4 : File And Exception Handling

(11) Elaborate on the concept of modules in Python. How do they


contribute to organizing code and enhancing reusability? Include
suitable examples. [BL2]

(12) Explain the steps to create and use custom modules and
packages in Python. Illustrate with examples of directory structures
and import methods. [BL2]

(13) Differentiate between a module and a package in Python.


Describe how packages are created and utilized, along with an
example. [BL2]

(14) What is the purpose of the _init_.py file in Python packages?


Discuss what happens when it is excluded. [BL2]

(15) Explain how the import statement works in Python. Compare it


with from module import. Provide examples to highlight the
differences. [BL2]
(16) Describe file handling in Python, including creating, reading,
writing, and appending operations. Use examples for demonstration.
[BL2]

(17) How can exceptions during file operations be managed in


Python? Provide examples of common errors and their handling
mechanisms. [BL2]

(18) Outline the steps involved in working with binary files in Python.
Include examples for both reading and writing binary data. [BL2]

(19) Illustrate file handling in Python using context managers and the
with statement. Show how it improves resource management with
examples. [BL2]

(20) Explain how to check if a file exists and handle file paths in
Python. Use examples with os.path functions. [BL2]

(21) Discuss the challenges of handling large files in Python regarding


file size and performance. Suggest strategies to optimize
performance. [BL2]

(22) Explain how to write and read CSV files in Python. Demonstrate
this using the csv module with examples. [BL2]

(23) Discuss the functionality of os.walk() for traversing directories


and processing files. Provide a practical example. [BL2]
(24) What are the differences between absolute and relative file
paths in Python? Provide examples of their usage in appropriate
scenarios. [BL2]

(25) Highlight the benefits of using Python modules and packages in


large-scale projects. How do they help in maintaining organized and
high-quality code? [BL2]

Unit 5 : OOPS

(11) Define classes and objects in object-oriented programming.


Explain their connection and provide examples to illustrate. [BL2]

(12) What is the purpose of constructors in a class? Explain how they


are used to initialize objects, with an example. [BL2]

(13) Discuss the significance of the self parameter in Python class


methods. Why is it essential? Provide examples. [BL2]

(14) Explain the concept of data hiding in object-oriented


programming. Demonstrate its implementation in Python using
private and public attributes. [BL2]

(15) What is data abstraction in OOP? How does it contribute to


encapsulation? Provide examples to support your explanation. [BL2]
(16) Describe the process of creating and using class methods in
Python. How do they differ from instance methods? Include
examples. [BL2]

(17) How does inheritance work in object-oriented programming?


Explain the process of inheriting from a superclass with examples.
[BL2]

(18) Define multiple inheritance in Python. How is it managed in


Python? Provide examples to explain. [BL2]

(19) Explain the role of the super() function in Python. How is it


connected to inheritance? Illustrate with examples. [BL2]

(20) Compare single inheritance with multiple inheritance. Use


examples to explain the differences. [BL2]

(21) What is polymorphism in Python? Discuss how it enhances code


flexibility with examples. [BL2]

(22) Explain how encapsulation is implemented in Python using


classes and objects. Provide suitable examples. [BL2]

(23) How can exceptions be handled in constructors? Discuss the


impact on object initialization with examples. [BL2]
(24) Define a class method in Python. How is it declared and used?
Provide examples for better understanding. [BL2]

(25) Describe how decorators are used to create class methods and
static methods in Python. Include examples to clarify. [BL2]

You might also like