7 Conditional Probability, Heckman Selection, Bayesian Updating
This section introduces sample spaces, events, sigma algebras, and probability axioms, then builds toward conditional probability and Bayesian updating.
7.1 Probabilities and Conditional Probabilities
7.1.1 Intersection
The definition of intersection of two sets \(C = A \cap B\),is that \(C\) is the set of all elements that are in both \(A\) and \(B\), in set builder notation, we have:
\[ C = \{ x | x \in A \text{ and } x \in B \} \]
Suppose we have the probability for event \(A\) and event \(B\) are \(P(A)\) and \(P(B)\), respectively with \(P\) satisfying the Kolmogorov Law of probability. Then the probability for the intersection of event \(A\) and event \(B\) is denoted as:
\[ P(C) = P(A \cap B) \]
How do we know if the \(C\) is included in the sigma algebra, \(\mathcal{B}\), which is the domain of the probability function \(P : \mathcal{B} \rightarrow [0, 1]\)? We know because: (1) the complements of \(A\) and \(B\) are in the sigma algebra, (2) and the union of the complements is also in the sigma algebra, (3) and the complement of that union is also in the sigma algebra, and (4) that complement of the union is exactly the intersection of \(A\) and \(B\).
7.1.2 Conditional probabilities, events, and mapping to data.
We define the idea of conditional probability as follows. For an event \(B\) with \(P(B)>0\), the conditional probability of event \(A\) given \(B\) is:
\[ P(A \mid B) = \frac{P(A \cap B)}{P(B)} \]
We call \(P(B)\) the unconditional probability, and \(P(A \mid B)\) the conditional probability.
If two \(A\) and \(B\) with \(P(A)>0\) and \(P(B)>0\) are independent, then the conditional probability is equal to the unconditional probability, \(P(A \mid B) = P(A)\) and \(P(B \mid A) = P(B)\).
Note that independence does not mean events \(A\) and \(B\) are disjoint. Specifically:
Proposition: if \(A\) and \(B\) are independent, and \(P(A)>0\) and \(P(B)>0\), then \(A\) and \(B\) are not disjoint.
Proof by contradiction: suppose \(A\) and \(B\) are disjoint, then \(P(A \cap B) = 0\), so \(P(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{0}{P(B)} = 0 \neq P(A)\), which contradicts the independence condition.
7.1.3 Law of total probability
The law of total probability states that, given \(\left\{B_1, B_2, \dots\right\}\) events which partition \(S\), and \(P(B_i)>0\) for all \(i\), then:
\[ P(A) = \sum_{i} P(A \mid B_i) P(B_i) \]
- Why is the condition \(P(B_i) > 0\) needed? This is required because the conditional probability \(P(A \mid B_i)\) is only defined when \(P(B_i) > 0\).
The partition requirement is essential. For example, the following claim is false:
If disjoint events \(B_1,B_2,\ldots\) each have positive probability, then \(P(A)=\sum_i P(A\mid B_i)P(B_i)\) even when their union does not cover the sample space.
Counterexample to the Proposition:
The proposition claims: Given events \(\{B_1, B_2, \dots\}\) with \(\sum_i B_i < 1\) (i.e., the \(B_i\) do not partition the sample space), and \(P(B_i)>0\) for all \(i\), then \(P(A) = \sum_{i} P(A \mid B_i) P(B_i)\).
This is false.
Counterexample:
Let the sample space \(S = \{1,2,3,4\}\), with equal probability for each outcome:\(P(\{i\}) = 0.25\).
Let \(B_1 = \{1\}\), \(B_2 = \{2\}\) (so \(B_1 \cap B_2 = \emptyset\)), and \(A = \{1,2,3\}\).
- \(P(B_1) = 0.25\), \(P(B_2) = 0.25\)
- \(P(A) = 0.75\)
- \(P(A \mid B_1) = \frac{P(A \cap B_1)}{P(B_1)} = \frac{0.25}{0.25} = 1\)
- \(P(A \mid B_2) = \frac{0.25}{0.25} = 1\)
Now,
\[\sum_{i=1}^2 P(A \mid B_i) P(B_i) = 1 \times 0.25 + 1 \times 0.25 = 0.5\]
But \(P(A) = 0.75 \neq 0.5\).
Conclusion: The formula \(P(A) = \sum_{i} P(A \mid B_i) P(B_i)\) only holds if the \(B_i\) partition the sample space (i.e., \(\bigcup_i B_i = S\) and \(B_i\) are disjoint). If not, the formula can fail, as shown above.
7.2 Independence and conditional mean independence
7.2.1 Independence, mean independence, and conditioning
Let \(\epsilon\), \(\nu\), and \(Z\) be three random variables. We now discuss conditional independence and conditional mean independence.
- Independence: If \(\epsilon\) and \(\nu\) are independent, denoted by \(\epsilon \perp \nu\), then for every pair of real numbers \(e\) and \(v\), \[ F_{\epsilon,\nu}(e,v)=F_\epsilon(e)F_\nu(v). \] If the random variables have a joint density, independence implies that the density factorizes: \(f(\epsilon,\nu)=f(\epsilon)f(\nu)\). Independence is symmetric: \(\epsilon\perp\nu\) means exactly the same thing as \(\nu\perp\epsilon\).
- Mean independence: Mean independence is directional. We say that \(\epsilon\) is mean independent of \(\nu\) when \[ E[\epsilon\mid\nu]=E[\epsilon]. \] This means that the conditional mean of \(\epsilon\) given \(\nu\) is the same as its unconditional mean. It does not generally imply the reverse statement \(E[\nu\mid\epsilon]=E[\nu]\); if the reverse statement also holds, it is a separate assumption. But if \(\epsilon \perp \nu\), then mean independence holds in both directions.
Provided the relevant expectations exist, both independence and mean independence of \(\epsilon\) from \(\nu\) imply \(E[\epsilon \nu] = E[\epsilon]E[\nu]\).
- Under independence, we have \(E[\epsilon \nu] = E[\epsilon]E[\nu]\).
- Under mean independence, if \(\epsilon\) is mean independent of \(\nu\) (or if \(\nu\) is mean independent of \(\epsilon\)), we have \(E[\epsilon \nu] = E[E[\epsilon \nu \mid \nu]] = E[\nu E[\epsilon \mid \nu]] = E[\nu E[\epsilon]] = E[\epsilon]E[\nu]\).
We can augment independence and mean independence by conditioning on another random variable \(Z\). This leads to conditional independence and conditional mean independence.
- Conditional Independence: \(\epsilon\) and \(\nu\) are conditionally independent given \(Z\), denoted by \(\epsilon\perp\nu\mid Z\), when their conditional distributions factorize given each value of \(Z\). Like ordinary independence, this relationship is symmetric.
- Conditional Mean Independence: Conditional mean independence is also directional. We say that \(\epsilon\) is conditionally mean independent of \(\nu\) given \(Z\) when \[ E[\epsilon\mid\nu,Z]=E[\epsilon\mid Z]. \] At a fixed \(Z\), knowing \(\nu\) does not change the conditional mean of \(\epsilon\). This does not generally imply \(E[\nu\mid\epsilon,Z]=E[\nu\mid Z]\); that reverse conditional-mean restriction must be imposed separately.
Conditional independence and conditional mean independence extend the concepts of independence and mean independence by taking into account the information provided by another variable \(Z\). Note that conditional independence and conditional mean independence do not imply independence or mean independence unconditionally.
Conditional independence
Suppose we impose the assumption that \(\epsilon \perp \nu \mid Z\). This means that, after holding \(Z\) fixed, learning the value of \(\nu\) provides no additional information about \(\epsilon\). For every \(z\), the conditional joint density factorizes as
\[ f(\epsilon,\nu\mid Z=z)=f(\epsilon\mid Z=z)f(\nu\mid Z=z). \]
Therefore, the following conditional expectation is:
\[ \begin{aligned} E[\epsilon\mid \nu>c,Z=z] &=\frac{1}{P(\nu>c\mid Z=z)} \int_c^\infty\int \epsilon f(\epsilon,\nu\mid Z=z)\,d\epsilon\,d\nu\\ &=\frac{1}{P(\nu>c\mid Z=z)} \left(\int \epsilon f(\epsilon\mid Z=z)\,d\epsilon\right) \left(\int_c^\infty f(\nu\mid Z=z)\,d\nu\right)\\ &=\frac{E[\epsilon\mid Z=z]}{P(\nu>c\mid Z=z)}P(\nu>c\mid Z=z)\\ &=E[\epsilon\mid Z=z]. \end{aligned} \]
Thus conditional independence implies that \(E[\epsilon\mid \nu>c,Z]=E[\epsilon\mid Z]\).
Conditional mean independence
Can we weaken our assumption and get the same result? It seems that we should because the result is about the conditional mean, so it seems we should be able to impose the assumption of conditional mean independence instead of the strong conditional independence assumption. Hence, assuming that, \[ E[\epsilon\mid \nu=v,Z=z]=E[\epsilon\mid Z=z] \quad\text{for every }v. \]
Now we can can use the rule that \(f(a,b\mid c)=f(a\mid b,c)f(b\mid c)\) to decompose the conditional joint density:
\[ f(\epsilon,\nu\mid Z=z)=f(\epsilon\mid\nu,Z=z)f(\nu\mid Z=z)\,. \]
Given these, we have:
\[ \begin{aligned} E[\epsilon\mid \nu>c,Z=z] &=\frac{1}{P(\nu>c\mid Z=z)} \int_c^\infty\int \epsilon f(\epsilon\mid\nu,Z=z)f(\nu\mid Z=z)\,d\epsilon\,d\nu\\ &=\frac{1}{P(\nu>c\mid Z=z)} \int_c^\infty E[\epsilon\mid\nu,Z=z]f(\nu\mid Z=z)\,d\nu\\ &=\frac{E[\epsilon\mid Z=z]}{P(\nu>c\mid Z=z)} \int_c^\infty f(\nu\mid Z=z)\,d\nu\\ &=E[\epsilon\mid Z=z]. \end{aligned} \]
Hence with just conditional mean independence we already arrive at: \(E[\epsilon\mid \nu>c,Z]=E[\epsilon\mid Z]\), without needing the full conditional independence assumption.
7.3 Conditional normal and Heckman Selection
7.3.1 Truncated expectation for the normal distribution
Often, we are interested in expectation given some truncation. Suppose we have the normal distribution, \(X \sim N(\mu, \sigma^2)\), and we want to compute the expectation of \(X\) given that \(X\) is above some threshold \(c\), i.e., \(E(X | X > c)\). This is called truncated expectation.
To derive the truncated expectation for the normal distribution, \(E(X \mid X > c)\) where \(X \sim N(\mu, \sigma^2)\), follow these steps. First:
\[ E(X \mid X > c) = \frac{\int_c^{\infty} x f_X(x) dx}{P(X > c)} \]
where \(f_X(x)\) is the normal density.
Second we can standardize the variable. Let \(z = \frac{x - \mu}{\sigma}\), so \(x = \mu + \sigma z\) and \(dx = \sigma dz\). The lower limit becomes \(z_c = \frac{c - \mu}{\sigma}\). This allows us to rewrite:
\[ \int_c^{\infty} x f_X(x) dx = \int_{z_c}^{\infty} (\mu + \sigma z) \phi(z) dz \]
where \(\phi(z)\) is the standard normal density. This splits into two terms:
\[ \mu \int_{z_c}^{\infty} \phi(z) dz + \sigma \int_{z_c}^{\infty} z \phi(z) dz \]
The first term is \(\mu [1 - \Phi(z_c)]\). For the second term, use \(\phi'(z)=-z\phi(z)\):
\[ \int_{z_c}^{\infty} z\phi(z)\,dz = \left[-\phi(z)\right]_{z_c}^{\infty} = \phi(z_c). \]
Thus, the second term is \(\sigma\phi(z_c)\).
Third, we now replace the numerator and denominator in the truncated expectation formula and have: \[ E(X \mid X > c) = \frac{\mu [1 - \Phi(z_c)] + \sigma \phi(z_c)}{1 - \Phi(z_c)} = \mu + \sigma \frac{\phi(z_c)}{1 - \Phi(z_c)} \]
Substitute back \(z_c = \frac{c - \mu}{\sigma}\):
\[ E(X \mid X > c) = \mu + \sigma \frac{\phi\left(\frac{c - \mu}{\sigma}\right)}{1 - \Phi\left(\frac{c - \mu}{\sigma}\right)} \]
7.3.2 Application: Heckman’s two-step correction for sample selection bias
The following discussion is based on Heckman (1979).
Now consider the wage problem. Set up now the heckman two-stage labor participation selection and wage model. In the first stage, we have a latent variable model for labor participation:
\[ Y_i^{\ast} = X_i \beta + \epsilon_i \]
where if \(Y_i^{\ast} > 0\), the individual participates in the labor market and \(W_i\) is observed, and if \(Y_i^{\ast} \le 0\) otherwise. Conditional on the observed covariates \((X_i,Z_i)\), let \(\epsilon_i \sim N(0, 1)\).
In the second stage, we have the wage equation:
\[ W_i = Z_i \gamma + u_i \]
where, conditional on \((X_i,Z_i)\), \(u_i \sim N(0, \sigma^2)\). We only observe wages for individuals who participate in the labor market, i.e., when \(Y_i^* > 0\). Assume that the errors are jointly normal conditional on the observed covariates \((X_i,Z_i)\). Therefore, the expected wage conditional on these covariates and participation is:
\[ E(W_i \mid X_i, Z_i, Y_i^* > 0) = Z_i \gamma + E(u_i \mid \epsilon_i > -X_i \beta, X_i, Z_i) \]
Suppose that \(u_i\) and \(\epsilon_i\) have conditional correlation \(\rho\). Then we can write \(u_i\) as \(u_i = \rho \sigma \epsilon_i + \eta_i\), where \(\eta_i \sim N(0, \sigma^2 (1 - \rho^2))\) is independent of \(\epsilon_i\) conditional on \((X_i,Z_i)\). Then we have:
\[ E(u_i \mid \epsilon_i > -X_i \beta, X_i, Z_i) = \rho \sigma E(\epsilon_i \mid \epsilon_i > -X_i \beta, X_i, Z_i) + E(\eta_i \mid \epsilon_i > -X_i \beta, X_i, Z_i) \] Since \(\eta_i\) is independent of \(\epsilon_i\) conditional on \((X_i,Z_i)\), we have \(E(\eta_i \mid \epsilon_i > -X_i \beta, X_i, Z_i) = 0\). Since \(\epsilon_i \sim N(0,1)\) conditional on \((X_i,Z_i)\), we can use the truncated expectation formula derived above to get:
\[ E(\epsilon_i \mid \epsilon_i > -X_i \beta) = \frac{\phi(-X_i \beta)}{1 - \Phi(-X_i \beta)} = \frac{\phi(X_i \beta)}{\Phi(X_i \beta)}. \]
Therefore, the expected wage conditional on participation is:
\[ E(W_i \mid X_i, Z_i, Y_i^* > 0) = Z_i \gamma + \rho \sigma \frac{\phi(X_i \beta)}{\Phi(X_i \beta)} \]
Even though we do not observe \(Y^{\ast}_i\), if we can estimate \(\beta\) from the first stage (e.g., via probit), we can compute the inverse Mills ratio, \(\frac{\phi(X_i \beta)}{\Phi(X_i \beta)}\), and include it as an additional regressor in the second-stage wage regression to correct for selection bias. This is the essence of Heckman’s two-step correction method.
7.4 Bayesian Basics
7.4.1 Bayes rule
The bayes rule states that if \(P(A)>0\) and \(P(B)>0\), then:
\[ P(A \mid B) = \frac{P(B \mid A) P(A)}{P(B)} \]
This formula allows us to “reverse” conditional probabilities: it expresses the probability of \(A\) given \(B\) in terms of the probability of \(B\) given \(A\), the probability of \(A\), and the probability of \(B\).
We can further expand the denominator \(P(B)\) using the law of total probability. Alternatively, we can justify the equality below using the third property of probability function. If \(\{A, A^c\}\) is a partition of the sample space, then:
\[ P(B) = P(B \mid A) P(A) + P(B \mid A^c) P(A^c) \]
So Bayes’ rule can be rewritten as:
\[ P(A \mid B) = \frac{P(B \mid A) P(A)}{P(B \mid A) P(A) + P(B \mid A^c) P(A^c)} \]
This is the general form of Bayes’ rule for partitions. Note that when we write things out, we don’t need to know \(P(B)\)
7.4.2 Bayes rule mixed discrete-continuous version
If \(A\) is a continuous random variable and \(B=b\) is observed, then the continuous Bayes rule is:
\[ f(a\mid b) = \frac{f(b\mid a)\,f(a)}{f(b)}. \]
Here \(f(a\mid b)\) is the posterior density of \(A\) given \(B=b\), \(f(b\mid a)\) is the likelihood, and \(f(a)\) is the prior density.
The denominator is the marginal density of \(B\):
\[ f(b)=\int_{-\infty}^{\infty} f(b\mid a)\,f(a)\,da. \]
So equivalently,
\[ f(a\mid b) = \frac{f(b\mid a)\,f(a)}{\int_{-\infty}^{\infty} f(b\mid a')\,f(a')\,da'} \propto f(b\mid a)\,f(a). \]
7.4.3 Bayes rule mixed discrete + continuous version
If \(A\) is discrete and \(B\) is continuous, then for any value \(a\) in the support of \(A\) and observed \(B=b\),
\[ P(A=a\mid B=b) = \frac{f(b\mid a)\,P(A=a)}{\sum_{a'} f(b\mid a')\,P(A=a')}. \]
Here \(f(b\mid a)\) is the likelihood density of \(B\) given \(A=a\), and the denominator is the marginal density of \(B\) at \(b\).
7.4.4 Bayes rule application
Suppose there is a firm with the following production function:
\[ \widetilde{Y} = f(K) = A\cdot L^{\alpha} \]
Suppose I already know the value of \(\alpha\) = 0.5, and furthermore that we even know that labor demand for the firm is inelastic, the firm owner just hires herself, so \(L\) is fixed at 1, but I don’t know what the value of \(A\) is. Suppose I know, however that \(A \in \left\{1, 2\right\}\). So we are trying to figure out whether \(A=1\) or \(A=2\), in another word, whether we are dealing with a low type (\(A=1\)) or a high type (\(A=2\)) firm.
If we know \(\widetilde{Y}\), we would have our answer immediately. If \(A=1\), \(Y=1\), and if \(A=2\), \(Y=2\).
But suppose now that \(\widetilde{Y}\) is measured with additive normal error, which means that:
\[ Y = \widetilde{Y} + \epsilon\,, \]
where \(\epsilon\) is normal with mean \(\mu_{\epsilon}\) and standard deviation \(\sigma_{\epsilon}\).
We will observe a sequence of observed revenue levels, \(\left\{Y\right\}_{i=1}^n\), where each \(Y_i\) is an independent measurement of the firm’s revenue. And we want to update our belief on whether \(A=1\) or \(A=2\) based on these observations.
Note that \(P(A=1) = 1 - P(A=2)\), I believe \(A\) is either 1 or 2, so the probability that it is either must sum up to 1.
Also note that we have the exact density function for \(f(Y_i \mid A)\):
\[ f(Y_i \mid A=a) = \phi(Y_i - a\cdot L^{\alpha}) \]
Since \(A\) is discrete here, we do not use a posterior density \(f(A\mid Y_i)\). Instead, we use posterior probabilities:
\[ P(A=a\mid Y_i=y_i). \]
7.4.5 Prior distribution, likelihood, and posterior distribution
The prior distribution is what we believe about \(A\) before seeing the data. Since \(A\in\{1,2\}\), the prior is just two numbers:
\[ P(A=1)=\pi_1,\qquad P(A=2)=\pi_2, \]
with \(\pi_1+\pi_2=1\). If we have no reason to favor one value over the other, we might choose \(\pi_1=\pi_2=1/2\).
The likelihood is the data model: for each possible value of \(A\), it tells us how likely it is to observe \(Y_i\).
\[ f(Y_i\mid A=1),\qquad f(Y_i\mid A=2). \]
The posterior distribution is the updated belief after seeing the data. Bayes’ rule combines the prior and the likelihood:
\[ P(A=a\mid Y_i=y_i) = \frac{f(y_i\mid A=a)\,P(A=a)}{\sum_{a'\in\{1,2\}} f(y_i\mid A=a')\,P(A=a')}. \]
So the posterior is just the prior reweighted by how well each candidate value of \(A\) explains the observed data.
Why does the numerator matter so much? Because the denominator does not depend on the candidate value \(a\). For a fixed observation \(y_i\), the term
\[ \sum_{a'\in\{1,2\}} f(y_i\mid A=a')\,P(A=a') \]
is the same no matter whether we are computing the posterior for \(A=1\) or for \(A=2\). It is only there to make the posterior probabilities add up to 1. So the denominator is the normalizing constant.
That means the relative size of the posterior probabilities is determined entirely by the numerator:
\[ f(y_i\mid A=a)\,P(A=a). \]
So when we compare two possible values, say \(A=1\) and \(A=2\), we can write
\[ P(A=1\mid Y_i=y_i)\propto f(y_i\mid A=1)P(A=1), \]
and
\[ P(A=2\mid Y_i=y_i)\propto f(y_i\mid A=2)P(A=2). \]
This is why the proportional form is useful: it tells us which candidate value of \(A\) gets more posterior weight before we normalize.
This is the key updating idea: after seeing one observation, the posterior becomes the new prior for the next observation. So if we first observe \(Y_1=y_1\), then we use
\[ P(A=a\mid Y_1=y_1) \]
as the starting belief for updating again when \(Y_2=y_2\) arrives.
This is why the formula looks a little different from the one-shot Bayes rule. The basic Bayes rule uses the original prior \(P(A=a)\) on the right-hand side because it describes one update from scratch. In the sequential version, we simply apply the same rule again, but now the prior has already been updated by the earlier data. So the posterior from the first observation is the prior for the second observation, the posterior from the second observation is the prior for the third observation, and so on.
In sequential form, the update after the second observation is
\[ P(A=a\mid Y_1=y_1,Y_2=y_2) = \frac{f(y_2\mid A=a)\,P(A=a\mid Y_1=y_1)}{\sum_{a'\in\{1,2\}} f(y_2\mid A=a')\,P(A=a'\mid Y_1=y_1)}. \]
To see where the product form comes from, start with the first observation:
\[ P(A=a\mid Y_1=y_1) = \frac{f(y_1\mid A=a)\,P(A=a)}{\sum_{a'\in\{1,2\}} f(y_1\mid A=a')\,P(A=a')}. \]
Now plug this posterior into the second-step formula. The numerator becomes
\[ f(y_2\mid A=a)\,P(A=a\mid Y_1=y_1) = f(y_2\mid A=a)\, \frac{f(y_1\mid A=a)\,P(A=a)}{\sum_{a'\in\{1,2\}} f(y_1\mid A=a')\,P(A=a')}. \]
This shows that the likelihood terms multiply: one factor for \(y_1\) and one factor for \(y_2\). The denominator only serves to normalize the probabilities, so after simplifying we get
\[ P(A=a\mid Y_1=y_1,Y_2=y_2) = \frac{P(A=a)\,f(y_1\mid A=a)\,f(y_2\mid A=a)}{\sum_{a'\in\{1,2\}} P(A=a')\,f(y_1\mid A=a')\,f(y_2\mid A=a')}. \]
If the observations are conditionally independent given \(A\), then the same logic continues for \(n\) observations. The joint likelihood is the product of the individual likelihoods:
\[ f(y_1,\dots,y_n\mid A=a)=\prod_{i=1}^n f(y_i\mid A=a). \]
That is why the product symbol appears in the multi-data Bayes formula: each new observation contributes one more likelihood factor, and conditional independence lets us multiply them together.
7.4.6 How the posterior updates the prior
After we observe one data point \(Y_i=y_i\), the posterior becomes our new belief about \(A\). In other words, the posterior from one step is the prior for the next step.
If the observations \(Y_1,\dots,Y_n\) are independent conditional on \(A\), then after all \(n\) observations we have
\[ P(A=a\mid Y_1=y_1,\dots,Y_n=y_n) = \frac{P(A=a)\prod_{i=1}^n f(y_i\mid A=a)}{\sum_{a'\in\{1,2\}} P(A=a')\prod_{i=1}^n f(y_i\mid A=a')}. \]
This formula shows the updating rule clearly: start with the prior, multiply by the likelihood for each observation, and then normalize so the posterior probabilities add up to 1.
7.4.7 Numerical illustration with three observed values
To make the updating process concrete, let us choose a very simple numerical example.
- Prior belief: \(P(A=1)=0.5\) and \(P(A=2)=0.5\).
- Let \(L=1\), \(\alpha=0.5\), and assume \(\epsilon\sim N(0,1)\).
- Then the conditional density is
\[ f(y_i\mid A=a)=\phi(y_i-a), \]
because the mean under \(A=a\) is just \(a\cdot L^{\alpha}=a\).
Suppose we observe three data points:
\[ y_1=1.2,\qquad y_2=0.4,\qquad y_3=1.6. \]
We now update step by step.
Step 1: update after observing \(y_1=1.2\).
\[ P(A=1\mid y_1) = \frac{0.5\,\phi(1.2-1)}{0.5\,\phi(1.2-1)+0.5\,\phi(1.2-2)} = \frac{\phi(0.2)}{\phi(0.2)+\phi(-0.8)} \approx 0.574. \]
So after the first observation, the posterior puts about \(57.4\%\) probability on \(A=1\) and \(42.6\%\) on \(A=2\).
Step 2: use that posterior as the new prior and update with \(y_2=0.4\).
Before seeing \(y_2\), our current belief is the posterior from Step 1:
\[ P(A=1\mid y_1)\approx 0.574,\qquad P(A=2\mid y_1)\approx 0.426. \]
Now update again:
\[ P(A=1\mid y_1,y_2) = \frac{P(A=1\mid y_1)\,\phi(0.4-1)}{P(A=1\mid y_1)\,\phi(0.4-1)+P(A=2\mid y_1)\,\phi(0.4-2)} \approx 0.802. \]
After the second observation, the evidence shifts more strongly toward \(A=1\).
Step 3: update once more with \(y_3=1.6\).
Using the Step 2 posterior as the new prior,
\[ P(A=1\mid y_1,y_2,y_3) = \frac{P(A=1\mid y_1,y_2)\,\phi(1.6-1)}{P(A=1\mid y_1,y_2)\,\phi(1.6-1)+P(A=2\mid y_1,y_2)\,\phi(1.6-2)} \approx 0.786. \]
So after all three observations, the final posterior belief is about \(78.6\%\) on \(A=1\) and \(21.4\%\) on \(A=2\).
This illustrates the key idea of Bayesian updating: the prior is the starting belief, each observation updates that belief through the likelihood, and the posterior from one round becomes the prior for the next round.
So the answer to \(P(A\mid Y_i)\) is the posterior probability above, and it is the object we use to update our prior belief about \(A\).