# CDF in a discrete simulation (Jerry banks book)

Consider the experiment of tossing a single die. Let $X$ be number of spots on up face of die after toss. Then range space of $X$ is $R_x = \{1,2,3,4,5,6\}$. The discrete probability distribution for this experiment is:

\begin{array}{ccccccc} x_i & 1 & 2 & 3 & 4 & 5 & 6 \\ p(x_i) & 1/21 & 2/21 & 3/21 & 4/21 & 5/21 &6/21 \end{array}

Now the author has given a table for the above experiment with its cdf (Cumulative distribution function), but I don't understand how it is produced. The table is

\begin{array}{ccccccc} x & (-\infty,1) & [1,2) & [2,3) & [3,4) & [4,5) & [5,6) & [6, \infty)\\ F(x) & 0 & 1/21 & 3/21 & 6/21 & 10/21 & 15/21 & 21/21 \end{array}

How is the $F(x)$ value calculated ?

• Why $/21$ and not $/6$? and what is it you want removed? – Peter Flom - Reinstate Monica Sep 9 '12 at 13:42
• @peter--- Absolutely a right thought. I also thought this, but the author has given this table directly and when i looked again and again i saw " X be number of spots", so i think the author has taken Sample space as 21 instead of 6, as there are 21 spots in 1 die – Rameshwar.S.Soni Sep 9 '12 at 14:03
• @PeterFlom--- i want to understand how the F(x) i.e. CDF value is removed ? – Rameshwar.S.Soni Sep 9 '12 at 14:13
• One possible interpretation of this setting is that the author contemplates tossing a loaded die. The first table specifies the chances of each face: clearly it's loaded so that faces with more pips have a greater chance of appearing. (As a check, note that the probabilities sum to unity, as they ought: $1/21+2/21+\cdots+6/21=1$.) The second table merely presents the same information as a CDF. The question is a little difficult to comprehend, though, because it is not apparent that anything is "removed." What do you mean by that? – whuber Sep 9 '12 at 14:36
• R122, I asked that question as a hint to you: you needn't reproduce the text in comments! Now it's time for you to apply the definitions you quoted to this example. – whuber Sep 9 '12 at 17:41

After wasting around 5-6 hours this is what I have understood, is that correct?

In table 2, I need to find out different values of $F(x)$ depending on the value of $x$. So for example, when $x=[2,3)$ we have $F(x)=3/21$. This is how the answer came :

Since $[a,b)$ is a semi-open interval which means my $x$ value will be $$a \leq x < b$$ therefore $x=[2,3)$ will be $$2 \leq x < 3$$ i.e. I will take values equal to 2 and greater than 2 but less than 3 i.e. 2, 2.1, 2.2, 2.3, ..., 2.9. But since the pips or spots on a die can never be in fraction or decimal point, all values except 2 are discarded and we get only 2 i.e. $F(2)$. According to the definition of CDF $$F(x) = \sum p(x_i) \text{ for all } x_i \leq x$$

Therefore $F(2) = p(1) + p(2)$ which can be obtained from Table 1, i.e. $F(2) = 1/21 + 2/21 = 3/21$.

Am I correct?

@Zen--- Therefore I think $F(2.5)$ is still $F(2)$ therefore answer is again 3/21. Correct?

• Correct. Good job. – Zen Sep 11 '12 at 20:19
• @Zen-- Thanx man for your help. – Rameshwar.S.Soni Sep 12 '12 at 14:53