Why is the Bernoulli distribution with parameter θ in the exponential family? What are its natural parameter, sufficient statistic and log-partition function, and why does the derivative of the log-partition function give the mean?

Probability and statistics, Exponential family
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Writing a distribution as h(x)exp⁡(ηT(x)−A(η)) and using the properties of A.

Key idea

p(x∣θ)=exp⁡ ⁣(x η−log⁡(1+eη)) with η=log⁡θ1−θ, so A(η)=log⁡(1+eη) and A′(η)=θ.

Steps

  1. Start with p(x)=θx(1−θ)1−x for x∈{0,1} and take the exponential of its log.
  2. Rearrange: p(x)=exp⁡ ⁣(xlog⁡θ+(1−x)log⁡(1−θ))=exp⁡ ⁣(xlog⁡θ1−θ+log⁡(1−θ)).
  3. Match to h(x)exp⁡(ηT(x)−A(η)): h(x)=1, T(x)=x, natural parameter η=log⁡θ1−θ (the log-odds).
  4. Invert: θ=11+e−η, the sigmoid. Then 1−θ=11+eη, so A(η)=−log⁡(1−θ)=log⁡(1+eη).
  5. Differentiate: A′(η)=eη1+eη=θ=E[X]. Again, A′′(η)=θ(1−θ)=Var(X).
  6. Link to ML: this is why logistic regression models η linearly and passes it through a sigmoid to get the mean.

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probability and statistics: A die-like variable takes values in {1,…,K} with probabilities π1,…,πK. Given nk observations of category k (total n), derive the MLE of π with a Lagrange multiplier. For counts (30,50,20), what is it?
Next in Probability and statistics: A variable is drawn from N(0,1) with probability 0.3 and from N(4,2) (variance 2) with probability 0.7. Use the law of total variance to find its mean and variance. Why is the variance more than the weighted average of the two component variances?