# Presentation: 325066

## BAYESIAN STATISTICS 

*Donald A. Berry*
*Institute of Statistics *
*& Decision Sciences*
*Duke University*

## Text for this course

*Statistics: A Bayesian Perspective*
- D. Berry, 1996, Duxbury Press.
- Includes disk of Minitab macros.
- References to text in this course are not in order of text chapters.

## These slides available on WWW

*Need PowerPoint.*
*Download from*
*http://www.stat.duke.edu*
*“**Faculty” then Berry.*

## Advanced topics reference

*Bayesian Biostatistics*
- D. Berry & D. Stangl, 1996,
- Marcel Dekker Pub.
- Principal focus is medicine.
- Especially helpful for hierarchical modeling—to be introduced in this course.

## Another advanced reference

*Bayesian Data Analysis*
- A. Gelman, J. Carlin, H. Stern, D. Rubin, 1995, Chapman & Hall.
- Computational methods, esp. Markov chain Monte Carlo.
- Hierarchical modeling.

## Added attraction

*My August 1997 report to**FDA Center for Devices: **Using a Bayesian Approach in Medical Device Development*
*	**http://www.stat.duke.edu*
- Among other topics:
- Using historical information.
- Decision making.

## COURSE OUTLINE

*Ch.5: Conditional probability **	**	**& Bayes’ rule*
*Conditional probability.*
*Law of total probability.*
*Bayes’ rule.*
*Screening for cancer.*
*Mary Decker Slaney case.*
*Updating probabilities.*
*Why need a formal rule for learning?*
*“**Let’s Make a Deal”*

## COURSE OUTLINE (cont’d)

*Chs. 6-9: Inferences for proportions*
*Likelihoods.*
*Predictive probabilities.*
*Laplace’s rule of succession.*
*Frequentist vs. Bayesian approach.*
*Comparing two proportions.*
*Chs. 10-12: Inferences for means*
*Frequentist tests of hypotheses.*
*Frequentist confidence intervals.*
*Bayesian analogs.*

## COURSE OUTLINE (cont’d)

*Inferences for Poisson rates **(not in text)*
*Prior to posterior.*
*Ratios of Poisson rates.*
*Bayesian hierarchical analysis **(not in text)*
*Binomial example.*
*Poisson example: screening mammography for women in their 40s.*

## COURSE OUTLINE (cont’d)

*Decision analysis*
*Loss functions.*
*Bayes risk.*
*Value of perfect information.*
*Value of sample information.*
*Bayesian sample size and strategy.*

## CHAPTER 5: CONDITIONAL PROBABILITY AND BAYES’ RULE

***A***

***A************B***

***B***

***Equivalently,***

## Conditional probability & trees.Example 5.3: How many girls?

*Family, 2 children*
*D: Both are girls*
*C: At least 1 girl*

## In contrast, condition on G2: How many girls?

*Family, 2 children*
*D: Both are girls*
*G2: Second is a girl*

## Law of total probability

*Multiplication rule:*

*Law of total probability:*

- B

- A

## Bayes’ rule

*Rule of inverse probabilities:*

*[Expansion of P(B) in denominator *
*is the law of total probability.]*

## Alternative versions of Bayes’ rule

*Where B is “data” and A is an “hypothesis”:*
*Posterior odds = Likelihood ratio x Prior odds*

## Paternity testing: Ex. 5.12

*ABO blood types, background:*
*Suzy’s mom: Type O*
*Al Edged: Type AB*
*Suzy: Type B*
*F = Al is Suzy’s father*
*Bayes’ rule:*

## Posterior probability of paternity

*Paternity Index:*
*Rewriting Bayes’ rule:*
*Mendel: P(B** *|* **F) = 1/2*
*Allelic frequency: P(B** *|* **~F) = 0.09*
*In example:*

## Posterior vs. prior probabilities, for PI = 5.56

*Generally:*

*Paternity testers:*
*    **P(F) = 1/2*
*Then*
*P(F *|* **B) *
*     **= PI/(PI+1)*
*     **= 5.56/6.56*
*     **= 84.8%*

*0.848*

## Example: Screening for cancer

*Incidence = **   1/1000*
*Sensitivity =**   1–FNR =**   90%*
*Specificity =**   1–FPR =**   95%*

## Screening for cancer (cont’d)

- Condition on +,nothing else matters

## Mary Decker Slaney Case

*Testosterone/Epitestosterone level in urine  6*
*“**Suspicious” **** “positive” **** “guilty”*
*Statistical issues:*
*Specificity*
*Sensitivity*
*Inverse probabilities/Bayes’ rule*
*Prior probabilities*
*Multiplicities*

## My presentation in Mary Decker Slaney Case

*Proportion of women athletes with T/E  6 is about 1%.*
*H = athlete is a user.*

## Two databases, users and not (hypothetical distributions)

## Specificity

## Sensitivity

## User probability given T/E  6(Suppose Spec = 99%)

