wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Stats+Python ISA Test - Quiz 2

Total questions: 20

Worksheet time: 13mins

Name
Class
Date
1.

Q: Which of the following clustering algorithm is the most sensitive to outliers?

a)

K-medians clustering algorithm

b)

K-modes clustering algorithm

c)

K-means clustering algorithm

d)

K-medoids clustering algorithm

2.

Q: Consider the image attached and write the code in python needed to create a dataframe that looks as this one?

a)

DepartmentData=DataFrame({'DOJ': ['12-Mar-2020','2-Feb-2020','15-Jan-2020','23-Apr-2019','14-Sep-2019'],

'Dep': ['BI','QA','DEV','DEV','QA'],

'id': [101,102,103,104,105],

})

b)

DepartmentData=pd.DataFrame({'DOJ': ['12-Mar-2020','2-Feb-2020','15-Jan-2020','23-Apr-2019','14-Sep-2019'],

'Dep': ['BI','QA','DEV','DEV','QA'],

'id': [101,102,103,104,105]

})

c)

DepartmentData=pd.DataFrame({DOJ== ['12-Mar-2020','2-Feb-2020','15-Jan-2020','23-Apr-2019','14-Sep-2019'],

Dep==['BI','QA','DEV','DEV','QA'],

id== [101,102,103,104,105]

})

d)

None of the above

3.

Q: Which of the following should be imported from sklearn to measure the classification or model performance and accuracy?

a)

metrics

b)

Pandas

c)

Numpy

d)

MASS

4.

Q: Consider the following image depicting association between price and age variable. What would you conclude from the output?

a)

Positive correlation between variables

b)

Negative correlation between variables

c)

Zero correlation between variables

d)

Cannot say

5.

Q: Which of the following code computes or executes the best fit of the Linear regression model as listed below?

a)

LREG.predict

b)

plt.plot.fit

c)

LREG.fit

d)

RegModel.fit

6.

Q: Let’s say, a “Linear regression” model perfectly fits the training data (train error is zero). Now, Which of the following statement is true?

a)

You will always have test error zero

b)

You can not have test error zero

c)

Error may be zero, if there is no noise in the test data.

d)

None of the above

7.

Q: What is bootstrap sampling in statistics and machine learning?

a)

It is a power option to reboot your final model

b)

A library used to improve model accuracy in python

c)

Drawing of sample data repeatedly with replacement, to estimate population parameter

d)

Drawing of random samples into the population to estimate the best sample

8.

Q: The following visualization shows the fit of three different models (in blue line) on same training data. What can you conclude from these visualizations?


1) The training error in first model is higher when compared to second and third model.

2) The best model for this regression problem is the last (third) model, because it has minimum training error.

3) The second model is more robust than first and third because it will perform better on unseen data.

4) The third model is overfitting data as compared to first and second model.

5) All models will perform same because we have not seen the test data.

a)

1 and 3

b)

1, 3 and 4

c)

Only 5

d)

1 and 2

9.

Q: Below graphs show two fitted regression lines (A & B) on randomly generated data. Now, I want to find the sum of residuals in both cases A and B. What would it be?


Note:

1) Scale is same in both graphs for both axis.

2) X axis is independent variable and Y-axis is dependent variable.

a)

A has higher than B

b)

A has lower than B

c)

Both have the same

d)

None of these above

10.

Q: Consider a linear regression problem, using R-squared value to measure goodness-of-fit. Having added another significant variable in the model results in?

a)

A decrease in the r-squared value

b)

A decrease in the adjusted-r-squared value

c)

An increase in both the r-squared values

d)

A decrease in both r-square and adjusted-r-squared values

11.

Q: Which of the one is true about the presence of Heteroskedasticity in the model?

a)

Linear Regression with constant error terms

b)

Linear Regression with varying error terms

c)

Linear Regression with zero error terms

d)

None of the above

12.

Q: Given that horizontal axis measures independent variable & vertical axis dependent variable, which of the following offsets, do we use in case of least square line fit?

a)

Vertical offset

b)

Perpendicular offset

c)

Both but depend on situation

d)

None of above

13.

Q: In order to execute a bag of multiple decision trees, which of the following package is appropriate?

a)

from sklearn.ensemble import RandomForestRegressor

b)

from sklearn.ensemble import MultipleTreePlot

c)

from sklearn.forest import RandomForestRegressor

d)

from sklearn.ensemble import TreeBag

14.

Q: Suppose the distribution of salaries in a company X has median $35,000, and 25th and 75th percentiles are $21,000 and $53,000 respectively.Would a person with Salary $1 be considered an Outlier?

a)

Yes

b)

No

c)

More information is required

d)

Not Applicable

15.

Consider this graph which consists the method of plotting the explained variation as a function of the number of clusters and is used to determine the optimum number of clusters. What is it called?

a)

Elbow Clusters

b)

Elbow Curve

c)

Elbow optimum

d)

Elbow optimal clustering

16.

Q: Consider 3 independent variables X1= Weight, X2 = Colour and X3 = Depth. For an imputation of missing values, which of the following should substitute for variable X2 ?

a)

Mean value of X2

b)

Mean value of X1

c)

Mode value of X3

d)

Mode value of X2

17.

Q: Consider a student's dataset for an University. One of the variables in the data is 'Age' and based on its entries, suppose one wants to segregate the students in the following status as shown in the picture. What would you call this manipulation?

a)

Boot Strapping

b)

Machine Learning

c)

Ordinal Mapping

d)

Feature Engineering

18.

Q: On performing a normalization or standardization on your data, which of the following impact applies on the data?

a)

Outliers in the model are removed

b)

Brings uniformity in the scale of your variables

c)

Inverts the relationship between variables

d)

None of the above

19.

Q: Consider a set of variables X1 = Size, X2 = Rating, X3 = Religion, X4 = Gender, X5 = ParkingType, X6= Ranking, X7= Colour and X8 = Height. For which of these variables, is mapping of features applicable?

a)

All of the above

b)

Only X1, X2, X3 and X6

c)

Only X1, X2 and X6

d)

Only X3, X4, X5, X7 and X8

20.

Q) Consider the distribution of a particular variable which follows the one as shown in the image. Which of the following would be applicable to justify the distribution?

a)

A symmetric distribution with a mean μ = 0

b)

A negatively skewed distribution

c)

A positively skewed distribution

d)

A negative and symmetric distribution with μ = 0