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.

1
vote
0answers
20 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
57 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
0answers
21 views

Question regarding joint posterior distribution [closed]

I also have the mean and standard deviation, not sure if they are needed for this question. I am totally lost, please help. Thanks! This is the rest part of the question, sorry i didnt post it at ...
0
votes
1answer
24 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
25 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
21 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
11 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
34 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
37 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
31 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
17 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
45 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
50 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
28 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
25 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
46 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
330 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
26 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
92 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
41 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
29 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
39 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
29 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
62 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 ...
2
votes
1answer
170 views

Posterior distribution of mixture models

In the context of mixture models in Bayesian inference, one can assume that the general form of the joint posterior for a mixture model of $k$ components is $$ \begin{equation} p( \boldsymbol{\...
2
votes
1answer
479 views

Joint posterior distribution of $(\mu,\sigma^2)$ in the Normal model

Find the joint posterior of $(\mu, \sigma^2)$ given Normal data. I've found the joint prior of $\mu$ and $\sigma^2$ (where $\displaystyle\sigma^2\sim\chi^{-2}(v_o,v_os_o^2)$ and $\mu\mid\sigma^2\sim ...
2
votes
1answer
43 views

The distribution of a posterior predictive p-value under certain assumptions

I am wondering if anyone can check my understanding of the following passage concerning posterior predictive p-values in the textbook "Bayesian Data Analysis 3rd Edition" on page 151: In the ...
4
votes
1answer
78 views

Likelihood raised to a power; how to set the power?

Suppose ${\bf{\theta}} = (\theta_1 , \ldots, \theta_d)$ and you have a posterior as below: $$\pi(\theta | D ) \propto L(\theta |D ) \pi(\theta)$$ Suppose we are in active learning setting and need ...
0
votes
0answers
31 views

Viterbi Algorithm vs Maximum of Variational Posterior for HMM

I have a HMM with observed values $x$ and latent values $z$, upon which I've performed variation inference to get an approximate posterior distribution $q(z|x)$. If I want to calculate a "most likely ...
0
votes
0answers
18 views

Setting Average posterior probability value in Stata traj plugin

In complement to Aikake Information Criterion, I want to use posterior probability to select the best model for group-based trajectory modeling. In this paper: https://drc.bmj.com/content/bmjdrc/4/1/...
3
votes
2answers
114 views

Simulating the Posterior Density of a Transformed Parameters

I am reviewing an example (p. 180-181, Example 11.3 and 11.4) from All of Statistics by Larry Wasserman. The example intends to illustrate that the posterior can be found analytically and can be ...
2
votes
0answers
64 views

Posterior sampling without using pm.Potential in pyMC3

I'm going through the Price Is Right example in chapter 5 of Probabilistic Programming & Bayesian Methods for Hackers and I have problems understanding the solution. I have tried to change the ...
1
vote
1answer
50 views

Bayesian consistency in compact uncountable parameter space

Let $p(y_i \mid \theta)$ be the likelihood we are using of a single data point, $p(\theta)$ be the prior, and $f(y_i)$ the true distribution of the data. Also, let $\theta_0$ be the parameter that ...
0
votes
1answer
30 views

Posterior of random variable with normal prior and normally-distributed observation

Suppose $X$ is normally distributed with mean $10$ and standard deviation $1$. I take a normally-distributed noisy measurement of $X$ with standard deviation $0.1$, and the measurement is $5$. I am ...
0
votes
0answers
35 views

Estimating posterior probability from a random grid

I am simulating the evolution of galaxies, and want to find the distributions of input parameters that best reproduce an observation of a particular galaxy. I have a measurement $y \pm \sigma$ of a ...
1
vote
1answer
89 views

Failing to implement Bayesian Chi2 goodness of fit test

I am trying to implement one of the methods described in Valen Johnson's A Bayesian Chi-Squared Test for Goodness of Fit. It presents a couple of variants depending on whether the random variable of ...
1
vote
1answer
28 views

Basic question on proportionality in Bayesian Inference for Normal distribution

I have a nagging question regarding the Normal distribution and maintaining proportionality in Bayesian Inference. Say for example that: $\pi(\theta|Y) \propto L(Y|\theta)\pi(\theta)$ $Y | \theta \...
3
votes
0answers
75 views

What is the posterior kernel lengthscale of a Gaussian process?

If I have access to multiple samples from a Gaussian process with known covariance kernel but unknown parameters (i.e. unknown lengthscale), it is straightforward to estimate the lengthscale using ...
0
votes
1answer
65 views

Bayesian Linear Regression - Creating a distribution for a new prediction

I'm using MCMC to fit a linear regression model with the end goal of making predictions for new observations. See reproducible example below: ...
1
vote
0answers
20 views

How does one compute the posterior odds ratio between two models

Apologies if this question has been asked before but I couldn't find anything that matched my problem. I have some astronomy based data sets and wish to find which of three models fits the data the ...
1
vote
0answers
79 views

Confusion about the use of the MLE & the posterior in parameter estimation for logistic regression

In classification one usually computes $$ C = \operatorname*{argmax}_k p(C=k\mid X) $$ where $p(C=k\mid X)$ is the posterior distribution. In a simple logistic regression setting with $C \in \{0, 1\}...
0
votes
1answer
46 views

what do you mean by writing out the posterior distribution of µ up to a normalizing constant? [duplicate]

I think i am stuck at the basic what do you mean by writing out the posterior distribution of µ up to a normalizing constant ? How to compute the value of C here?
0
votes
0answers
46 views

Likelihood of one datapoint given $k$ models

Introduction I'm currently facing a problem where I'm constraining a set of (physical) parameters $\theta_k$ with $k\in [1,2,...,K]$ via several independent datasets. One of those datasets, however, ...
2
votes
1answer
79 views

How to get posterior probability from Bayes factor

I ran into this question in my class and am not sure how to solve it: A positive test result gives you a Bayes factor of 71 in favor of being sick. If your prior probability of Being sick was 0.05, ...
1
vote
1answer
335 views

Show posterior mean can be written as a weighted average of the prior mean and MLE

Suppose $Y_1, \dots Y_n$ are exponentially distributed: $Y_i | \lambda \sim Exp(\lambda)$. Find the conjugate prior for $\lambda$, and the corresponding posterior distribution. Show that the posterior ...
1
vote
1answer
44 views

Posterior and Predictive Density [closed]

Let X1 be a claim from an auto insurance policy. Suppose X follows an exponential distribution with rate lambda, where lambda follows a gamma distribution with mean 2 and variance 2. What is the ...
0
votes
1answer
39 views

What Is Meant by “Maximising” Posterior Probability?

My textbook says the following: The optimal coding decision (optimal in the sense of having the smallest probability of being wrong) is to find which value of $\mathbf{s}$ is most probable, ...
3
votes
2answers
267 views

Gaussian mixture model - does an improper uniform prior give a proper posterior?

We draw $n$ i.i.d. points $x_1 , x_2 , ..., x_n$ from the following Gaussian mixture: $$p(x|\mu_1,\mu_2) = \frac{1}{2} \text{N} (x|\mu_1,1) + \frac{1}{2} \text{N} (x|\mu_2,1).$$ The prior is the ...