🚀 Crack FAANG Interviews: Master Logistic Regression with This 3-Level Quiz Challenge (Score 90%+ to Prove You're Ready!)
Logistic Regression Quiz - Basic Level
Q1. What is the primary purpose of logistic regression?
A) Predict continuous valuesB) 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 functionB) ReLU function
C) Sigmoid function
D) Tanh function
Q3. The output of the sigmoid function always lies between:
A) -1 to 1B) 0 to 1
C) -∞ to ∞
D) 1 to 100
Q4. Logistic Regression is considered a type of:
A) Supervised learningB) Unsupervised learning
C) Reinforcement learning
D) Dimensionality reduction
Q5. Which of the following is not an assumption of logistic regression?
A) No multicollinearityB) 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 continuousB) 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 boundaryB) 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 functionB) 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 ClusteringB) Dropout
C) L1 or L2 Regularization
D) Cross-entropy boosting
Detailed Explanations
- Logistic regression is a classification algorithm for predicting discrete outcomes (often binary).
- Sigmoid transforms real numbers into a 0-1 range, useful for probabilities.
- Sigmoid output lies strictly between 0 and 1.
- It uses labeled data for training, which makes it supervised.
- Logistic regression doesn't assume normality of errors like linear regression.
- Logistic regression predicts binary or categorical outputs.
- MLE estimates coefficients by maximizing the likelihood of observed labels.
- Output is the probability of class = 1.
- The logit is the log of odds, which the model learns as a linear function of inputs.
- L1/L2 regularization penalize model complexity to prevent overfitting.