PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Statistics & Math/OpenAI

Derive MLE and Bayesian posterior for Bernoulli

Last updated: Mar 29, 2026

Quick Overview

This question evaluates parameter estimation and inferential reasoning for Bernoulli/binomial data, including maximum likelihood estimation and its asymptotic variance, Bayesian updating with a Beta prior and the resulting posterior and posterior predictive probability, as well as interval estimation; it is classified in the Statistics & Math domain. It is commonly asked to assess understanding of frequentist versus Bayesian inference, the behavior and reliability of asymptotic approximations and credible intervals, and the practical implications for predictive probability and uncertainty quantification, testing both conceptual understanding and practical application.

  • medium
  • OpenAI
  • Statistics & Math
  • Machine Learning Engineer

Derive MLE and Bayesian posterior for Bernoulli

Company: OpenAI

Role: Machine Learning Engineer

Category: Statistics & Math

Difficulty: medium

Interview Round: Onsite

Given n Bernoulli trials with k successes: (a) derive the maximum likelihood estimator (MLE) for the success probability p and its asymptotic variance; (b) with a Beta(alpha, beta) prior, derive the posterior for p and the posterior predictive probability of success for the next trial; (c) compute a 95% confidence interval for p via normal approximation and a 95% credible interval from the posterior; (d) explain when each interval is reliable and how sample size affects inference.

Quick Answer: This question evaluates parameter estimation and inferential reasoning for Bernoulli/binomial data, including maximum likelihood estimation and its asymptotic variance, Bayesian updating with a Beta prior and the resulting posterior and posterior predictive probability, as well as interval estimation; it is classified in the Statistics & Math domain. It is commonly asked to assess understanding of frequentist versus Bayesian inference, the behavior and reliability of asymptotic approximations and credible intervals, and the practical implications for predictive probability and uncertainty quantification, testing both conceptual understanding and practical application.

OpenAI logo
OpenAI
Aug 11, 2025, 12:00 AM
Machine Learning Engineer
Onsite
Statistics & Math
41
0

Bernoulli/Binomial Inference Task

You observe n independent Bernoulli trials with unknown success probability p, and you record k successes (so K ~ Binomial(n, p)).

Tasks

(a) Derive the maximum likelihood estimator (MLE) of p and its asymptotic variance.

(b) Assume a Beta(alpha, beta) prior on p. Derive the posterior distribution of p and the posterior predictive probability that the next trial is a success.

(c) Compute a 95% confidence interval (CI) for p using the normal approximation, and a 95% credible interval from the posterior in (b).

(d) Explain when each interval (Wald CI vs. Bayesian credible interval) is reliable and how sample size affects the inference.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More OpenAI•More Machine Learning Engineer•OpenAI Machine Learning Engineer•OpenAI Statistics & Math•Machine Learning Engineer Statistics & Math
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.