## Discrete Probability Distribution

Aims: By the end of this note, you will be able to

- calculate the expectation of a discrete probability distribution;
- calculate the variance of a discrete probability distribution [HL but good background for SL];
- solve problems related to discrete probability distribution.

### What is discrete probability distribution?

- Any discrete random variable X has an associated probability distribution.
A discrete probability distribution tells us what is the associated probability
for each event X = x
_{i }to occur. - A probability distribution can be represented in (i) tabular form, (ii) graphical form, or (iii) functional form.
- In this section, we will concentrate in discrete probability distribution.

**Example 1**: Let the random variable X be the number of time we obtain even value outcome from rolling a fair die three times. Represent the discrete probability distribution in (i) tabular form, (ii) graphical form, or (iii) functional form.

Tabular form: x 0123P(X=x) 1/83/83/81/8

Function form: P(X=x) =^{ 3}C_{x}(1/2)^{3}, x ={0,1,2,3}Graphical form:

( **HL**) From the probability distribution, you should be able to construct a cumulative probability distribution or simply cumulative distribution function. When this cumulative probability distribution is also called cumulative density function (cdf) when there is a focus on probability. Obviously you can also form a step function for frequency but this should not be confused with cumulative density function (cdf). The cumulative probability P(X__<__x) is also represented as F(x). The table below shows how the cumulative probability is calculated and organized and the following diagram represents the cumulative density function. The height of a step at x equals the probability P(X=x). Althought there is a straight line going from , say 0 to 1, there is actually no data in this region. Also observe how the end points have been represented in this step function.

x 0123P(X=x) 1/83/83/81/8P(X __<__x)1/84/87/81

- A discrete probability function has the following features:

(a) 0 ≤ P(X=x_{i}) ≤ 1 for all value of x_{i}.

(b) Σ_{i=1}^{n}P(X=x_{i}) = P(X=x_{1}) + P(X=x_{2}) + ... + P(X=x_{n}) = 1

Note that it is acceptable for P(X=x_{i}) to be denoted by P_{i}.

**Exercise A**:

(a) Represent the discrete probability distribution of the number of Head observed from tossing a fair coin twice using tabular form.

(b)Represent the discrete probability distribution of the number of picture card (King, Queen & Jack) observed from randomly selecting three cards wihtout replacement from a pack of playing cards using tabular form.

Answers: Your tables should have these probabilities: (a) P_{0}=1/4,P_{1}=1/2, P_{2}=1/4; (b) P_{0}=38/85, P_{1}=36/85 , P_{2}=132/1105, P_{3}=11/1105

- Knowing
the probability distribution is helpful but in a lot of cases we will also
like to know
**what outcome to expect**if we repeat an experiment with random outcomes many times. This expected value is simply referred to as**expectation**and is denoted by E(X). It is read as "the expected value of X." This E(X) can also be interpreted as the mean value of X and often denoted as μ under this interpretation.

E(X) = Σ_{i=1}^{n}[ x_{i}P(X=x_{i}) ]

E(X) = Σ_{i=1}^{n}[ x_{1}P(X=x_{1}) + x_{2}P(X=x_{2}) + ... + x_{n}P(X=x_{n}) ] ---------(1)

Equation (1) is actually a measure of the central tendency of X. We say that this is a measure of weighted average and can also be read as the long-run average.

**Example 3**:

Calculate the E(X) of the following distribution:x 0123P(X=x) 1/83/83/81/8

= 12/8

= 3/2

Note: Since this is a discrete distribution then E(X)=3/2 cannot actuall be observed from all possible outcomes of X. Another exmple of this is fertility rate. The fertility rate of a country can be 2.1 but we cannot actually observed a woman who has 2.1 children in her life-time.

**Use of GDC.**

The most efficient way to obtain the E(X) from GDC is to enter [STAT] 1:EDIT [ENTER] . Enter xs into L1 and P(X=x) into L2. Press [2nd][Mode] to quit once you are finished with data-keying.

[STAT]select CALC, 1:1-Var Stats [ENTER]. You will see

1-Var Stats with a blinking cursor.

Enter [2nd][1][,][2nd][2][ENTER] for "L1,L2" and it is important you enter the list with xs first before comma and the list containing the probabilities.E(X) is read from or Σx.

Var(X) is read from (sx)^{2}

**Example 4**: The probability that it will rain in MaOnShan on any one day is 0.21. How many days of the year would you expect it to rain in MaOfShan?

Answer: E(X) = 0.21(365) , where X represents a rainy day in MaOnShan.

E(X) = 76.7 (3s.f.)

In this case,**E(X) = np**where n is the total sample size and p represents the probability that event A (in this case rain) for each member in the sample. What is the rationale for this formula?

E(X) = Σ_{i=1}^{n}[ x_{i}P(X=x_{i}) ] but each day has the same probability to rain thus, P_{i}=p and x_{i}=1 for each day of the year. Thus, E(X) = Σ_{i=1}^{n}p = np. Actually, example 4 is a special discrete probability distribution and is known as binomial probability distribution. We will learn more about this distribution in the next section.

