Apply Bayes' rule to compute posterior
RobloxData Scientist · Online AssessmentLast updated
Evaluates understanding of Bayes’ rule and basic probability concepts—specifically computing a posterior probability P(A|B) and the marginal likelihood P(B) from a prior and likelihoods—in the Statistics & Math domain at a foundational-to-intermediate abstraction level.
A binary event (A) (e.g., “user is a payer” or “patient has a disease”) has prior probability (P(A)).
You observe evidence (B) (e.g., a model predicts positive, or a test result is positive) with known likelihoods:
- (P(B\mid A))
- (P(B\mid\neg A))
Task:
- Use Bayes’ rule to compute the posterior probability (P(A\mid B)).
- Show how to compute (P(B)) from the given quantities.
Optionally, illustrate with a numeric example to verify the formula.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.