***    ******Sens:******	******    0******	****** 0.25******	****** 0.50******	****** 0.75******	****** 1.00***
_***Prior***_***	******--------------------------------------------------------***
***0******	******	******    0******	******0******	******0******	******0******	******0***
***0.0001******	******    0******	******0.002******	******0.005******	******0.007******	******0.010***
***0.001******	******    0******	******0.024******	******0.048******	******0.070******	******0.091***
***0.01******	******    0******	******0.202******	******0.336******	******0.431******	******0.503***
***0.02******	******    0******	******0.338******	******0.505******	******0.605******	******0.671***
***0.03******	******    0******	******0.436******	******0.607******	******0.699******	******0.756***
***0.04******	******    0******	******0.510******	******0.676******	******0.758******	******0.806***
***0.05******	******    0******	******0.568******	******0.725******	******0.798******	******0.840***
***0.1******	******	******    0******	******0.735******	******0.847******	******0.893******	******0.917***
***0.2******	******	******    0******	******0.862******	******0.926******	******0.949******	******0.962***
***0.3******	******	******    0******	******0.915******	******0.955******	******0.970******	******0.977***
***0.4******	******	******    0******	******0.943******	******0.971******	******0.980******	******0.985***
***0.5******	******	******    0******	******0.962******	******0.980******	******0.987******	******0.990***
***0.6******	******	******    0******	******0.974******	******0.987******	******0.991******	******0.993***
***0.7******	******	******    0******	******0.983******	******0.992******	******0.994******	******0.996***
***0.8******	******	******    0******	******0.990******	******0.995******	******0.997******	******0.998***
***0.9******	******	******    0******	******0.996******	******0.998******	******0.999******	******0.999***
***1******	******	******   —******	******1******	******1******	******1******	******1***

*Beyond a*
*reasonable*
*doubt?*

## Better: Use exact observed value.Suppose T/E = 6. (Extra slide.)

*Bayes’ rule:*
*But requires modeling—or binning*

## Why formal theorem for learning?

*Data:  Of 5 selections w/o replacement, 1 is Red, 4 are Green*
*Suppose  P(urn 1) = P(urn 2) = 1/2*
*GUESS: P(urn 1 *|* Data) = ?*

*Quiz: Have 2 urns:*

*90 R’s*
*10 G’s*

*95 R’s*
*  **5 G’s*

## P(urn 1 | data) = 40/41=97.5%

*P(1 *|* Data) **** P(Data *|*1) P(1)*
*P(Data *|* 1) = 2.51E–4*
*P(Data *|* 2) = 6.31E–6*
*Posterior odds:*

## Martingales and Bayes

*Overheard: "Result was not statistically significant, but only because my sample size was not big enough!"*
*Time course of P values is difficult to analyze, depends on parameters.*
*Bayesian probabilities have elegant martingale property:*
*P(H) = E P(H *|* data)*
*	**(“Law of total probability,” again.)*

## Example: In 2-urn quiz, start with P(1)=1/2; suppose 5 obs.

*Example: In 2-urn quiz, start with P(1)=1/2; suppose 5 obs.*

*Unconditional probability of urn 1*
*is the prior probability, as advertised.*
*In example, P(1) ****but could have ****.*

## Sampling and learning:Example 5.13. How many greens?

*Assume:*
*Bowl with 5 chips.*
*0, 1, 2, 3, 4, or 5 are green.*
*Prior probabilities are equal:*

## Updated probabilities ifselect a green chip

*Observe G, a green chip.*
*Likelihoods:*
*   *_*P(G*__|__*0) P(G*__|__*1) P(G*__|__*2) P(G*__|__*3) P(G*__|__*4) P(G*__|__*5)*_*    0        1/5      2/5      3/5      4/5        1*
*Posterior probabilities:*
*   *_*P(0*__|__*G) P(1*__|__*G) P(2*__|__*G) P(3*__|__*G) P(4*__|__*G) P(5*__|__*G)*_
*	**    **0       1/15    2/15    3/15    4/15    5/15*

## Probability next chip is green—WITHOUT replacement

_*      *__*G:         0          1         2        3        4         5   *_
*P(G*|*G1)     0       1/15    2/15    3/15    4/15    5/15*
_*P(G2*_|_*G)     0        0/4      1/4      2/4      3/4      4/4 *_
*Product      0       0/60    2/60    6/60  ** **12/60 ** ** 20/60*

*P(G2*|*G1) = sum of products = 2/3*

## Probability next chip is green—WITH replacement

- _      __*G:         0          1         2        3        4         5   *_
*P(G*|*G1)     0       1/15    2/15    3/15    4/15    5/15*
_*P(G2*_|_*G)     0        1/5      2/5      3/5      4/5      5/5 *_
*Product      0       1/75    4/75    9/75  ** **16/75 ** ** 25/75*

*P(G2*|*G1) = sum of products*
*                **= 11/15*
*                **> 2/3 (for without replacement)*

## Example 5.15:“Let’s Make a Deal”

*Choice of three boxes*
*One contains key to Lincoln Continental.*
*Other two are empty.*
*Contestant chooses box 2.*
*P(win) = 1/3*
*Monte Hall opens box 1 and shows it’s empty. Only 2 possibilities; he claims*
*	**P(win *|* box 1 empty) = 1/2*

