Bayesian Estimation: Priors, Posteriors, MAP
Part 2: How much can one sample tell you about the world?
Probabilistic Machine Learning
University of Virginia
Farzad Farnoud
September 17, 2026
Outline
Has the sun gone supernova?
A hypothetical supernova of the sun seen from space, with the Earth at the right

Hypothetical scenario. AI-generated illustration, not to scale.

It is night. We cannot see the sun.

A sensor measuring radiation reports readings consistent with a supernova, but the sensor is noisy and can have elevated readings even in the absence of a supernova.

What should we conclude?

Last time: the frequentist view
Has the sun gone supernova?
To a frequentist, the sun has either gone supernova or it has not. That is a fact about the universe; no probability attaches to it. What is random is the measurement. Our trust in the measurement comes from how reliable they are in general, not from the particular reading we have.
Chapter 2 in these terms
$\theta^*$ is fixed and unknown. An estimator $\hat\theta(\bX)$ is a rule from data to a value, and its bias, variance, and mean squared error are averages over the data it could have seen.

The setup is xkcd 1132.

Today: the Bayesian view
Has the sun gone supernova?
A Bayesian does not know which universe she lives in: one in which the sun has gone supernova, or one in which it has not. She assigns each a probability before looking (supernovae are rare, so the first gets very little), and the sensor readings update those probabilities. Her conclusion is a probability for each universe, given the readings she actually has.
This chapter in these terms
$\Theta$ is a random variable. A prior $\cpr{p(\theta)}$ says what we believe before the data. Bayes' rule turns the prior and the data into a posterior $\cpo{p(\theta|\bx)}$. Every question about $\theta$ becomes a computation with the posterior.

The same readings, two questions: how reliable are my measurements (estimates), and how probable is each universe given what I saw.

The ingredients
Components
Data $\bx$: a realization of $\bX$, whose distribution depends on the parameter $\Theta$. $\Theta$ is unknown, and therefore a random variable. Together they have a joint distribution $p_{\bX,\Theta}$, with marginals $p_{\bX}$ and $p_\Theta$.
Three steps
  1. The prior $p_\Theta(\theta)$.
  2. The posterior \[\cpo{p_{\Theta|\bX}(\theta|\bx)}=\frac{\cpr{p_\Theta(\theta)}\,\clk{p_{\bX|\Theta}(\bx|\theta)}}{p_{\bX}(\bx)},\qquad\text{written } \cpo{p(\theta|\bx)}=\frac{\cpr{p(\theta)}\clk{p(\bx|\theta)}}{p(\bx)}\] once the argument makes the distribution clear.
