http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787
MATLAB Central Newsreader  expectated value
Feed for thread: expectated value
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Tue, 15 Jan 2013 07:47:12 +0000
expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895464
maryam
Dear friens<br>
I would like calculate the expectated value (E(.)) of a 1by1000 matrix {E(x)=sigma x*f(x)} <br>
how do I that?<br>
thanks & best regards

Tue, 15 Jan 2013 08:38:32 +0000
Re: expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895468
Nasser M. Abbasi
On 01/15/2013 01:47 AM, maryam wrote:<br>
> Dear friens<br>
> I would like calculate the expectated value (E(.)) of a 1by1000 matrix<br>
> {E(x)=sigma x*f(x)}<br>
> how do I that?<br>
<br>
Apply the definition of expected value?<br>
<br>
when you are not sure how to do something, always look up<br>
the definition and go from there.<br>
<br>
<a href="http://en.wikipedia.org/wiki/Expected_value">http://en.wikipedia.org/wiki/Expected_value</a><br>
<br>
If you have problem with implementing the defintion, then show<br>
what you tried and where you are having problem.<br>
<br>
good luck,<br>
<br>
Nasser

Tue, 15 Jan 2013 14:32:09 +0000
Re: expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895493
maryam
"Nasser M. Abbasi" wrote in message <kd34i6$p21$1@speranza.aioe.org>...<br>
> On 01/15/2013 01:47 AM, maryam wrote:<br>
> > Dear friens<br>
> > I would like calculate the expectated value (E(.)) of a 1by1000 matrix<br>
> > {E(x)=sigma x*f(x)}<br>
> > how do I that?<br>
> <br>
> Apply the definition of expected value?<br>
> <br>
> when you are not sure how to do something, always look up<br>
> the definition and go from there.<br>
> <br>
> <a href="http://en.wikipedia.org/wiki/Expected_value">http://en.wikipedia.org/wiki/Expected_value</a><br>
> <br>
> If you have problem with implementing the defintion, then show<br>
> what you tried and where you are having problem.<br>
> <br>
> good luck,<br>
> <br>
> Nasser<br>
<br>
I know the the definition of expected value but I cant implement it.<br>
assume a 1byn arbitrary matrix, what's its matlab code?<br>
thanks

Tue, 15 Jan 2013 15:10:08 +0000
Re: expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895500
Torsten
"maryam" wrote in message <kd3p99$3qu$1@newscl01ah.mathworks.com>...<br>
> "Nasser M. Abbasi" wrote in message <kd34i6$p21$1@speranza.aioe.org>...<br>
> > On 01/15/2013 01:47 AM, maryam wrote:<br>
> > > Dear friens<br>
> > > I would like calculate the expectated value (E(.)) of a 1by1000 matrix<br>
> > > {E(x)=sigma x*f(x)}<br>
> > > how do I that?<br>
> > <br>
> > Apply the definition of expected value?<br>
> > <br>
> > when you are not sure how to do something, always look up<br>
> > the definition and go from there.<br>
> > <br>
> > <a href="http://en.wikipedia.org/wiki/Expected_value">http://en.wikipedia.org/wiki/Expected_value</a><br>
> > <br>
> > If you have problem with implementing the defintion, then show<br>
> > what you tried and where you are having problem.<br>
> > <br>
> > good luck,<br>
> > <br>
> > Nasser<br>
> <br>
> I know the the definition of expected value but I cant implement it.<br>
> assume a 1byn arbitrary matrix, what's its matlab code?<br>
> thanks <br>
<br>
A row of numbers does not have an expected value.<br>
What you probably mean is an estimator for the expected value<br>
of the random variable which produced the row of numbers. <br>
Usually one takes <br>
mean(A,2) <br>
for this where A is your 1xn  matrix.<br>
<br>
Best wishes<br>
Torsten.

