Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [posterior]

Refers to the probability distribution of parameters conditioned on data in Bayesian statistics.

0
votes
0answers
12 views

Calculating the posterior distribution of linear predictor

I am currently fitting a linear regression model in a bayesian framework in R with the package ngspatial. To investigate the quality of fit, I would like to calculate the bayes R2, as suggested here ...
0
votes
0answers
20 views

Posterior convergence in expectation vs probability

Let's assume that we are doing approximate Bayesian inference and compute the convergence of our posterior estimate to the true value of the parameter using Wasserstein distance. Why posterior ...
2
votes
0answers
23 views

Finding the mode of the posterior distribution

I have the following hierachical bayesian model - $\mathbf{x}|\mathbf{c},\sigma^2 \sim \mathcal{N}(\mathbf{x}|\mathbf{c},\sigma^2)$ $\mathbf{c}|\mathbf{c}_1,\sigma^2_2 \sim \mathcal{N}(\mathbf{c}|\...
1
vote
1answer
14 views

Marginalising over Dependent Random Variables

Suppose I have two RVs, $A$, and $B$. Every place I have looked thus far suggests the following for marginalisation, which for me is fine: $f_A(a) = \int_{-\infty}^{\infty} f_{A,B}(a,b)db $. ...
0
votes
1answer
34 views

Generating data from the posterior distribution

Let $$p(D \mid \mu,\sigma^2) \sim \mathcal{N}(\mu,\sigma^2)$$ where $D=(x_1\ldots x_n)$ is my data. I imposed a normal prior on the mean as $$\pi(\mu) \sim \mathcal{N}(\mu_0,\sigma_0^2)$$ Using Bayes, ...
0
votes
0answers
10 views

dirichlet distribution and excessively large numerator

what I am trying to do is calculating posterior probability using dirichlet distribution as my prior. the situation is like this. a web log have three variables A, B, C, and each variable's value is ...
0
votes
0answers
14 views

Posterior using Numerical integration - why divided by (sum of posterior / number of samples)

Background Reading Markov Chain Monte Carlo (MCMC) and the numerical integration method to get the posterior. Question The implementation code divides the posterior with (post.sum() / len(thetas)). ...
0
votes
2answers
42 views

Finding the posterior distribution of a Bayesian analysis prior

I have a prior distribution $f(x)=\pi cos(\pi x) $ where $x$ is the probability of getting tails in a coin toss. Should a coin toss result in tails, how would this be reflected in the posterior ...
0
votes
0answers
9 views

Finding the posterior distribution for Beta likelihood with unknown alpha [duplicate]

If $(y_i|\theta)$ is distributed as $Beta(y_i,\theta,\beta)$ then what prior distribution do I use? My initial thought was to use a Beta prior. Is this right? I found the likelihood but I'm not sure ...
0
votes
1answer
64 views

What mathematically enables one to Bayesian update multiple times?

I'm going through the MIT OCW notes on probability and statistics and came across an example in some class notes where the posterior is updated after two events: $x_1 = 1$ and $x_2=1$, which ...
1
vote
2answers
53 views

How do we reuse and store the output of an MCMC?

For many Bayesian models, the posterior distribution is intractable... a solution is then to sample points from this unknow distribution with a Markov Chain Monte Carlo (MCMC). But at the end, how do ...
0
votes
1answer
18 views

Explanation of the Posterior Derivation of the Gaussian Distribution

I'm reading through my notes and I don't quite understand this bit: I understand how the likelihood was calculated but no more than that.Can anyone explain the steps and exactly how they go from one ...
0
votes
0answers
21 views

Bayesian Inference, Posteriors Priors and Likelihoods [duplicate]

So at the moment I'm reading through my notes on Bayesian Inference and I'm really just not understanding anything. If anyone has any good websites that explain this topic well then I'd be really ...
0
votes
1answer
28 views

Constraints on choice of marginal distribution and likelihood

For some time I have been reading into Bishop's Pattern Recognition and Machine Learning. Coming back to some earlier chapters the following got me confused and I am interested where, formally I go ...
0
votes
0answers
24 views

1D Bayesian Inference clarification

I'd like some help making sure I understand a 1D Bayesian inference problem. Say I have a data vector which is an array of the number of flu cases reported weekly in California for the past 10 years. ...
0
votes
0answers
12 views

Closed form posterior for product of inverse Gamma and Normal distribution

I am currently reading a book about mixture analysis, and in the textbook a posterior for the parameters $\mu1,\mu2,\sigma_1^2,\sigma_2^2$ of a two-component gaussian mixture is derived as follows (S ...
0
votes
2answers
37 views

Posterior probability with Bins

For the following question I wanted to know how to estimate the probability that I have selected from bin A. There are 10 bins, 4 are labelled A, 6 labelled B. Each bin has balls with two colors (Red/ ...
0
votes
1answer
20 views

Setting an upper limit on an estimate

I have used MCMC to estimate the value of a parameter $\theta$ from some data. I have thousands of samples from the (marginal) posterior distribution. The distribution of $\theta$ is roughly Normally ...
1
vote
1answer
22 views

Finding a posterior distribution from a Poisson likelihood function and a uniform prior distribution

If a counting experiment gives one observation $x=5$, and if the prior distribution is given as a uniform function, then is the following a correct way of calculating the posterior function? First, ...
1
vote
0answers
22 views

Monte Carlo integration for Bayesian parameter estimation

I want to determine the credible interval of a quantity $\theta_1$. I want to make this estimate using observed data by assuming a certain model which depends on $\theta_1$ as well as about n=15 ...
0
votes
0answers
22 views

What is the posterior distribution of a Bernoulli prior that gets updated with a continuous uniform signal?

I'm trying to figure out what the distribution of the posterior is after I update a Bernoulli prior with a continuous uniform signal, say: P(D=G|u)=x where D{G,I} and u is uniformly distributed on ...
11
votes
2answers
1k views

In Bayesian inference, why are some terms dropped from the posterior predictive?

In Kevin Murphy's Conjugate Bayesian analysis of the Gaussian distribution, he writes that the posterior predictive distribution is $$ p(x \mid D) = \int p(x \mid \theta) p(\theta \mid D) d \theta $$ ...
2
votes
0answers
26 views

Model selection for this model with one observation

I would like to perform model selection given a range of $k$ models $\mathcal{M}_1, \mathcal{M}_2, ..., \mathcal{M}_k$, each with some prior probability $f(\mathcal{M}_1), \dots, f(\mathcal{M}_k).$ ...
1
vote
1answer
68 views

computing the distribution over the latent function values with the form of a GP predictive

If we have a latent state space $\mathbf{X}$ and the observations $\mathbf{Y}$ and the transition function between two states $\mathbf{x}_{t-1}$ and $\mathbf{x}_{t}$ is given by $\mathbf{f}$ which is ...
0
votes
0answers
204 views

Joint posterior for finite mixture with normal components

I currently read the book Finite Mixture and Markov Switching Models by Sylvia Frühwirth-Schnatter and I have a question regarding Section 6.2.1 regarding finite mixtures with normal components. Maybe ...
1
vote
0answers
35 views

Full (approximated) posterior covariance matrix - GPML toolbox

I am trying to implement the paper "Streaming Sparse Gaussian Process Approximations" by - Thang D. Bui, Cuong V. Nguyen, Richard E. Turner in matlab. As a start, I create a sparse GP using the GPML ...
1
vote
2answers
324 views

importance sampling from posterior distribution in R

Today I read that Importance Sampling can be used to draw posterior distribution samples just like Rejection Sampling. However, my understanding of Importance Sampling is that its main purpose is to ...
0
votes
1answer
33 views

Conditional Posterior Distributions

So I'm trying to find the conditional posterior distributions of n given $\theta$ and x as well as $\theta$ given n and x. These are my priors (poisson and beta) \begin{equation*} \begin{aligned} &...
0
votes
1answer
28 views

Finding MAP estimate

I think after all the reading I've done I still don't fully understand MAP estimation. I came across a problem that's leaving me dumbfounded. Suppose $A$ ~ $N(0,\sigma^2_1) $ and $\epsilon$ ~ $N(0,\...
1
vote
0answers
25 views

Finding mode of posterior using Newton method in R

I am attempting to approximate the posterior $\tilde{\pi_{G}}(z|\theta,Y)$ which is the Gaussian approximation to the full conditional of $z$, and in order to do this I need to find the mode $z^{*} \...
0
votes
0answers
16 views

Posterior predictive check for capture-recapture data using jagsUI wrapper

The R package jagsUI is a wrapper for JAGS that has some awesome functions, including a posterior predictive check. As discussed here, you simulate the new data for the parameters based on the ...
3
votes
2answers
47 views

Bayesian updating with multiple priors and multiple likelihood functions

$\Omega$ (finite) state space, $S$ (finite) signal space. Suppose we have a closed and convex set of priors $\mathcal{M}\subseteq \Delta(\Omega)$ such that each of them has full support. Let $\...
0
votes
1answer
39 views

Posterior density for a linear regression model

Given a classical linear regression model $$y = X\beta + \varepsilon,$$ $$\varepsilon\sim N(0,\sigma^2I_n),$$ the posterior density is proportional to the product of the likelihood and the selected ...
2
votes
1answer
35 views

Computing posterior density of Normal with unknown $\mu$ and $\sigma^2$

(From Bayesian Essentials with R by Marin & Robert page 31) We are given an iid sample $\mathfrak{D}_n = (x_1, \dots, x_n)$ from the normal distribution $\mathcal{N}(0, \sigma^2)$ and $\theta=(\...
0
votes
0answers
18 views

Bayes: posterior density, mean and mode [duplicate]

The likelihood function is $f(n_1|\alpha,n) = [\frac{n!}{n_1!(n-n_1)!}]\alpha^{n_1}(1-\alpha)^{n-n_1}$ The prior for $\alpha$ $g(\alpha)=(\alpha(1-\alpha))^{-1}$ for $\alpha$ between 0 and 1. ...
3
votes
2answers
47 views

In a Bayesian MCMC model, if we plug the average of posterior draws back into the Likelihood, would it be estimating the Posterior Predictive?

Suppose we have a Bayesian model with data $y$ and a parameter to be estimated, $\theta$. Then the posterior is written as: $$ p(\theta | y) \propto p(y|\theta)p(\theta) $$ Suppose that we used an ...
0
votes
0answers
69 views

How do I calculate a Bayesian Posterior Distribution from an Exponential Prior and Sample Data

I have a dataset where each observation is a length of time (e.g. 50 days, 70 days, 105 days) and I am trying to utilize Bayesian statistics to calculate a posterior distribution in light of new data. ...
1
vote
0answers
56 views

Calculate a Bayesian 'posterior predictive p-value' for a multinomial logistic regression

For assessing the fit of a model in a Bayesian framework, 'posterior predictive p-values' (PPPs) are often used. Here, a value close to 0.5 indicates a good fit; a value close to 0 or 1 indicates a ...
0
votes
0answers
19 views

Redefining latent variables as observed data

This was just a thought that occurred to me, but technically, is it possible to redefine what I treat as latent variables and what I treat as data? For example, lets assume I have a set of latent ...
0
votes
0answers
54 views

How to derive the maximum *a posteriori* estimate when the prior distribution is Normal $N(m,r^2)$?

I am learning probabilities and I need a guru to help with this problem: Assume $p(y | x) = N(ax,\ s^2)$, where all quantities are scalars, $a$ and $s$ are known constants, and the prior ...
1
vote
1answer
51 views

Maximum A Posteriori Estimate

The formula for calculating the MAP estimate of a particular parameter, $p$, is given by the following: $p^{MAP} =$ argmax $P(p)P(p|x)$. Now I am trying to do a question where I am told the prior ...
2
votes
0answers
29 views

does Informativeness of the prior always decreases similarity of the posterior mean to the data mean? [closed]

I am looking for a proof of the statement "If the variance of the prior distribution is greater, the posterior is more affected by the data". More specifically, if X, X' are priors such that E(X)=E(X'...
7
votes
3answers
345 views

verifying a posterior is proper

There's a homework problem in a textbook that asks to verify propriety of a certain posterior distribution, and I'm having a little trouble with it. The setup is you have a logistic regression model ...
2
votes
1answer
27 views

$\pi(\beta,\sigma^2)l(\beta,\sigma^2\vert Y)\iff\pi(\sigma^2\vert Y)\pi(\beta\vert\sigma^2, Y)?$

How do you pass from $$\pi(\beta,\sigma^2\vert Y)\propto\pi(\beta,\sigma^2)l(\beta,\sigma^2\vert Y)$$ to $$\pi(\beta,\sigma^2\vert Y)\propto\pi(\sigma^2\vert Y)\pi(\beta\vert\sigma^2, Y)$$ ? I know ...
2
votes
2answers
123 views

Bayesian Statistics -Prior and Posterior distributions

Please is it ever possible for the prior distribution to contain more information about parameter(s) than the posterior distribution? If yes, when can that occur? Is it the same concept as the ...
0
votes
1answer
98 views

Posterior Predictive Distribution of a Parameter

Suppose I have data, $y_1, \ldots, y_n \sim \mathcal{N}(\mu, \sigma^2)$, where $\mu$ is an unknown parameter and $\sigma^2$ is known. We put a prior on the parameter $\mu \sim \mathcal{N}(\mu_0, \tau^...
0
votes
1answer
31 views

Bayesian Statistics problem- calculating posterior probability [closed]

Given that Hamilton wrote 51 Federalist papers and Madison wrote 14 Federalist papers, there’s a dispute over how to attribute 12 other papers between these two authors. Diving further, in Hamilton’s ...
1
vote
2answers
66 views

marginal distribution of normal $\mu$ with inverse gamma prior on $\sigma^2$

(From Bayesian Essentials with R by Marin & Robert) Given that $$\mu | \sigma^2 \sim N(\epsilon, \sigma^2 / \lambda_\mu)\,,$$ and $$\sigma^2 \sim IG(\lambda_\sigma /2, \alpha /2)\,,$$ we want ...
0
votes
0answers
39 views

bayesian decision making - comparing expected loss

The problem is like this: Suppose that I am considering which country should I invest on, country A and country B, based on their GDP growth rate $\alpha$. There are two possible choices for each ...
0
votes
1answer
83 views

Bayesian posterior pmf for weighted dice with uniform prior

We want to find posterior probability mass function for dice tossing with uniform prior. We are interested in rolling of weighted dice. The outcome is 1,2,...,6. We assume that prior probability ...