Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

STATISTICS 2R: PROBABILITY

Workshop 3

Probability mass functions and cumulative distribution functions

Task 1. The left-hand panel of the figure below shows the probability

mass function, pX(x), of a discrete random variable, X.  Use the right-hand panel to sketch the cumulative distribution function, FX(x), of X.

Compute the following probabilities.

P(X = 1) = pX(1) = 0.2


P(X 2) = pX(1) + pX(2) = 0.2 + 0.3 = 0.5, or P(X 2) = FX(2) = 0.5


P(X > 3) = pX(3) + pX(4) = 0.4 + 0.1 = 0.5,

or P(X > 3) = 1 – P(X 2) = 1 – FX(2) = 0.5


P(2 X 3) = pX(2) + pX(3) = 0.3 + 0.4 = 0.7


Task 2. The right-hand panel of the figure below shows the cumulative

distribution function, FX(x), of a discrete random variable, X.   Use the left- hand panel to sketch the probability mass function, pX(x), of X.

What is the range space of X?

Task 3. The discrete random variable X has range space RX = {1, 2,

3, 6} and a probability mass function with the following form on RX:

pX(x) = k/x, x = 1, 2, 3, 6.

(a) For what value of k is pX(x) a valid probability mass function?

Require:

i.e.

i.e.

i.e.

pX(1) + pX(2) + pX(3) + pX(6) = 1

k/1 + k/2 + k/3 + k/6 = 1

2k = 1

k = ½

With k = ½ , the values of the probability mass function are ½, ¼, 1/6 and 1/12 so they satisfy the second validity condition, that 0 pX(x) 1.

(b) Find the cumulative distribution function, FX(x), of X.

(0,

|

|

|1,

x < 1

1 x < 2

2 x < 3

3 x < 6

6 x

Discrete random variables: expected value and variance

Task 4. Try this task without looking at the lecture notes!

(a) Write down the definition of the expected value E(X) of a discrete random variable X.

E(X) = x .pX (x)

xRX

(b) What is the formula for computing E{g(X)}?

E g(X) = g(x).pX (x)

xRX

(c) How is the variance, Var(X), of a discrete random variable X defined?

Var(X) = E (X )2 , where = E(X)

It is often simpler to use the equivalent formula:

Var(X) = E(X2 ) (E(X))2

Task 5. Consider  a  discrete  random variable X with  the following

probability mass function:

0. 1,

0.4, pX (x) =

0.3,

0.2,

x = 0

x = 2

x = 3

x = 4

(a) Compute the expected value of the random variable X.

E(X) = (0 0 1) + (2 0 4) + (3 0 3) + (4 0 2) = 2.5

(b) Compute the variance of the random variable X.

E(X2) = (02 0. 1) + (22 0.4) + (32 0.3) + (42 0.2) = 7.5

Var(X) = E (X2 ) (E(X))2 = 7.5 (2.5)2 = 1.25

(c) Compute E(X − 2).

E{|X – 2|} = (|0 – 2|0. 1)+(|2 – 2|0.4)+(|3 – 2|0.3)+(|4 – 2|0.2) = 0.2 + 0 + 0.3 + 0.4 = 0.9

Task 6. 100 buses drive children to a leisure centre.  50 buses carry

60 children each, so they are overcrowded.  20 buses carry 40 children each, and the remaining 30 buses carry only 10 children each. Two safety inspectors, who do not know the above numbers, want to find out about any overcrowded buses.

You may assume that, if asked, children and bus drivers will report the true number of children on their bus.

(a) Inspector 1 asks a randomly-selected bus driver how many children were on his or her bus. Denote by X the number reported by the driver. Find the probability mass function and expected value of X.

50 bus drivers (out of 100) report 60 children, 20 (out of 100) report 40 children and 30 (out of 100) report 10 children. So, the probabilities that a randomly-selected bus driver reports the value 60 40 and 10

(respectively) are 50/100 , 20/100 and 30/100 .

The probability mass function of X is, therefore:

x 10 40 60

So E(X) = (10 0.3) + (40 0.2) + (60 0.5) = 41.


(b) Inspector 2 asks a randomly-selected child how many children were on his or her bus.  Denote by Y the number reported by the child.  Find the probability mass function and expected value of Y.

Total number of children = (50 60) + (20 40) + (30 10) = 4100.

3,000 children (out of 4,100) report 60 children, 800 (out of 4,100) report 40 children and 300 (out of 4,100) report 10 children. So, the probabilities that a randomly-selected child reports the value 60, 40

and 10 (respectively) are 3000/4100 , 800/4100 and 300/4100 .

The probability mass function of Y is, therefore:

y 10 40 60

py(y) 3/41 8/41 30/41

So E(Y) = (10 3/41) + (40 8/41) + (60 30/41) = 2150/41 = 52.44.