Expectation of the length of first part of a line

80 Views Asked by At

Question: a horizontal line of length 5 is divided into two parts first part is of length X find the expectation of X and also E[X(5-X)] .

Source :

Fundamental of Mathematical statistics by SC GUPTA and VK kapoor

My work :

Let AB is a horizontal line. If C is any point on AB. 
Such that AC = a, 
so, the first part is a and second is (5-a) with probabilities a/5 and (5-a) /5.

 Let X is an event that length of first part be a. 

    X = 1 , x € FIRST PART 
       = 0 , x € SECOND PART. 

    E(X) = 1. a/5 + 0. (5-a) /5 
    E(X) = a/5 

    Similarly, 

    E(X^2) = a/5
    E[X(5-X)] = 5E(X) - E(X^2) 
                     = 4a/5.

Correct me if I am wrong.