# PMF and CDF Calculating

I've got the following homework problem that I'm stuck on.

Two fair six-sided dice are tossed independently. Let M= the maximum of the two tosses.

a. What is the PMF of M? [Hint: first determine P(1), then p(2), and so on.]

b. Determine the CDF of M.

I am just now learning how about PMF/CDF so this is new material for me. I was told by another person in my class that the following works for part a:

$\frac{2M - 1}{36}$

$P(1) = \frac{(2(1)-1)}{36}=1/36$

$P(2) = \frac{(2(2)-1)}{36}=3/36$

$P(3) = \frac{(2(3)-1)}{36}=5/36$

$P(4) = \frac{(2(4)-1)}{36}= 7/36$

$P(5) = \frac{(2(5)-1)}{36}=9/36$

$P(6) = \frac{(2(6)-1)}{36}=11/36$

I am not sure however if this is correct, and also do not know how to come to this conclusion by myself, so if someone could help me understand this it would be extremely useful.

As for part b, I don't know how to calculate the CDF.

First Question: Let us find the probability that the maximum is $3$, first a slightly tedious way, and then a less tedious way.

Imagine that the dice are Christmas dice, green and red. We record the result of the tossing as an ordered pair $(a,b)$, where $a$ is the number on the green, and $b$ is the number on the red. There are $36$ possibilities, all equally likely.

What is the probability that the maximum $M$ is exactly $3$. To do this, let us list all possibilities that give a maximum of $3$. These are $(1,3)$, $(2,3)$, $(3,3)$ and $(3,1)$, $(3,2)$. There are $5$ of them, so the probability that the maximum is $3$ is $\frac{5}{36}$.

Now we find the answer in the way that your friend used. The maximum is $3$ if (i) all numbers are $\le 3$ and it is not true that all numbers are $\le 2$.

The number of ways that all numbers are $\le 3$ is $3^2$, for $a$ can take on any one of $3$ values, and for each value taken on by $a$, the number $b$ can take on any one of $3$ values.

Similarly, the number of ways in which all the numbers are $\le 2$ is $2^2$.

So the number of ways in which they are all $\le 3$ but not all $\le 2$ is $3^2-2^2$.

It follows that our required probability is $\frac{3^2-2^2}{36}$.

We can use either the first type of argument or the second type to find $\Pr(M=k)$ for all values of $k$ between $1$ and $6$.

Second question: The cdf (cumulative distribution function) of $M$ is the function $F$ such that for all reals $x$ we have $F(x)=\Pr(M\le x)$.

First let us calculate $F(x)$ for $x\lt 1$. If $x\lt 1$, then $\Pr(M\le x)=0$. So $F(x)=0$ if $x\lt 1$.

Note that $F(1)=\frac{1}{6}$, since $\Pr(M\le 1)=\frac{1}{6}$. Similarly, $F(1.23)=\frac{1}{6}$. In fact, $F(x)=\frac{1}{6}$ for all $x$ with $1\le x\lt 2$.

But $F(2)$, the probability that $M$ is $\le 2$, is $\frac{2}{6}$. And it continues to be $\frac{2}{6}$ for all $x$ in the interval $2\le x\lt 3$.

At $3$, $F(x)$ jumps to $\frac{3}{6}$. And so on.

Continue. Finally, if $x\ge 1$, then $F(x)=1$.

You can think of $F(x)$ as the "weight" (total probability) up to and including $x$.