Chapter 2 Bayesian Inference Flashcards
What are the qualities/assumptions of a binomial experiment
- One repeats binomial experiment n times
- Each trial outcome is success or failure - binary
- Probability of success p and is the same for each trial
- Each trial results are independent
What is the likelihood
The data - probability of an observed value
how do we denote prior of theta
p(theta)
how do we denote likelihood function for data as a function of theta
p(y|theta)
how do we denote posterior of theta
p(theta|y)
What si the relationship between beta distribution and uniform distribution
Beta(1,1) is a special case of the uniform distribution on (0,1)
How to find the pdf of beta(a,b) in R
dbeta(theta,a,b)
How to find the cdf of beta(a.b) in R that is (P(thetaX<=thetax)
pbeta(theta,a,b)
How to generate a ransom sample of size 5 from the beta(a,b) distribution
rbeta(5,a,b)
How find quantiles of beta function giving the cdf at a certain point in R
qbeta(q,a,b)
What does beta.select() do and how to use it
Gets us to specify two quantiles and find the beta curve that matches these quantiles
Ex: beta.select(list(x=0.55,p=0.5),list(x=0.8, p=0.9)) = 3.06 , 2.56 so we choose a = 3.06 and b= 2.56
What does beta_interval (x, shape_par=c(a,b)) do
beta_interval(0.5, shape_par=c(a,b)) plots the middle 50% area of the prior distribution quantile function can calculate the 25th/75th percentile
What prior and sampling distribution give rise to a beta posterior
A beta prior and a binomial sampling distribution
Define conjugate prior
A class of priors is conjugate for a sampling model p(y|theta) is the prior and the posterior are from the same class of distribution
When plotted what will be the difference between the prior and the posterior
The posterior will have variance smaller as we have more information forming the distribution. The prior mean and posterior mean can be pretty similar if the prior assumptions were accurate
how can we estimate the posterior mean from sample proportion and the prior mean
Posterior mean will lie somewhere in between
Answering a hypothesis - is this a reasonable assumption
Find the probability using pbeta function - gives P(theta<=X)
Define bayesian coverage of 95% of theta
This coverage is achieved in interval [L(y),U(y)] based on observed data Y=y if P(L(y)
Define frequent coverage
This coverage is achieved in interval [L(y),U(y)] if before the data is observed if P(L(y)
What is the probability of a 100x(1-alpha)% credible interval
P(theta is in interval [theta_(quantile alpha/2), theta _(1-quantile alpha/2) | Y=y) = 1- alpha
What is the difference between HPD region and a credible interval
All points in HPD region have higher posterior density than points outside the region. This is not the case for a credible interval. Also HPD can have more than one interval region if posterior is multimodal
What does HPD stand for
Highest posterior density
Explain what the predictive distribution is
The conditional distribution of Y tilde (which si a future unobserved value) given the data y1……yn. It is written p(Y_tilde | y1……yn)
What is significant about independence when considering Y_tilde
Y_ tilde is not independent from the data. Once we have the data we learn more about theta which in turn tells us more about Y_tilde