## “Let’s Make a Deal” Assumptions

*Monte Hall would never open box 2.*
*He would never open box containing the key. *
*If key in box 2 then he opens boxes 1 and 3 with equal probabilities.*

*Event “Box 1 empty” includes *
*assumptions that he wouldn’t *
*open box 2 or the box with the key.*

## “Let’s Make a Deal”; P(data)

*Under above assumptions:*
*P(box 1 empty) = *
*P(box 1 empty *|* in box 1)P(in box 1)*
*  **+ **P(box 1 empty *|* in box 2)P(in box 2)*
*  **+ P(box 1 empty *|* in box 3)P(in box 3)*
*= 0x1/3 + **(1/2)x1/3 **+ 1x1/3 = 1/2*

## “Let’s Make a Deal”; Bayes’ rule

*P(in box 2 *|* box 1 empty) = *
*P(box 1 empty *|* in box 2)P(in box 2)*
***P(box 1 empty) = **(1/6) ****(1/2) = **1/3*

*Unchanged!*
*Monte Hall’s information has no value*
*—**about box 2, but it affects box 3!*

## INFERENCES CONCERNING PROPORTIONS—CHAPTERS 6-9

*Population has two types of members: heads/tails, green/**not green, girl/boy, Democrat/Republican, success/failure, etc.*
*Of interest is p = population proportion of success.*
*p is unknown.*

## Exercise 7.28: Data for long-term effects of lead in childhood

*Researchers assessed lead content in children's shed primary teeth.*
*29 children had teeth with a lead content > 22.22 ppm.*
*22 graduated from high school; **7 did not.*
*p = proportion of children who graduate from high school among all children with lead content > 22.22 ppm.*

## Likelihood for population proportion p of “graduate”

## Likelihoods; Discrete case

_*  *__*p     Likelihood     x 10*_*10*
*0.5     1.863e-9         19*
*0.6     2.156e-8       216*
*0.7     8.551e-8       855*
*0.8     9.445e-8       944*
*0.9     9.848e-9         98*

*Likelihood =*
*   **p**22**(1–p)**7*

## Bayes’ rule, Discrete case.Suppose uniform prior

_*  *__*p    Likelihood    Prior    Product      Posterior*_
*0.5          19          1/5         19/5          0.009*
*0.6        216          1/5       216/5          0.101*
*0.7        855          1/5       855/5          0.401*
*0.8        944          1/5       944/5          0.443*
_*0.9          98          1/5         98/5          0.046*_
*Sum                                2132/5         1.000*

## Bayes’ rule, Continuous case.Suppose uniform prior

*If prior density of p is uniform [flat] then posterior **** likelihood: Beta(23,8)*

## Beta density for a proportion

*Beta(a,b) density ****:*
*p**a–1**(1–p)**b–1*
*Mean of Beta(a,b):*
*Variance of Beta(a,b):*

## Updating rule for beta densities

*Assume Beta(a,b) prior density of p*
*After observing s successes and f failures, updated density of p is **beta(a+s,b+f):*
*p**a–1**(1–p)**b–1*x* p**s**(1–p)**f**= p**a+s–1**(1–p)**b+f–1*
*Special case of Beta(a,b) is the uniform: a = b = 1 (considered previously)*

## Example with single observation—from Beta(4,2):

*Beta(4,2)*

*Beta(5,2)*

*Beta(4,3)*

*Succ.*

*Fail*

## Predictive probabilities for beta densities

*Assume Beta(a,b) prior density for success propensity p*
*Probability of success on next observation is mean of p: a/(a+b)*
*Probability of 2 successes in next 2 observations, for example, is*

## Predictive probabilities for uniform, Beta(1,1):

*For n observations, the predictive*
*probability of k successes is 1/(n+1).*
*For n = 10:*

## Predictive probabilitiesfor one observation

*Beta(4,2)*

*Beta(5,2)*

*Beta(4,3)*

*Succ.*

*Fail*

*4/6*

*2/6*

## Revisit graduation rate for children exposed to lead

*    **For uniform prior, *
*posterior is Beta(23,8):*

*   **For beta(9,1) prior,*
*posterior is Beta(31,8):*

*Mean = 0.74*

*Mean = 0.79*

## Prediction for next 10

*Assume uniform prior (posterior is beta(23,8)). What is (predictive) probability at least 9 of next 10 will graduate from high school? *
*P(9 or 10) = 0.190 + 0.076 **** 27%*

## Treatment comparison:Example with pairs

*Data: 13 A's and 4 B's*
*Parameter = p = P(A wins)*
*For **ANY** design with these results, the likelihood function is*
*	**	**P(data | p) **** p**13 **(1–p)**4*
*  *
*Posterior probabilities and Bayesian conclusion also same for any design.*

## Likelihood function of p:

## If prior is uniform on (0, 1):

*If ****(p) **** 1, then**	**posterior **** likelihood*
*For example,**P(p > 0.5 *|* data)**= proportion of likelihood to**right of 0.5:*

*p = 0.5*

## Laplace’s rule of succession

***  ******P(A wins next pair | data) =***

***[Compare: mean of Beta(a,b) is a/(a+b)]***

## Predictive distribution

*   **Predictive distribution of # of successes in next *
*	**17 tries:*

*Has more variability than any binomial ***

## Best fitting binomial vs. predictive probabilities

*Binomial, p=14/19*

*Predictive, p ~ beta(14,5)*

## Frequentist inferences—Comparisons with Bayesian

*Revisit: 13 A's and 4 B's*
*Parameter = p = P(A wins)*
*Likelihood **** p**13 **(1–p)**4*
*  *
*Frequentist conclusion? Depends on design.*

## Frequentist hypothesis testing

*P value = Probability of observing data as or more extreme than results, assuming H**0**: P = P(tail of dist. *|* H**0**)*
*Four designs:*
*(1)  Observe 17 pairs*
*(2)  Stop trial once both 4 A's and 4 B's*
*(3)  Interim analysis at 17, stop if 0 - 4  or*
*	**	**    **13 - 17 A's, else continue to n = 44 *
*(4)  Stop when "enough information"*

## Design (1): Observe 17 pairs

*Binomial distribution*
*with n = 17, p = 0.5;*
*P value = **0.049**.*

## Design (2): Stop when both 4 A’s and 4 B’s

*     **Two-sided negative*
*binomial with r = 4, p = 0.5;*
*        **P value = **0.021*

## Design (3): Interim analysis at n=17, possible total is 44

*Interim*
*analysis*
*after 17,*
*continue*
*to 44 if *
*not 0-4*
*or 13-17;*
*P value*
*= **0.085*

*Both shaded regions = 0.049*

*  **Prob. **both** = 0.013;*
*net is 2(0.049) – 0.013*
*          **= 0.085*

## Design (4): Stop when enough information

*Cannot calculate P value.*
*Strictly speaking, frequentist inferences are impossible when using the “scientific” stopping rule: stop when you learn the answer.*

## Frequentist conclusion depends on investigator’s intentions

*Inv. 1 planned several interim analyses*
*Inv. 2 planned none (or says none!)*
*They get identical data*
*Inv. 2 claims statistical significance*
*Inv. 1 cannot—only because looked at data with possibility of early stopping*
*To avoid penalties, frequentists suggest not looking. Seems unscientific.*

## Unplanned interim looks

*Suppose investigator plans no interim analyses, but looks?*
*Frequentist inferences are not possible*
*P value = *
*	**P(observing result more extreme *|* H**0**)*
*What results are “extreme”?*

## Multiplicities in science

*Multiplicities include:*
*Multiple comparisons*
*Subgroup analyses*
*Repeated significance testing*
*Multiplicities are ubiquitous and they complicate inferences.*
*But adjustments for “repeated significance testing” is non scientific and is a distinctly negative aspect of the frequentist approach.*

## Frequentist vs. Bayesian—Six comparisons

*1.**	**Probabilities of data vs. probabilities of parameters (& also data).*
*2.**	**Evidence used:*
*Frequentist measures specific to experiment.*
*Posterior distribution depends on all available information.*
*	**Makes Bayesian approach appealing, but assembling, assessing, & quantifying information is work.*

## Frequentist vs. Bayesian—Six comparisons

*3.**	**Depend on probabilities of results that could occur vs. did occur:*
*Frequentist measures (e.g., P values, confidence intervals) incorporate probabilities of data that were possible but did not occur.*
*Posterior depends on data only through the likelihood, which is calculated from observed data.*

## Frequentist vs. Bayesian—Six comparisons

*4.**	**Flexibility:*
*Frequentist measures depend on design; require that design be followed.*
*Bayesian view: update continually as data accumulate (only requirement is honesty). Sample size: need not choose in advance. Weigh costs/benefits; decide whether to start experiment. After experiment starts, decide whether to continue—stop at any time, for any reason.*

## Frequentist vs. Bayesian—Six comparisons

*5.**	**Predictive probabilities*
*Frequentist: assume particular value of parameter (or particular hypothesis).*
*Bayesian: average over parameters.*
*6.**	**Decision making*
*Frequentist: historically avoided.*
*Bayesian: tailored to decision analysis; losses and gains considered explicitly.*

## Two-sample comparison of proportions

*Example: 15 sickle-cell carriers (heterozygotes) and 15 noncarriers were injected with malaria parasites.*
*2 of 15 carriers and 14 of 15 noncarriers contracted malaria. *
*Likelihoods: p**C**2**(1–p**C**)**13 ** & p**N**14**(1–p**N**)*
*Assuming independence, multiply likelihoods: p**C**2**(1–p**C**)**13**p**N**14**(1–p**N**)*
*Picture ***

## Product of separate likelihoods

## Probability of pN > pC given data

## P(pN – pC > 0.6 | data)

## PdALx = P(pN – pC > x)using Minitab

_* *__*x       PdALx*_*                *_* x       PdALx*_
* **0        1.00                  0.5      0.96*
*0.1      1.00                  0.6      0.82*
*0.2      1.00                  0.7      0.52*
*0.3      1.00                  0.8      0.21*
*0.4      0.99                  0.9      0.05*

*Picture **** *

## PdALx (Probability difference is At Least x) in picture form:

*0.816 = PdAL.6*

## CHAPTERS 10-12: INFERENCES ABOUT MEANS

*Example:*
*100 patients, endpoint mean m*
*H**0**: m = 0*
*   **= 1.96, SD = 10*
*Frequentist:*

## Two-sided P value is 0.05

## Frequentist testing hypotheses

*What we did:*
*Conditioned on m = 0*
*Calculated tail area, the probability of more extreme results when m = 0:*

## Frequentist confidence intervals

*When     = 1.96: 0 < m < 3.92 is the 95% confidence interval.*
*Which means what?*

## Bayesian approach

*Condition on observed data: n,*
*Calculate posterior probability:*
*P(m=0 *|* n = 100,    =1.96)*
*P(0 < m < 3.92 *|* n = 100,    =1.96)*
*etc.*

## Bayesian: Consider alternatives. Discrete case

*Suppose if m is not **0**, it is either **1**, **2**, or **3**:*

## Alternatively, by symmetry of

## Bayes’ rule calculations

## Continuous case (m any value)

*Likelihood of m is normal, centered **at    , with SD = 10/****100 = 1*
*Suppose prior is normal, mean 0, **SD = ****2 = 1.41*

## Prior, likelihood, posterior of m:

##     Posterior mean is weighted average of prior mean and 

## Example calculations from posterior distribution of m

## Bayesian probability of frequentist confidence interval

*Probability of 95% confidence interval (0 to 3.92) is same as for m > 0:*
*P(0 < m < 3.92 *|*   ) = 94.5%*
*Posterior probability of CI can be close to 100% or close to 0.**(Always 95% for flat prior.)*

## INFERENCES FOR POISSON RATES

*** **is an unknown Poisson rate **(Radiation Protection  literature generally uses ****  rather than **** to represent an unknown Poisson rate)*
*Observe X ~ Poisson(****):*
*P(X=k) = ****k**e**–****/** **k!*
*	**[It will be clear in the following that extension to any number of observations is easy.]*
*Make inferences about ****.*

