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