integration over a Gaussian density

  • Permalink
  • submit to reddit
  • Email
  • Follow


in matlab, how to get the integration of xf(x) from t1 to t2
where f(x) is a Gaussian (or Normal) density function with
known mean and variance parameters? thanks!
0
Reply mricad7950 (38) 2/6/2008 12:14:10 AM

See related articles to this posting

comp.soft-sys.matlab 204959 articles. 552 followers. Post

0 Replies
175 Views

Similar Articles

[PageSpeed] 20


Reply:

Similar Artilces:

integration over a Gaussian density #2
in matlab, how to get the integration of xf(x) from t1 to t2 where f(x) is a Gaussian (or Normal) density function with known mean and variance parameters? thanks! "Jerry " <mricad@yahoo.no000spppam.com> wrote in message <foau82$cqb$1@fred.mathworks.com>... > in matlab, how to get the integration of xf(x) from t1 to t2 > where f(x) is a Gaussian (or Normal) density function with > known mean and variance parameters? thanks! normcdf, if you have the statistics toolbox. If not, then its a simple transformation of erf or erfc. John "John D'Errico"...

How can i calculate a double density gaussian defined integral
Hi, I am developing a tool with Matlab of statistical type and i have to calculate the integral of this function: f1=( r/(2*pi*(sigma)^2)) * exp( -( (r)^2/(2*(1-(correlationCoefficent)^2)*(sigma)^2 ) * ( 1-2*correlationCoefficent*cos(t)*sin(t) ) ) ); i tried with this Matlab functions: int dblquad and other... but the result is always the same, Matlab communicate me that it can't resolve the integral. There aren't error message because the code is exact simply it can't find a solution for this type of integral, and the value that return int or the oder functions isn't a n...

integration of a gaussian
Hi! I need to integrate a gaussian plot between two bounds 'a' and 'b' (for example: -5, +5) . I'm trying to use the snipped code below: a=quadl(normpdf,-5,5,0,0,0,1) but once executed Matlab send me the message: ??? Error using ==> normpdf Requires at least one input argument. Any idea? Many thanks in advance, Paolo. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.725 / Virus Database: 480 - Release Date: 19/07/2004 Paolo Giai Miniet wrote >[...] > I need to integrate a gaussian plo...

Complex Gaussian integral
Hi. I am using version 9.03. I tried int(exp(-I*x^2),x=-infinity..infinity); and received the correct answer: (1/2-1/2*I)*2^(1/2)*Pi^(1/2) (which is equivalent to sqrt(Pi/I)). However int(exp(I*x^2),x=-infinity..infinity); yields the incorrect result: infinity rather than the complex conjugate of the first integral. Is this a known bug? Inf. Introducing a parameter 'a' seems to reveal the problem: > int(exp(a*x^2),x=-infinity..infinity); / (1/2) | Pi | --------- -csgn(a) = 1 ...

Problem with Simplify and Integrating a gaussian
Hello, I encountered a very strange behaviour of Mathematica and would like to ask if this is a bug or if I am doing something incredible wrong. I hope this list is the right place to do so. Please find below the contents of my notebook: In[27]:= v[x_]=If[x<a,0,Exp[- ((x-a)/1.)^2]] u[x_]=Simplify[v[x]] Out[27]= If[x<a,0,Exp[-((x-a)/1.)^2]] Out[28]= \[Piecewise]E^(-1. (a-1. x)^2) a<=x 0 True In[29]:= Refine[Integrate[u[x],{x,d,\[Infinity]}],{d>a,a>0}] Refine[Integrate[v[x],{x,d,\[Infinity]}],{d>a,a>0}] Out[29]= 0.886227 (1.+Erf[a-1. d]) During evaluation ...