## From prior to posterior

*Suppose **** has a Gamma(a,b) prior distribution:*
***a–1**e**–b ****b**a**/ ****(a), **** > 0*
*	**[mean is a/b, SD is ****a/b]*
*Posterior is proportional to:*
***a–1**e**–b ********k**e**–****= ******a+k**e**–(b+1) **** **	**which is Gamma(a+k,b+1).*
*[Another example of conjugate prior.]*

## Assessing prior distribution for 

*b is the “effective number” of previous observations of ****’s—smaller b is more conservative; say b **** 5.*
*a/b is a typical historical ****; **say a/b **** 2 and therefore a **** 10.*
*Then prior distribution of **** is Gamma(10,5).*
*If observe Poisson(****) of 10, posterior distribution of **** is Gamma(20,6).*

## If (a,b)=(10,5) and k=10 then updated (a,b) is (20,6)

*Prior, Gamma(10,5)*

*Posterior,*
*  **Gamma(20,6)*

## If (a,b)=(4,2) and k=1 then updated (a,b) is (5,3)

*Posterior, Gamma(5,3)*

*Prior, Gamma(4,2)*

## Consider 1/2 where priors are assessed to be:

*Prior for ****1**,*
*  **Gamma(10,5)*

*Prior for ****2**,*
*  **Gamma(4,2)*

