skjacobi

92 Reputation

2 Badges

16 years, 122 days

MaplePrimes Activity


These are answers submitted by skjacobi

Hi Axel,

The only way I know of checking your result is to integrate the posterior to see if it integrates to one.  Of course, this integral is giving me the same problems.  So, I'm not sure how to verfiy the results.  And, I'm thinking of throwing in the towel on this entire approach.  Thinking of trying out MCMC...

Hi Axel,

I'll see if that works.  Can you explain how you came up with that number?

 

Thanks,

Sarah

Is it possible for the integral to be evaluated numerically?  Thanks for your help.  I really appreciate it.

The problem I'm working on is in the area of environmental engineering.  I'm developing a methodology to reduce sediment loadings to an impaired waterway, while explicitly addressing uncertainty in the current knowledge of the physical system.

The marginal distributions for the components of  X have most of their densities between 5 and 15.  Both beta distributions have most density between 0.75 and 1. 

Hi.  The probelm I'm working on is to develop a probabiliy distribution, called the posterior distribution, using Bayes' law.  Here are the components: 

Prior distribution = f(X) This probabiliy density function describes the probability of the parameters X (X is a vector)

Likelihood funtion = f(z|X)  This condition density function describes the probability of z given X. 

Posterior distribution = f(X|z)  This probabiliy density function describes the probabiliy of X given z and is defined as (Prior)(Likelihood)/f(z)

Therefore, f(X|z)= f(X)*f(z|X)/f(z), which equals f(X)*f(z|X)/(Integral of f(X)*f(z|X) over all possible values of X).

My code is trying to develop f(X|z).  I am running into trouble when trying to integrate the denominator.  The denominator is essentially a normalizing constant that allows the posterior distribution to behave like a probability density function - i.e. integrates to one over all possible values of X. 

As far as magnitude of the denominator, I'm not sure what I should expect.  I'll think about that and let you know.

 

 

 

 

I'm attaching my entire code to avoid confussion.  Everything runs without a hitch except the last command:

DenomG1 := evalf(Int(PostNumG1, [x1 = -infinity..infinity, x2 = -infinity..infinity, x3 = -infinity..infinity, x4 = -infinity..infinity, x5 = -infinity..infinity, x6 = -infinity..infinity, x7 = -infinity..infinity, x8 = -infinity..infinity, y = 0 .. 1, z = 0 .. 1]));

I've tried various versions of this command without much luck. 

Thanks for any ideas!

SarahDownload 9092_Part1.mpl
View file details

I have a somewhat general question now.  Sometimes, when I type evalf(Int(f,[RANGES])) Maple doesn't even try to evaluate it.  Other times, Maple will start working on evaluating the integral numerically.  Why does this command sometimes work and other times not? 

Sorry about that last post - on my computer, it's illegible.  So, basically what I said was that Sigma is populated by floating point numbers (it's not symbolic). 

I've separated the code and run each piece to see where it gets hung up.Everything runs fine except the numerical integration. I looked into transforming the variables. I'm not sure how to translate the transformations from a multivariate normal distribution to the more complicated distribution that I have, which is a product of a multi-normal and 2 beta distributions. The problem is that the beta distributions are functions of the original joint-normal variables and the transformations I've found seem unlikely to extend to my situation. I'm going to see how things proceed by using finite integration bounds that will include all but the very small tails of the distribution

Thanks for your replies.  Here are some more details...

Here are the values contained in Sigma

 

0.00348 0.00978 0.00296 0.00978 0.00914 0.01757 0.00914 0
0.00978 0.68710 0.00978 0.13742 0.04282 0 0.04282 0.12847
0.00296 0.00978 0.00348 0.00978 0.01295 0.01757 0.00914 0.00000
0.00978 0.13742 0.00978 0.68710 0.04282 0 0.04282 0.12847
0.00914 0.04282 0.01295 0.04282 0.06673 0.07692 0.04004 0.00000
0.01757 0.00000 0.01757 0 0.07692 0.24628 0.07692 0.02564
0.00914 0.04282 0.00914 0.04282 0.04004 0.07692 0.06673 0.01335
0 0.12847 0 0.12847 0 0.02564 0.01335 0.06673

I've separated the code and run each piece to see where it gets hung up.  Everything runs fine except the numerical integration.  I looked into transforming the variables.  I'm not sure how to translate the transformations from a multivariate normal distribution to the more complicated distribution that I have, which is a product of a multi-normal and 2 beta distributions.  The problem is that the beta distributions are functions of the original joint-normal variables and the transformations I've found seem unlikely to extend to my situation.  I'm going to see how things proceed by using finite integration bounds that we include all but the very small tails of the distribution. 

Page 1 of 1