Below is the problem:
Choose a point uniformly at random from the triangle with vertices (0,0), (0, 30), and (20, 30). Let (X, Y ) be the coordinates of the chosen point. (a) Find the cumulative distribution function of X. (b) Use part (a) to find the density of X.
First, for the first part of the question, a triangle is formed by three vertices in the question. Therefore it would look something like an inverted triangle whose right angle is formed by y-axis and the line that goes through (0,30) and (20, 30)
If I find the area of this triangle it would be 300 since (30)(20) / 2 = 300
so for (X, Y) coordinates in the area, the probability of the point being in the triangle is 1/300.
So to find cdf, since the equation of the line that goes through the origin and (20, 30) is y = (3/2)x, I think cdf is
F(X) = 1. (3/2)x * x * 1/2 * 1/300 = (1/400) * x^2 for 0 <= x <= 20 2. 0 for x < 0 3. 1 for x > 20
But I am not really sure if my process is right
For part (b), I know I just have to take the derivative but the if I take the derivative, I am only calculating the area of the slope but I am suppose to find the area of the inverted triangle. Since the area of two triangles are equal, can I just take the derivative? or should the area be something like 1 - (derivative) ?