## Observe 10 events on first and 1 event on second:

*Posterior for ****1**,*
* **Gamma(20,6)*

*Posterior for ****2**, Gamma(5,3)*

* **Mean of *
***1** is 3.33*

* **Mean of *
***2** is 1.67*

## Finding distribution of ratio, r = 1/2, by simple simulation

***1** is Gamma(20,6)*
*	**= sum of 20 independent exp(6) variables*
***2** is Gamma(5,3)*
*	**= sum of 5 independent exp(3) variables*
*Generate ****1** and ****2** and divide.*
*Repeat as necessary.*

**Notes:**
X ~ Exp(6)
U = P(X>x) = exp(-6x)
x = (–log U)/6

To generate Gamma(20,6):
   Generate uniform on (0,1)
   Take log
   Divide by –6, giving x
   Do 20 times and add.

## Histogram of posterior of r = 1/2; 10,000 simulations

*1.5% for r > 30*

*ratio r*

*0.6% for r < 1*

*Mean of r is 6.8*
*  **SD of r is 6.9*

## r < 1 means 1 < 2;posterior probability is 0.6%

*Posterior for ****1**,*
* **Gamma(20,6)*

*Posterior for ****2**, Gamma(5,3)*

*Recall:*

## HIERARCHICAL MODELING

*Population:*

*Sample:*

*Sample from sample:*

*Inferential*
* **problems*

## Analogy to selecting coins

*Population of coins—population of p’s:*

*Select two coins and toss each coin **10 times: one 9 heads, other 4 heads.*
*Estimate p**1**, p**2**.*
*Estimate distribution of p’s in population.*