How to get this gaussian integral result?
Integrate[ x1^(n1) x2^(n2) x3^(n3) Exp[ a x1 x1 + b x2 x2 + c x3 x3 + d12 x1 x2 + d23 x2 x3 + d13 x1 x3 + d], {x1, -Infinity, Infinity}, {x2, -Infinity, Infinity}, {x3, -Infinity, Infinity}]. n1,n2,n3 are Natural numbers. I still cannot get the general result ,although mathematica takes so much time. Can you help me about this? simplerbysimpler@gmail.com writes: > Integrate[ > x1^(n1) x2^(n2) x3^(n3) Exp[ > a x1 x1 + b x2 x2 + c x3 x3 + d12 x1 x2 + d23 x2 x3 + d13 x1 x3 + > d], {x1, -Infinity, Infinity}, {x2, -Infinity, > Infinity}, {x3, ...

integral inside an integral
Does anyone know how to make the following work using pure functions in Mathematica? Given two functions f and g compute and for a fixed k[x] h[f_,g_,alpha]:=NIntegrate[f[alpha-x]*k[x]/NIntegrate[g[alpha-x-y]*k[y],{y,-Infinity,Infinity}],{x,-Infinity,Infinity}] I want to put arbitrary functions f and g into h and get an answer. Charles In your definition of h, alpha must be a pattern, and since you are using numerical techniques alpha should be restricted to a numeric value. Clear[h, h2] k[x_] := Exp[-x^2/3] h[f_, g_, alpha_?NumericQ] := NIntegrate[f[alpha - x...

integrating within an integral
Hi, I am looking to integrate a function within another integral. My problems is that the variable of integration for the outer integral is a variable in the inner intergral. For example in pseudo-code: int(x^2 - int(c^2-x^2)dc )dx I was suggested the use of a separate function and putting the quad command in a loop. So I would call the inner integral from this: function res = G2(xv,lambda10) res = zeros(size(xv)); for i=1:length(xv) x = xv(i); res(i) = (2./lambda10) .* quad(@(c) c.^2./sqrt... (c.^2-x.^2), x.*(1+eps), lambda10.*(1-eps)); end end wher...

how to integrate this double integral?
Hello everyone. I'm trying to integrate the below double integral using Monte Carlo integration: h = int(from 0 to infinity) int(from 0 to infinity) g(x,y) f_1(x)f_2(y) dxdy where f_1 is Gamma function with parameters alpha1 and beta1, f_2 is Gamma function with parameters alpha1 and beta2. Here g(x,y) is not provided as a closed form, but it can be evaluated through my m function. Since g(x,y) is not closed form, the best way may use Monte Carlo integration as follows: h^ = sum(from 1 to n) g(U1_i, U2_i) f_1(U1_i) f_2(U2_i) / n The problem is that I have to multiply two intervals o...

Rapid execution of gaussian integrals
I recently posted about very slow execution of infinite symbolic integrals of the general form Integrate[const * Exp[-A x^2 + 2 B x], {x, -Infinity, Infinity},] when A and B are constant-valued expressions of even modest complexity, even when one inserts the necessary Assumptions to make the integral convergent. Daniel Lichtbau replied with some helpful suggestions on how to speed things up a bit; but to really speed things up I've since been using the brute force approach gaussianIntegral[func_, x_] : = Module[ {exp, A, B, C, const}, exp = Exp...

Integral of square of integral
Hi All, I need to calculate numerically nested integrals of the form I = integral f(t)dt (between constant limits) where f(t) = [integral of g(x,t)dx (between constant limits)]^2. Because the result of the innermost integral is squared, the form of the nested integrals does fit the nested quadrature functions dblquad and quad2d. In addition, the integrand g(x,t) of the innermost integral has two problems 1) it is highly oscillatory -so I was trying the Gauss-Kronrod method (MATLAB's quadgk) and 2) it includes a expressions of the form v(x) + u(t) (where u and v are wel...

Integration of Elliptic Integral
One of the (many!) advantages of the CAS Mathematica is how quickly known bugs and deficiencies in general, of an earlier version are fixed in the next (if possibly!) version of it. I know some bugs (especially regarding Integration) in other CAS which are not fixed even 3 or 4 versions later! It is very pleasant to search in the archives of MathGroup forum and see old posts mentioning bugs or bad behavior of e.g. Integrate command which in the later version(s).were corrected. Nevertheress, sometimes you see old versions to work and give desirable results and on the contrary the new...

Integrating a quadruple integral
Dear all, I need to numerically evaluate a quadrauple integral; however, to my best knowledge, Matlab doesn't offer any bulit in functions for this type of situation. Can someone please give me some advice on how I can solve this problem? Any input is appreciated. Thank you. David Den Mon, 01 Oct 2007 21:41:59 +0000 skrev David : > Dear all, > > I need to numerically evaluate a quadrauple integral; however, to my best > knowledge, Matlab doesn't offer any bulit in functions for this type of situation. > Can someone please give me some advice on how I can solve...

Gaussian integration broken
Abother bug concerning gaussian integration: In:= Integrate[Exp[-{x, y}.{{a, b}, {c, d}}.{x, y}], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}] Out:= 0 ...

Exponential integration with normal density function
Hello, I need to evaluate an exponential integral over a positive range. The integrand is of the following form: (1/x)*pdf(X) where pdf(X) is the Normal(mu,sigma^2) probability density function. Which integral approximation method (quad, quadgk, etc.) is the best to evaluate this integral in terms of time and least error? Thank you, A. On May 5, 5:05=A0pm, "Angie" <angie1...@yahoo.com> wrote: > Hello, > > I need to evaluate an exponential integral over a positive range. The int= egrand is of the following form: > > (1/x)*pdf(X) > > wher...

L_{p} norm for gaussian density
Dear all, Hi, I am a newbie in this newsgroup, my name's Andrew Au. Nice to see you all. I am recently studying in speech recognition. I am wondering can I replace the Mahalanobis distance, used by the Gaussian density, by any other norm, is it still a probability density, can it help by consider choosing different metric...? It seems that wasn't many post about probability model here, I am really interested in those method for knowledge representation. For example, Bayesian Network, Hidden Markov Model, Kalman Filter as so on. Are there any newsgroup talk about all these... ? ...

Gaussian probability density function in Matlab?
Hello all, I am wondering if there is Gaussian probability density function(pdf) and Gaussian cumulative density function (cdf) in matlab? Thanks! Davy zhushenli@gmail.com wrote: > I am wondering if there is Gaussian probability density function(pdf) > and Gaussian cumulative density function (cdf) in matlab? If you have the Statstics Toolbox, they are NORMPDF and NORMCDF. If not, it's easy enough to code them up; the CDF uses ERF or ERFC. Hope this helps. - Peter Perkins The MathWorks, Inc. ...

Numerical Integration of a Density a various point
Hello, I have a density (2-dimensional function) that is not symbolically integrable. Therefore I would like to numerically integrate this function at different points, e.g. 100-500. Is there a way to compute the numerical integral at various point simultaneously? I tried to use quad2d with vectors, but it doesn't work. Do you an idea how to solve this? Best regards, Ralf "Ralf Heimrich" <blowfinger@gmx.net> wrote in message news:f22bfd39-a28a-4b32-b9a5-611a6def6ee4@w31g2000yqk.googlegroups.com... > Hello, > > I have a density (2-dimensional function) that ...

How to normalize the Gaussian distribution integration to 1
I have a gaussian distribution as the following; FWHM=50000; a=FWHM/1.7; x=linspace(-2*a,2*a,161); p2=(1/(sqrt(pi)*a))*exp(-.5*(x./a).^2); i have to do the following; normalize the gaussian distribution so that when the sum is calculated and each divsion is divided by the sum, the result gives 1. is this correct? g=sum(p2); for o=1:length(p2) YY(o)=p2(o)/g; end any other suggestion is appreciated. thanks alot On 8 Nov., 12:09, "salman " <salmanabdull...@gmail.com> wrote: > I have a gaussian distribution as the following; > > FWHM=3D50000; > ...

Three-dimensional Gaussian Probability Density Function
Hi all, I am working on a research,I want to define a 3-Dimensional Gaussian Probability function on YUV color space.. But I dont know how to calculate 3-D Gauss PDF? Can someone help me? Thanks in Advance Student-Yeditepe University Shlomo shlomo wrote: > Hi all, > > I am working on a research,I want to define a 3-Dimensional Gaussian > Probability function on YUV color space.. But I dont know how to > calculate 3-D Gauss PDF? > > Can someone help me? > I assume that the 3-D refers to (Y, U, V). Have you plenty of examples of the vector (Y, U, V)? Let us nam...

plotting the probability density for multivariate gaussian mixture
Hi, I have a multivariate gaussian mixture distribution(a mixture of two gaussians). For each gaussian in the mixture, the mean MU is a 3 dimensional vector, and the covariance matrix is a 3 by 3 matrix. I want to project the probability densities onto their best-fit hyperplane for the visualization purpose, so could you please help me out? Thanks a tonne! Manjari On Wed, 06 Feb 2013 17:17:08 +0000, Manjari wrote: > Hi, > I have a multivariate gaussian mixture distribution(a mixture of two > gaussians). For each gaussian in the mixture, the mean MU is a 3 > dimensional...

Integration of probability density function/ random variable
Dear Friends, Suppose we have the following system, Customer demand x that is considered to be a positive stochastic random variable with probability density function f(x) and cumulative distribution function F(x). order quantity: Q. Selling price, p=40. wholesale price, W=30, salvage value S=23, Order quantity Q=150. f(x) mean deviation=400, f(x) standard deviation=130. if the order Quantity is more than market demand, Q>=x, then the expected profit of retailer is calculated by integrating this function E(Q)=[(p-w)*x-(w-s)*(Q-x)]*f(x)dx from Q=0 to 150. That is int(E(Q)...

SMS Gateways Integration | Payment Gateways Integration | API integration and development
http://www.rankingofuniversity.com/show.php?c=9&ARTID=188 ...

SMS Gateways Integration | Payment Gateways Integration | API integration and development
http://www.rankingofuniversity.com/show.php?c=9&ARTID=188 ...