New answers tagged

4 votes
Accepted

Finding the optimal stopping time to place a bet in an urn problem

Betting on the last ball is an optimal strategy, regardless of what the prior is. Here's how I know: Imagine that after seeing 8 balls, you decide to bet that the 9th ball is red. This is equivalent ...
Joe Mansley's user avatar
4 votes

Finding the optimal stopping time to place a bet in an urn problem

Below is a recipe to compute the expectation value for winning the prize 1] As a function of the number of drawn red and blue balls (let's call them $x_r$ and $x_b$) we can compute a posterior ...
Sextus Empiricus's user avatar
7 votes
Accepted

How to use Truncated Normal for observation distribution in GLM model?

General remarks The truncated normal model (just like the censored normal model) does not belong to the GLM (generalized linear model) family in the classical sense (a la McCullagh & Nelder, 1989, ...
Achim Zeileis's user avatar
1 vote

Understanding a parameter in a bayesian Poisson model ($\beta$)

This is a hyperparameter arising in a mixture representation of the prior For hierarchical Bayesian models of this kind, the parameter $\beta$ is what we usually call a hyperparameter. A ...
Ben's user avatar
  • 112k
2 votes

Reproducing a didactic example of Lindley (1993)

Yes, and like you, for five right and one wrong, I get (using Lindley's $P$ rather than your $\pi$) $$\mathbb P(P=\tfrac12 \mid RRRRRW) = \frac{ 0.8 P^5(1-P)\Big|_{P=1/2}}{0.8 P^5(1-P)\Big|_{P=1/2} + \...
Henry's user avatar
  • 35.3k
1 vote
Accepted

Distribution of a conditional expectation

I am answering my own question, thanking @gazza89 for putting me on the right track. Given $𝑝(𝑠)=\int𝑝(𝑠|𝑥)𝑝(𝑥)𝑑𝑥 $, and $E(x|s)$ defined by Bayes' rule, the distribution of the conditional ...
andrea m.'s user avatar
  • 265
5 votes

Distribution of a conditional expectation

Possibly this question may help: Bayes' Theorem Intuition In my answer there I used the following figure: Bayes rule can be viewed as taking a slice out of the joint distribution and regarding ...
Sextus Empiricus's user avatar
4 votes

Distribution of a conditional expectation

I would work through this problem as follows: $$\langle x| s \rangle = \int x \cdot p(x|s) dx$$ I think this is different to what you've done, you seem to be integrating against s but any expression ...
gazza89's user avatar
  • 2,269
0 votes

In Bayesian linear regression Advantages of predictive posterior compared to posterior of model coefficients

Your question is more involved than it seems. Let me explain. First, you have to decide on a tentative model for regression. Well, every Bayesian model involves a likelihood function and a prior ...
Romke Bontekoe's user avatar
0 votes

In Bayesian linear regression Advantages of predictive posterior compared to posterior of model coefficients

When using MCMC to sample the predictions you would first take a sample from the posterior for the parameters $\beta$, and then plug in the parameters and the data $\tilde{\mathbf{x}}$. Let's use the ...
Tim's user avatar
  • 131k
0 votes

Coding a simple Stick-Breaking Process in Python

Let me also add that you can compute this without using the Numpy library. I am currently working on a journal that requires me to use stick-breaking as a prior for my autoencoder. Method 1: ...
Joy's user avatar
  • 11
0 votes

JAGS: How can I apply truncated Cauchy distribution im prior?

The Cauchy distribution is a special case of the t distribution, with 1 degree of freedom. While JAGS does not have the Cauchy, it does have the t distribution. ...
b07702095's user avatar
1 vote

Bayesian Inference: Conceptual question to get evidence

It sounds like your end-goal is to come up with a pmf $P(X|Y)$, i.e. for any signal duration Y, what are the probabilities that you get 0 values, 1 value, 2 values, etc. The only reason to invoke ...
gazza89's user avatar
  • 2,269
1 vote
Accepted

Conceptual questions about the proxy distribution in variational inference

I think in this instance it would be best to give some high-level answers to your questions and direct you to appropriate sources for details. Your original question was: How do we select the ...
microhaus's user avatar
  • 2,383
2 votes
Accepted

Derive the prior on variance scale if uniform prior placed on logarithm scale

Your error is going from $\text{Let}~ Y = \log \sigma^2$ to $\dfrac{dY}{d\sigma^2} = 2/\sigma$ You should have: $\dfrac{dY}{d\sigma^2} = 1/{\sigma^2}$ (simple derivative of a logarithm) though perhaps ...
Henry's user avatar
  • 35.3k
0 votes

Computing a posterior distribution

The prior probability distribution of $\theta$ is $$ f_\theta(u) \, du = \begin{cases} 1\, du & \text{if } 0<u<1, \\ 0 \, du & \text{otherwise.} \end{cases} $$ The likelihood function is ...
Michael Hardy's user avatar
0 votes

Computing a posterior distribution

I'll try to answer it because I gave it some thought but I'm not 100% sure so I would like some to correct me if possible. If I understand well, you have the following process, you have some ...
Fiodor1234's user avatar
  • 2,150
0 votes
Accepted

Inference in Bayesian networks with hidden variables

Well I don't think sampling is needed here (unless I misunderstand your question / diagram). I believe what is intended is to expand the probabilities using something like the product rule, so that: \...
tisPrimeTime's user avatar
0 votes

Acceptance-Reject to generate a distribution proportionate to Inverse Gamma and truncate Cauchy distribution

When simulating $\zeta=\tau^2$ from $$p(\zeta)\propto IG(\zeta;0,(\mu_1-\eta)^2/2+(\mu_2-\eta)^2/2)\times Ca^+(0,b_ \tau)$$ using a proposal $$p(\zeta)\propto IG(\zeta;a,b)$$ the acceptance ratio is $$...
Xi'an's user avatar
  • 99.8k
1 vote
Accepted

Intuition for chain rule in Bayesian approach for prediction?

Do you have a link to somewhere that claims this is Bayes rule? As far as I can see line (1) Is marginalization, and line (2) is chain rule. These are all very general probabilistic statements that ...
tisPrimeTime's user avatar
0 votes

Bayesian mixture model with Random Effects in Linear Predictor

Here is a potential viewpoint of the sort of model that you can have: $$y_i|z_i,x_i \sim \mathcal{N}(\mu_{z_i,x_i},\sigma_\epsilon)$$ where $x_i$ is an index for the individual. With priors $$\begin{...
Sextus Empiricus's user avatar
3 votes

Fitting a nonlinear model for a CDF

If you have a model with behavior like an increasing function then often you do not get random behavior in the form of some additive noise term $\epsilon_i(t)$, and instead it is more like the errors ...
Sextus Empiricus's user avatar
1 vote
Accepted

question on the computation of the predictive uncertainty in bayesian neural networks

I did not know how bayesian neural networks perform this operation prior to this answer, however I think the equation you mention is not specific to Bayesian neural networks but is indeed a generic ...
john_standard's user avatar
1 vote
Accepted

Parameter distribution of $\theta$ from a rectangular matrix multiplication $C\theta$

In a Bayesian linear regression we can indeed encode the wanted form of relation by considering a prior covariance which is "infinite". This is sometimes called a diffuse prior or a ...
Yves's user avatar
  • 4,688
1 vote

How to properly put lower/upper limits on a Bayesian posterior

The uniform distribution is often applied to situations where $w \in [l,u]$ represents a segment on the real line, with no preferred value for $w$ within this segment. However, on the one hand, this ...
Romke Bontekoe's user avatar
1 vote

Why are Bayesian mixed-effects models (e.g., brms) more able to estimate complex models than Frequentist mixed models (e.g., lme4)?

Random effects are used to capture correlations in the data, namely, within the same level of the corresponding grouping factors. The parameters that quantify the strength of these correlations are ...
Dimitris Rizopoulos's user avatar
2 votes

Why are Bayesian mixed-effects models (e.g., brms) more able to estimate complex models than Frequentist mixed models (e.g., lme4)?

When you “estimate” a Bayesian model most often what you do is you sample from the posterior distribution. Posterior is, by Bayes theorem, basically a product of the priors and the likelihood. If you ...
Tim's user avatar
  • 131k
3 votes

Estimating sigma in Bayesian inference

A completely flat inverse-Gamma, i.e. letting the shape and scale tend to zero, will often lead to the same problems in practice. Gelman's 2006 paper on prior distributions for variance parameters is ...
Doctor Milt's user avatar
  • 1,738
0 votes

Proving that a function is always increasing

It doesn't make sense to me that you say that they are independent, but then say that the conditional probability is increasing. If they are independent, then the conditional probability must be ...
Acccumulation's user avatar
0 votes

How do I make discrete predictions for discrete data that appears to have a normal distribution?

Not a lot of info to go off from, but a few things to note: OP mentions the marginal distribution is roughly symmetric and discrete. I've surmised this from their mention of a KDE plot. OP mentions &...
Demetri Pananos's user avatar
9 votes
Accepted

Proving that a function is always increasing

By the law of iterative expectations and conditional independence, for any $n \in \mathbb{N}$ and $u_i \in \{0, 1\}$, $i = 1, \ldots, n$, we have \begin{align} & P(X_1 = u_1, \ldots X_n = u_n) = ...
Zhanxiong's user avatar
  • 13.6k

Top 50 recent answers are included