Bayesian vs Frequentist approach (to statistics)
Jessica Cox
How likely is a rate above five?
Jessica Cox
How likely is a rate above five?
How often would we count eight or more events if the rate were five?
Given eight events, how likely is the rate to exceed five?
Count \(k=8\). Observation time \(T=1\).
of counts reach eight or more when the reference rate holds.
95% confidence interval
For illustration, use an exponential prior with mean four events per unit.
Posterior probability above five
18.0% lies at or below five.
Central 95% credible interval
At a rate of five, this fraction of repeated counts reach eight or more.
The remaining posterior area lies at or below five, given eight events and the broad exponential prior.
True rate \(\lambda=5\), time \(T=1\).
Eight events, exponential prior.
95% credible interval [3.29, 12.61]
With the same rate, what is the chance of another count of eight or more?
under the broad exponential prior.
Each gap between marks holds 10% of the prior probability.
Rates between one and two get the same probability as rates between two and three.
Rates between one and two get the same probability as rates between two and four. Both ranges span one doubling.
An independent earlier record has four events in one unit. Assume the same rate in both periods.
Gamma shape \(a\) and rate \(b\)
Four events in one unit give a one-sided 95% confidence limit.
Suppose we give rates above that limit 5% prior probability.
The earlier result supplies 9.15. We supply the exponential shape and the 5% tail.
Smaller rates are more likely. The mean and standard deviation are both four.Update the broad prior with four events in one earlier unit of time.Choose an exponential prior with 5% probability above the earlier limit of 9.15.Give equal-width intervals equal probability between 0.25 and 25.Give each doubling equal probability between 0.25 and 25.
Each record has \(k/T=8\).
Rates are in events per unit time.
For a \(\mathrm{Gamma}(a,b)\) prior, \(b\) acts like prior observation time.
| With the earlier-count prior | One time unit | Ten time units |
|---|---|---|
| Prior weight \(b/(b+T)\) | 55.6% | 11.1% |
| Posterior mean | 5.78 | 7.56 |
Posterior upper limits across the five priors
Smaller rates are more likely. The mean and standard deviation are both four.Update the broad prior with four events in one earlier unit of time.Choose an exponential prior with 5% probability above the earlier limit of 9.15.Give equal-width intervals equal probability between 0.25 and 25.Give each doubling equal probability between 0.25 and 25.
Ten events per unit, twice the reference rate, lies inside the 95% confidence interval. Stopping here could miss an increase that large.
A prior that ends at this limit gives zero posterior probability to the whole range above it, whatever the next count.
We chose to measure the rate because we thought it might have risen.
That was already a prior judgment. Bayesian analysis lets us say which rates seemed plausible and how the count changed our view.
Press 1–9 for B1–B9 or 0 for B10. Press I to return here.
In one unit, \(K\mid\lambda\sim\mathrm{Poisson}(\lambda)\). We observe eight events. Both priors are exponential with rate parameter \(b\).
The broad prior uses \(b=0.25\). A skeptical prior assigns 10% above five, giving \(b=\log(10)/5\).
Eight Poisson events in one unit. Prior \(\lambda\sim\mathrm{Exp}(\mathrm{rate}=0.25)\). Chance of an increase \(p=\Pr(\lambda>5\mid K=8)\simeq 0.820\).
A missed increase costs \(C\), a false alarm costs \(F\), and a correct decision costs zero.
| Miss cost \(C\) | False-alarm cost \(F\) | Reporting threshold | Expected loss if reporting | Expected loss if withholding | Choice |
|---|---|---|---|---|---|
| 1 | 4 | 80.0% | 0.72 | 0.82 | Report |
| 1 | 9 | 90.0% | 1.62 | 0.82 | Withhold |
Eight Poisson events in one unit. Prior \(\lambda\sim\mathrm{Exp}(\mathrm{rate}=0.25)\). Chance of an increase \(p=\Pr(\lambda>5\mid K=8)\simeq 0.820\).
A sure loss of two units, or an even chance of zero or four
A missed increase costs \(C=1\), a false alarm costs \(F=4\), and a correct decision costs zero.
| Penalty \(\ell(x)\) | Report | Withhold |
|---|---|---|
| \(x\) | 0.72 | 0.82 |
| \(x^2\) | 2.87 | 0.82 |
Eight Poisson events in one unit. Prior \(\lambda\sim\mathrm{Exp}(\mathrm{rate}=0.25)\). Chance of an increase \(p=\Pr(\lambda>5\mid K=8)\simeq 0.820\).
A missed increase costs \(C=1\), a false alarm costs \(F=4\), and a correct decision costs zero.
Take \(\gamma\) independent of the event rate.
For \(K\mid\lambda,T\sim\mathrm{Poisson}(T\lambda)\), compare eight events in one unit with eighty in ten units.
A missed increase costs \(C=1\), a false alarm costs \(F=9\), and a correct decision costs zero.
Before observing a count, take \(K\mid\lambda\sim\mathrm{Poisson}(\lambda)\) for one unit and \(\lambda\sim\mathrm{Exp}(b)\) with rate parameter \(b\).
Plan one unit with \(\lambda\sim\mathrm{Exp}(\mathrm{rate}=0.25)\) and \(K\mid\lambda\sim\mathrm{Poisson}(\lambda)\). A missed increase costs \(C=1\), a false alarm costs \(F=4\), and a correct decision costs zero.
If \(p\) is the chance that the rate exceeds five, report when \(p>F/(F+C)=0.8\).
Counting saves \(R_{\rm before}-R_{\rm after}\simeq 0.115\) expected loss units before the cost of the measurement.
Given a common rate \(\lambda\), two independent one-unit Poisson counts yield four earlier events and eight new events. Start with \(\lambda\sim\mathrm{Exp}(\mathrm{rate}=0.25)\).
| Uses of the earlier count | Gamma shape \(a\), rate \(b\) | Mean rate | Central 95% credible interval |
|---|---|---|---|
| Once | \((a,b)=(13,\,2.25)\) | 5.78 | [3.08, 9.32] |
| Twice in error | \((a,b)=(17,\,3.25)\) | 5.23 | [3.05, 7.99] |
For \(K\mid\lambda,T\sim\mathrm{Poisson}(T\lambda)\), the improper flat prior on \(\lambda>0\) gives a \(\mathrm{Gamma}(k+1,T)\) posterior with rate parameter \(T\).
| 95% upper limit | Equation for \(u\), with \(k=8,\ T=1\) | Rate |
|---|---|---|
| Exact Poisson confidence limit | \(\Pr(K\le 8\mid\lambda=u)=0.05\) | 14.43465 |
| Posterior, flat on \((0,\infty)\) | \(S(u)=0.05\) | 14.43465 |
| Posterior, flat on \([0.25,25]\) | \(\dfrac{S(u)-S(25)}{S(0.25)-S(25)}=0.05\) | 14.43180 |
At the reference rate, independent one-unit counts satisfy \(X,Y\sim\mathrm{Poisson}(5)\), so \(X+Y\sim\mathrm{Poisson}(10)\).
At each look, use the smallest count whose upper-tail probability is at most 5%.
| When we test | Report an increase if | False-alarm probability |
|---|---|---|
| After two units | \(X+Y\ge 16\) | 4.87% |
| After one or two units | \(X\ge 10\) or \(X+Y\ge 16\) | 6.46% |