Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed
Probability · Lecture 37 of 76 · 11:35
Inferring a Continuous Random Variable from a Discrete Measurement
Study guide
What this lecture covers
This lecture works a single example problem: given a prior belief about the unknown bias Q of a coin, expressed as a continuous PDF, how do you update that belief after observing one flip, which is a discrete outcome (heads or tails)? It sits within the unit on Bayes' rule, extending the discrete-discrete version to the mixed case where the unknown is continuous but the observation is discrete.
After watching, you should be able to set up and solve this continuous-discrete version of Bayes' rule: write the numerator as a prior PDF times a conditional PMF, expand the denominator with the law of total probability as an integral, and interpret the resulting posterior PDF.
Key ideas
- Continuous prior, discrete observation:
Q(the coin's bias) is modeled with a PDF, while the flip outcomeXis a discrete Bernoulli random variable, so inference between them needs a mixed form of Bayes' rule. - Prior on Q: the example prior is
f(q) = 6q(1-q)forqbetween 0 and 1, a symmetric curve peaking atq = 1/2. - Model of X given Q: given the bias
q,Xis Bernoulli withP(X=1|Q=q) = qandP(X=0|Q=q) = 1-q. - Continuous-discrete Bayes' rule: the posterior PDF of
QgivenXis the prior PDF times the conditional PMF, divided by the PMF ofX. - Law of total probability for the denominator: the PMF of
Xis found by integrating the numerator expression over all possible values ofQ. - Posterior after heads: observing
X = 1shifts the posterior to12q^2(1-q), with its peak moving up toq = 2/3. - Posterior after tails: observing
X = 0shifts the posterior to12q(1-q)^2, symmetric to the heads case, with its peak moving down. - The beta distribution: the prior and both posteriors all belong to the beta family, commonly used to model probabilities and other quantities bounded between 0 and 1.
Walkthrough
Setting up the coin-bias problem (0:06)
The lecture introduces Q as the unknown bias of a coin, with prior PDF 6q(1-q) on [0, 1]. It explains that a flip of the coin is modeled as a Bernoulli random variable X, equal to 1 for heads and 0 for tails, with P(X=1|Q=q) = q. The conditional PMF of X given Q is written compactly as q when x=1 and 1-q when x=0.
Writing Bayes' rule for a continuous unknown and discrete data (2:06)
The goal is the conditional PDF of Q given X. Because Q is continuous and X is discrete, the numerator combines a PDF (the prior on Q) with a conditional PMF (the model of X given Q), and the denominator, the PMF of X, is obtained via the law of total probability by integrating that same product over all values of Q.
Solving for the case of observing heads (4:10)
For X = 1, the numerator becomes 6q(1-q) * q, and the denominator is that expression integrated over q from 0 to 1. Carrying out the calculus gives a denominator of 1/2, so the posterior simplifies to 12q^2(1-q). Plotted, this posterior peaks at q = 2/3: seeing heads is evidence the coin is biased toward heads, so belief in Q shifts above 1/2.
Solving for the case of observing tails (8:13)
Repeating the same steps for X = 0 swaps the roles of q and 1-q in the conditional PMF, leading to a posterior of 12q(1-q)^2. This mirrors the heads case and peaks at a low value of q, reflecting that observing tails is evidence the coin favors tails.
Recognizing the beta distribution (10:18)
The lecture points out that the prior and both posteriors are symmetric versions of each other and all belong to the beta family of distributions, which is commonly used to model a bias or any quantity restricted to [0, 1]. It closes by noting that this example is good practice for applying the continuous-discrete version of Bayes' rule, and recommends checking that a computed answer makes intuitive sense.
Before you watch
- Be comfortable with the discrete-discrete and continuous-continuous versions of Bayes' rule before working through this mixed case.
- Know the definition of a Bernoulli random variable and how to work with conditional PMFs.
- Be ready to do a short integral by hand, since the derivation depends on integrating a polynomial in
Q.
Check your understanding
- Why does inferring
Qfrom a coin flip require a version of Bayes' rule that mixes a PDF and a PMF, rather than the purely discrete or purely continuous versions? - How is the denominator in this version of Bayes' rule computed, and what principle justifies that computation?
- Why does the posterior after observing heads peak at a higher value of
Qthan the prior did? - What is the relationship between the two posterior distributions obtained from observing heads versus tails?
- What family of distributions do the prior and posteriors in this problem belong to, and why is that family a natural choice here?
Vocabulary
- bias (noun)
- How much a coin favors heads or tails, described as a number between 0 and 1.
We want to learn the coin's bias from one flip. - Bernoulli random variable (phrase)
- A variable that takes only two values, usually 0 and 1, based on a single yes/no trial.
The flip outcome is modeled as a Bernoulli random variable. - update (verb)
- To change a belief based on new information.
We update our belief about Q after seeing one flip. - peak (verb)
- To reach the highest point.
The prior peaks at q = 1/2. - beta distribution (phrase)
- A family of probability curves used for values between 0 and 1.
The prior and posteriors all belong to the beta distribution family. - evidence (noun)
- Information that supports or changes a belief.
Seeing heads is evidence the coin favors heads. - polynomial (noun)
- An expression made of terms with variables raised to whole-number powers.
The prior is a polynomial in q. - carrying out (phrase)
- Performing or completing a task or calculation.
Carrying out the calculus gives the exact denominator. - intuitive sense (phrase)
- A result that matches what you would expect naturally.
It helps to check that the answer makes intuitive sense. - posterior (noun)
- The updated belief about an unknown value, calculated after seeing new data.
The posterior after heads peaks at q = 2/3. - prior (noun)
- The starting belief about an unknown value, before any new data is seen.
The prior on Q is 6q(1-q). - PDF (probability density function) (phrase)
- A curve that describes how likely different values of a continuous variable are.
Q's bias is described by a PDF, not a PMF. - PMF (probability mass function) (phrase)
- A table or formula giving the probability of each possible value of a discrete variable.
The flip outcome X has a PMF that depends on Q. - mixed case (phrase)
- A situation combining two different types, here a continuous unknown and a discrete observation.
This problem needs the mixed case of Bayes' rule. - numerator (noun)
- The top part of a fraction.
The numerator combines the prior PDF with a conditional PMF. - denominator (noun)
- The bottom part of a fraction.
The denominator is found using the law of total probability. - integrate (verb)
- To add up a continuous quantity over a range of values.
We integrate over all possible values of Q to get the denominator. - symmetric (adjective)
- Having matching shape on both sides, like a mirror image.
The prior is a symmetric curve peaking at q = 1/2. - shift (verb)
- To move from one position or value to another.
Observing heads shifts the posterior above 1/2. - favor (verb)
- To support or lean toward one outcome over another.
The updated belief favors a coin biased toward heads. - plot (noun)
- A graph showing how a value changes.
Plotted, the posterior peaks at q = 2/3. - family (noun)
- A group of related things that share the same general form.
The beta family includes the prior and both posteriors. - restricted (adjective)
- Limited to a certain range or set of values.
The beta distribution models a quantity restricted to [0, 1]. - mirror (verb)
- To closely match or reflect something else.
The tails posterior mirrors the heads posterior. - derivation (noun)
- The full process of working out a result step by step.
The derivation ends with a posterior of 12q^2(1-q).
Chapters
- 0:00 <Untitled Chapter 1>
- 0:06 Continuous Random Variable from a Discrete Measurement
- 0:34 Interpret Q
- 1:48 Conditional Pmf
- 2:30 Bayes Rule
- 3:06 Variation of Bayes Rule
- 3:25 Law of Total Probability
- 10:39 The Beta Distribution
From the YouTube description
MIT 6.041SC Probabilistic Systems Analysis and Applied Probability, Fall 2013
View the complete course: http://ocw.mit.edu/6-041SCF13
Instructor: Jimmy Li
License: Creative Commons BY-NC-SA
More information at http://ocw.mit.edu/terms
More courses at http://ocw.mit.edu
← Recitation: Inferring a Discrete Variable from a Continuous Measurement · Recitation: A Derived Distribution Example →
