KatInterview

Chatbot Quality Metrics: Joint Probability and A/B Testing

Statistics & ExperimentsModel answer
EasyModel answerStatistics & Experimentsprobabilityhypothesis-testinga-b-testing

Last updated

Apply independence rules, expected counts with uncertainty, and a two-proportion hypothesis test to evaluate and compare chatbot response quality.

Scenario

You are a data scientist reviewing the output quality of a customer-service chatbot. Internal evaluation has established two metrics for any given response:

  • P(accurate) = 0.7
  • P(on-topic) = 0.8

Part 1 — Joint probability

Assuming accuracy and on-topic-ness are independent events, what is the probability that a single response is both accurate and on-topic? Briefly explain what happens to that estimate if the independence assumption does not hold.

Part 2 — Expected count

You pull a random sample of 1,000 logged responses. How many would you expect to be neither accurate nor on-topic? Attach an appropriate measure of uncertainty to that estimate.

Part 3 — Comparing two models

Your team wants to decide whether a new model (Model B) produces on-topic responses at a different rate than the current model (Model A). Describe, end to end, how you would run a hypothesis test at significance level α = 0.05, including:

  • how you would collect and label the data
  • the hypotheses and test statistic
  • a worked numerical example
  • how to interpret a non-significant result
  • when you would use a different test instead

A strong answer will also address sample size planning and at least two practical pitfalls.

Hints

Hint 1

For Part 1, the product rule P(A ∩ B) = P(A)·P(B) only holds under independence — think about Fréchet bounds for the general case and whether honesty and relevance are likely positively or negatively correlated in practice.

Hint 2

For Part 2, use complements or inclusion-exclusion to find P(neither), then model the count as a Binomial to get the standard deviation — if your observed count is far outside ±2 SDs, that is evidence your assumptions are off.

Hint 3

For Part 3, know when to use the pooled versus unpooled standard error, why the paired design (same prompts shown to both models) calls for McNemar's test instead of a two-proportion z-test, and why a non-significant p-value is not the same as proving the models are equivalent.