0

Let $X$ be a random variable that takes values from 0 to 9 with equal probability $\frac{1}{10}$.

a) Find the probability distribution of the random variable $Y = X \mod 4$.

b) Find the probability distribution of the random variable $Y = 6 \mod (X + 1)$.


For instance part a - I know there are only four possible answers for these: anything mod 4 is either $0, 1, 2,$ or $3$. What I don't know how to do is how to "find" the probability distribution. Is it a number? A chart? In my notes I have two ways of writing it; one is a table and another is "$P(X = x) = \{$" followed by the distribution. This question is very different from the one in my notes and I'm a little confused on how to begin.

edit: Is probability distribution the same as "PMF"? The term PMF has never been used in class before (yet?).

Hunter Batley
  • 296
  • 2
  • 10
Hello
  • 509
  • For (a), you can just list all the possible values of Y with their corresponding probability. For example, Y = 0 when x = 0, 4, or 8. So Y = 0 with probability 3/10. You can do the same for Y=1,2,3. This is called the probability mass function (PMF) of Y. When the possible values of a random variable are discrete, you use a pmf. When continuous, use a pdf (probability density function). For (b) you can do the same thing, just figure out the possible values of Y by plugging in the possible values of X. – FullofDill Sep 05 '17 at 20:46
  • Is this the correct way of doing it? – Hello Sep 05 '17 at 21:00
  • Close. instead of "2/10: 2,3" it would be more clear if you wrote "2/10 y=2,3" and instead of P(Y= X (mod 4)) I think it's clearer to write P(Y=y) since we are using lower case 'y' to represent the actual value of y in the expression "2/10 y=2,3" – FullofDill Sep 05 '17 at 22:28
  • It should be possible to do this as a table too. A typical format might have two columns, $y$ at the head of the left column (with numbers $0,1,2,3$ in the four cells of the column beneath it) and $P(Y=y)$ at the head of the right column. But if you have been using a different table format for other probabilities then it's probably a good idea to keep using the other format. – David K Sep 05 '17 at 22:42

2 Answers2

0

For part a:

Y = 0 when X = 0, 4 or 8. So P(Y=0) = 3 * 1/10 = 3/10

Y = 1 when X = 1, 5 or 9. So P(Y=1) = 3 * 1/10 = 3/10

Y = 2 when X = 2 or 6. So P(Y=2) = 2 * 1/10 = 2/10

Y = 3 when X = 3 or 7. So P(Y=3) = 2 * 1/10 = 2/10

You can write the final probability mass function like this:

$$P(Y=y) = \begin{cases} \frac{3}{10} & y = 0,1 \\ \frac{2}{10} & y= 2,3 \end{cases}$$

Part(b) is similar. Just write out the possible values of Y along with how many values of X they correspond to.

0

FullofDill's answer is perfectly acceptable, but I just wanted to challenge myself to create a non-piecewise PMF for these, because it seemed like a neat challenge!

For Part a, Obviously we start knowing that our denominator for our probability will be 10, and we can see that as long as $y$ is in range, $y\geq2$ - So we can start with 2 as a constant in our numerator:

$$P(Y=y)= \frac{2+?}{10}$$

We know that if y is less than 2, we need to add 1 to the denominator. There's a few options to add a one if $x<n$, in this case the easier options was to use the floor function and some odd arithmetic to make a statement that subtracts 1 if y > 2, and then subtract that to get what we want:

$$P(Y=y)= \frac{2-\left \lfloor \frac{y-2}{2} \right \rfloor}{10}$$

This, of course, will only work if $0 \leq y \leq 3$.

Part b is much more complicated. The function needs to return $\frac{4}{10}$ if $y=\{0,6\}$, $\frac{1}{10}$ if $y=\{1,2\}$ and 0 otherwise. I racked my head for an hour or so trying to think of an approach that would work for all three options, but every option I thought of had some flaw that made it useless. I admit defeat: the following piecewise PMF is probably the most succinct and straightforward answer for Part b:

$$P(Y=y)=\begin{cases} \frac{4}{10} & y=0,6 \\ \frac{1}{10}& y=1,2 \\ 0 & \text{ otherwise} \end{cases}$$

In regard to your final question, PMF is short for "Probability Mass Function" - it is, indeed, a probability distribution function, but it is explicitly a function for discrete random variables. Mass Functions are built such that when you plug in the value of your random variable (and any other parameters), the function returns the probability for that single value, and so are usually pretty straightforward to deal with.

This is in opposition to a Probability Density Function, used for continuous random variables. Because Density functions deal with continuous variables, it's not useful to consider single values of that variable, because that's dealing with an infinitesimal point - the probability of any single value for a continuous function is 0. Instead, for continuous random variable, we specify a range of interest (with a minimum and maximum), and then integrate the density function within that range to get the probability of that range (yes, this does involve calculus). In effect, A density function is generally built so that the area under the curve is equal to the probability, not the value of the function at any point.

Both of these functions are "probability distribution functions", but if a text specifies one or the other, it's usually giving you a clue as to the nature of the random variable you're dealing with. It's also worth noting that many Density Functions have Mass Function equivalents and vice versa!