Suppose the a discrete random variable X has a probability mass function p(x) = cx for x = 1,2,3,4,5 and p(x) = 0 for other values of x.
(a) Find the value of the constant c such that p(x) is a valid probability mass function.
So. I believe that I found the answer for part (a). It is the summation of p(x) for values 1-5 which comes to be 15c =1 -> c = 1/15. However i am not sure if it would prove true for all other values of x.
Also I have a question in my notes that I don't know how to solve. It goes as: Let X be a random variable with mean "mu" = 5 and variance = 9.
Find E([X-1]^2)
You are right for the first question: the probabilities must sum to $1$, i.e. $$ 1 = \sum_{k=1}^5 ck + 0 = 15c $$ using the fact that $p(x)=0$ for any $x\notin\{1,2,3,4,5\}$, so you only have to deal with these 5 values.
Hint: For the second question: use linearity of expectation, and the fact that $$\operatorname{Var}(X) = \mathbb{E}[(X-\mathbb{E}[X])^2] = \mathbb{E}[X^2] - \mathbb{E}[X]^2.$$
${}$