## Generic example: Unit is person or subgroup or treatment or study

*Unit i       x**i**        n**i**        x**i** /n**i*
*	**1**	**   20**	**   20**	**  1.00*
*	**2**	**     4**	**   10**	**  0.40*
*	**3**	**   11**	**   16**	**  0.69*
*	**4**	**   10**	**   19**	**  0.53*
*	**5**	**     5**	**   14**	**  0.36*
*	**6**	**   36**	**   46**	**  0.78*
*	**7**	**     9**	**   10**	**  0.90*
*	**8**	**     7**	**     9**	**  0.78*
*    **9**	**     4**	**     6**	**  0.67*
*Total**	** 106**	** 150**	**  0.71*

*n**i** = #observations*
*       **in unit i*
*x**i** = #successes*
*       **in unit i*
*x**i**/n**i** = success*
*          **proportion*

## If p1 = p2 =  .  .  .  = p9 = p(all 150 units exchangeable)

## Assuming equal p’s,95% CI for p: (0.63, 0.77)

*95% CI for p: (0.63, 0.77).*
*But 7 of 9 estimates lie outside this interval.*
*Combined analysis unsatisfactory.*
*Nine different analyses even worse: nine individual CIs?*

## Suppose ni independent observations on unit i

*Suppose each unit has its **own p, with p**1**,  .  .  . , p**9** **having distribution G.*
*Observe x's, not p's.*
*X**i** ~ binomial(n**i**, p**i**). *
*Likelihood:*

## Bayesian view: G unknown means it has probability distribution

*Prior distribution reflects heterogeneity vs homogeneity.*
*Assume G is Beta(a,b),**a > 0, b > 0 with a and b unknown.*
*Density of observation p from G:*
*	**where*

## Beta(a,b) for a, b = 1, 2, 3, 4:

## When G is Beta(a,b)

*Study heterogeneity:*
*little if a+b large*
*lots if a+b small*

## Bayesian questions:

*P(p > 1/2) = ?**	**(= mean of P(p > 1/2 | G) **	**by law of total probability, again!)*
*P(next unit in study i is success) = ?*
*How to weigh results in unit i?*
*How to weigh results in unit j?*
*P(next unit in 10th study is success) = ?*
*How to weigh results in study i?*

## Suppose uniform prior for a & b on integers 1, . . ., 10

## Posterior probabilities for a & b

## Calculating posterior distribution of G

*Direct in this example*
*Can be more complicated, and**require:*
*Gibbs sampling (BUGS)*
*Other Markov chain Monte Carlo*

## Posterior mean of G(also predictive density for p)

## Contrast with likelihood assuming all p’s equal

## Bayes estimates

*Unit i       x**i**        n**i**        x**i** /n**i**  Bayes*
*	**1**	**   20**	**   20**	**  1.00**	**  0.90*
*	**2**	**     4**	**   10**	**  0.40**	**  0.53*
*	**3**	**   11**	**   16**	**  0.69**	**  0.69*
*	**4**	**   10**	**   19**	**  0.53**	**  0.57*
*	**5**	**     5**	**   14**	**  0.36**	**  0.48*
*	**6**	**   36**	**   46**	**  0.78**	**  0.77*
*	**7**	**     9**	**   10**	**  0.90**	**  0.80*
*	**8**	**     7**	**     9**	**  0.78**	**  0.73*
*    **9**	**     4**	**     6**	**  0.67**	**  0.68*
*Total**	** 106**	** 150**	**  0.71**	**  0.68*

## Bayes estimates are regressed or shrunk toward overall mean

*Bayes estimates*

*Unadjusted estimates*

## Screening mammography for women in their 40s—Poisson example

*NIH Consensus Development Conference Panel (January 1997): No universal recommendation for screening women in their 40s; they should be informed of benefits and risks.*
*NCAB presentation (February 1997): Subcommittee to devise information **to convey to women.*
*Then, politics.*

## U.S. Senate: Mammography WILL be effective!

*February 1997: “Sense of the Senate” resolution to recommend mammography passes 98-0.*
*Rueters, March 1997: One of [NCI Director Klausner’s] harshest critics, Sen. Arlen Specter, a Pennsylvania Republican, said Thursday in a statement his Appropriations subcommittee, **which controls the institute's budget**, would hold more hearings into the mammogram issue.*

## Science by politics

*March 1997: NCI was offered a deal it couldn’t refuse.*
*March 1997: NCAB meets again; recommends mammography for women in their 40s.*
*Klausner: "We got a tremendous amount of pressure from all sides.”*

## Part of my presentation to NCAB

*Characteristics and BC mortality results from 8 randomized trials.*
*Frequentist analysis combining trial results; assumes homogeneity.*
*Bayesian hierarchical analysis; allows for trial heterogeneity.*
*Quantifying benefit.*
*Risks.*

## Characteristics of randomized trials

