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

Thread Subject: Coding Probability Density (that is a large summation)

Subject: Coding Probability Density (that is a large summation)

From: OR Stats

Date: 09 May, 2008 11:34:03

Message: 1 of 5

Hello M-Community:

I am fitting a density to my data. I would therefore like
to estimate parameters of the density function based on my
data. The density, however, is expressed as a summation.
It is not one of the preconfigured densities found in MATLAB.

The summation has 100 terms and cannot be re-expressed in
simpler form. And rather than literally writing every term,
it would be easier to write a loop. But how may I code this
estimation as such in MATLAB?

It can be thought of as an optimization problem for which
the parameters need to be recovered when the x's are
observed. E.g., density function f with unknown parameter a:

f(x) = Sum _k=0 to 100_ { f1(a,k)*f2(x,a,k)}

Both f1 and f2 can be expressed analytically. But clearly
it is unfortunate that f(x) is an infinite summation of the
two functions multiplied together. Since I am interested in
is using my observed 'x''s to estimate 'a'. How can I do
this estimation in MATLAB?

Thanks in advance for your thoughts and suggestions.

Subject: Re: Coding Probability Density (that is a large summation)

From: Peter Perkins

Date: 09 May, 2008 20:51:48

Message: 2 of 5

OR Stats wrote:

> It can be thought of as an optimization problem for which
> the parameters need to be recovered when the x's are
> observed. E.g., density function f with unknown parameter a:
>
> f(x) = Sum _k=0 to 100_ { f1(a,k)*f2(x,a,k)}
>
> Both f1 and f2 can be expressed analytically. But clearly
> it is unfortunate that f(x) is an infinite summation of the
> two functions multiplied together. Since I am interested in
> is using my observed 'x''s to estimate 'a'. How can I do
> this estimation in MATLAB?

In theory, this is no different than any other maximum likelihood problem, and
could be solved using, for example, FMINSEARCH, FMINCON, MLE (in the Statistics
Toolbox), or others. In practice, who knows what statistical and numeric
properties this likelihood function has.

Hope this helps.

Subject: Re: Coding Probability Density (that is a large summation)

From: OR Stats

Date: 09 May, 2008 22:41:04

Message: 3 of 5

Thanks for your suggestion, Peter. How would I express the
likelihood estimation in MATLAB when the density itself is
100 some terms? Do I have an alternative to coding all 100
terms? f1(a,k)*f2(x,a,k), where k is my index, which is
unrelated to my data points x themselves.

Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com> wrote
in message <g02dh4$l7t$1@fred.mathworks.com>...
> OR Stats wrote:
>
> > It can be thought of as an optimization problem for which
> > the parameters need to be recovered when the x's are
> > observed. E.g., density function f with unknown
parameter a:
> >
> > f(x) = Sum _k=0 to 100_ { f1(a,k)*f2(x,a,k)}
> >
> > Both f1 and f2 can be expressed analytically. But clearly
> > it is unfortunate that f(x) is an infinite summation of the
> > two functions multiplied together. Since I am interested in
> > is using my observed 'x''s to estimate 'a'. How can I do
> > this estimation in MATLAB?
>
> In theory, this is no different than any other maximum
likelihood problem, and
> could be solved using, for example, FMINSEARCH, FMINCON,
MLE (in the Statistics
> Toolbox), or others. In practice, who knows what
statistical and numeric
> properties this likelihood function has.
>
> Hope this helps.

Subject: Re: Coding Probability Density (that is a large summation)

From: OR Stats

Date: 10 May, 2008 14:59:03

Message: 4 of 5

I suppose the confusion is how to express the density when
symbolically it is 100+ terms...

"OR Stats" <stats112@gmail.com> wrote in message
<g02ju0$46k$1@fred.mathworks.com>...
> Thanks for your suggestion, Peter. How would I express the
> likelihood estimation in MATLAB when the density itself is
> 100 some terms? Do I have an alternative to coding all 100
> terms? f1(a,k)*f2(x,a,k), where k is my index, which is
> unrelated to my data points x themselves.
>
> Peter Perkins <Peter.PerkinsRemoveThis@mathworks.com> wrote
> in message <g02dh4$l7t$1@fred.mathworks.com>...
> > OR Stats wrote:
> >
> > > It can be thought of as an optimization problem for which
> > > the parameters need to be recovered when the x's are
> > > observed. E.g., density function f with unknown
> parameter a:
> > >
> > > f(x) = Sum _k=0 to 100_ { f1(a,k)*f2(x,a,k)}
> > >
> > > Both f1 and f2 can be expressed analytically. But clearly
> > > it is unfortunate that f(x) is an infinite summation
of the
> > > two functions multiplied together. Since I am
interested in
> > > is using my observed 'x''s to estimate 'a'. How can I do
> > > this estimation in MATLAB?
> >
> > In theory, this is no different than any other maximum
> likelihood problem, and
> > could be solved using, for example, FMINSEARCH, FMINCON,
> MLE (in the Statistics
> > Toolbox), or others. In practice, who knows what
> statistical and numeric
> > properties this likelihood function has.
> >
> > Hope this helps.
>

Subject: Re: Coding Probability Density (that is a large summation)

From: Peter Perkins

Date: 12 May, 2008 13:52:06

Message: 5 of 5

OR Stats wrote:
> I suppose the confusion is how to express the density when
> symbolically it is 100+ terms...

OR, I don't have enough information to know the right answer, but if you cannot
write it as a vectorized expression, then you can write a loop.

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
density estimation OR Stats 09 May, 2008 07:35:08
infinite summation OR Stats 09 May, 2008 07:35:07
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