Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: integration over a Gaussian density

Subject: integration over a Gaussian density

From: Jerry

Date: 06 Feb, 2008 00:16:02

Message: 1 of 10

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!

Subject: Re: integration over a Gaussian density

From: John D'Errico

Date: 06 Feb, 2008 00:52:02

Message: 2 of 10

"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

Subject: Re: integration over a Gaussian density

From: Jerry

Date: 06 Feb, 2008 01:14:02

Message: 3 of 10

"John D'Errico" <woodchips@rochester.rr.com> wrote in
message <fob0bi$bar$1@fred.mathworks.com>...
> "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

no, please note that "integration of xf(x) from t1 to t2",
it's xf(x), not f(x).

Subject: Re: integration over a Gaussian density

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 06 Feb, 2008 01:38:15

Message: 4 of 10

In article <fob1kq$15p$1@fred.mathworks.com>,
Jerry <mricad@yahoo.no000spppam.com> wrote:

>no, please note that "integration of xf(x) from t1 to t2",
>it's xf(x), not f(x).

Do you mean x*f(x) or do you mean a function named fx applied at
point x?

--
   "I was very young in those days, but I was also rather dim."
   -- Christopher Priest

Subject: Re: integration over a Gaussian density

From: Roger Stafford

Date: 06 Feb, 2008 03:05:09

Message: 5 of 10

"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!
---------
  Write x*f(x) = (x-m)*f(x) + m*f(x), where m is the mean. The first one can be
directly integrated in terms of the exp function, while the second can be
expressed in terms of normcdf or erf.

Roger Stafford

Subject: Re: integration over a Gaussian density

From: Roger Stafford

Date: 06 Feb, 2008 03:05:09

Message: 6 of 10

"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!
---------
  Write x*f(x) = (x-m)*f(x) + m*f(x), where m is the mean. The first one can be
directly integrated in terms of the exp function, while the second can be
expressed in terms of normcdf or erf.

Roger Stafford

Subject: Re: integration over a Gaussian density

From: Roger Stafford

Date: 06 Feb, 2008 03:05:26

Message: 7 of 10

"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!
---------
  Write x*f(x) = (x-m)*f(x) + m*f(x), where m is the mean. The first one can be
directly integrated in terms of the exp function, while the second can be
expressed in terms of normcdf or erf.

Roger Stafford

Subject: Re: integration over a Gaussian density

From: Roger Stafford

Date: 06 Feb, 2008 03:05:26

Message: 8 of 10

"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!
---------
  Write x*f(x) = (x-m)*f(x) + m*f(x), where m is the mean. The first one can be
directly integrated in terms of the exp function, while the second can be
expressed in terms of normcdf or erf.

Roger Stafford

Subject: Re: integration over a Gaussian density

From: Roger Stafford

Date: 06 Feb, 2008 03:41:02

Message: 9 of 10

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in
message <fob85m$ctq$1@fred.mathworks.com>...
> Write x*f(x) = (x-m)*f(x) + m*f(x), where m is the mean. The first one can
be
> directly integrated in terms of the exp function, while the second can be
> expressed in terms of normcdf or erf.
>
> Roger Stafford
-------
  I think the Matlab Newsgroup is misbehaving again! I clicked the "Post
Message" button only once, I swear, but got four copies sent anyhow. Let's see
how it behaves this time.

Roger Stafford

Subject: Re: integration over a Gaussian density

From: Jerry

Date: 06 Feb, 2008 05:12:01

Message: 10 of 10

"Roger Stafford"
<ellieandrogerxyzzy@mindspring.com.invalid> wrote in
message <foba8e$rr4$1@fred.mathworks.com>...
> "Roger Stafford"
<ellieandrogerxyzzy@mindspring.com.invalid> wrote in
> message <fob85m$ctq$1@fred.mathworks.com>...
> > Write x*f(x) = (x-m)*f(x) + m*f(x), where m is the
mean. The first one can
> be
> > directly integrated in terms of the exp function,
while the second can be
> > expressed in terms of normcdf or erf.
> >
> > Roger Stafford
> -------
> I think the Matlab Newsgroup is misbehaving again! I
clicked the "Post
> Message" button only once, I swear, but got four copies
sent anyhow. Let's see
> how it behaves this time.
>
> Roger Stafford
>

thanks, Roger. Your method is really smart! my OP got a
duplication too, don't worry about it. thanks again.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
integration Jerry 05 Feb, 2008 19:20:04
gaussian density Jerry 05 Feb, 2008 19:20:04
normal density Jerry 05 Feb, 2008 19:20:04
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics