Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
expectated value

Subject: expectated value

From: maryam

Date: 15 Jan, 2013 07:47:12

Message: 1 of 7

Dear friens
I would like calculate the expectated value (E(.)) of a 1-by-1000 matrix {E(x)=sigma x*f(x)}
how do I that?
thanks & best regards

Subject: expectated value

From: Nasser M. Abbasi

Date: 15 Jan, 2013 08:38:32

Message: 2 of 7

On 01/15/2013 01:47 AM, maryam wrote:
> Dear friens
> I would like calculate the expectated value (E(.)) of a 1-by-1000 matrix
> {E(x)=sigma x*f(x)}
> how do I that?

Apply the definition of expected value?

when you are not sure how to do something, always look up
the definition and go from there.

http://en.wikipedia.org/wiki/Expected_value

If you have problem with implementing the defintion, then show
what you tried and where you are having problem.

good luck,

--Nasser

Subject: expectated value

From: maryam

Date: 15 Jan, 2013 14:32:09

Message: 3 of 7

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

Subject: expectated value

From: Torsten

Date: 15 Jan, 2013 15:10:08

Message: 4 of 7

"maryam" wrote in message <kd3p99$3qu$1@newscl01ah.mathworks.com>...
> "Nasser M. Abbasi" wrote in message <kd34i6$p21$1@speranza.aioe.org>...
> > On 01/15/2013 01:47 AM, maryam wrote:
> > > Dear friens
> > > I would like calculate the expectated value (E(.)) of a 1-by-1000 matrix
> > > {E(x)=sigma x*f(x)}
> > > how do I that?
> >
> > Apply the definition of expected value?
> >
> > when you are not sure how to do something, always look up
> > the definition and go from there.
> >
> > http://en.wikipedia.org/wiki/Expected_value
> >
> > If you have problem with implementing the defintion, then show
> > what you tried and where you are having problem.
> >
> > good luck,
> >
> > --Nasser
> --------------------
> I know the the definition of expected value but I cant implement it.
> assume a 1-by-n arbitrary matrix, what's its matlab code?
> thanks

A row of numbers does not have an expected value.
What you probably mean is an estimator for the expected value
of the random variable which produced the row of numbers.
Usually one takes
mean(A,2)
for this where A is your 1xn - matrix.

Best wishes
Torsten.

Subject: expectated value

From: maryam

Date: 15 Jan, 2013 18:47:14

Message: 5 of 7

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

Subject: expectated value

From: Nasser M. Abbasi

Date: 16 Jan, 2013 02:44:07

Message: 6 of 7

On 01/15/2013 12:47 PM, maryam wrote:

> -----------------------------
> Dear Torsten
> thanks your reply
> In the part of my thesis I obtain a vector of random variables that is
> I=1xn - matrix.
> then I must to calculate "contrast (I)" , the definition of contrast is
>contrast(x)=E(x^2)/(E(x))^2
> and E(.) denoted the expectation operator.
> how could I calculate contrast (I)?
> thank you very much
>

 From what probability distribution are those numbers drawn from?

--Nasser

Subject: expectated value

From: Josh

Date: 16 Jan, 2013 04:36:10

Message: 7 of 7

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

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
E(x^2) is not always safe to calculate directly

Now
Var(x) = E(x^2) - E(x)^2
so
contrast(x) = (Var(x) + E(x)^2)/E(x)^2
Find E(x) and Var(x) is trivial provided you know the distribution

Tags for this Thread

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.

Contact us