**             ****Entry  F/U   Type    #  Int    #   Analy.**_**Trial         age   (yr) random  mam (mo) view   type **_
**HIP          40-49  18.0  Indiv   4   12    2    F/U****Kopparberg   40-49  15.2  Clust   4   24    1    ****Eval****Östergötland 40-49  14.2  Clust   4   24    1    ****Eval****Malmö        ****45-49  ****12.7  Indiv   8   21   2******** ****  F/U****Edinburgh    ****45-49  ****12.6  Clust   4   24   2******** ****  F/U****Gothenburg   40-49  12.0  Clust   5   18   2******** ****  ****Eval****Stockholm    40-49  11.4  Clust   2   26    1    ****Eval****Canada NBSSI 40-49  10.5  Indiv   5   12    2    F/U**

*Average age of protocol mammograms about 48;*
*	**> 50 in Malm**ö** and Edinburgh*

*Evaluation analysis:  . . .*

## Breast cancer mortality reduction, by trial

***        ***_***Screening group ***_***    ***_*** Control group  ***_*** ****** ******Mort.***
***        ******BC   Life   Mort.   BC   Life   Mort. ******Red.***_***Trial deaths Years  rate  deaths Years  rate   ***__***(%)***_
***HIP     49  248000  19.8    65  253000  25.7    ******23******Koppar  23  144000  16.0    18   75000  24.0    ******33****** ******Öster   27  143000  18.9    27  147000  18.4    ******-3******Malmö   57  166000  34.3    78  144000  54.2    ******38****** ******Edin    46  146000  31.5    52  135000  38.5    ******18******Gothen  18  138000  13.0    39  168000  23.2    ******44******Stock   24  174000  13.8    12   88000  13.6    ******-1***_***Canada  82  283000  29.0    72  283000  25.4 ***__***  ***__***-14***_
***Total  326 1442000  22.6   363 1293000  28.1    ******18***

## Mortality per 100,000 life years

## BC deaths, per 1000 women (Sweden only)

* **Impact of *
*evaluation*
*    **bias?*

- )

*27%*

## Mantel-Haenszel 95% confidence interval: 3% to 29% reduction

*Assumes BC mortality reduction same in all 8 trials.*
*Only 2 of 8 observed reductions are in 95% confidence interval.*
*Underestimates effect of trial differences.*

## Bayesian hierarchical model allows for different trial effects

*	**Allowing trials to have different mortality reductions:*
*Gives better fit to trial results.*
*Shows greater uncertainty.*

## “The Canadian trial is a major outlier.”

*An exaggeration.*
*An advantage of hierarchical Bayesian analysis is that it pulls it in, along with trials in the other extreme:*

## Allowing for trial heterogeneity

*Same estimated reduction: 18%.*
*Greater variability.*
*80% probability that next trial **(or A PARTICULAR WOMAN)** will show of some benefit.*

## Quantifying benefit—Assume 18% reduction in BC mortality

*About 4 women per 10,000 screened have lives extended*
*"Lives saved"?*
*"Deaths prevented"?*
*"Cancers cured"?*
*Amount of extension unknown.*

*Added life expectancy per woman screened over the decade: 3 days.*

## How to calculate? Recall BC deaths per 1000 women in Swedish trials.

## Assuming 18% reduction—Hours of life expectancy gained per mammogram

_*Age     Biannual  Annual*_****
* **40**    **       10***** **           5****
* **41           —             5*
* **42**  **         12             6*
* **43           —             6*
* **44**  **         14             7*
* **45           —             7*
* **46**  **         17             8*
* **47           —             9*
* **48**  **         19             9*
_* *__*49           —           10*_
*Sum        72           72*

** Greater gain if first**  screen—and equal.*
***If 18% reduction **   applies for biannual **   then reduction for**   annual is probably **   somewhat greater.*

## Marcia Angell in NYTimes

*“**In short, so small would be the payoff of regular mammograms at this age that the risks of driving the car **[bicycle? motorcycle? walk?] **to get them might well outweigh the benefits of the test.”*
*“**with few exceptions like giving up smoking . . . changes [in lifestyle] will produce only small effects (and large profits for the burgeoning industries that thrive on health promotion).”*

## The down side—Still assuming 18% reduction in BC mortality

*	**About 600 mammograms save **ONE YEAR OF LIFE**. The trade-offs:*
*Women’s time (600+ hours?).*
*Some pain, some anxiety.*
*About 20 false positives (added anxiety).*
*About 10 biopsies.*
*20% more cancers; some indolent, many in situ. **Count as negative!**Positive already counted in 18%.*

## Non-issues assuming 18% BC mortality reduction

*Radiation induced breast cancer mortality.*
*False negatives (estimated 25% in this age group).*
*False reassurance from false negatives.*
*Overly conservative therapy.*

## Conclusions

*There may be a substantial “evaluation analysis” bias in the Swedish trials. The investigators should publish “follow-up analyses” **(or share their data!)**.*
*A central repository for randomized trial data should be established (in a neutral country?).*

## Conclusions

*While uncertain, there is a probable screening benefit for women in their 40s.*
*Any benefit is small.*
*Screening may be a prudent choice for some women in their 40s but it is not an imperative health measure.*
*Women should be informed of the benefits and risks of screening.*
*When told they “must get mammograms” women should **just ask “Why?”*

