statistik topic7 probability distribution of random variable

15
INTRODUCTION We have introduced concepts and rules of probability in Topic 6. The probability of defined events from a given sample space S, as well as generated compound events have been discussed extensively. We have learned several important points as follows: (a) an event can be defined directly from a sample space S, and compound event can then be generated by using set operations. (b) a sample space S, comprises of simple events whose probabilities total up to 1. (c) a random statistical experiment produces an equiprobable sample space S, whereby each simple event has equal probability to occur. (d) probability of defined event from S can be obtained directly from the given definition. (e) probability for compound events can be obtained by using additive rules or multiplicative rules. T T o o p p i i c c 7 7 Probability Distribution of Random Variable LEARNING OUTCOMES By the end of this topic, you should be able to: 1. explain the concept of discrete and continuous random variables; 2. construct probability distribution of random variables; 3. calculate probability involving discrete and continuous distributions; and 4. estimate mean, variance and standard deviation of both types of distributions.

Upload: anas-assayuti

Post on 05-Dec-2014

2.021 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Statistik topic7 probability distribution of random variable

INTRODUCTION

We have introduced concepts and rules of probability in Topic 6. The probability of defined events from a given sample space S, as well as generated compound events have been discussed extensively. We have learned several important points as follows: (a) an event can be defined directly from a sample space S, and compound

event can then be generated by using set operations. (b) a sample space S, comprises of simple events whose probabilities total up to 1. (c) a random statistical experiment produces an equiprobable sample space S,

whereby each simple event has equal probability to occur. (d) probability of defined event from S can be obtained directly from the given

definition.(e) probability for compound events can be obtained by using additive rules or

multiplicative rules.

TTooppiicc 77 ProbabilityDistribution of RandomVariable

LEARNING OUTCOMES

By the end of this topic, you should be able to:

1. explain the concept of discrete and continuous random variables;

2. construct probability distribution of random variables;

3. calculate probability involving discrete and continuous distributions; and

4. estimate mean, variance and standard deviation of both types of distributions.

Page 2: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 109

Consider the experiment of tossing a fair Malaysian coin twice. Its sample space is S = {GG, GN, NG, NN} which comprises of simple events {GG}, {GN}, {NG} and {NN}; each with probability of occurrence equal to (1/2)(1/2) or 0.25. As for random experiment, the simple event is unpredictable. Suppose we are interested to know the number of picture(s) appearing in the outcome of the experiment, then we have the set of numbers {2, 1, 1, 0} as one-to-one mapping with the sample space, S. We can further assign these numbers to a variable X which will be called a random variable. Thus, we can have for example event X with value 2 or equivalently we can write{X =2} which is equivalent to or representing the outcome {GG}. Using variable X in such representation will enhance mathematical operation and numerical calculation involving events and sample space in finding the probability distribution of X, mean and variance.

The random variable X is of type discrete if it possesses integer values as in the above example. The random variable X is considered continuous type if it cannot take integer value per say but fraction values or number with decimals. As an example, X may represent time (in hour) taken to browse internet daily for three consecutive days in a week. It may have values {2.1, 2.5, 3.0}. We will make further discussion on random variable shortly.

PROBABABILITY DISTRIBUTION OF DISCRETE RANDOM VARIABLE

Capital letter such as X or Y are used to identify the variable. Accordingly, the small letters such as x or y will be used to represent their respective unknown

7.1

A discrete random variable can take or be assigned an integer value or whole number. Usually its value is obtained through counting process.

1. Allow a family member in a house to independently watch the 8 o’clock news via TV1, TV2 or TV3. There are 5 members of the family who are interested to watch the news. Suppose random variable X represents the number of the family that choose TV1. Is random variable X of the type discrete?

2. Consider the above family again; let Y represents the weight of the family members. Is Y a continuous random variable?

Page 3: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 110

value. It is important to define clearly what represents the variable, so that its possible values can be determined correctly. The Table 7.1 below shows some examples of discrete random variable.

Table 7.1: Examples of Discrete Random Variable

X , Representing Possible Values of X

(a) Number of dots that appear when a dice is thrown. 1, 2, 3, 4, 5, 6

(b) Number of G appears when two Malaysian coins are tossed together.

0, 1, 2

(c) Sum of the numbers of dots that appear on the pair of faces when two dice are thrown together.

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12

