You are on page 1of 38
_ RANDOM VARIABLES 2 AND PROBABILITY 7 DISTRIBUTIONS 2.1 Concept of a Random Variable t An experiment’ is ‘a' process by which observations ‘or measurements are obtained. “Experiments in which outcomes vary from trial to trial are called random experiments. The " individual outcomes of a random experiment’are called sample points. All possible outcomes comprise-a set, which we have called the sample space. e Generally, we are not interested in the details associated with each sample\ point but only in some number associated with these points. For example, when a coin is tossed three times there are 28 = 8 possible outcomes and, therefore, 8 sample points in the sample space, viz, Q = {1HH, HHT, HTH, THH, HTT, THT, TTH, TTT}. If we are interested in the number of heads that fall, then a numerical value of 0, 1, 2 or 3-will be assigned to each sample point. Such a numerical quantity whose value is determined by the outcome of an experiment of chance is known as a random variable or stochastic variable. Since ‘associating a number with each sample point of a sample space’ is mérely another ‘way of saying that we are ‘defining a function over the points of.a sample space’, we have the following formal definition. c Definition If Q is a. sample space with a probability measure and X is a real-valued function defined over the elements of ©, then X is called a random variable (r.v.). We shall use capital letter X or Y to denote a rv. and lower case letter x or y to denote a value of the rv. Xor Y. 50 Theory of Statistics Example 2.1 A die is rolled three times. Let the random variable X represént the number of aces (one-spot) obtained in the ‘three rolls. If getting an ace is defined as success denoted by S and getting a non-ace as failure denoted by F, then there are eight points in the sample space. The elements of the sample space “and the corresponding values of the random variable X are shown in Table 2.1. j Table 2.1. Sample Point | SSS| SSF'| SFS| FSS| SFF'| FSF| FFS| FFF x 3[2[2[2{[i1]1]14] 0 Ar.v. which takes on a finite or countably infinite number of values is called a discrete random variable while a r.v. which takes on a noncountably finite number of values is called a continuous random variable. For example, the number of accidents occurring during last year in a city is a discrete r.y. which could assume any of the possible values 0, 1, 2, 3, 4, .... On the other hand, the distance a shell will travel after being fired from a gun is a continuous r.v. which may take on any one of the values in an interval [a, b]. In most practical problems, discrete r.v’s represent count or enumeration data such as the number of books on a shelf or the number of defective items in a lot. On the other hand, continuous r.v’s usually represent measurement data such as the weights of men or distance from one point to another. Example 2.2 A balanced coin is tossed four times. List the elements of the sample space and the corresponding values x of the r.v. X, the total number of heads. Solution Let’ H and T stand for heads and tails respectively. The elements of the sample space are presumed to be equally likely, each with probability +: For example, P(HHHH) = 7 , P(HHHT) = 16° , ] } Random Variables & Probability Distributions 51 PCITTD) = 75. These results are shown in Table 2.2 below: Table 2.2 Element of | HH] tauer] were | enn | rae | arr | wre | arn sample space Probability 3k sl al+ al- ak a a 7 i i6 x 3 3 2 Element of | 7#HT | THTH tm arrr | rare | ert | orem | reer sample space Probability. ag [set tPe [a | 2.2 Discrete Probability Distributions Two of the most. important features of a r.v. are (i) the values it can assume and (ii) the probabilities that are associated with each of these possible values. In the case of tossing a coin three times, the r.v. X, representing the number of heads, assumes the value 2 with probability 3 since 3 of the 8 equally likely sample points result in 2 heads and 1 tail. ~ o oo bo bo [- a a 5 Bk BF 5 i} ° Assuming equal probabilities for the possible outcomes in Table 2.1, we have P (SSS) =, P(SSH) =f, wm PPE) =2. For instaneo, tho probability that no head is obiained is +, ie.P(X=0) = P (FFF) = 4. Tho possible values x of X and their probabilities P (X = x) or P(x) are given in Table 2.3. Table 2.2 | 3 x o - 1 P(X=%) 4 2 | We also use the functional notation f(x) for the probability that the r.v. takes on the value x, that is f(x) = P(X =x). ic oe oe 52 Theory of Statistics Definition If X is a discrete r.v., the function given by f(x) = P(X =x) for each x within the range of X is called the probability function or the probability distribution of X. A probability function (p.f.) may take the form ofa table, a graph, or a mathematical equation. Whatever its form, the p.f. of a discrete r.v. must satisfy the following conditions: . @ fa)20 (i) Tf)=1 where the summation is taken over all possible values of x. Example 2.3 A balanced coin is tossed four times. Find the probability distribution of the number of heads. Solution - Let X bé a random variable whose values x are the possible total number of heads. Four coins can fall in 24 = 16 ways, each with probability 7;. The outcomes in the sample space and the corresponding values of x are shown in Table 2.2. Thus x can be any number from 0 to 4. Then P (X = 3) = 4, sinco three heads can occur in-only four ways. The possible values of x and the corresponding probabilities are listed in Table 2.4 below: Example 2.4 Find a formula for the probability distribution of the number of heads obtained in four tosses of a balanced coin. Solution 4 In Table 2.4, we find that PA = 0) = 7g, P= N=, P= 2 =, P= 3) = and P= 4) =F. It may be noted = Random Variables & Probability Distributions 53 that the numerators of these five fractions, 1, 4, 6, 4 and 1, are th binamint eoeicints(6)).(1).(3).($) ana($). e binomial coefficients oJ i) kad> Kg) and\ 4). Thus the formula for the probability distribution can be written as 4 me) for x=0, 1, 2, 8,4 16 We have represented the p.f. an in both tabular. form and as'a 6 mathematical equation. In Fig. 2.1., the p.f. of Example 2.4 is displayed in its graphical form. Discrete data are often pictured by this type of a bar diagram. The numbers corresponding to the values of the xs are located on the horizontal axis. Probabilities associated with o 12 3 4 the values of x are marked on the Number of heads vertical axis. Above each possible x;, Big at a vertical bar is erected; the height of this bar.represents f(x,). al* Instead of the bar diagram, 6 we more frequently construct rectangles, as in Fig. 2.2. Here the rectangles are constructed so that their bases. of equal width are centred at each x value and their heights are equal to the corresponding probabilities given by f(x). The bases are constructed so as. al al+ to leave no space between the o 12 3 4 rectangles. Fig. 2.2 is called a Number of heads probability histogram. Fig. 2.2 2.3. Cumulative Distribution Function for Discrete Random Variable The cumulative distribution function (c.d.f.) or briefly the distribution function (d.f.) for a r.v. X is defined by P(X sx) =F(x) 54 Theory of Statistics F(x) is the probability that X will assume a value less than or equal to x. As with f(x), x is a real‘ number, i.e. — 00 2 The graph of this cdf. is shown: in Fig. 2.3. Note that at all points of discontinuity the c.d-f. Fig. 2.8 takes on the greater of the two values. Thus the value of the function at W= 1 is % and not 3. We can also obtain the p.f. of a r.v. from its-¢.d.f. For this, we use the following result. Theorem 2.1 If the range of a rv. X consists of the values X) 0, it must satisfy Property (ii) in order to be p.d.f. Now ty fs) de= [" Kewde=-Few | =£ 0 o . o 3, and since this must be equal to 1, we have K= 1 1 (ob) P0.6 0, r=] no ar=[ Bet dt =- es =l-e& ~0 0 0 Since F(x) =0 for x < 0, we can write 0 <0 F@={ji_ex 2% x>0O P(O.5SX<1) =F(l)-F@.5)=(1-e%-(d-e') =e15- e3=0,173 This agrees with the result obtniniod. by using thé ‘p.d.f. directly in Example 2.8. Example 2.10 9 Find a -p.df. for the r.v. whose ghee cdf. is given by 0 xso : : FQ@)= { x O 1, getting 0,1 and 0. Thus we have 0 x<0 ° Fig. 27° f(x) = {: Ol . @ 60 Theory of Statistics a To fill the gaps at x = 0 and x = 1, we let f(0) and (1) both equal zero. Thus, we can write the p.d.f. of the original r.v. as 1 O1 and 01 (Region III of Fig. 2.9) we get lps Fen=f J (+ 0 ds dt =4xte+ D odo For *>1 and y>1 (Region IV of Fig. 2.9) we get 1fl Fen=f [+o dsa=1 Since the joint cdf. is everywhere continuous, the boundaries between any two of these regions can be included in either one, and we have 0 xs0,ys0 wAxy(ety) O1y2z1 Example 2.16 Find the joint p.df. of the two r.v.’s whose joint c.d.f. is given by otherwise Also use the joint p.d.f. to determine P(10,y>0 Solution Partial differentiation yields ae oats? ——. =q Bx dy PY) = 4 aye Random Variables & Probability Distributions 67. for x>0and y > 0 and 0 elsewhere. Thus the joint p.d.f. of X and Yis given by “ey foun [aes * Eewas otherwise 2 2 PUI0, we get F'%, Xp, Xs) “PPT (s+ De ds dt du as 6% (x? =| J qth e«didu oto =3r mG tp -e*) 70' Theory of Statistics For x,>1, 00, we get Ps pl Fy, Xa, ¥)) -f J { (s+ De ds di du otodo. sf (62 yp} [TGs [ae odo ° SPR i : =f" [Gre dt du 2 Pees e du =Fat+yd-e% For 01 and x,>0, we get 2p) psy Fp %p %9) =f" fier ae as ae du 5 pi (x? i =f7f ztrm/ye dt du 2 s(xie fs) “u mh [bear le fees 3 x0? i Ar | -w -["+3)- ee =fareyase™) For x,>1, %>1 and x5>0, we get x fl pl Fy, Xe, 5) =f Fl fier ner ae ded Aff Geile [aa Random Variables & Probability Distributions 71 mE OW =f. G+de dt du a £) uf? -f"(G-4 e | au ara 3) 0 = Ya %q (% + 1) (1 — e*8) x, 21,00 % x, (e+ 1) (1- ee) O0 1-e% x, 21,%,21,*%,>0 2.7 Marginal Distributions From the joint probability distribution of the r.v.’s X and Y, we.can find the probability distribution of X alone or that of Y alone. Such probability distributions are called marginal probability distributions. Definition If X and Y are discrete r.v.’s and fe, y) is their joint p.f, the function given by &(x) =Ehe » probability function of X. Correspondingly, the function given by h@)=ZI@»” for each y within the range of Yis called the marginal probability function of Y. | for each x within the range of X is called the marginal When X and Y are continuous r.v.’s the p.f.’s are replaced | by p.d.f’s, the summations are replaced by integrals, and we | have the following result. 72 Theory of-Statistics Definition’ If X and Y are cantiriuous’1 nv.’s and f(x, y) is their joint p.d.f., the function given by. a=" rea 0 << 00 is called the marginal probability density function of X. Correspondingly, the function given by : n=) fe. dx. -= of the probability distribution of X. Similarly, the row totals are the values - 2 h(y)= = f@,»” + fory=0, 1,2 sso . of the probability distribution of Y. X ‘ Random Variables & Probability Distributions 73 0 1 2 Total | 1 ix a a | 6 3 iz iz 2 be x 3 3 is a 2 36 38 Example 2.20 If the joint p.d.f. of X and Y is given by _f%Oxty) O0 Ay, Xa) Hd) = { 0 otherwise find the joint marginal p.d.f. of X, and X, and the marginal p.d.f. of X, alone. Random Variables & Probability Distributions 75 Solution The joint marginal p.d.f. of X, and X; is given by 1 : mx, x) = f (x, + xe? diy = (x, + We? _f@ + we 00 Thus mex x)= { 0 otherwise The marginal p.d.f. of X, alone from m(w;, x3), is given by 0 fl © a0) =] PF foei se 29 dey aeg= J mcs 29 a ° t) -». 1 PloeJersarn 1 = 01,00 oO FQ, Xa, 9) = otherwise The marginal p.d.f’s of X;, Xp and X, are: ofl ge) -f" f. ( + x.) e* dy divs 7 - - =| (+ We? dea=m +3 oO 80 Theory of Statistics ol 8%) -f" i (e+ xe * dx, drs ° 1). 1 -[orteras-loo) ¥ s0o-J fiom eran : [iGo fJeranees Thus we have _ pet” O0 sea={5 otherwise sey seaeed=(a+4) (n+g)e* Since f(x), x2, Xs) # 8(%,) 8x2) g(xg), the r.v.’s X,, X, and X, are not independent. The joint p.d.f.’s of X, and X, and of X, and X; are , —% 1) -5 mM (x, ¥3) = athe dy, =(x, +9 Je Ae 2 1\ + méiesd=f ivesve™des=(e8)e™ Thus we have ~f@+%)e* O0 mee a= { 5" otherwise . _ + Ae O0 m py Xs) = { 0 otherwise. Random Variables & Probability Distributions 81 8) 8) =(% +4) e* Since m (x, x) =g (x,) g(x), X, and X, are independent. 12 a) -ad=(v+4)¢ 7 Since m(xo, x3) = 8(%2)*8@%s), Xs and X, are independent. Example 2.27 The joint p.d.f. of two continuous rv.’s X and Vis _ pyle 0<"<4,1

You might also like