Consider the triangle with vertices (0; 0), (1; 0) and (0; 1). Let Z be a uniform

random variable in the interval [0; 1]. Draw a vertical line that intersects the x axis at Z. This
line divides the triangle in two pieces. Select a point (X; Y ) uniformly at random from the right
piece. Find the expectation E[X] of the x coordinate of the selected point.
Hint: You might have to integrate an ugly looking function. Factor the numerator, cancel
stu� and simplify the function.

To find the expectation E[X] of the x-coordinate of the selected point, we need to calculate the integral of the x-coordinate over the right piece of the triangle.

First, let's visualize the triangle:

Triangle vertices: A(0,0), B(1,0), C(0,1)

We draw a vertical line from point B on the x-axis, intersecting the triangle and dividing it into two pieces. Let the intersection point be P(Z,0), where Z is a random variable in the interval [0,1].

Now we want to find the expectation of the x-coordinate of a point randomly selected from the right piece of the triangle, let it be point Q(X,Y).

To find E[X], we need to integrate X over the region of the right piece of the triangle.

The equation of the line BP can be written as: X = Z

The equation of the line AC can be written as: Y = 1 - X

So, the region of the right piece of the triangle is defined by:
X lies in the interval [Z, 1]
Y lies in the interval [0, 1 - X]

Now, we need to set up the integral:

E[X] = ∫[0,1] ∫[Z,1] X * f(X,Y) dX dY

Where f(X,Y) is the joint probability density function of X and Y.

We have a uniform random variable Z in the interval [0,1], so its probability density function fZ(z) is constant over this interval.

Since X and Y are points selected uniformly at random from the right piece of the triangle, their joint probability density function f(X,Y) can be written as:

f(X,Y) = 2 / Area of the right piece of the triangle

The area of the right piece of the triangle is:
Area = 1/2 * base * height = 1/2 * (1-0) * (1-0) = 1/2

Therefore, f(X,Y) = 2 for all (X,Y) in the right piece of the triangle.

Now we can simplify the integral:

E[X] = ∫[0,1] ∫[Z,1] X * 2 dX dY
= 2 ∫[0,1] ∫[Z,1] X dX dY
= 2 ∫[0,1] [X^2/2] from Z to 1 dY
= 2 ∫[0,1] (1/2 - Z^2/2) dY
= 2 * [(1/2 - Z^2/2) * Y] from 0 to 1
= 2 * [(1/2 - Z^2/2) * 1 - (1/2 - Z^2/2) * 0]
= 2 * (1/2 - Z^2/2)
= 1 - Z^2

Therefore, the expectation of the x-coordinate, E[X], is given by 1 - Z^2.