Probabilistic Brain & Generative Models
- 13Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is a probability distribution?
13 questions
- 1
What is a probability distribution?
Model answer
A probability distribution is a function that assigns a probability (a number between 0 and 1) to each possible state of a system, such that the probabilities sum to 1.
Explanation
This definition is fundamental: it maps each outcome to a likelihood and enforces normalization.
- 2
Explain the difference between the frequentist and Bayesian interpretations of probability.
Model answer
The frequentist interpretation defines probability as the long-run frequency of an event in repeated trials, while the Bayesian interpretation treats probability as a degree of belief that can be assigned even to non-repeatable events.
Explanation
The content contrasts these views: frequentist works for dice, but Bayesian handles statements like '70% chance of rain' by treating probability as subjective certainty.
- 3
What does it mean to sample from a probability distribution?
Model answer
Sampling means generating an outcome randomly according to the probabilities defined by the distribution.
Explanation
The coin and dice examples illustrate sampling: each flip or roll produces a sample from the underlying distribution.
- 4
Define 'surprise' for a single event with probability p.
Model answer
Surprise is defined as log(1/p) (or −logp). It is high for rare events and zero for certain events (p=1).
Explanation
The content derives surprise from the need for additivity over independent events: when probabilities multiply, surprise adds, leading to the logarithm.
- 5
What is entropy, and how is it computed for a discrete distribution?
Model answer
Entropy is the average surprise of a distribution: H(P)=∑xp(x)log(1/p(x)). It measures the inherent uncertainty of the distribution.
Explanation
The content gives the formula and examples: a fair coin has lower entropy than a coin that can land on its side.
- 6
Calculate the entropy of a fair coin (heads and tails each with probability 0.5).
Model answer
H=−0.5log20.5−0.5log20.5=1 bit (using base 2) or loge2 nats.
Explanation
The content discusses entropy for a fair coin; calculation yields 1 bit if using log base 2.
- 7
Define cross-entropy between a true distribution P and a model Q.
Model answer
Cross-entropy is H(P,Q)=∑xp(x)log(1/q(x)). It measures the average surprise when observing data from P but believing in Q.
Explanation
The content contrasts it with entropy and shows it depends on both distributions.
- 8
What is the relationship between cross-entropy and entropy? State the inequality.
Model answer
Cross-entropy is always greater than or equal to the entropy of the true distribution: H(P,Q)≥H(P). Equality holds if and only if Q=P.
Explanation
This is Gibbs' inequality, mentioned in the content as a key property.
- 9
Why is cross-entropy asymmetric? Give an example of two distributions where swapping them changes the value.
Model answer
Cross-entropy is asymmetric because the roles of P (true) and Q (model) are not interchangeable. Example: P = rigged coin (99% heads, 1% tails), Q = fair coin gives H(P,Q) ≈ 0.7, but swapping gives H(Q,P) ≈ 2.3.
Explanation
The content explicitly calculates both cases showing the difference.
- 10
What is KL divergence, and how is it derived from cross-entropy and entropy?
Model answer
KL divergence is DKL(P∥Q)=∑xp(x)log(p(x)/q(x))=H(P,Q)−H(P). It measures the extra surprise from using Q to approximate P.
Explanation
The content derives it by subtracting entropy from cross-entropy and identifies it as a measure of model inaccuracy.
- 11
Why does minimizing cross-entropy also minimize KL divergence in machine learning?
Model answer
Because DKL(P∥Q)=H(P,Q)−H(P), and H(P) is constant with respect to the model Q. Minimizing H(P,Q) is equivalent to minimizing DKL(P∥Q).
Explanation
The content explains that the entropy of the true data distribution is fixed, so optimizing cross-entropy suffices.
- 12
How is cross-entropy used in training generative models?
Model answer
Generative models are trained to minimize the cross-entropy between the true data distribution and the model distribution, which approximates minimizing the KL divergence, leading to a better fit.
Explanation
The content mentions that cross-entropy is the typical loss function for such models.
- 13
What role does entropy play in the free energy principle mentioned in the content?
Model answer
The free energy principle uses concepts like entropy and KL divergence to describe how biological systems minimize uncertainty about their environment.
Explanation
The content briefly mentions the free energy principle as an application of these ideas in neuroscience.

Ask anything
We've read this whole study set, so questions about it get the best answers.