# Calculation of expected value...

Printable View

• Apr 24th 2009, 03:04 AM
mathcuk
Calculation of expected value...
Hello all..
Here it follows..
X1, X2 are uniformly distributed over [0, 12]
Y1, Y2 are uniformly distributed over [0, 20]
We can define a new random variable D expressing the distance between both robots by D = sqrt(
(X2 - X1)2 + (Y2 - Y1)2 ).
What is the expected value of X1, i.e. E(X1)? How can the expected value of D be determined, either by an
equation or approximated on a computer perhaps?
• Apr 24th 2009, 11:00 PM
matheagle
1 I'm trying to figure out what is a Robot.
2 I guess those 2's are squares.
3 E(X1)=6, the midpoint of a uniform distribution.
• Apr 25th 2009, 02:32 AM
CaptainBlack
Quote:

Originally Posted by mathcuk
Hello all..
Here it follows..
X1, X2 are uniformly distributed over [0, 12]
Y1, Y2 are uniformly distributed over [0, 20]
We can define a new random variable D expressing the distance between both robots by D = sqrt(
(X2 - X1)2 + (Y2 - Y1)2 ).
What is the expected value of X1, i.e. E(X1)? How can the expected value of D be determined, either by an
equation or approximated on a computer perhaps?

As X_1, X_2, Y_1, Y_2 appear to be independed this is a (rather nasty) standard multi-dimensional integral. But the easiest way to estimate this integral is by a Monte-Carlo integration. This gives E(D) ~= 8.4 with SE ~= 0.04 from 10000 replications.

The Monte-Carlo will even give a histogram of the sampling distribution (note: typo in the vertical axis legend; it's 10000 replications not 100000):

CB