Interviews are the most challenging part of getting any job especially for **Data Scientist** and **Machine Learning Engineer** roles where you are tested on **Machine Learning** and **Deep Learning** concepts.

So, Given below is a short quiz that consists of **25 Questions** consisting of **MCQs**(One or more correct), **True-False,** and **Integer Type Questions** to check your knowledge.

**– The ideal time devoted to this quiz should be around 45 min.**

** **

**1. Which of the following are correct about Activation Functions in neural network?**

(a) Derivative of a sigmoid activation function g(z) is g(z)[1-g(z)]

(b) Derivative of a hyperbolic tangent activation k(z) function is 1-(k(z))^{2}

(c) Derivative of a leaky RELU Activation function h(z) is 1

(d) Derivative of RELU activation function l(z) is 0 for z<0

**Answer: [ a, b, d ]**

**Explanation: The derivative of Leaky RELU activation function h(z) is 1 only for z>0, while for z<0, it has a very small value.**

**2. Choose the correct option for residuals in linear regression?**

(a) Residuals are horizontal offset, and the sum of residuals varies between [0,1]

(b) Residuals are horizontal offset, and the sum of residuals can be unity

(c) Residuals are vertical offset, and the sum of residuals is always unity

(d) Residuals are vertical offset, and the sum of residuals is always zero

**Answer: [ d ]**

**Explanation: Residuals are vertical offset and the sum of residuals is always zero.**