Tue, 15 Jan 2013 18:47:14 +0000
Re: expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895509
maryam
"Torsten" wrote in message <kd3rgg$d1h$1@newscl01ah.mathworks.com>...<br>
> "maryam" wrote in message <kd3p99$3qu$1@newscl01ah.mathworks.com>...<br>
> > "Nasser M. Abbasi" wrote in message <kd34i6$p21$1@speranza.aioe.org>...<br>
> > > On 01/15/2013 01:47 AM, maryam wrote:<br>
> > > > Dear friens<br>
> > > > I would like calculate the expectated value (E(.)) of a 1by1000 matrix<br>
> > > > {E(x)=sigma x*f(x)}<br>
> > > > how do I that?<br>
> > > <br>
> > > Apply the definition of expected value?<br>
> > > <br>
> > > when you are not sure how to do something, always look up<br>
> > > the definition and go from there.<br>
> > > <br>
> > > <a href="http://en.wikipedia.org/wiki/Expected_value">http://en.wikipedia.org/wiki/Expected_value</a><br>
> > > <br>
> > > If you have problem with implementing the defintion, then show<br>
> > > what you tried and where you are having problem.<br>
> > > <br>
> > > good luck,<br>
> > > <br>
> > > Nasser<br>
> > <br>
> > I know the the definition of expected value but I cant implement it.<br>
> > assume a 1byn arbitrary matrix, what's its matlab code?<br>
> > thanks <br>
> <br>
> A row of numbers does not have an expected value.<br>
> What you probably mean is an estimator for the expected value<br>
> of the random variable which produced the row of numbers. <br>
> Usually one takes <br>
> mean(A,2) <br>
> for this where A is your 1xn  matrix.<br>
> <br>
> Best wishes<br>
> Torsten.<br>
<br>
Dear Torsten<br>
thanks your reply<br>
In the part of my thesis I obtain a vector of random variables that is I=1xn  matrix.<br>
then I must to calculate "contrast (I)" , the definition of contrast is contrast(x)=E(x^2)/(E(x))^2<br>
and E(.) denoted the expectation operator.<br>
how could I calculate contrast (I)?<br>
thank you very much

Wed, 16 Jan 2013 02:44:07 +0000
Re: expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895538
Nasser M. Abbasi
On 01/15/2013 12:47 PM, maryam wrote:<br>
<br>
> <br>
> Dear Torsten<br>
> thanks your reply<br>
> In the part of my thesis I obtain a vector of random variables that is<br>
> I=1xn  matrix.<br>
> then I must to calculate "contrast (I)" , the definition of contrast is<br>
>contrast(x)=E(x^2)/(E(x))^2<br>
> and E(.) denoted the expectation operator.<br>
> how could I calculate contrast (I)?<br>
> thank you very much<br>
><br>
<br>
From what probability distribution are those numbers drawn from?<br>
<br>
Nasser

Wed, 16 Jan 2013 04:36:10 +0000
Re: expectated value
http://www.mathworks.com/matlabcentral/newsreader/view_thread/325787#895542
Josh
"maryam" wrote in message <kd487i$5pv$1@newscl01ah.mathworks.com>...<br>
> "Torsten" wrote in message <kd3rgg$d1h$1@newscl01ah.mathworks.com>...<br>
> > "maryam" wrote in message <kd3p99$3qu$1@newscl01ah.mathworks.com>...<br>
> > > "Nasser M. Abbasi" wrote in message <kd34i6$p21$1@speranza.aioe.org>...<br>
> > > > On 01/15/2013 01:47 AM, maryam wrote:<br>
> > > > > Dear friens<br>
> > > > > I would like calculate the expectated value (E(.)) of a 1by1000 matrix<br>
> > > > > {E(x)=sigma x*f(x)}<br>
> > > > > how do I that?<br>
> > > > <br>
> > > > Apply the definition of expected value?<br>
> > > > <br>
> > > > when you are not sure how to do something, always look up<br>
> > > > the definition and go from there.<br>
> > > > <br>
> > > > <a href="http://en.wikipedia.org/wiki/Expected_value">http://en.wikipedia.org/wiki/Expected_value</a><br>
> > > > <br>
> > > > If you have problem with implementing the defintion, then show<br>
> > > > what you tried and where you are having problem.<br>
> > > > <br>
> > > > good luck,<br>
> > > > <br>
> > > > Nasser<br>
> > > <br>
> > > I know the the definition of expected value but I cant implement it.<br>
> > > assume a 1byn arbitrary matrix, what's its matlab code?<br>
> > > thanks <br>
> > <br>
> > A row of numbers does not have an expected value.<br>
> > What you probably mean is an estimator for the expected value<br>
> > of the random variable which produced the row of numbers. <br>
> > Usually one takes <br>
> > mean(A,2) <br>
> > for this where A is your 1xn  matrix.<br>
> > <br>
> > Best wishes<br>
> > Torsten.<br>
> <br>
> Dear Torsten<br>
> thanks your reply<br>
> In the part of my thesis I obtain a vector of random variables that is I=1xn  matrix.<br>
> then I must to calculate "contrast (I)" , the definition of contrast is contrast(x)=E(x^2)/(E(x))^2<br>
> and E(.) denoted the expectation operator.<br>
> how could I calculate contrast (I)?<br>
> thank you very much<br>
<br>
The expected value of a set of random variables is based entirely on the distribution. For example the expected value of rolling a 6 sided dice is (6+1)/2 = 3.5<br>
E(x^2) is not always safe to calculate directly<br>
<br>
Now<br>
Var(x) = E(x^2)  E(x)^2<br>
so<br>
contrast(x) = (Var(x) + E(x)^2)/E(x)^2<br>
Find E(x) and Var(x) is trivial provided you know the distribution