I would like to calculate the following with Mathematica:
Let $X$ be a random variable with probability function $$p(x)= \left\{ \begin{matrix} \frac{x}{6} & \text{for }x \in \{1,2,3\}\\ 0 & \text{Otherwise} \end{matrix}\right. $$ Calculate $P(X \leq 2)$, $E(X)$ and $var(x)$
My major problem is to create the probability function with the correct distribution since there haven't been any specific distribution informed in the task. So how do I solve this?
If it is any help, then the results are respectively:
{0.5, 2.333, 0.5556}