Re: Variance from pdf
- From: Peter Perkins <Peter.PerkinsRemoveThis@xxxxxxxxxxxxx>
- Date: Mon, 05 Dec 2005 11:44:16 -0500
R Ahmed wrote:
I have the pdf values at hand and I need to know the variance and mean of the pdf. Please let me know how it is possible in MATLAB to do so.
Hi -
This isn't a lot of information to go on. I guess what you mean is, "I have numerical values for the PDF f(x) at some (hopefully) large number of x values."
If that's really what you have, it seems like the best you can do is think of this as a stairstep approximation to the true PDF.
you can do one of two things:
1) compute the two moments analytically, or
2) generate a large number of random values from your PDF approximation, and compute their sample mean and variance as an approximation to the true moments. You should be able to do this pretty easily using RANDSAMPLE from the Statistics Toolbox, if you have that toolbox.
Hope this helps.
- Peter Perkins The MathWorks, Inc. .
- Follow-Ups:
- Re: Variance from pdf
- From: R Ahmed
- Re: Variance from pdf
- References:
- Variance from pdf
- From: R Ahmed
- Variance from pdf
- Prev by Date: MATLAB .dat file creation
- Next by Date: Can one compile a windows .mexw32 file in linux environment?
- Previous by thread: Variance from pdf
- Next by thread: Re: Variance from pdf
- Index(es):
Relevant Pages
|