Questions tagged [numerical-integration]

A class of algorithms to approximate definite integrals.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

Convergence of Diffusion Process Monte-Carlo

Let $X_t$ be a $d$-dimensional diffusion process initialized at $x \in \mathbb{R}^d$; given as the strong solution to the SDE $$ X_t = x + \int_0^t a(t,X_t)dt + \int_0^t b(t,X_t)dW_t; $$ where $a$ and ...
0
votes
0answers
13 views

How to approximate expectation and variance of an integral from a discrete Time series financial dataset?

I have discrete time series financial data, with time($u$), price($S$) and someVariable($q$) which looks something like this. ...
2
votes
2answers
92 views

Mean and variance of a non-standard pdf

I have tried to compute the variance and the mean for $\mu=0.5$ of the following PDF using Wolfram cloud but I failed $$ F(z,\mu,\sigma)=\frac{2 (z-\sigma )^2 \exp \left(-\frac{(z-\sigma )^2 \...
0
votes
1answer
26 views

is it a good idea to take the derivative or integral of some features and add them as new features in machine learning?

I'm learning how to do feature Engineering and come across some ideas in my head that's why I want to ask if I had some dataset with some features let's say 2 features and I have a timestamp column ...
0
votes
0answers
17 views

More efficient way to calculate convolution of Weibull distribution

Hi I was trying to compute the convolution of Weibull distribution as follows with parameter t, lambda(scale parameter) and k: ...
0
votes
1answer
43 views

Expectation of continuous rv X^2

I ran the following algorithm to find the expected value of X^2 for a random variable X with pdf: exp(-abs(x)^3/3) This is what I did and my results: ...
7
votes
2answers
101 views

What is better in Monte Carlo integration: product of means or mean of products?

Let $X$ and $Y$ be two independent continuous random variables with pdfs $f_X$ and $f_Y$, respectively. Let $\varphi_1$ and $\varphi_2$ be two continuous functions from ${\mathbb R}$ to ${\mathbb R}$. ...
2
votes
0answers
15 views

Double Integral involving Beta Functions (about Pareto Distribution)?

I have tried evaluate $(m_i,m_j)$th product moment of $X_{(i)}$ and $X_{(j)}$ order statistics of Pareto Distribution, that is $E[X_{(i)},X_{(j)}]$, where $i\le j$ , $X_1,X_2,...,X_n$ i.i.d. from ...
12
votes
2answers
188 views

Why is pseudo-random sampling applicable for Monte Carlo integration, even though it does not satisfy the CLT requirements?

Assume we have a function $f\left(x\right)$ defined on $\left[0, 1\right]$ that we want to integrate and estimate the error using Monte Carlo method. We generate realizations of uniformly distributed ...
7
votes
4answers
398 views

Expectation of $\ln(1 + e^x)$, where $x$ is normally distributed

I need to evaluate the following integral: $$\int_{-\infty}^\infty\mathrm d x \exp\left(-\frac{(x-\mu)^2}{2\nu}\right) \ln(1+e^x)$$ where $\mu$ is a finite real number and $\nu > 0$. This is just ...
0
votes
1answer
41 views

Understanding Gauss-Hermite Weights

I routinely use Gauss-Hermite as a tool for approximating complex integrals. While I am proficient in its applications, I am not proficient in its development. I am working to understand the weights ...
0
votes
0answers
38 views

quickly finding the moments of a numerically-defined PDF

I have a two-dimensional continuous PDF which is numerically defined. From this PDF I would like to extract the second central moment (variance) of a "slice" of this distribution. The "slice" is to ...
2
votes
0answers
8 views

Best methods to integrate summed probability and uncertainty from multiple sources?

I am trying to calculate risk of coastal flooding. In our model, we have 4 major sources of uncertainty: Elevation at location (height + gaussian error) Sea level rise (value at any given year + ...
2
votes
1answer
113 views

Why should there be two solutions for each parameter of likelihood ratio equation for Weibull-distribution?

I try to calculate the confidence ínterval of a Weibull distribution by means of the Likelihood method as described in ReliaWiki. In order to find the confidence intervals, I have to solve the ...
4
votes
0answers
33 views

Integration by sampling from truncated distribution

I'm reading the book Ben Lambert's Bayesian Statistics: problems and answers, which by the way I like. There is a group of problems in "Integration by Sampling" chapter 12. The first integral is $$...
2
votes
1answer
39 views

How to calculate mean and variance from very small function proportional to the density?

Problem Say I have the following function $g(x)$, which is proportional to the density function $f_\theta(\theta)$ of random variable $\theta$, i.e. $g(\theta) \propto f(\theta)$, such that $$ \...
1
vote
0answers
29 views

Error bars of Monte Carlo expectation with correlated samples

I will try to phrase the question in a general way, then give my specific case as an example. Suppose I want to evaluate $Q = \mathbb E \left[ f\left(X, Y \right) \right]$ where $X$ and $Y$ are ...
1
vote
1answer
198 views

Estimating the population median from a kernel density estimator

I have a 1-d kernel density estimate in the form of two vectors: x_grid is a vector of x-values at which the density function was sampled ...
1
vote
0answers
35 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
11 views

What kind of algorithms are appropriate for this sort of medium-dimensional integration problem?

I'm trying to model a situation in which an agent must select one of several choices (not more than ten). Each choice is associated with a vector, known to the agent, representing its effectiveness in ...
6
votes
2answers
210 views

Numerically/approximately integrating over independent gamma variables

Problem Statement For a problem in biology, I am testing out a joint distribution of the form: $$ X \sim Multinomial(\frac{\theta_1}{\sum \theta_i}, ...,\frac{\theta_n}{\sum{\theta_i}}) \\ \theta_i \...
1
vote
0answers
38 views

How to perform MCMC integration when no prior over the integrated function is available? [closed]

As far as I can tell, MCMC integration (e.g. VEGAS) is performed by sampling from a distribution proportional to $f(x)$ using MCMC, then building a density estimator $g(x)$ using these samples (for ...
2
votes
1answer
47 views

Evaluating problematic function when cdf is close to one?

Let $F(x;\theta)$ be a cumulative distribution function and $\beta>0$. I need to evaluate $$\rho=\frac{F(x;\theta)^\beta}{F(x;\theta)-F(x;\theta)^{\beta+1}},$$ but, for some values of $\theta$, R ...
2
votes
1answer
51 views

Calculating Integral Using MCMC

Consider the integral $\int_{\Theta}f(\theta|\mathbf{x}) \Pi(\theta)d\theta$,where $\theta$ is a univariate parameter and $\Theta$ is the support of $\Pi(\theta)$. I need to evaluate the value of this ...
2
votes
1answer
85 views

Issues with qbeta and pbeta [closed]

I'm trying to get samples from truncated beta. I have written the following function based on inverse transform sampling method to do so, however, it seems that when CDF converges to 1 fast, pbeta ...
4
votes
2answers
127 views

MCMC combined with numerical integration towards more efficient Bayesian inference

I am quite new to Bayesian statistics so the question can be a bit naive. My question is on how to deal with a model with individual coefficients. Simple versions of a task and a model I deal with is ...
2
votes
0answers
190 views

Calculating expected loss of posterior distribution

I'm working with 2 posterior distributions from AB tests. For the sake of simplicity let's assume: $$ A\sim Beta(10, 20) $$ $$ B\sim Beta(5, 25) $$ I want to calculate the posterior expected loss of ...
2
votes
1answer
625 views

What is the difference between monte carlo integration and gibbs sampling?

I am aware that both are methods of sampling from the posterior. MC integration replaces the integral by a sample MC sample. Is this sample independent? Gibbs sampling is a class of MCMC ...
0
votes
1answer
105 views

Approximate a CDF

Suppose we have $n$ equations with an integral of the form $\int_0^{x_i} F(z)dz = c_i,\ i=1,\ldots,n$ where $F(y)=\mathbb{P}(X \le y)$ is an unknown cumulative distribution function of a non-negative ...
5
votes
1answer
246 views

Constant of Laplace approximation

I'm reading Example 3.16 of Robert & Casella's Monte Carlo Statistical Methods. It uses a Laplace approximation for approximating an integral related with the Gamma distribution namely $$\int_a^b\...
6
votes
1answer
783 views

How to choose best proposal distribution for importance sampling

From Robert & Casella p95, we know that the choice of proposal distribution $g(x)$ with minimal variance is the $g$ proportional to $|h(x)|f(x)$. If we restrict our proposal distribution to cetain ...
1
vote
2answers
185 views

Expected value of $X$ which follows a normal distribution, between a certain interval [duplicate]

What is the process of finding the expected value of $X$ in a normal distribution between a certain interval? In particular I want to find: $E(X | a \le X \le b)$. For example, if $X$ has $\mu=0$ ...
3
votes
1answer
304 views

Calculating integral by using Monte Carlo method

I am asked to calculate the value of the following integral by using Monte Carlo method. $$I=\int_{\mathbb{R^{10}}}(2\pi)^{-10/2}\exp\left(-\sum_{i=1}^{10}\frac{x_i^2}{2}+\sin\left(\sum_{i=1}^{10}x_i\...
3
votes
0answers
384 views

Estimating standard error of Monte Carlo integration, non-MCMC version

Let us suppose that we're to evaluate the expectation of a random variable $h$ with respect to some distribution $\pi$, $\text{E}_{\pi}[h]$. The standard Monte Carlo estimate, using a sample of $X_1, ...
1
vote
1answer
54 views

Efficient estimation of conditional means from pdf, CDF, & quantile function supplied numerically

Suppose I have a a probability distribution that I know to have a continuous differentiable unimodal pdf, with pdf(x) strictly greater than zero for all x in the positive half-plane. In addition, I ...
0
votes
1answer
2k views

How to calculate joint distribution by integrating over all possible values of model parameters and observations

I was wondering how to calculate the following joint distribution by assuming that $x_i$'s are continuous observations from normal distirbution $N(\mu, \sigma)$ with mean $\mu$ and variance $\sigma$ ...
3
votes
0answers
194 views

Low-valued multivariate integral in R [closed]

I'm trying to calculate multivariate normal integrals in R, with relatively high dimensions. I've tried the openMX and cubature packages. The problem is that the integrals become too small and I get ...
0
votes
1answer
295 views

Metropolis-Hastings Algorithm for Numerical Integration [duplicate]

I'm attempting to implement a Metropolis-Hastings Algorithm to evaluate integrals of the following form: $$I =\frac{1}{\sqrt\pi}\int_{-\infty}^{\infty} {f(x)\exp(-x^2)} \text{d}x$$ Now we can ...
2
votes
1answer
510 views

What does it mean that high dimensional integration is difficult?

When we say numerical integration is difficult for high dimensional problems, what do we mean by high dimensional? For example, in the Bayesian framework, the marginal normalizing constant can be ...
2
votes
2answers
178 views

Savitzky-Golay … integrator?

Background: Savitzky-Golay filters (yes they have other names) are robust estimators of slope. Where a small noise can substantially damage the slope estimate of textbook finite difference methods, ...
0
votes
1answer
269 views

Rollmean vs. Integrate.xy for computing Integrals

I have a density function in R that reflects an underlying null distribution, for example: density_null=density(rnorm(100)) I want to integrate between 0 and ...
1
vote
0answers
195 views

Advantages of monte carlo over numerical quadrature for integration in low dimension MLE?

I am doing a parameter estimation for a two-level model via maximum likelihood estimation. My MLE optimization procedure requires multiple numerical integrations over a 3 dimensional space at each ...
1
vote
0answers
56 views

Proving an equivalence relation by using numerical methods such as Gaussian quadrature

The background is residual useful life prediction. The following is my problem description. Degradation signal path: $r(t)=\phi+\theta t$ , where $\phi$ is assumed to be the same for all units,and $\...
2
votes
0answers
53 views

Numerical methods for one-dimensional Bayesian inference

I am doing inference using a Bayesian model that has only one variable, which boils down to computing a (one-dimensional) cumulative distribution and a quantile function given the log of a probability ...
2
votes
0answers
145 views

Maximum likelihood estimation using a random number generator

Imagine that I have a random number generator $X$ where it is impossible (or mathematicaly intractable) to calculate its probability density function - this can happen when we compose several simpler ...
0
votes
1answer
472 views

Having integration in Bayesian model: what package to use?

I have a bit experience on Bayesian analysis and am a JAGS user. Recently I have to run a more complicated model that contains integration (I use adaptIntegrate from cubature package in the original ...
1
vote
1answer
84 views

I have three probabilities of a value falling within the following ranges +/- 5%, +/- 10% and +/- 20% of the mean value

I have the mean value and my question is: is it possible to calculate the standard deviation assuming a normal distribution? Looking at previous questions which have been asked, this question is ...
2
votes
1answer
105 views

The median of the absolute value of the difference of two dependent log normal random variables

Assume X and Y have a bivariate lognormal distribution (x,y>0) that is: $f_{X,Y}(x,y)$=$$\frac{1}{2p\sqrt{1-r^2}xy\sigma_1\sigma_2}exp\{\frac{-1}{2(1-r^2)}[(\frac{ln(x)-\mu_1}{\sigma_1})^2-2r(\frac{...
1
vote
1answer
160 views

Linear regression of B-splines with terms inside an integral?

I have encountered a problem that the literature suggests linear regression is able to solve, but I am at a loss. I have a function $F$ that I want to estimate. This function obeys $N$ equations of ...
6
votes
1answer
625 views

Use Importance Sampling and Monte carlo for estimating a summation

Maybe my question is pretty basic and dumb. I'm studying computer science. In one problem i have to use Monte Carlo method and Importance sampling in order to estimate a big sum. I've seen Monte Carlo ...