Data Science Interview Preparation

🚀 Crack FAANG Interviews: Master Logistic Regression with This 3-Level Quiz Challenge (Score 90%+ to Prove You're Ready!)

Logistic Regression Quiz - Basic Level

Logistic Regression Quiz - Basic Level

Q1. What is the primary purpose of logistic regression?

A) Predict continuous values
B) Perform clustering on data
C) Classify inputs into categories
D) Minimize variance in data

Q2. Which function is used in logistic regression to map predictions to probabilities?

A) Linear function
B) ReLU function
C) Sigmoid function
D) Tanh function

Q3. The output of the sigmoid function always lies between:

A) -1 to 1
B) 0 to 1
C) -∞ to ∞
D) 1 to 100

Q4. Logistic Regression is considered a type of:

A) Supervised learning
B) Unsupervised learning
C) Reinforcement learning
D) Dimensionality reduction

Q5. Which of the following is not an assumption of logistic regression?

A) No multicollinearity
B) Linearity between independent variables and log-odds
C) Normal distribution of errors
D) Independent observations

Q6. In logistic regression, the dependent variable is:

A) Always continuous
B) Ordinal only
C) Binary or categorical
D) Nominal only

Q7. Which method is typically used to estimate the coefficients in logistic regression?

A) Ordinary Least Squares (OLS)
B) Gradient Boosting
C) Maximum Likelihood Estimation (MLE)
D) K-Means

Q8. In binary logistic regression, the probability output is interpreted as:

A) Distance from decision boundary
B) Confidence score of linearity
C) Likelihood of belonging to the positive class
D) Absolute certainty

Q9. What is the logit function in logistic regression?

A) Sigmoid of a function
B) Log of independent variable
C) Log(odds) = ln(p / (1 - p))
D) Exponential of the target variable

Q10. Which of the following techniques helps avoid overfitting in logistic regression?

A) K-Means Clustering
B) Dropout
C) L1 or L2 Regularization
D) Cross-entropy boosting

Detailed Explanations

  1. Logistic regression is a classification algorithm for predicting discrete outcomes (often binary).
  2. Sigmoid transforms real numbers into a 0-1 range, useful for probabilities.
  3. Sigmoid output lies strictly between 0 and 1.
  4. It uses labeled data for training, which makes it supervised.
  5. Logistic regression doesn't assume normality of errors like linear regression.
  6. Logistic regression predicts binary or categorical outputs.
  7. MLE estimates coefficients by maximizing the likelihood of observed labels.
  8. Output is the probability of class = 1.
  9. The logit is the log of odds, which the model learns as a linear function of inputs.
  10. L1/L2 regularization penalize model complexity to prevent overfitting.
'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();
Theme images by Barcin. Powered by Blogger.