Bayesian

Jun Kang
September 4, 2019

Coin toss

  • Observed data (H, H, H, H, H, H, H, H, H, H)
  • Guess the probability of coming head: 0.5? or 1.0?

Frequentist approch (What usually has been done)

  • Null hypothesis: probability of coming head is 0.5
  • Hypothesis testing: Probability of observed data under null hypothesis a.k.a. p-value = (\( \frac{1}{2}^{10} \))
  • Hypothesis rejection: probability of coming head is not 0.5

Coin toss prior probability

  • The gambling dealer!!
  • Guess the probability of coming head after seeing 10 continuous head: 0.5? or 1.0?

Posterior of tumor purity

post <- extract(fit)

hist(post$P,
     main = paste("Tumor purity"),
     ylab = '')

plot of chunk unnamed-chunk-16

Trace Plot

traceplot(fit, pars = 'cn')

plot of chunk unnamed-chunk-17

Diagnostic Plot

stan_diag(fit)

plot of chunk unnamed-chunk-18