PROBABILITY & STATISTICS · INTERVIEW QUESTION
Explain conditional probability and independence. How are they used in Naive Bayes?
🟡 intermediate · Probability Theory
Hint: P(A|B) = P(A∩B)/P(B). Independence means P(A|B) = P(A).
Answer
Conditional probability = / measures the probability of A given B occurred. Two events are independent if = P(A)$$P(B), meaning knowing B doesn't change A's probability. Naive Bayes classifier uses Bayes' theorem with the 'naive' conditional independence assumption: = ∏. This dramatically reduces parameters from exponential to linear. Despite the unrealistic independence assumption, it works well because:
- Classification only needs the correct ordering of , not calibrated probabilities
- Dependencies often cancel out.
Applications: spam filtering, text classification, medical diagnosis.
Variants: Gaussian NB (continuous), Multinomial NB (counts), Bernoulli NB (binary).
Related questions
- Explain Bayes' theorem and give an ML application.
- What is the Law of Large Numbers? How does it relate to ML?
- Explain the Central Limit Theorem and its assumptions. Why is it important in data science?
- What are conjugate priors? Give examples in Bayesian ML.
- What is the difference between Type I and Type II errors? How do they relate to precision and recall?