As can be seen from the table, the variable X is not just a variable but it represents some events in the experiment, whereby any possible value that X takes is actually equivalent to a certain event resulting from the experiment. Consider case (b) in Table 7.1, the sample space of the experiment is S = {GG, GN, NG, NN}. Then (X = 2), or we say “X takes value 2” is equivalent to the actual event {GG} and so forth. With this equivalency, we can consider that (X = 2) as an event which possesses probability of occurrence Pr(X=2). Through this equivalency, we have equality in probability, Pr(X=2) = Pr (GG) = (1/2)(1/2) = ¼.

Table 7.2 shows an intermediate step before calculating the probability distribution of X.

Table 7.2: Equivalency of Events X and Actual Events of Experiment

Values of X The Equivalent Events Pr(X = x)

(X = 2) {GG} Pr(X = 2) = Pr(GG) = (1/2)(1/2) = ¼

(X = 1) {GN } , or {NG} Pr(X = 1) = Pr(GN) + Pr(NG) = ¼ +1/4 = ½

(X = 0) {NN} Pr(X = 0) = Pr(NN) = (1/2)(1/2) = ¼

We then have probability distribution for all possible values of X as given in Table 7.3 below.

Table 7.3: Probability Distribution of X

Values of X (=x) 2 1 0 Sum

Pr(X=x) = p(x) ¼ ½ ¼ 1

Page 4: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 111

From the above example, we have two important rules given below.

Probability Rules for Discrete Distribution

The distribution table and the probability function p(x) should fulfil the following rules:

Example 7.1

Let X be the random variable representing the number of girls in families with 3 children.(a) If such family is selected at random, what are the possible values of X? (b) Construct a table of probability distribution of all possible values of X.

Solution

(a) The selected family may have all girls, all non-girls (all boys) or some combinations of girls and boys; so the possible sample space is

S = {GGG, GGB, GBG, BGG, BBG, BGB, GBB, BBB} Where G: Girl; B: Boy.

The possible values of X as per outcome of the experiment:

Events Outcomes GGG GGB GBG BGG BBG BGB GBB BBB

Possible Values of X 3 2 2 2 1 1 1 0

Thus we have the set of possible values of X is {3, 2, 1, 0}.

Rule 1 : For all values of X, the probability value Pr(X = x) is fraction between 0 and 1 (inclusive).

Rule 2 : For all values of X, the total probabilities are equal to 1.

Page 5: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 112

(b) Equivalency of events and probabilities:

Values of X The Equivalent Events Pr(X = x)

(X = 3) {GGG} Pr(X = 3) = Pr(GGG) = (1/2)(1/2)(1/2) = 1/8

(X = 2) {GGB}, or {GBG}, or {BGG}

Pr(X = 2) = Pr(GGB)+Pr(GBG)+Pr(BGG) = 1/8 + 1/8 + 1/8 = 3/8

(X = 1) {GBB}, or {BBG}, or {BGB}

Pr(X = 1) = Pr(GBB)+Pr(BBG)+Pr(BGB) = 1/8 + 1/8 + 1/8 = 3/8

(X = 0) {BBB} Pr(X = 0) = Pr(BBB) = (1/2)(1/2)(1/2) = 1/8

The probability distribution of X is

Table 7.4: Probability Distribution of X

Values of X (=x) 3 2 1 0 Sum

Pr(X=x) 1/8 3/8 3/8 1/8 1

THE MEAN AND VARIANCE OF A DISCRETE PROBABILITY DISTRIBUTION

