Like this document? Why not share!

# Statistik topic7 probability distribution of random variable

## by Anas Assayuti, jurujual at BerkatJaya Niaga Enterprise on Dec 09, 2011

• 826 views

### Views

Total Views
826
Views on SlideShare
826
Embed Views
0

Likes
0
29
0

No embeds

## Statistik topic7 probability distribution of random variableDocument Transcript

• Topic 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. INTRODUCTIONWe have introduced concepts and rules of probability in Topic 6. The probabilityof defined events from a given sample space S, as well as generated compoundevents have been discussed extensively. We have learned several important pointsas 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.
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 109Consider the experiment of tossing a fair Malaysian coin twice. Its sample spaceis 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 forrandom experiment, the simple event is unpredictable. Suppose we are interestedto 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 thesample space, S. We can further assign these numbers to a variable X which willbe called a random variable. Thus, we can have for example event X with value2 or equivalently we can write{X =2} which is equivalent to or representing theoutcome {GG}. Using variable X in such representation will enhancemathematical operation and numerical calculation involving events and samplespace 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 theabove example. The random variable X is considered continuous type if it cannottake integer value per say but fraction values or number with decimals. As anexample, X may represent time (in hour) taken to browse internet daily for threeconsecutive days in a week. It may have values {2.1, 2.5, 3.0}. We will makefurther discussion on random variable shortly. 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?7.1 PROBABABILITY DISTRIBUTION OF DISCRETE RANDOM VARIABLE A discrete random variable can take or be assigned an integer value or whole number. Usually its value is obtained through counting process.Capital letter such as X or Y are used to identify the variable. Accordingly, thesmall letters such as x or y will be used to represent their respective unknown
• 110 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLEvalue. It is important to define clearly what represents the variable, so that itspossible values can be determined correctly. The Table 7.1 below shows someexamples 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 0, 1, 2 are tossed together. (c) Sum of the numbers of dots that appear on the pair 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 of faces when two dice are thrown together.As can be seen from the table, the variable X is not just a variable but it representssome events in the experiment, whereby any possible value that X takes isactually 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 eventwhich possesses probability of occurrence Pr(X=2). Through this equivalency, wehave equality in probability, Pr(X=2) = Pr (GG) = (1/2)(1/2) = ¼.Table 7.2 shows an intermediate step before calculating the probabilitydistribution 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 inTable 7.3 below. Table 7.3: Probability Distribution of X Values of X (=x) 2 1 0 Sum Pr(X=x) = p(x) ¼ ½ ¼ 1
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 111From the above example, we have two important rules given below.Probability Rules for Discrete DistributionThe distribution table and the probability function p(x) should fulfil the followingrules: 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.Example 7.1Let X be the random variable representing the number of girls in families with 3children.(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}.
• 112 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE(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 Pr(X = 2) = Pr(GGB)+Pr(GBG)+Pr(BGG) {BGG} = 1/8 + 1/8 + 1/8 = 3/8 (X = 1) {GBB}, or {BBG}, or Pr(X = 1) = Pr(GBB)+Pr(BBG)+Pr(BGB) {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 ACTIVITY 7.1 With regard to the random variable X of case (a) in Table 7.1, construct a probability distribution table of X.7.2 THE MEAN AND VARIANCE OF A DISCRETE PROBABILITY DISTRIBUTIONThe mean of a random variable X with its discrete probability distribution isgiven by E( X ) x1 Pr( X x1 ) x 2 Pr( X x 2 ) ... x n Pr( X xn ) n xi Pr( X xi ) i 1 Formula 7.1
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 113Where x1 , x 2 ,..., x n are all possible values of x which make the probability distribution well defined, and Pr( X x1 ), Pr( X x 2 ),..., Pr( X x n ) are the corresponding probabilities.Example 7.2Find the mean of the number of girls (G) in the distribution given in Example 7.1.SolutionUsing Formula 7.1, the mean is given by x Pr(x) = 3(1/8) + 2(3/8) + 1(3/8) + 0(1/8) = 12/8 = 1.5This number 1.5 cannot occur in practice, however in long run we can say thatany typical family randomly selected will have 2 girls.Example 7.3In a Faculty of Business, the following probability distribution was obtained forthe number of students per semester taking Introductory Statistics course. Find themean 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.20SolutionUsing Formula 7.1, the mean is given by x Pr(x) = 10(0.10) + 12(0.15) + 14(0.30) + 16(0.25) + 18(0.20) = 14.6
• 114 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLEIn 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 thefollowing formulas:(a) Variance n 2 ( xi ) 2 Pr( X xi ) , Or 1 Formula 7.2(b) Variance n 2 xi2 Pr( X xi ) 2 1 Formula 7.2(a)(c) Standard deviation is given by 2 Formula 7.2(b)Example 7.4Find the variance and standard deviation of the number of girls (G) in thedistribution given in Example 7.1.SolutionWe will use both formulas for comparison purpose. With the mean 1.5, and usingFormula 7.2, the variance is given by n 2 ( xi ) 2 Pr( X xi ) 1 = (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 ¾
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 115Using Formula 7.2a, we have: 4 xi2 Pr( X xi ) x12 Pr( X x1 ) 2 x2 Pr( X 2 x2 ) ... x4 Pr( X x4 ) 0 = 32(1/8) + 22(3/8) + 12(3/8) + 0(1/8) = 24/8 = 3. variance, 2 3 – (1.5)2 = 0.75, or ¾. 2The standard deviation is, 0.75 =0.866In practice, the Formula 7.2a is much easier to be used in finding variance simplybecause it does not involve subtraction.We have just shown that probability distribution of random variable X can bedisplayed via table whereby the probabilities are distributed among all values ofX. 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 twoways:(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.5Let 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.
• 116 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLESolution(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, etcThen 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 x Pr(x) =1(1/15) + 2(2/15) + 3(3/15) + 4(4/15) + 5(5/15) = 11/3 3.67 n E(X2) = xi2 Pr( X xi ) 1 = 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, 2 Standard deviation, 1.25
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 117 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.37.3 PROBABILITY DISTRIBUTION OF CONTINUOUS RANDOM VARIABLEA continuous random variable (as abbreviated by cts r.v.), X takes value ininterval form as given in Table 7.5 below. Let random variable X represent theone hour lecture time, then it can take any value in the interval of 50.0 to 60.0minutes. 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 asPr(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 withpositive 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 minutesIn general, let a probability function f(x) is defined for x in the interval a x bwith a b. Then for an event (c X d) with a c d b, its probability isgiven by:
• 118 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE d Pr(c x d) = f ( x)dx c Formula 7.3Probability Rules for Continuous DistributionThe probability function f(x) should fulfil the following rules: Rule 3 : f(x) 0, for all x in the interval a x b, b Rule 4 : f ( x)dx = 1, for all x in the interval a x b. aExample 7.6A continuous random variable X has probability function as defined below: k 1 x 3 f ( x) 0 othersFind 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).SolutionAs the probability function should fulfil Rule 4 of continuous distribution, thus wehave 3 3 3 f ( x)dx = 1, k dx k x 1 = 1; k = 1/2. 1 1
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 119 2.5 2.5(a) Pr(1.5 X 2.5) = (1 / 2) dx (0.5) x 1.5 = 0.5, 1.5(b) The event ( X 2.5) is equivalent to event (1 X 2.5). 2.5 2.5 Pr(1 X 2.5) = (1 / 2) dx (0.5) x 1 = 0.75 1(c) By complement, Pr(X > 2.5) = 1 – Pr(X 2.5) = 1 – 0.75 = 0.25. 7.4 THE MEAN AND VARIANCE OF A CONTINUOUS PROBABILITY DISTRIBUTIONThe mean of a continuous probability distribution is defined as expectation ofX, and given by: E( X ) x f ( x)dx Formula 7.4The variance of a continuous probability distribution is given by 2 E( X 2 ) 2 Formula 7.5Where E( X 2 ) x2 f ( x)dx Formula 7.6
• 120 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLEExample 7.7Find the mean and variance of the continuous distribution given in Example 7.6.SolutionThe probability function is given by k 1 x 3 f ( x) 0 otherswith constant k = 0.5 3 x2The mean is given by E( X ) x f ( x)dx = (0.5) = 2.0 2 1The variance is obtained as follows: 3 2 2 x3 E( X ) x f ( x)dx =(0.5) =13/3 4.33, 3 1 2 2 2 E( X ) = 13/3 – 4 = 1/3. 2Standard deviation = 0.58Example 7.8Find the mean and variance of the continuous distribution given bellow: x 0<x<4 8 f(x) 0 others
• TOPIC 7 PROBABILITY DISTIBUTION OF RANDOM VARIABLE 121SolutionThe mean is given by 0 4 x E X x f x dx 0dx x dx 0dx 0 8 4 4 3 4 x x 8 2 x dx 2 0 8 3 8 0 3 3The variance is obtained as follows: 4 4 2 2 x x4 E( X ) x dx = 8, 0 8 4 8 0 2Variance = E( X 2 ) 2 = 8 – (64/9) = 8/9 0.89. 2Standard deviation = 0.94.
• 122 TOPIC 7 PROBABILITY DISTRIBUTION OF RANDOM VARIABLE ACTIVITY 7.3 1. A continuous random variable X has probability function as defined below: (k / 8) 0 x 4 f ( x) 0 others 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: kx 2 1 x 4 f ( x) 0 others 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.We have learnt two types of random variables in this topic. The discrete randomvariable owns integer or whole number values. Its distribution is called discreteprobability distribution which should comply with the Rule 1 and Rule 2. Thereare two ways of obtaining this distribution by either a direct defining randomvariable X from the sample space S or from a given probability function p(x). Theother type of random variable owns non-integer values but numbers withdecimals. This variable is of the continuous type whose distribution is calledcontinuous probability distribution. The only way of obtaining continuousdistribution is via density function f(x) which should comply with the Rule 1 andRule 2 of continuous distribution. Finding probability, mean and variance ofdiscrete distribution involve summation, whereas for continuous type involveintegration.