Random variable X can take the values of 1 and 2 with the probability P(X=x) =x/3, M is the median of 3 independent observations of x. Find M.

Ans is 47/27.