Working up to a constant
Drop constants, then normalize
Drop every factor that is constant in $\theta$ first: \[\cpo{p(\theta|\bx)}\propto \cpr{p(\theta)}\clk{p(\bx|\theta)},\] dropping constants from both $\cpr{p(\theta)}$ and $\clk{p(\bx|\theta)}$ too. Then normalize the right side.
How to normalize?
  1. Recognize the distribution (today's route).
  2. Integrate numerically.
  3. Approximate: Markov chain Monte Carlo and variational inference, later in the course.
When only $\argmax_\theta \cpo{p(\theta|\bx)}$ is wanted, no normalization at all.
$\propto$ is the working tool
Everything constant in $\theta$ goes, and the constant comes back at the end, if it is needed at all.
The traffic road: the prior

A road has light traffic on a day with probability $\theta$. Over 10 days, 6 had light traffic. Three steps lead to the posterior.

Step 1: the prior
Before the data, nothing is known about $\Theta$, so every value in $[0,1]$ is equally plausible: \[\cpr{\Theta\sim\uni(0,1),\qquad p(\theta)=1\ \text{on }[0,1]}.\]
The traffic road: the likelihood
Step 2: the data and the likelihood
The data is $\bx=(6,4)$: 6 light and 4 heavy days. Given $\theta$, the count of light days is $\bin(10,\theta)$, so \[\clk{p(\bx|\theta)=\binom{10}{6}\theta^{6}(1-\theta)^{4}}.\] Read as a function of $\theta$, this is the likelihood. It peaks at $\theta=6/10=0.6$, the MLE (last week's method); the binomial coefficient does not depend on $\theta$.
The traffic road: the posterior
Step 3: the posterior
\[\begin{aligned}\cpo{p(\theta|\bx)}&=\frac{\cpr{p(\theta)}\,\clk{p(\bx|\theta)}}{p(\bx)}=\frac{\textcolor{gray}{1}\cdot\textcolor{gray}{\tbinom{10}{6}}\,\clk{\theta^{6}(1-\theta)^{4}}}{\textcolor{gray}{p(\bx)}}\\&\propto\cpo{\theta^{6}(1-\theta)^{4}}.\end{aligned}\] The grayed factors do not depend on $\theta$ and are dropped. As a function of $\theta$, what is left is a Beta density up to its constant: $\cpo{\Theta|\bx\sim\bet(7,5)}$.

The mode is 0.6, the MLE; the mean is $7/12=0.583$; the standard deviation is 0.137.

Your turn: one toss, then three

Let $X_i=1$ denote a head and $X_i=0$ a tail, with $X_i\mid\Theta=\theta\sim\ber(\theta)$. The prior on $\Theta$ is uniform.

Predict: sketch the posterior after a single head, before computing it.

  1. (a) Observe $X_1=1$. Find $p(\theta\mid X_1=1)$.
  2. (b) Observe $\bx=(1,1,0)$. Find the posterior and $\pr(\Theta>1/2\mid\bX=\bx)$.
Your turn: one toss, then three (a)
  1. (a) Observe $X_1=1$. Find $p(\theta\mid X_1=1)$.
Solution \[\begin{aligned} \cpr{\text{Prior:}}\quad &\cpr{p(\theta)=1,\qquad\Theta\sim\bet(1,1)},\\ \clk{\text{Likelihood:}}\quad &\clk{p(X_1=1\mid\theta)=\theta},\\ \cpo{\text{Posterior:}}\quad &\cpo{p(\theta\mid X_1=1)\propto\theta=\theta^1(1-\theta)^0},\\ &\cpo{\Theta\mid X_1=1\sim\bet(2,1)},\\ &\cpo{p(\theta\mid X_1=1)=2\theta}. \end{aligned}\]
Your turn: one toss, then three (b)
  1. (b) Observe $\bx=(1,1,0)$. Find the posterior and $\pr(\Theta>1/2\mid\bX=\bx)$.
Solution \[\begin{aligned} \cpr{\text{Prior:}}\quad &\cpr{p(\theta)=1,\qquad 0\leq\theta\leq1},\\ \clk{\text{Likelihood:}}\quad &\clk{p(\bx\mid\theta)\propto\theta^2(1-\theta)},\\ \cpo{\text{Posterior:}}\quad &\cpo{p(\theta\mid\bx)\propto\theta^2(1-\theta)}\\ &=\cpo{\theta^{3-1}(1-\theta)^{2-1}},\\ &\cpo{\Theta\mid\bx\sim\bet(3,2)}, \end{aligned}\]
\[\begin{aligned} \hphantom{\text{Likelihood:}}\llap{\text{Density:}}\quad &p(\theta\mid\bx)=12\theta^2(1-\theta),\\ \text{Tail:}\quad &\pr(\Theta>\tfrac12\mid\bx)=1-F_{\bet(3,2)}(\tfrac12),\\ &\pr(\Theta>\tfrac12\mid\bx)=\tfrac{11}{16}=0.6875. \end{aligned}\]

A head multiplies the curve by $\theta$ and tilts it right; a tail by $1-\theta$ and tilts it left.

A Beta prior with Bernoulli data

Let $n=h+t$, where $h$ is the number of heads and $t$ the number of tails.

Proportional formNamed distribution
Prior$\cpr{p(\theta)\propto\theta^{\alpha-1}(1-\theta)^{\beta-1}}$$\cpr{\Theta\sim\bet(\alpha,\beta)}$
$\clk{p(\bx\mid\theta)\propto\theta^h(1-\theta)^t}$$\clk{X\mid\Theta\sim\bin(n,\theta)}$
Posterior$\cpo{p(\theta\mid\bx)\propto\theta^{\cpr{\alpha}+\clk{h}-1}(1-\theta)^{\cpr{\beta}+\clk{t}-1}}$$\cpo{\Theta\mid\bx\sim\bet(\cpr{\alpha}+\clk{h},\cpr{\beta}+\clk{t})}$

The observed counts add to the two Beta parameters.

Observed percentages can be misleading

A fraction $\theta$ of viewers like a video; the prior is uniform. Call the video high quality if $\theta>0.8$.

Before the data: what is the prior probability that the video is high quality?

After observing $\bx$, use

\[\pr(\Theta>0.8\mid\bx)=\int_{0.8}^1\cpo{p(\theta|\bx)}\,d\theta.\]

Predict: which result makes you most confident that the video is high quality?

  1. (a) 1 like, 0 dislikes: $100\%$ liked it.
  2. (b) 9 likes, 1 dislike: $90\%$ liked it.
  3. (c) 85 likes, 15 dislikes: $85\%$ liked it.
The posterior ranking reverses the observed percentages

Under the uniform prior, $\pr(\Theta>0.8)=1-0.8=0.20$.

Data $(h,t)$Observed rate $h/n$Posterior$\pr(\Theta>0.8\mid\bx)$
$(1,0)$$1.00$$\cpo{\bet(2,1)}$$0.36$
$(9,1)$$0.90$$\cpo{\bet(10,2)}$$0.68$
$(85,15)$$0.85$$\cpo{\bet(86,16)}$$0.88$
Data reduces sensitivity to fixed Beta priors

Predict: after 100 viewers (80 likes, 20 dislikes), how far apart are the two means? After 1000?

viewersflat priorskeptic $\bet(2,8)$gap
50.710.400.31
20 (16 likes)0.770.600.17
100 (80 likes)0.790.750.05
1000 (800 likes)0.800.790.01
The two posterior means converge in this model
For fixed Beta priors with positive density near the data-generating value, the likelihood increasingly dominates as $n$ grows.
Two equivalent ways to update

Let $\bx$ be the data already observed and $\bx'$ the new data. Assume $\bX'\independent\bX\mid\Theta$, so $\clk{p(\bx'\mid\theta,\bx)}=\clk{p(\bx'\mid\theta)}$.

Use posterior as new prior
Update with the first batch: \[\cpo{p(\theta\mid\bx)}\propto \cpr{p(\theta)}\clk{p(\bx\mid\theta)}.\] Use the posterior as the prior for the second batch: \[\cpo{p(\theta\mid\bx,\bx')}\propto \cpo{p(\theta\mid\bx)}\clk{p(\bx'\mid\theta)}.\]
Pool the data with the original prior
Combine the two batches, then update once: \[\cpo{p(\theta\mid\bx,\bx')}\propto \cpr{p(\theta)}\clk{p(\bx,\bx'\mid\theta)}.\] Use conditional independence to factor the likelihood: \[\clk{p(\bx,\bx'\mid\theta)}=\clk{p(\bx\mid\theta)}\clk{p(\bx'\mid\theta)}.\]
Both routes give the same posterior
$\cpo{p(\theta\mid\bx,\bx')}\propto \cpr{p(\theta)}\clk{p(\bx\mid\theta)}\clk{p(\bx'\mid\theta)}.$

Road: $\bx$ is the first 10 days (6 light), $\bx'$ the next 40 days (23 light).

Shapes in the Beta family
\[p(\theta)\propto\theta^{\alpha-1}(1-\theta)^{\beta-1}.\]

For $\alpha,\beta\geq1$, interpret the prior relative to the uniform $\bet(1,1)$ prior:

\[\underbrace{\alpha-1}_{\text{prior successes}},\qquad\underbrace{\beta-1}_{\text{prior failures}}.\]

Total prior pseudocount: $\alpha+\beta-2$.

A parameter below $1$ has no pseudocount interpretation and can place substantial mass near a boundary.

Question: which curve fits each setting?

  1. (a) Little is known about traffic.
  2. (b) An allele causes a disease.

For more on choosing priors, read about Jeffreys priors.

A Poisson model for event counts

Let $Y_i$ be the number of events in observation window $i$.

\[\clk{Y_i\mid\Lambda=\lambda\sim\poi(\lambda),\qquad p(y_i\mid\lambda)=e^{-\lambda}\frac{\lambda^{y_i}}{y_i!}}.\]

Here, $\lambda$ is the expected count in one window:

\[\E[Y_i\mid\lambda]=\lambda,\qquad\var(Y_i\mid\lambda)=\lambda.\]
Why this model can make sense
The observations are counts in comparable windows. Events occur independently at a roughly stable rate within each window.
The same recipe for counts: Poisson data, Gamma prior

For $n$ independent windows, let $S=\sum_{i=1}^n y_i$. The Gamma distribution uses the shape–rate parameterization.

Proportional formNamed distribution
Prior$\cpr{p(\lambda)\propto\lambda^{\alpha-1}e^{-\beta\lambda}}$$\cpr{\Lambda\sim\gam(\alpha,\beta)}$
$\clk{p(y_1^n\mid\lambda)\propto\lambda^S e^{-n\lambda}}$$\clk{Y_i\mid\Lambda\sim\poi(\lambda)}$
Posterior$\cpo{p(\lambda\mid y_1^n)\propto\lambda^{\alpha+S-1}e^{-(\beta+n)\lambda}}$$\cpo{\Lambda\mid y_1^n\sim\gam(\alpha+S,\beta+n)}$

$\clk{S}$ adds to the Gamma shape, and $\clk{n}$ adds to the Gamma rate.

A convenient flat prior for a rate
$\clk{n=10}$, $\clk{S=20}$
Reference prior$\cpr{p(\lambda)\propto1}$, $\lambda>0$
Posterior$\cpo{\Lambda\mid y_1^{10}\sim\gam(21,10)}$
Posterior mean$\cpo{\E[\Lambda\mid y_1^{10}]=2.1}$
Improper prior, proper posterior
$\int_0^\infty1\,d\lambda=\infty$, but the posterior density integrates to one.

“Flat” depends on the parameterization.

Outline
Bayesian view: point estimates depend on the loss

Sometimes we need a single number to summarize the posterior distribution.

The choice depends on the loss function.

Posterior lossBest estimate
$\E[(\Theta-\hat\theta)^2\mid\bx]$posterior mean $\E[\Theta|\bx]$
$\E[|\Theta-\hat\theta|\mid\bx]$posterior median
discrete $0$–$1$ lossposterior mode

For continuous $\Theta$, MAP maximizes the posterior density:

\[\hat\theta_{\mathrm{MAP}}=\arg\max_\theta \cpo{p(\theta\mid\bx)},\qquad\hat\theta_{\mathrm{mean}}=\E[\Theta\mid\bx].\]

mode 0.020 < median 0.026 < mean 0.029

Bayesian view: the posterior mean minimizes the squared error

With $\bar\theta=\E[\Theta|\bx]$,

\[\E[(\hat\theta-\Theta)^2|\bx]=\var(\Theta\mid\bx)+(\hat\theta-\bar\theta)^2.\]

The cross term is zero because $\E[\Theta-\bar\theta\mid\bx]=0$.

The loss is minimized at $\hat\theta=\bar\theta$.

The floor is the posterior variance
Minimum posterior MSE $=\var(\Theta\mid\bx)$.
Mean, median, and mode for a Beta posterior

Let $\cpo{\Theta\mid\bx\sim\bet(a,b)}$, where $a=\cpr{\alpha}+\clk{h}$ and $b=\cpr{\beta}+\clk{t}$.

Mean
\[\Large\dfrac{a}{a+b}\]
Median
\[\Large\dfrac{a-1/3}{a+b-2/3}\]

(approx.)

Mode
\[\Large\dfrac{a-1}{a+b-2}\]

The median approximation and the mode formula assume $a,b>1$.

Uniform prior
$\hat\theta_{\mathrm{MAP}}=\hat\theta_{\mathrm{MLE}}=h/n$.
Between the prior and the data

The posterior mean is a weighted average of the MLE and the prior mean:

\[\cpo{\frac{h+\alpha}{n+\alpha+\beta}}=\clk{\frac{n}{n+\alpha+\beta}\cdot\frac{h}{n}}+\cpr{\frac{\alpha+\beta}{n+\alpha+\beta}\cdot\frac{\alpha}{\alpha+\beta}}.\]
Data weight $n$, prior weight $\alpha+\beta$
As $n$ grows, the posterior mean moves toward the MLE.
Your turn

Given: $n=3$, $h=2$, $t=1$, and $\cpr{\Theta\sim\bet(2,2)}$.

  1. (a) The posterior?
  2. (b) Posterior mean, posterior mode, the MLE, the prior mean?
  3. (c) Check the weighted average.
Solution

(a) $\cpo{p(\theta\mid\bx)\propto\theta^3(1-\theta)^2}$, $\cpo{\Theta\mid\bx\sim\bet(4,3)}$.

(b) mean $=4/7$, MAP $=3/5$, MLE $=2/3$, prior mean $=1/2$.

(c) $\dfrac47=\left(\dfrac37\right)\left(\dfrac23\right)+\left(\dfrac47\right)\left(\dfrac12\right)$.

prior .500   mean .571   MAP .600   MLE .667

Outline
A firefighter writing in a logbook beside a fire engine in an open station bay
AI-generated illustration
A question about tomorrow, not about $\lambda$

A fire department has recorded $20$ incidents in $10$ days. With the flat prior, $\cpo{\Lambda\mid y_1^{10}\sim\gam(21,10)}$.

Question: what is $\pr(Y_{11}>5\mid y_1^{10})$, the probability of more than $5$ incidents tomorrow?

The posterior describes $\Lambda$, not tomorrow's count.

The answer depends on $\lambda$

For a given rate,

\[\clk{\pr(Y_{11}>5\mid\Lambda=\lambda)=1-\sum_{k=0}^{5}e^{-\lambda}\frac{\lambda^k}{k!}},\]

which is $0.004$ at $\lambda=1.5$ and $0.084$ at $\lambda=3$, both plausible rates.

So how do we find the probability of more than $5$ incidents tomorrow, given the data?

Two ways to answer: plug in, or average
Plug in the posterior mean
Treat the posterior mean of $\Lambda$ as the true rate, and compute the Poisson probability of more than $5$ incidents at that rate.
Average over the posterior
Compute the probability at every rate $\lambda$, and average these probabilities, weighting each rate by its posterior density.
The plug-in treats $\lambda$ as known

Plug in the posterior mean, $\cpo{\E[\Lambda\mid y_1^{10}]=21/10=2.1}$:

\[\cml{Y_{11}\sim\poi(2.1)},\qquad\cml{\pr(Y_{11}>5)=0.020}.\]

The posterior still spreads over rates from about $1.3$ to $3.1$ ($95\%$ of its mass). At $\lambda=3$ the same probability is $0.084$, four times larger.

A plug-in prediction discards the uncertainty about $\lambda$
It uses one value of $\lambda$ and ignores the rest of the posterior.
The posterior predictive distribution

Two distributions are already available:

\[\underbrace{\cpo{p(\lambda\mid y_1^n)}}_{\text{posterior}}\qquad\underbrace{\clk{p(y_{n+1}\mid\lambda)}}_{\text{sampling model}}.\]

Average the sampling model over the posterior:

\[\begin{aligned}\cpd{p(y_{n+1}\mid y_1^n)}&=\int p(y_{n+1},\lambda\mid y_1^n)\,d\lambda\\&=\int p(y_{n+1}\mid\lambda,y_1^n)\,\cpo{p(\lambda\mid y_1^n)}\,d\lambda\\&=\int \clk{p(y_{n+1}\mid\lambda)}\,\cpo{p(\lambda\mid y_1^n)}\,d\lambda.\end{aligned}\]

Once $\Lambda$ is known, the past does not change the distribution of the next observation.

The last step uses $Y_{n+1}\independent Y_1^n\mid\Lambda$.

The posterior predictive keeps every plausible $\lambda$

Average the Poisson over the posterior $\cpo{\gam(21,10)}$:

\[\cpd{p(y\mid y_1^{10})}=\int\clk{\poi(y;\lambda)}\,\cpo{\gam(\lambda;21,10)}\,d\lambda.\]

For the fire department,

\[\cpd{\pr(Y_{11}>5\mid y_1^{10})}=\textstyle\sum_{y>5}\cpd{p(y\mid y_1^{10})}=\cpd{0.026},\]

against $\cml{0.020}$ from the plug-in.

The posterior predictive keeps the uncertainty about $\lambda$
It averages over every plausible rate, each weighted by its posterior density.
Tomorrow's count after one day

Go back to the department's first day: two incidents. With the flat prior, $\cpo{\Lambda\mid y_1\sim\gam(3,1)}$, with posterior mean $3$.

Plug-in predictive
Use the posterior mean as the rate: \[\cml{p(y_2\mid\lambda=3)},\quad\text{the }\cml{\poi(3)}\text{ pmf}.\]
Posterior predictive
Average the Poisson over the posterior: \[\cpd{p(y_2\mid y_1)}=\int\clk{\poi(y_2;\lambda)}\,\cpo{\gam(\lambda;3,1)}\,d\lambda.\]

Predict: How does $p(y_2\mid y_1)$ compare to $p(y_2\mid\lambda=3)$?

One day of data doubles the spread of the prediction

The plug-in assumes the single rate $\lambda=3$. The posterior predictive includes every plausible rate: each band of rates contributes Poisson counts with its own $\lambda$, weighted by its posterior probability. Variance of tomorrow's count: $\cpd{6}$ for the posterior predictive, $\cml{3}$ for the plug-in.

The predictive reflects how much data there is; the plug-in does not
plug-inpredictive
datavariance$\pr(Y>5)$variance$\pr(Y>5)$
one day, $2$ incidents$3$$0.084$$6$$0.145$
ten days, $20$ incidents$2.1$$0.020$$2.31$$0.026$

The plug-in is as confident after one day as after ten. The predictive is wide when the data are few and approaches the plug-in as they accumulate.

Poisson: the expected count tomorrow

For counts $\clk{Y_i\mid\Lambda\sim\poi(\Lambda)}$ and posterior $\cpo{\Lambda\mid y_1^n\sim\gam(\alpha+n\bar y,\,\beta+n)}$, the expected count tomorrow follows from iterated expectations:

\[\begin{aligned} \cpd{\E[Y_{n+1}\mid y_1^n]} &= \cpo{\E_{\Lambda\mid y_1^n}}\!\left[ \E(Y_{n+1}\mid\Lambda, y_1^n) \right] && \text{(law of iterated expectations)} \\[2pt] &= \cpo{\E_{\Lambda\mid y_1^n}}\!\left[ \clk{\E(Y_{n+1}\mid\Lambda)} \right] && \text{($Y_{n+1}\independent Y_1^n\mid\Lambda$)} \\[2pt] &= \cpo{\E_{\Lambda\mid y_1^n}[\Lambda]} && \text{($Y_{n+1}\mid\Lambda\sim\poi(\Lambda)\implies\E[Y_{n+1}\mid\Lambda]=\Lambda$)} \\[2pt] &= \cpo{\frac{\alpha+n\bar y}{\beta+n}} && \text{(mean of $\gam(\alpha+n\bar y, \beta+n)$)}. \end{aligned}\]

For the one day with two incidents, $\cpo{\gam(3,1)}$ gives $\cpd{\E[Y_2\mid y_1]=3}$.

Weighted average of prior mean and sample mean
\[\E[Y_{n+1}\mid y_1^n]= \cpr{\frac{\beta}{\beta+n}\left(\frac{\alpha}{\beta}\right)} + \clk{\frac{n}{\beta+n}\,\bar y}\] As $n\to\infty$, the weight on the prior fades and the prediction approaches $\bar y$.
Two sources of uncertainty in the next count

With $m=\E[\Lambda\mid y_1^n]$, condition on $\Lambda$ as for the mean:

\[\begin{aligned} \cpd{\var(Y_{n+1}\mid y_1^n)} &= \E_{\Lambda\mid y_1^n}\!\left[\E\big((Y_{n+1}-m)^2\mid\Lambda\big)\right] && \text{($Y_{n+1}\independent Y_1^n\mid\Lambda$)} \\[2pt] &= \E_{\Lambda\mid y_1^n}\!\left[\Lambda+(\Lambda-m)^2\right] && \text{($\var(Y_{n+1}\mid\Lambda)=\Lambda$)} \\[2pt] &= \cml{\E[\Lambda\mid y_1^n]}+\cpo{\var(\Lambda\mid y_1^n)}. \end{aligned}\]
\[\boxed{\cpd{\var(Y_{n+1}\mid y_1^n)}=\underbrace{\cml{\frac{\alpha+n\bar y}{\beta+n}}}_{\cml{\text{Poisson noise}}}+\underbrace{\cpo{\frac{\alpha+n\bar y}{(\beta+n)^2}}}_{\cpo{\text{uncertainty about }\Lambda}}}\]
The prediction is wider than a plug-in Poisson
Plugging in $\poi(m)$ keeps only the first term. The second term shrinks as $n$ grows. After ten days, uncertainty about $\Lambda$ adds only $0.21$.
Summary
Posterior $\propto$ prior $\times$ likelihood.
Bernoulli counts update a Beta distribution. Poisson counts update a Gamma distribution.
Observed counts add to the prior's parameters.
The loss function determines the appropriate point estimate.
Prediction averages the sampling model over the posterior.

Next: Gaussian prior and likelihood, with frequentist and Bayesian estimators side by side.