## DECISION ANALYSIS

*Made an observation*
*What to do now? (Plan ahead!)*
*Options (for example):*
*Nothing*
*Intervene*
*More observation*
*Consequences depend on **true state of nature*

## Components of typicala decision problem

*Observation X, level in urine, say.*
*Actions:*
*a**1** = do nothing*
*a**2** = intervention*
*a**3** = more tests*
*State of nature ****, internal dose level.*
*Loss function: L(a,****)**(Loss = –Utility)*

## Example loss table, L(a,), discrete case

*Think of ****1** as background level of **    uranium, ****2** as level from exposure.*

*How to decide between a**1** and a**2**?*

*L(a,****):*

*Bayesian view: **** is random,*
*         **P**1** = P(****=****1**)  [= 1–P**2**]*

*           **a**1**       **a**2*
***1**         **0**        **5*
***2**     **100**      **10*

## Bayes’ risk

*Bayes’ risks:*
*	**B(a**1**) = EL(a**1**,****) = 0*x*P**1** + 100(1–P**1**)**         = 100(1–P**1**)*
*	**B(a**2**) = EL(a**2**,****) = 5*x*P**1** + 10(1–P**1**)**         = 10 – 5P**1*

*           **a**1**       **a**2*
***1**         **0**        **5*
***2**     **100**      **10*

## Graphs of Bayes risks

- 100

- 0

## What about a3? Suppose perfect test, at cost 2

*B(a**3**) + cost of info**         = **0*x*P**1** + **10**(1–P**1**) + 2**         = 12 – 10P**1*

*           **a**1**       a**2*
***1**         **0**        5*
***2**     100      **10*

## Including a3

- 100

- 0

## Continuous case,Loss function: L(a,)

*L(a**2**,****)*

*L(a**1**,****)*

*Think of **** as true *
*(internal) dose of *
*uranium about*
*which there is*
*uncertainty.*

## Posterior (or current) distribution of given X

*Current distribution of ***

*L(a**2**,****)*

*L(a**1**,****)*

## Not: P( > *)

*L(a**2**,****)*

*L(a**1**,****)*

*P(**** > **** *)*

## Rather: Compare actions on basis of Bayes risk

*Product of density *
* **of **** and L(a**2**,****)*

*Area under*
* **  **curve is*
* **Bayes risk*
*    **for a**2*

## Bayes risks of a1 and a2

*B(a**1**) = EL(a**1**,****) = 379*
*B(a**2**) = EL(a**2**,****) = 431*
*Action “**do nothing**” is better*

## Order of preference switches (to a2 over a1 ) if shift in mean or SD:

*Larger mean,*
*   **same SD:*

*  **Larger SD*
*same mean:*

## What about a3?

*Green curve is for perfect information.*
*Its mean is expected loss under perfect **   information, **B(a**3**) = 370*

*If **** were known*

## Expected value ofperfect information (EVPI)

*Summarizing:*
*B(a**1**) = 379*
*B(a**2**) = 431*
*B(a**3**) = 370*
*EVPI = **B(a**1**) **– **B(a**3**)** **         = 379 – 370 = 9*

## Expected value of sample information (EVSI)

*Suppose X has a distribution with parameter ****.*
*X has a predictive distribution.*
*Each X gives a posterior distribution for ****.*
*Calculate expected loss for each X.*
*Average expected loss with respect to predictive distribution of X.*
*Subtract from minimum Bayes risk to **give EVSI.*

## Bayesian sample size and sampling strategy

*Choosing sample size is a decision problem.*
*Unless there are long observation delays, use sequential sampling:*
*No fixed sample size.*
*Dynamic programming/predictive distribution.*
*One-step look-ahead procedures.*
*(Very different from frequentist perspective.)*

## COURSE OUTLINE

*Ch.5: Conditional probability; Bayes’ rule.*
*Chs. 6-9: Inferences for proportions.*
*Chs. 10-12: Inferences for means.*
*Inferences for Poisson rates.*
*Bayesian hierarchical analysis.*
*Decision analysis.*
*Interspersed: Advantages &disadvantages of Bayesian approach.*

## Addendum 

- The following three slides were presented at Panel Discussion following the course.
- Reference: Little, R.J.A., 1982, “The statistical analysis of low-level radioactivity in the presence of background counts,”* Health Physics, ****43, ***693-703.

## Extensions of Little’s Model

- 1, 2 , ... , 1000
- ’s are correlated.
- Extending Little to the hierarchical setting makes prior assessing almost automatic**.**
- Suppose *i* ~ G
- G has possibility of point mass at 0
- If all ’s are 0 then will conclude with probability essentially 1 that ’s live at 0

## ROC (Receiver Operating Characteristics)

***ROC *****(Receiver Operating Characteristics)**

- Bayesian contribution: explicit consideration of loss.

*Abbreviations: FPR = False Positive Rate, FNR = False Negative Rate, sens = sensitivity,  spec = specificity**.*

## Retesting Lowers 

**Retesting Lowers ******

- Specificity = 1– False Positive Rate

- 1– Sensitivity = False Negative Rate