# Linear Regression in Machine Learning Questions and Answers

This set of Machine Learning Multiple Choice Questions & Answers (MCQs) focuses on “Linear Regression”.

1. In which category does linear regression belong to?
a) Neither supervised nor unsupervised learning
b) Both supervised and unsupervised learning
c) Unsupervised learning
d) Supervised learning

Explanation: In linear regression, the dataset is given to the learner. The classification is already done in the training data, from which the learner can learn. Hence, it is supervised learning.

2. The learner is trying to predict housing prices based on the size of each house. What type of regression is this?
a) Multivariate Logistic Regression
b) Logistic Regression
c) Linear Regression
d) Multivariate Linear Regression

Explanation: Learner is trying to predict a discrete number instead of binary output (yes or no / 0 or 1, etc.). Hence, it is a linear regression and not a logistic regression. Since there is only one independent variable, it is not multivariate linear regression.

3. The learner is trying to predict housing prices based on the size of each house. The variable “size” is ___________
a) dependent variable
b) label set variable
c) independent variable
d) target variable

Explanation: The variable “size” is not dependent on the price of the house. So, it is an independent variable. The variable “price” is dependent on size.

4. The target variable is represented along ____________
a) Y axis
b) X axis
c) Either Y-axis or X-axis, it doesn’t matter
d) Depends on the dataset

Explanation: The target variable is dependent on the other variables. So, it is represented as a function of the independent variable. Thus, it is plotted along the y-axis, after its value is calculated using the function.

5. The learner is trying to predict the cost of papaya based on its size. The variable “cost” is __________
a) independent variable
b) target Variable
c) ranked variable
d) categorical variable

Explanation: The cost is dependent on the size of the papaya. It is measured as a function of the size. The learner’s goal is to predict the price of the papaya. Hence, it is the target variable. It is represented along y-axis.

6. The independent variable is represented along _________
a) Either X-axis or Y-axis, it doesn’t matter
b) Y axis
c) X axis
d) Depends on the dataset

Explanation: As the name suggests, the independent variable is not dependent on other variables. The target variable’s value is predicted using the value of the independent variable. Thus, it is represented along the x-axis.

7. How many variables are required to represent a linear regression model?
a) 3
b) 2
c) 1
d) 4

Explanation: Three variables are required. They are: – 1) m = the number of training examples, 2) x = the independent variable, y = the target variable.

8. What does (x(5), y(5)) represent or imply?
a) There are 5 training examples
b) The values of x and y are 5
c) The fourth training example
d) The fifth training example

Explanation: In a linear regression model, the set (x(i), y(i)) represents the ith example in the training set. x(i) gives the value of ith x, y(i) gives the ith value of y.

9. Hypothesis h maps from x (independent variable) to y (dependent variable).
a) True
b) False

Explanation: The hypothesis is developed by the learner to predict y. It reads the value of x and then uses the mapping function to calculate the value of y for the given value of x.

10. Learning algorithm outputs the hypothesis.
a) False
b) True

Explanation: The learning algorithm iterates through the training dataset, develops a function with minimal error to predict the value of the target variable based on the value of the independent variable.

More MCQs on Linear Regression:

Sanfoundry Global Education & Learning Series – Machine Learning.

To practice all areas of Machine Learning, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]