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 [integral]

For on-topic question related to uses of the mathematical concept of an integral, i.e. $\int_a^b f(x)\; dx$. Purely mathematical questions about integrals are better asked at math SE: https://math.stackexchange.com/

1
vote
1answer
22 views

when can integration and expectation be exchanged?

When is it possible to move expectations into integrals? In a proof of the Central Limit Theorem, at one point an expectation was moved into the integral (without much explanation of why that worked....
4
votes
2answers
71 views

Integrating with a multivariate Gaussian

I need to figure out the steps to solve the following integral, where $Q(\mathbf{w})$ is a multivariate Gaussian with mean $\overline{\mathbf{w}}$ and covariance $\mathbf{C}$: \begin{align}\int Q(\...
1
vote
1answer
48 views

Absolute moment and integration by parts

Let $X$ be a real continuous random variable with distribution $F$ with finite moments. I want to calculate $$E[\vert X \vert] = \int_{-\infty}^{\infty} \vert x\vert dF(x)= -\int_{-\infty}^{0} x dF(x)...
1
vote
1answer
22 views

Integrate $\int_{-\infty}^{\infty}\frac{1}{2\pi}e^{(-\frac{1}{2}(\frac{x^2}{4}+4y^2))} dy$

I'm trying to integrate $\int_{-\infty}^{\infty}\frac{1}{2\pi}e^{(-\frac{1}{2}(\frac{x^2}{4}+4y^2))} dy$ using the fact that the integral of any normal PDF is 1. But I'm having trouble completing the ...
0
votes
0answers
18 views

Unbiased estimator ( Integral Issue)

$X_1, ... , X_n$ are iid with pdf $f(x|\theta) = e^{-(x-\theta))}I_{(\theta, \infty)}(x)$ it is easy to find the sufficient statistic which is $X_{(1)}$ $E_{\theta}[g(X_{(1)})]=$ $\theta$ (...
0
votes
0answers
11 views

Phase marginal for a multivariate complex Gaussian density

Suppose $z$ is a random variable taking values in $\mathbb{C}^n$ and admitting the complex Gaussian density $p(z;W) \propto \exp{(-\frac{1}{2}z^*Wz)}$, where $W$ is Hermitian. Let $r$ be the vector of ...
1
vote
1answer
32 views

Integration by parts for multivariable cumulative distribution function

How can I integrate by parts $$\int_A (y_1+\cdots+y_n) \,dF(y_1,...,y_n),$$ where $F$ is the cumulative distribution function for some random vector, $A$ is some Borel bounded set in ${\mathbb R}^n$.? ...
0
votes
0answers
11 views

IQN: Confusion about distortion risk measure

In the paper "Implicit Quantile Networks for Distributional Reinforcement Learning", they define $$ \begin{align} Z_\tau&:=F_Z^{-1}(\tau)\tag 1\\ Q&:=\mathbb E_{\tau\sim U([0,1])}[Z_\tau]\tag ...
3
votes
1answer
372 views

Variance of Monte Carlo integration with importance sampling

I am following these lecture slides on Monte Carlo integration with importance sampling. I am just implementing a very simple example: $\int_{0}^{1} e^{x}dx$. For the importance sampling version, I ...
1
vote
0answers
44 views

Solving integrals in R

I would like to write an R function for solving the following equation: Essentially I would like to be able to set or vary the parameters values of "m" and "s" and those parameters in "p(t)" ...
1
vote
2answers
196 views

Double integral involving the normal CDF

I need to compute (or best approximate?) the following integral $$\int_0^\infty \int_0^\infty (1 + \alpha u)^{-1}(1 + v)^{-1} \Phi\left(\frac{\beta}{\sqrt{\gamma + uv}}\right) \text{d}u \text{d}v,\...
2
votes
1answer
25 views

Why is this a valid step (expectation w.r.t posterior)?

Reading through this paper and on page 10 they use the step: $$\int q(\theta|D,\phi) \log p(Y|X,\theta) d\theta = E_q \log p(Y|X,\theta)$$ Now obviously I understand why they have written this as an ...
0
votes
0answers
24 views

How can I calculate $\int{f(\bar{x}|\theta)g(\theta)d\theta}$ when $\bar{X}$ and $g$ are both normally distributed? [duplicate]

I'm reading Berger & Sellke (1987) 1. On page 115, the following statements are given: $$ \begin{align} m_g(x) & = \int{f(x|\theta)g(\theta)d\theta} \\ g & \sim \mathcal{N}(\theta_0,\...
3
votes
0answers
45 views

Integrating the inverse-Wishart density

It is alleged in this question and in the Wikipedia article and elsewhere that the density function for the inverse-Wishart distribution with $n$ degrees of freedom on $p\times p$ positive-definite ...
2
votes
1answer
45 views

Expectation of $h \circ X$

I'm only starting to learn statistics. The definition I've been given for the expected value (expectation) of a continuous random variable X with probability density function (PDF) $f_X$ is the ...
3
votes
0answers
60 views

$\mathbb{E}[\sigma(r)^2]$ with $r \sim \mathcal{N}(0,1)$

Start with a random variable $r \sim \mathcal{N}(0,1)$. Now consider the random variable $\sigma(r)$ formed by passing it through a standard logistic function $\sigma(x) = \frac{1}{1 + e^{-x}}$. I ...
0
votes
0answers
28 views

Moments of the Generalized Dirichlet distribution

I have been trying to solve the following integral. $ \int\theta_j \sum_{k=1}^K \theta_k \beta_{k,w} \prod_{k=1}^K \frac{\Gamma(\alpha_k + \beta_k)}{\Gamma(\alpha_k)\Gamma(\beta_k)} \theta_k^{\...
1
vote
0answers
41 views

Calculating statistics on transformations of many random variables [closed]

I have a model that uses $n$ independent random variables $X_1,..., X_n$. I know the density function of each random variable. I would like to calculate statistics such as $E(\sqrt{X_1+...+X_n})$ or $...
0
votes
1answer
73 views

Mean and variance of probability density with multidimensional indicator function

I encountered the following question while studying machine learning: We are asked to calculate mean and covariance of a given probability density function $$p(x) = \frac{1}{16} \cdot 1_{0 \leq x_1 ...
3
votes
1answer
79 views

weighted sum of posterior Dirichlet distributions

I have the following distribution: $q(\vec\theta) = \frac{\sum_k \alpha_k}{\sum_k \beta_k \alpha_k} (\sum_k\theta_k\beta_k) \frac{\Gamma(\sum_k \alpha_k)}{\prod_k\Gamma(\alpha_k)} \prod_k \theta_{k}^{...
1
vote
0answers
135 views

How to find integral's upper limit using optimize function without knowing the interval where it will occur

I'm working on the following to get the upper limit of my integration, as I know I need to have some idea where the point might occur but in real it can be any value between 0 and infinity. May I know ...
1
vote
1answer
42 views

How can I derive the function curve from a histogram of observed data

I'm analysing some datasets that produce heavy tailed data when plotted as a histogram. My initial goal was to attempt to fit a known distribution to my dataset. Thereafter I use to the properties of ...
5
votes
1answer
157 views

Limits of integration of a density function

My question is based on this post. In summary, $X \sim \text{Unif}(a,b)$ and $Y|X \sim \text{Unif}(a,X)$. Then the author does the following calculations: \begin{align} f(y) = \int_{-\infty}^{\infty} ...
4
votes
1answer
64 views

Marginal Distribution of Exponential Mixture Model

I am currently trying to marginalize over the scale parameter in a mixture distribution of exponential pdfs, but I do not trust my result. Let me show you my steps: Probability Density Function The ...
3
votes
0answers
129 views

Partial integration involving CDF [closed]

I am reading a textbook which claims that we can obtain by partial integration, for CDF $F(x)$:$$\int_{t}^{\infty} (1-F(x)) \frac{dx}{x}=\int_{t}^{\infty} (\log u -\log t) dF(u) $$ I am aware that ...
1
vote
1answer
229 views

How to calculate the integral of Normal CDF and Normal PDF?

I'm trying to find $\int_{\frac{a-b}{B}}^\infty\Phi\left(tA+ABx\right)\phi(x)\,dx$ where $A = \frac{\sqrt{\gamma_{3}+\sigma_3^2}}{\gamma_{3}},\ B = \frac{\gamma_{2}}{\sqrt{\gamma_{2}+\sigma_{2}^...
2
votes
1answer
39 views

How to evaluate $\int_0^\infty m^{x+1}e^{-2m}dm$ as $\Gamma(x+2)\frac{1}{2}^{x+2}$?

$\int_0^\infty \frac{m^{x+1}e^{-2m}}{\Gamma(x+1)\Gamma(2)}dm =\frac{\Gamma(x+2)\frac{1}{2}^{x+2}}{\Gamma(x+1)\Gamma(2)}$ How does the left side equal the right side? I understand that the gamma ...
0
votes
0answers
22 views

How to integrate probability density of sum of two indepedent random variables with a finite lower bound on one of them?

$$\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}e^{-u^2/2}\:du=1$$ but $$u = \ln(A)-C-k$$ where $\ln(A)$ and $C$ are normally distributed independent random variables, and $k$ is a constant. I am ...
2
votes
0answers
39 views

Piecewise integration

I am trying to estimate residential demand for electricity in a country where electricity is sold (to all households (HH)) at an increasing two-part tariff. By choosing marginal prices as my key ...
0
votes
1answer
104 views

Bayes version for continuous case, what does the integral mean?

In bayes version for continuous case, what does it mean to integrate with respect to $d\theta$ when $\theta$ is a vector not a a scalar value? $$p(\theta|D) = \frac{p(D|\theta)p(\theta)}{p(D)}$$ ...
0
votes
1answer
188 views

VAR model for first differences (not a good idea?)

I have read from couple of slides in the internet that if I have two $I(1)$ processes, it’s not a good idea to simply take the differences and include them in a VAR model, as then one might lose ...
1
vote
0answers
21 views

Integration of the product of Two multivariable Gaussain pdfs

I want to calculate \begin{align} \int_{-\infty}^{\infty} G(x-v_i, \Sigma_i) G(x-v_j, \Sigma_j) dx \end{align} where \begin{align} G(x-v_i, \Sigma_i) = \frac{1}{(2\pi)^{d/2} |\Sigma_i|^{1/2}} \...
1
vote
0answers
51 views

Moments of the horseshoe prior?

Are the first two moments well defined for the horseshoe prior? I would say that the expectation is zero but the variance does not exist. Using the following argument. Let $$\beta_i \mid \lambda_i, \...
0
votes
1answer
367 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 ...
3
votes
1answer
879 views

KL divergence between which distributions could be infinity

I know that KL divergence measures difference between two probability distributions. My doubt is for which of the distributions it could become Infinity, putting it in another way, ...
1
vote
2answers
60 views

Convolution of a less typical distribution

$X_1$ and $X_2$ are independent and identically distributed (i.i.d) random variables defined on R+ each with pdf of the form $f_X(x) = \sqrt\frac{1}{2\pi x}exp[\frac{-x}{2}]\quad ,\quad x>0, \quad ...
0
votes
0answers
16 views

Survival probability in economics

I try to deal with survival probability in economics. Hope the question fits the site. I am trying to integrate by parts by using an indicator function. However, I am not really sure if it is a ...
2
votes
2answers
61 views

Calculating multivariate integrals between lower and upper bounds

Suppose $\vec{X}=(x_1,x_2,...,x_n)$ follows some continuous multivariate distribution, such that $x_i\in{\rm I\!R}, i=1,...,n$. Suppose also that I have access to the following functions: $\phi(\...
0
votes
0answers
43 views

Back transform the integral of a log-log model?

One of my colleagues has an issue with back transforming the integral of model back to its original units. His model has a log transformed Y as a function of a log transformed X predictor. He can ...
5
votes
1answer
232 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\...
1
vote
2answers
36 views

Efficiently drawing from non-parametrically estimated distribution

Suppose I can estimate a distribution $G(x)$ as $$ \hat G(x) = f(x, X)$$ where $X$ are my data points and $f$ is a known, but computationally heavy function. Eventually I'm interested in $$ h(\...
0
votes
1answer
92 views

Relation of standard deviation between independent and dependent variables

Is there a relationship between the standard deviation of an independent variable to the standard deviation of a dependent variable? For example, if we know the standard deviation of a variable $x$ ...
1
vote
0answers
72 views

Kernels property: integral of kernel product $\propto k(x,y)$

Let $k$ be a kernel function (symmetric and semi-positive definite function). Does the following relationship hold: $\int_{-\infty}^{+\infty}k(x,u)k(y,u) du \propto k(x,y)$ ? Or for what type of ...
2
votes
1answer
45 views

Find the value of an integral using Monte-Carlo method

I have a task in a subject called "Monte-Carlo methods" with which I'm a bit stuck and therefore I'm asking for your help. The task is as follows: Describe in detail one specific option how to find ...
1
vote
1answer
52 views

Mass point delta and it's mathematical interpretation

Considering a spike-and-slab prior of the form $$w\sim\pi\mathcal{N}(0,\alpha^{-1})+(1-\pi)\delta_0$$ where $\delta_0$ is a point mass at zero, if we would like to integrate over w such that $$I=\...
1
vote
0answers
10 views

Conditional Expected Value of Birnbaum-Saunders Bivariate

Consider $(T{1},T_{2})\sim BVBS(\alpha_{1},\beta_{1},\alpha_{2},\beta_{2}).$ According to item (b) of Theorem 3.1 of Balakrishnan and Kundu (2010) article, we have: \begin{align*} f_{T_{1}|T_{2}=t_{2}...
0
votes
0answers
58 views

Search solution to an integral

When I try to solve a problem of a personal research, I get the following integral: $$E\left(X\sqrt{(\alpha X)^{2}+4}\right)=\displaystyle{\int\limits_{-\infty}^{+\infty}\frac{x\sqrt{(\alpha x)^{2}+4}...
0
votes
0answers
206 views

Calculating Jensen-Shannon and Kullback-Leibler for density splines

I need to find a way to calculate the JS distance (and, by necessity, the KL divergence) between continuous, non-normal (generating distribution unknown) distributions. I have many classes, and ...
1
vote
1answer
60 views

Simulation of integral to infinity

I need to estimate an integral that has the next form: $$\frac{1}{\epsilon}\int_{q_\alpha}^\infty S(x)dx$$ where $S(x)=1-F_S(x)$, $\epsilon$ is close to $1$. The value $q_{\alpha}$ is a quantile at ...
3
votes
0answers
57 views

Stationary density of $\{X_t\}$ as a solution of integral equation

For the model, $X_t = \alpha X_{t-1} + \epsilon_t$, we find the integral equation related to stationary distribution in the following way: Let $X_{t-1}\thicksim f$ and $X_t|X_{t-1}=x \thicksim q(y|x)$...