A real estate broker needs to advertise two townhouses, two duplexes, and two single-family homes. However, the broker decides to choose at random only one of the six properties for open house on a certain weekend. Let the random variable X take on the value 1 if a townhouse is chosen, 2 if a duplex is chosen, and 3 if a single-family home is chosen.
a) Write the probability function of X.
b) Suppose the random variable X is assigned the value of 2 if a townhouse is chosen, 4 if a duplex is chosen, and 6 if a single-family home is chosen. Write the probability function of X.