The mean of a random variable X with its discrete probability distribution is given by

)Pr(

)Pr(...)Pr()Pr()(

1

2211n

iii

nn

xXx

xXxxXxxXxXE

Formula 7.1

7.2

ACTIVITY 7.1

With regard to the random variable X of case (a) in Table 7.1, construct a probability distribution table of X.

Page 6: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 113

Where

nxxx ,...,, 21 are all possible values of x which make the probability distribution well defined, and )Pr(),...,Pr(),Pr( 21 nxXxXxX are the corresponding probabilities.

Example 7.2

Find the mean of the number of girls (G) in the distribution given in Example 7.1.

Solution

Using Formula 7.1, the mean is given by

)Pr(xx = 3(1/8) + 2(3/8) + 1(3/8) + 0(1/8) = 12/8 = 1.5

This number 1.5 cannot occur in practice, however in long run we can say that any typical family randomly selected will have 2 girls.

Example 7.3

In a Faculty of Business, the following probability distribution was obtained for the number of students per semester taking Introductory Statistics course. Find the mean of this distribution.

Number of Students (x) 10 12 14 16 18

Probability, Pr(X=x) 0.10 0.15 0.30 0.25 0.20

Solution

Using Formula 7.1, the mean is given by

)Pr(xx = 10(0.10) + 12(0.15) + 14(0.30) + 16(0.25) + 18(0.20) = 14.6

Page 7: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 114

In general we can say that about 15 students would normally take the course.

The variance and standard deviation of the distribution is given by one of the following formulas:

(a) Variance

)Pr()(1

22i

n

i xXx , Or

Formula 7.2

(b) Variance

2

1

22 )Pr( i

n

i xXx

Formula 7.2(a)

(c) Standard deviation is given by

2

Formula 7.2(b)

Example 7.4

Find the variance and standard deviation of the number of girls (G) in the distribution given in Example 7.1.

Solution

We will use both formulas for comparison purpose. With the mean 1.5, and using Formula 7.2, the variance is given by

)Pr()(1

22i

n

i xXx

= (3-1.5)2(1/8) + (2-1.5)2(3/8) + (1-1.5)2(3/8) + (0-1.5)2(1/8) = 0.75, or ¾

Page 8: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 115

Using Formula 7.2a, we have:

)Pr(...)Pr()Pr()Pr( 4242

221

21

4

0

2 xXxxXxxXxxXx ii

= 32(1/8) + 22(3/8) + 12(3/8) + 0(1/8) = 24/8 = 3. variance, 2 3 – (1.5)2 = 0.75, or ¾.

The standard deviation is, 2 75.0 =0.866

In practice, the Formula 7.2a is much easier to be used in finding variance simply because it does not involve subtraction.

We have just shown that probability distribution of random variable X can be displayed via table whereby the probabilities are distributed among all values of X. In this table, each value of x is paired with its probability of occurrence. Probability distribution in tabular form can be sought in one of the following two ways:

(a) When the random variable X is defined from a given sample space S of a particular experiment, as in Example 7.1.

(b) When the sample space S of an experiment is not given, but a function p(x) for some discrete values of random variable x is defined. In this case, the function p(x) has to comply with Rule 1, and Rule 2 as mentioned above.

Example 7.5

Let a function of random variable X is given by expression:

p(x) = kx, x = 1, 2, 3, 4,5

(i) Obtain the value of constant k,(ii) Form the table of probability distribution of X,

(iii) Is p(x) complying with rules of probability distribution?

(iv) Find the mean, and variance of the distribution.

Page 9: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 116

Solution

(i) Observe that the possible values of x are discrete (integer).

(ii) The function p(x) should comply with Rule 2 whereby

Sum of all probabilities = 1,

p(1) + p(2) + p(3) + p(4) + p(5) = 1,

1.k + 2.k + 3.k + 4.k + 5k = 1,

15k = 1,

k = 1/15. Where p(3) = 3 k = 3k, etc

Then the table of probability distribution of X is

Values of x 1 2 3 4 5 Sum

p(x) 1/15 2/15 3/15 4/15 5/15 1

(iii) Yes, for Rule 1: For each value of x, p(x) is in the interval 0 p(x) 1, and, the probabilities for all values of x is summed up to 1.

(iv) The mean, from Formula 1 we have

)Pr(xx =1(1/15) + 2(2/15) + 3(3/15) + 4(4/15) + 5(5/15) = 11/3 3.67

E(X2) = )Pr(1

2i

n

i xXx

= 12(1/15) + 22(2/15) + 32(3/15) + 42(4/15) + 52(5/15) = 15

From Formula 7.2a, the variance is given by

2 15 – (11/3)2 = 14/9 1.56,

Standard deviation, 2 1.25

Page 10: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 117

PROBABILITY DISTRIBUTION OF CONTINUOUS RANDOM VARIABLE

A continuous random variable (as abbreviated by cts r.v.), X takes value in interval form as given in Table 7.5 below. Let random variable X represent the one hour lecture time, then it can take any value in the interval of 50.0 to 60.0 minutes. So, it is best to write the event X by taking any value in this interval as (50.0 X 60.0). Accordingly, we can write the probability of this event as Pr(50.0 X 60.0). As such, X can take an exact value with zero probability. Thus e.g. Pr(X = 51.0 minutes) = 0. In such a case, a possible define event with positive probability is (52.0 X 56.0).

Table 7.5: Examples of Continuous Random Variable

Cts r.v. X Representing Events Possible Range of Values

(a) Weights of Form 5 students 27.0 to 32.0 Kg

(b) Measurements of ladys’ shoe marked ‘size 8’ 24.0 to 25.0 cm

(c) Waiting time for arrival of bus 20.0 to 30 minutes

(d) Approximately one hour lecture session 50.0 to 60.0 minutes

In general, let a probability function f(x) is defined for x in the interval a x b with a b. Then for an event (c X d) with a c d b, its probability is given by:

7.3

ACTIVITY 7.2

1. Given below are probability functions of a discrete random variable X,(a) p(x) = kx, x = 1, 2, 3, 4, 5, 6. (b) p(x) = kx(x - 1), x = 1, 2, 3, 4, 5.

2. Obtain the mean, variance, and standard deviation of the following probability distribution of a discrete random variable X.

X = x 1 2 3 4

p(x) 0.1 0.2 0.4 0.3

Page 11: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 118

Pr(c x d) = d

c

dxxf )(

Formula 7.3

Probability Rules for Continuous Distribution

The probability function f(x) should fulfil the following rules:

Example 7.6

A continuous random variable X has probability function as defined below:

others

xkxf

0

31)(

Find the value of constant k, and then obtain probability of the following events:

(a) (1.5 X 2.5)

(b) (X 2.5).

(c) (X > 2.5).

Solution

As the probability function should fulfil Rule 4 of continuous distribution, thus we have

3

1

)( dxxf = 1, 3

1

31xkdxk = 1; k = 1/2.

Rule 3 : f(x) 0, for all x in the interval a x b,

Rule 4 :b

a

dxxf )( = 1, for all x in the interval a x b.

Page 12: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 119

(a) Pr(1.5 X 2.5) = 5.2

5.1

5.25.1)5.0()2/1( xdx = 0.5,

(b) The event ( X 2.5) is equivalent to event (1 X 2.5).

Pr(1 X 2.5) = 5.2

1

5.21)5.0()2/1( xdx = 0.75

(c) By complement,

Pr(X > 2.5) = 1 – Pr(X 2.5) = 1 – 0.75 = 0.25.

THE MEAN AND VARIANCE OF A CONTINUOUS PROBABILITY DISTRIBUTION

The mean of a continuous probability distribution is defined as expectation of X, and given by:

dxxfxXE )()(

Formula 7.4

The variance of a continuous probability distribution is given by

222 )(XE

Formula 7.5 Where

dxxfxXE )()( 22

Formula 7.6

7.4

Page 13: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 120

Example 7.7

Find the mean and variance of the continuous distribution given in Example 7.6. Solution

The probability function is given by

others

xkxf

0

31)(

with constant k = 0.5

The mean is given by dxxfxXE )()( = (0.5)3

1

2

2x = 2.0

The variance is obtained as follows:

dxxfxXE )()( 22 =(0.5)3

1

3

3x =13/3 4.33,

222 )(XE = 13/3 – 4 = 1/3.

Standard deviation = 2 0.58

Example 7.8

Find the mean and variance of the continuous distribution given bellow:

others

x

0

0 < x < 48

f(x)

Page 14: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 121

Solution

The mean is given by

322

38

838

08

0

4

0

34

0

4

4

0

0

xdxxx

dxdxxxdxdxxfxXE

The variance is obtained as follows:

4

0

4

0

422

848)( xdxxxXE = 8,

Variance = 222 )(XE = 8 – (64/9) = 8/9 0.89.

Standard deviation = 2 0.94.

Page 15: Statistik topic7 probability distribution of random variable

TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE 122

We have learnt two types of random variables in this topic. The discrete random variable owns integer or whole number values. Its distribution is called discrete probability distribution which should comply with the Rule 1 and Rule 2. There are two ways of obtaining this distribution by either a direct defining random variable X from the sample space S or from a given probability function p(x). The other type of random variable owns non-integer values but numbers with decimals. This variable is of the continuous type whose distribution is called continuous probability distribution. The only way of obtaining continuous distribution is via density function f(x) which should comply with the Rule 1 and Rule 2 of continuous distribution. Finding probability, mean and variance of discrete distribution involve summation, whereas for continuous type involve integration.

ACTIVITY 7.31. A continuous random variable X has probability function as defined

below:

others

xkxf

0

40)8/()(

Find the value of k and the probability of: (a) ( X 2), (b) ( X > 2). (c) Obtain mean, variance and standard deviation.

2. A continuous random variable X has probability function as defined below:

others

xkxxf

0

41)(

2

Find the value of k and the probability of: (a) ( 1.5 X 2.5), (b) ( X 3.0). (c) Obtain mean, variance and standard deviation.