**Properties of E(X).**

(i) E(k)=k where k is a constant.

That is the expectation of a constant is just that constant.

(ii) E(kX)= kE(X) where k is a constant.

(iii) E(f(X)) = Σ_{i=1}^{n}[ f(x_{i})P(X=x_{i}) ] where f(x) is some real valued function of the random variable X.

If f(x)=ax+b then we have the property (iv) below.

(iv) E(aX+b) = aE(X)+E(b)

E(aX+b) = aE(x) + b, where a and b are constants.

**Example 5**:-
x 0123P(X=x) 1/81/161/25/16^{2}), (c) [E(X)]^{2},& (d) E(X^{2}+2X+1).

Solutions: (a) E(X) = 0(1/8) + 1(1/16) + 2(1/2) + 3(5/16)

E(X)= (1/16) + 1 + (15/16)

E(X)= 2.

(b) E(X^{2}) = 0(1/8) + 1(1/16) + 4(1/2) + 9(5/16)

E(X^{2})= (1/16) + 2 + (45/16)

E(X^{2})= 39/8.

(c) [E(X)]^{2}= 4

Note that E(X^{2}) is not equal to [E(X)]^{2}.

(d) E(X^{2}+2X+1) = E(X^{2}) + 2E(X) + 1

E(X^{2}+2X+1) = 39/8 + 2(2) + 1

E(X^{2}+2X+1) = 79/8.

- Expectation has many applications in real life. One application is on game.
We say that a game is
**fair if E(X) = 0.**

That is, in the long run, we have an equal chance of winning the game. If E(X)<0 then the game is not fair because in the long run we only expect to lose.

**Example 6:**In a game of die, you will roll a fair six-sided die. You will be paid in dollar the even value outcome and loose the corresponding amount of dollar if you obtain an odd value outcome from your die. The table below shows your payout.

value 123456payout(x) -12-34-56P(X=x) 1/61/61/61/61/61/6

E(X) = -1(1/6) + 2(1/6) -3(1/6) +4(1/6) -5(1/6) +6(1/6)

Expected payout is E(X) = 1/2 >0

Thus, you will have an advantage in the game and can expect to win $0.50 in the long run. Unfortunately, no one who has learned probability will play this game with you.

- Recall that
**variance**can be interpreted as the average of the squared deviations about the mean. Population variance is often denoted by s^{2}.

s^{2}= Σ f_{i}(x_{i}-μ)^{2}/n ; where n is the total population size, n= Σ f_{i}

s^{2}= Σ (f_{i}/n)(x_{i}-μ)^{2}

s^{2}= Σ p_{i}(x_{i}-μ)^{2}; using property (iii) of E(X) above we obtain

**s**---------------(2)^{2}= E [ (X - μ)^{2}]

So Var(X) =**E [ (X - μ)**^{2}]

= E [X^{2}-2Xμ+ μ^{2}]

= E (X^{2}) -2μE(X) + μ^{2 }

= E (X^{2}) - μ^{2 }

**Var (X) = E (X**---------------(3)^{2}) - [E(X)]^{2} **Properties of Variable.**- Var(k) = 0, where k is a constant.

Since k is a constant then there is no variability in this set of data. Thus Var(k) = 0.

- Var(kX) = k
^{2}Var(X)

This can be shown by employing equations (2) and (3) above.

- Var(aX+b) = a
^{2}Var(X)

This is a more general case of property (ii) above.

- Var(k) = 0, where k is a constant.

**Example 7:**

x | 10 |
15 |
20 |
25 |
30 |

P(X=x) | 1/10 |
1/5 |
1/5 |
3/10 |
1/5 |

Based on this probability distribution, calculate the following:

(a) E(X) and (b) Var(X).

Solutions:

(a) E(X) =10(1/10) + 15(1/5) + 20(1/5) +25(3/10) +30(1/5)

E(X) = 1 + 3 + 4 + 7.5 + 6

E(x) = 21.5

(b) Var(X) = E(X^{2}) - [E(X)]^{2}

Var(X) = [(100/10) + (225/5) +(400/5) +3(625/10) + (900/5)] - (21.5)^{2}

Var(X) = 161/4

**Example 8**: Given that Var(X) =3, find (a) Var(2X) and (b)
Var((1/2)-X/3).

(a) Var(2X) = 2^{2}Var(X)

= 4(3)

= 12.

(b) Var((1/2)-(X/3)) = (-1/3)^{2}Var(X)

= (1/9)(3)

= 1/3

**Exercise B**:

(1) Find the mean and standard deviation of the following probability distribution.

x | 1 |
2 |
3 |
4 |
5 |

P(X=x) | 2/25 |
7/25 |
12/25 |
3/25 |
1/25 |

(2) Given that E(X)=1 and Var(X)=3/2, find

(a) E(2x+1);

(b) Var(3-X).

Answers: (1)E(X)=69/25, standard deviation, s=0.907(3s.f) ; (2a) 3, (2b) 3/2.