**3. In two-category classification, according to the minimum risk decision rule, when will be decided w _{1} if:[ where, R- Risk Function, α_{1}**,

(a) R(x/α_{1}) < R(x/α_{2})

(b) R(α_{1}/x) < R(α_{2}/x)

(c) R(x/α_{1}) > R(x/α_{2})

(d) R(α_{1}/x) > R(α_{2}/x)

**Answer: [ b ]**

**Explanation: For deciding class w _{1}, the conditional Risk for w_{1} is smaller than w_{2}.**

**4. Which of the following are correct about the Hyperbolic tangent activation function?**

(a) Its output is zero centered

(b) Its value ranges between 0 to 1

(c) Its derivative value lies between 0 to 1

(d) Its output lies between -1 to 1

**Answer: [ a, c, d ]**

**Explanation: The output range for the Hyperbolic Tangent activation function is between [-1,1].**

**5. True or False: **A teacher uses the following Strategy for evaluation of multiple-choice questions(4 options) having a single correct option-

For each correct question assign 4 marks and for an incorrect question deduct 1 mark. If the probability of opting for each question correctly is uniform, is the strategy fair?

**Answer: [ False ]**

**Hint: ** **Calculate the overall expectation value and then observe whether it’s zero or not.**

**6. Which of the following statements are TRUE?**

(a) Tree-based models rely on dividing the feature space into sub-sections

(b) outliers do not normally affect tree-based models

(c) outliers only tend to models which rely on assigning weights to parameters

(d) Standard scaler performed well on features that have outliers

**Answer: [ a, b, c ]**

**Explanation: Standard Scaler does not perform well on those features which are having outliers since outliers affect mean and variance both.**

**7. Which of the following are correct about Type-1 and Type-2 errors?**

(a) There is a tradeoff between type-1 and type-2 error

(b) Type-1 error is also known as False positive

(c) Type-1 error can be reduced by reducing the alpha level

(d) Type-1 error is related to the power of the test

**Answer: [ a, b, c ]**

**Explanation: Type-2 Error is related to the power of the test.**

**8. Statement-1: Adjusted-R ^{2 }is an increasing function of the number of independent variables.**

** Statement-2: R ^{2} is not an increasing function of the number of independent variables.**

** Which of the following are correct?**

(a) Both Statements-1 and 2 are True

(b) Statement-1 is True and Statement-2 is False

(c) Both Statements-1 and 2 are False

(d) Statement-2 is True or Statement-2 is False

**Answer: [ c, d ]**

**Explanation: R ^{2 }is an increasing function of the number of independent variables while adjusted-R^{2} is not an increasing function of the number of independent variables.**

**9. Which of the following are correct related to the Confusion Matrix?**

(a) Confusion matrix is always a square matrix

(b) Confusion matrix is a way to judge our classification model

(c) Diagonal entries in a confusion matrix may be zero or non-zero

(d) Confusion matrix is a symmetric matrix

**Answer: [ a, b, c ]**

**Explanation: Confusion matrices are not necessarily symmetric.**

**10. True or False: **If two variables X and Y are correlated, then there necessarily exists a mutual dependency between the variables.

**Answer: [ False ]**

**Explanation: Correlation may be due to pure chance, or due to any third common factor.**

**For further reference, refer to the link**

** **

**11. Integer Answer Type Question:**

** **How many of the given techniques are used for Dimensionality Reduction?

Pairwise correlation, Stepwise selection, Cluster analysis, Principal component analysis, Backward elimination(RFE), LASSO Regression, Tree-based selection, Multicollinearity.

**Answer: [ 8 ]**

**Explanation: All mentioned techniques can be used as a dimensionality reduction technique in different varieties of problem statements.**

**For further reference, refer to the link**

**12. True or False: **If two variables X and Y are correlated, then we must be able to specify the cause i.e, X is the cause or Y is the cause.

**Answer: [ False ]**

**Explanation: ****Correlation does not necessarily imply Causation while Causation implies Correlation.**

**For further reference, refer to the link **

** **

**13. Which of the following is FALSE related to Feature Selection Techniques?**

(a) Filter based methods: Correlation, Anova, Chi-square test

(b) Wrapper based methods: Forward selection, Backward elimination, Stepwise selection

(c) Embedded methods: LASSO, Ridge, Elastic Net.

(d) None of the above

**Answer: [ d ]**

**Explanation: All the mentioned techniques are correctly categorized.**

**14. A medical researcher wants to test the effect of a newly made drug on the heart rate of people. The hypothesis for his test would be:**

**H _{0}: The drug does not affect the heart rate
**

**H _{1}: The drug affects the heart rate**

**Which error is more serious among Type-1 and Type-2 errors?**

(a) Type-1 error

(b) Type-2 error

(c) Depends on the exact value of alpha

(d) Can’t be determined

**Answer: [ b ] **

**Explanation: Consequences of Type-1 error: Researcher will not approve the drug**

** Consequences of Type-2 error: The Researcher will approve the drug**

∴ **Type-2 error is more serious: The Researcher will try to increase the alpha level above 0.05 so that he can reduce the probability of incorrectly accepting the Null hypothesis.**

**15. True or False: **In a classification problem statement after training followed by testing, we get an accuracy of 99.7%, we can necessarily conclude that it is a good model.

**Answer: [ False ]**

**Explanation: Accuracy is not only a sufficient metric for judging our classification model.**

** **

**16. Which of the following statements are correct about Regression and Correlation?**

(a) Correlation is a descriptive statistics while Regression is an Inferential Statistics

(b) Both correlation and regression are Independent of origin and scale

(c) Correlation is a relative measure while Regression is an absolute

(d) Correlation is purely random while Regression is Functional

**Answer: [ a, c, d ]**

**Explanation: Regression is independent of origin but dependent on scale.**

**17. Which of the following options are correct regarding R ^{2} and adjusted-R^{2}?**

(a) Adjusted-R^{2} is an improved version of R^{2}

(b) Adjusted R^{2} can be negative whereas R^{2} can’t

(c) Difference between R^{2} and adjusted-R^{2} is only of degrees of freedom

(d) Adjusted-R^{2} includes the independent variables in the model on merit

**Answer: [ a, c, d ]**

**Explanation: R ^{2} can be negative when the chosen model is worse than the horizontal line(mean).**

**18. Which statements are correct about Regression Coefficient b _{xy} and b_{yx}?**

(a) These are unaffected by change of origin but affected by the change of scale

(b) If variables are independent, then both the coefficients are zero

(c) If one of the regression-coefficient i.e, b_{xy}>1, then b_{yx}>1

(d) The arithmetic mean of 2 regression coefficient is greater than the coefficient of correlation

**Answer: [ a, b, d ]**

**Explanation: If one of the regression-coefficient i.e, b _{xy}>1, then b_{yx}<1.**

**19. True or False: **Dropout can be considered as the ensemble technique for a neural network.

**Answer: [ True ]**

**Explanation: Ensemble learning uses multiple models and combines their predictions. Dropout refers to dropping off (making zero) units in the neural network randomly with a certain probability while training which results in several different neural networks. To combine the results of all of their networks, the units are multiplied by probability uses for dropping units. Therefore, “ensemble interpretation” is valid for dropout.**

**20. Which statements are correct about Boosting ensemble techniques?**

(a) Boosting exploits the dependency between the models

(b) In Ada Boost, learning happens by weights updation

(c) In Gradient boosting, learning happens by optimizing the loss function

(d) In Boosting, weak learners are trained parallelly

**Answer: [ a, b, c ]**

**Explanation: In boosting, weak learners are trained sequentially.**

**21. In Bootstrapping Procedures of Bagging Algorithm, which is TRUE?**

(a) Default: Choose all observations and features

(b) Random Subspace: All observations but subsets of features

(c) Random Patches: Subset of features and subsets of observation

(d) All of the above

**Answer: [ d ]**

**Explanation: All of the statements are true.**

**22. True or False: **Both One Hot Encoding and Label Encoding increases the dimensionality of the dataset by adding new variables.

**Answer: [ False ]**

**Explanation: One Hot encoding increases the dimensionality of the dataset whereas the Label encoder doesn’t increase the dimensionality.**

**23. Which of the following statements are correct for Support Vector Machines(SVM)?**

(a) A support vector machine is a machine learning algorithm that analyses data for both classification and regression analysis

(b) SVM is an unsupervised learning method

(c) An SVM finds the hyperplane which is having the largest margin value

(d) SVMs are used in text categorization, image classification recognition, etc.

**Answer: [ a, c, d ]**

**Explanation: SVM is a supervised machine learning technique.**

**24. Consider the following 3-class confusion matrix:**

** PREDICTED**

ACTUAL ↴ |
A |
B |
C |

A |
25 |
5 |
2 |

B |
3 |
32 |
4 |

C |
1 |
0 |
15 |

**Which of the following are correct?**

(a) The overall accuracy of the model is 82.75%

(b) Recall and sensitivity for class B are the same

(c) Precision for class A is 0.462

(d) Specificity for class C is 0.915

**Answer: [ a, b, c, d ]**

**Hint: Use basic formulas related to the confusion matrix.**

**25. True or False: **Analysis of Covariance(ANCOVA) is a technique to capture the association between continuous and categorical variables.

**Answer: [ True ]**

**Explanation: ANCOVA is used to find the association between continuous and categorical variables.**

** **

** **

*Thanks for reading!*

I hope you enjoyed the questions and were able to test your knowledge about Data Science.

If you liked this and want to know more, go visit my other articles on Data Science and Machine Learning by clicking on the Link

Please feel free to contact me on Linkedin, Email.

Something not mentioned or want to share your thoughts? Feel free to comment below And I’ll get back to you.

Currently, I pursuing my Bachelor of Technology (B.Tech) in Computer Science and Engineering from the **Indian Institute of Technology Jodhpur(IITJ). **I am very enthusiastic about Machine learning, Deep Learning, and Artificial Intelligence.

Lorem ipsum dolor sit amet, consectetur adipiscing elit,

For Q24: answer is " b" which is alone correct. Per my calculations the values for options a, c, d as follows: (a) The overall accuracy of the model is 88.5% (c) Precision for class A is 0.781 (d) Specificity for class C is 0.984. Following is the calculation attempted per my understanding. If this is not correct, would be great to see the calculation behind why a, c, d are correct. For Class A TP=25 TN=32+4+0+15=51 FP=5+2 = 7 FN=3+1=4 Accuracy = (TP+TN)/(TP+FP+TN+FN) = 76/87 = 87.3 Precision = (TP) / (TP+FP) = 25/32 = 78.125 Recall/Sensitivity = (TP) / (TP+FN) = 25/29 = 86.2 Specificity = (TN) / (TN+FP) = 51/58 = 87.9 For Class B TP = 32 TN = 25+2+1+15 = 43 FP = 3+4 = 7 FN = 5+0 = 5 Accuracy = 75/87 = 86.2 Precision = 32/39 = 82.05 Recall/Sensitivity = 32/37 = 86.48 Specificity = 43/50 = 86 For Class C TP = 15 TN = 25+5+32+3 = 65 FP = 1+0 = 1 FN = 4+2 = 6 Accuracy = 80/87 = 91.95 Precision = 15/16 = 93.75 Recall/Sensitivity = 15/21 = 71.4 Specificity = 65/66 = 98.48 Metrics for overall: TP = 25+32+15 = 72 TN = 51+43+65 = 159 FP = 7+7+1 = 15 FN = 4+5+6 = 15 Over All Accuracy = 72+159/(72+159+15+15) = 231/261 = 0.885