random variables pr obability...

23
Random Variables and Pr obability Distributions J."/ Concept af a Random Variable The field of statistids is concerned with making inferences about populations and pop-ulation- qhar.actffistics. Experiments are'ioiiducied with results that 'are subject to chance. The testing of a number of electronic components is an example of a statistical experiment, a term that is used to describe any process by which several chance observations are generated. It is often very important *) tg allocata".a nuqerical description !9 the outcome. For example, the sample space giving a detailed description of each possible outcome when three elec- t1o-9jc_.qppponents are tested may be written 5: {NNN, NND, NDN, DNN, NDD, DND' DDN,,DDD\, ' - . I,r where N denotes "nondefective" and D denotes "defecti#.n'One is naturally concerned with the number of defectives that occur. Thus each point in the sample space will be assigned a numericsl value of 0, I, 2, or 3. These values are, of course, random quantities determined by the outcome of iei*priiilinf. fn*y *"y be viewed as values assumed by the random uariable' X, the number gi-Ce,{ectivg items when three electronic components are tested. 4 j

Upload: others

Post on 29-Aug-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

ility

/3 of, alsoI thatge orbronerb and

; howf 3 of

l greench ballilraw is

3 defec-purchasehe defec-

Random Variables andPr obability Distributions

J."/ Concept af a Random Variable

The field of statistids is concerned with making inferences about populationsand pop-ulation- qhar.actffistics. Experiments are'ioiiducied with results that

'are subject to chance. The testing of a number of electronic components is anexample of a statistical experiment, a term that is used to describe any processby which several chance observations are generated. It is often very important

*) tg allocata".a nuqerical description !9 the outcome. For example, the samplespace giving a detailed description of each possible outcome when three elec-t1o-9jc_.qppponents are tested may be written

5: {NNN, NND, NDN, DNN, NDD, DND' DDN,,DDD\, '

- . I,r

where N denotes "nondefective" and D denotes "defecti#.n'One is naturallyconcerned with the number of defectives that occur. Thus each point in thesample space will be assigned a numericsl value of 0, I, 2, or 3. These valuesare, of course, random quantities determined by the outcome of iei*priiilinf.fn*y *"y be viewed as values assumed by the random uariable' X, the numbergi-Ce,{ectivg items when three electronic components are tested.

4 j

Page 2: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

44 Ch. 2 ' Rsndom Variables and Probability Distributions

Definition 2.1

Example 2.2

Example 2.1

,n/ - 't..t t,).,a'v i *^\*j .,:.r :,-!,..r .J1.1

.4 random variable a func tion tAq- qs ssCt:q! e,s q-r gql luy1b-91-Vtt!-e rch:JSmep inthe.s*mple space.

We shall use a capital letter, say X, to denote a random variable and itscorresponding small letter, x in this case, for one of its values. In the electroniccomponent testing illustration above, we notice that the random variable Xassumes the value 2 for all elements in the subset

5: {DDN, DND, NDD}

of the sample space S. That is, each possible value of X_represents an eveg-t

that is a subset of the sample space for the given experiment.

Two balls are drawn in succession without replacement from an urn contain-ing 4 red balls and 3 black balls. Th_e pA-s-lible outcomes and the valueg-;r ofthe random variable

", *$j:I it ll1".::ryEt-q!9{ b{ls' are

Lol"", t*r*qhSample Space v"

RRRBBRBB

21

1

0

A stockroom clerk returns three safety helmets at random to three steel millemployees, who had previously checked them. If Smith, Jones, and Brown, inthai oider, receive one of the three hats, list the sample points for the possible

orders of returning the helmets and find the values m 9'-f lhe random variableM that represents the number of lneclSatches'Salution. If S, J, and B stancl for Smith's, Jones', and Brown's helmets, respec-

tively, then the possible arrangements in which the helmets may be returnedand the number of correct matches are

Sample Space fl

SJBSBJJSBJBSBSJBJS

31

1

001

Page 3: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

iec. 2.1 ' Concept of a Rantlom Vaiable 45

itsnictX

tns

,, in

&qt

milln, incibleiable

In each of the two preceding examples the sample space containp a finitenumber of elements. On tne other hand,-yhg! a d-i9 i1lhJown unti! a 5 occurs,..*a'afmna-sempii slace m-rmannnena_ing sequence of elements,

s: {F, NF, NNF, NNNF,...},

where F and N represent, respectively, the occurrence and nonoccurrence Of a

5. But even in this experiment, the number of elements can be equated to the

number of whole numbers so that tllere is a first element, a second element, a

ihird "taro"nt, and so on, and in this sense can be counted'

tleffnitiOn 2.2 If a sample space contoins a fnite number of possibilities or an unending sequence

with as m-any elements as there are whole numbers, it is called a discrete sample

space.rin-tof

ryec--med

Theoutcomesofsonrestatisticalexperimentsmaybeneitherfinitenorcountable. Such is the case, for example,-when one conducts an investigation

measuring the distances that a certain -aiii oi automobile will travel over a

Of*;i;i test course on 5 liters of gasoline. Assuming distance to be a vari-

able measured to any degree of accuracy, then clearly we have an infinitenumber of possible distanies in the sample space that cannot be equated tothe num-beF-o$*whsle*numher$, Also, if one were to record the length of time

i;;;il;cal reaction to take place, once again the possible time intervals

making up our sample ,puc" utt infinite in number and uncountable' We see

now that all sample spaces need not be discrete'

illdrution 2.3 If a sample space contains on infnite numbey of possibilities equal to the number ofpointson.alinesegment,itiscalledacontinuoussamplespace.

A random variable is called a discrete ranilom variable if its set of possible

outcomes is countable. Since the possible values of Y in Example 2'1 are 0, 1,

uii z, and the possible values of M in Example 2.2 are 0, 1, and 3, it follows

that y and M are discrete random variables. When a random variable can

take on values on a-c-qn-tiDuqEs- scgle, it is called a continuous random vsriable'

@ oil"o ttr" possible nutu"r of i continuous random variable are precisely the

same values that are contained in the continuous sample space._ Such is the

case when the random variable represents the measured distance that a certain

*utd oiuotomobile will travel over a test course on 5 liters of gasoline'

.^.. 2 | i; most practical problems, 99!-4_Luo-qs- random- YaqAllgS -Lep!9!9-nt-"msa---'zF I

*r,"--- -*,' k / w-94-ngj9,cua3se!!9uoUt"-frtigltlt*trehtt, telqpqrallules, distaqce$, or life

ffi:- ,--t'' ,frf I ffi-' wt*"* airdt" ."tta"- ""ri"ut"-*reBL?,seatJpunL-da-ta,

such as lhedrn ",*' * {, ;ffi; sf dged="_"t a_sample of k itp$s qltlhe luslbpr of highway-,iel.a-lities

14- v -rdi

- f-ryrt;-iry4-gvel -stata 59i*1har-the.-rand-om variables Y an{.M of E11m--

pd;.i;;a fi-ioth repreienicount data, f the number of red balls and r14:tr* ;;;U"t of corrgct hat rnatches' ,

Page 4: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

"4]# 'r"*, @"'.

I'li"li.{ r. TT Fft jr' ++r,r' !' I J ' 6. pt( '1-

t lTr t_plf H

Ll T KY ,?- 1 rrl-l Ch. 2 ' Random Variables and probability Distributions46

2.2 Discrete Probability Distributions

,{ dis.c-r91e randgm variable ?s-suTes each of its values with a cer1ain-probabil"-, ity"Jn the case of tossing a coiiTfi-ree-iiffi&;'tr6-14;it6l" x,-iepresenting the

number of heads, assumes the value 2 with probability 3/g, since 3 of the gequally likely sample points result in two heads and one tail. If one assumesequal weights for the simple events in Example 2.2, the probability that noemployee gets back his right helmet, that is, the probability that M assumesthe value zero, is l/3. The possible values m of u and theii probabilities aregiven by

i t\ ! .r i-.ir')' i't/:{i

!1ri":!r. :r,iit:

..,:.t . ,.-.,.i.. ii:

,\ -'s 1 ,'

P(M : m) 111326L-lle(tL

Note that the values of m exhaust all possible cases and hence the probabilitiesadd to l.

Frequently, it is convenient to represent all the probabilities of a randomvariable X by a formula. such a formula would necessarily be a function of thenumerical values x that we shall denote by f (x),g(x), r(x), and so forth. There-fore, we write /(x) : P(X : x); that is, /(3) : p(X: 3). The set of orderedpairs (x,/(x)) is called the probability function or probability distribution of rhediscrete random variable X.

Definition 2.4 The set of ordered pairs (x,f (x));s a p1qlghiljlx.fg4plior-r, probability mass funcrion,or ppla-bllly ,Qqt1ilrrlion of the discrete random uaiiable X rf,for each possibleoutcome x'

lr'r t>' ol./(x)>0. 2it"':"t{"2.lf1x1: t.

Z. PtX:;r) :/(x).

Example 23 A shipment of 8 similar microcomputers to a retail outlet contains 3 that aredefective. If a school makes a random purchase of 2 of these computers, findthe probability distribution for the number of defectives.

sslntion. Let X be a random variable whose values x are the possiblenumbers of defective computers purchasec by the school. Then x can be any of

Page 5: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

a

e

8so:s

)mhete-edthe

-SD,ible

t arefind

sibleay of

Sec. 2.2 Discrete Probability Distributions

. '.: ...:,."e\ ty'

the numbers 0, 1, and 2. Now' . /:\" r;10 ,0' - t /to1:P(X:0):7f:X'

\,1

j - ,4ri*rl.:,*{. -1 '*l" i i. ,.

:- ': !''|,r"r /i t li { ' (.]'

f (2) : P{X :2) :

'ii", ;il;."i"uii',v Ji',ribuiion ol X is

47

: t."

0

Example2.4If50%oftheautomobilessoldbyanagencyforacertainforeigncarareequrppedwitlldiesele4g!ne$n.a"r"'-"r"foitheprobabilitydistributionof

_ r, tt. n,i,.,'U", dl ales66"olJilnons the next 4 cars sold bv this agency'' j "'^'"-' -\:..--

--- ''/

,.*. 'i- ^Solulion,$iace..the probability of selling a diesel model or a gasoline model is

0.5, ;;;';i: tO'Uoints in the sample space are equally iikely to occur' There-

,or","iil"'o*;t'";;;; ;11 prouuuititi"t, and.also for our function' will be

i6..fg-qbt-aa$9-lu-loberofw'ays.ofselling3diesel..models"weneedtocon.*<--rla"i-t[-ndUei of *uy, oi partitioning 4 -outcomes

into two cells with 3

. \, diesel models assigned to one Lu ana a gasoline model assigned to the other'

-.... This can be done - (i) - 4 ways. In general, the event of seliing x diesel

r /a\models and 4 - x gasoline models can occur trr (;) ways' where x can be 0' 1'

.: 2,3,ot4' Thus the probabilnt uttT:itton/(x) : P(x: x) is

\r//(x)== i? for x:0. l, 2, 3,4'

Therearemanyproblemsinwhichwewishtocomputetheprobabilitythattheobservedvalueofu.u,'do-variableXwillbelessthanorequaltosomereal number x. writigs fqi :-l-tljl -"1 - :l'"-ry f gpJ' -aumber"-v'- w-a-def,ne

r(');;e"ii";ffi"dffiaisi'q f thE random variable'x'

--Wililil1

Page 6: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

48 Ch. 2 ' Random Variables and Probability Distributions

Definition2.5,,'oW)ofadiscreterandomuariableXwithprobabiIityr'(x): P(X<x): I "f(0 for -a <x< cc.

,<I

For the random variable M, the number of correct matches in Example 2.2,

we have

F(2.4) : P(M < 2.4) :f (0\ +/(1) : (*) + (i) : *.

The cumulative distribution of M is given by

|.o form<0l+ foro< m<lr1'l:li rorl< m<3,'

. U form>3.

One should pay particular notice to the fact that the cumulative distribution isdefined not only for the values assumed by the given random variable bui forall real numbers.a-i;){ Examnle 2,5 tF;na the cumulative distribution of the random variable X in Example 2.4.

\ ^ -'' ,r^t-- r1--\ .,^-:f,, ;L^+ /'/,)\ - lle" Using F(x), verifY thatf (2\: 318.

Solation. Direct calculations of the probability distribution of Example 2.4give/(0) : tlt6,f (r) : Il4,f (2) : 318,f (3) : U4, andf (4) : Ur6' Therefore,

f iu 1-

* il} '''

fL?;:'

-iti= /", i,,)= 'lr

lhrI}d-{' ,

ti, t/,

:

lt'/t

{tl

A.t."ti_.7* "--;"'ir- 8

Hence

,. j. "'

i .1 .,'

\GItt I

IF

lr )f

r(0):/(0): tr(r):/(0) +/(l): *F(2) : f (o) + f(t) + f (2) : {+

r(3) :/(o) + f(t) + f(2) +/(3) : +*

r(4) :/(0) + f(t) + f(2) +/(3) + f(4) : 1.

|.tlfr('): { l_ilitLi'

forx<0for0<x<1forl<x<2for2<x<3for3<x<4forx>4.

Now

f(2) : F(2) -F(1) : 1+ - * : t.

Page 7: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

l

Discr ete Pr obabilit y Distributions 49ihutions

fiabilitY

nrple 2.2,

ibution,is--ile but for

rmple 2.4.

nmple 2.4herefore,

6l t6s lt64l163l t62lt6I lt6

Figure 2.1 Bar chart.

It is often helpful to look at a probability distribution in graphic form. onemight plot the points (x,,f(x)) of Example 2.4 to obtain Figure 2.l.By joiningthe points to the x axis either with a dashed or solid line, we obtain what iscommonly called a bar chgrt. Figure 2.1 makes it very easy to see what valuesof X are most likely to occur, and it also indicates a perfectly symmetric situ-ation in this case.

Instead of plotting the points (x,"f(x)), we more frequently construct rectan-gles, as in Figure 2.2.Herc the rectangles are bonstructed so that their bases ofequal width are centered at each valus x and their heights are equal to thecorresponding probabilities given by"f(t).The bases are constructed so as toleave no space between the rectangles. Figure 2.2 is called a probability histo-gram. I

since each base in Figure 2.2 has'.nit width, the P(x : x) is equal to thearea of the rectangle centered at x. Even if the bases were not of unit width' wecould adjust the heights of the rectangles to give areas that would still equalthe probabilities of X assuming any of its values x. This concept of using areasto represent probabilities is necessary for our consideration of the probabilitydistribution of a continuous random variable'

The graph of the cumulative distribution of Example 2.5, which appears as a

step function in Figure 2.3, is obtained by plotting the points (x, F(x))'

6l 16

s lt64lt63116

z.l t6I lr6

0l

Flgure 2.2 Frobability histogram.

Page 8: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

50 Ch. 2 ' Random Variables and Probability Distributions

r--r___________lI

r------JII

?------------JII

Figure 2.3 Discrete cumulative distribution.

Certain probability distributions are applicable to more than one physicalsituation. The probability distribution of Example 2.4, for example, alsoapplies to the random variable Y, where Y is the number of heads when a coinis tossed 4 times, or to the random variable W, where W is the number of redcards that occur when 4 cards are drawn at random from a deck in successionwith each card replaced and the deck shuflled before the next drawing. Specialdiscrete distributions that can be applied to many different experimental situ-ations will be considered in Chapter 4.

I

314

t12

t14

2.3 Continuous Probability Distributions>1

'.(' ,J (.\, A continuous random variable has a probability of zero of assuming exactlv.._ - - .',,,,:--'-':-- .- ----=- -=:---

--m €-it-61-m-vamECTonsequentlylitFprobability distribution cannot be-givet. in-''''t ,l -..:^' ,'ti\.! q ffid, ibfrlnt first this may seem startling, but it becomes more plausible

.\ L .'; -f' E r- .r.... 1i {i.. -, r,, ! - when we consider a particular example. Let us discuss a random variable

.*t.o ,,u }f,.. .ll, whose values are the heights of all people over 2l years of age. Between any-" \" {. t lr. . two values, say 163.5 and 164.5 centimeters, or even 163.99 and 164.01 centi-t , \^.',' meters- there are an infinite number of heishts. one of which is 164 centimeters.i' -ndL+r" - q The prdba-.fiIi1! of selecting a person at random w-ho is qx4ctly 164 centim_eters, A '' ., ^ / tall and not one of the infinitely large set of heights so close to 16a centimeieii

, s-"Fr* "ntr'' ,nN, ] that you cannot humanly measure the difference ltg:fr,ole, and thus we assignM p I"-t [a probability of zero to the event. This is not the case, however, if we,f-alk

@ \t ,^5 I-1;d' about the probability of selecting a person who is at least 163 centimeters'6u1-W .,id}" \u not more than 165 centimeters tall. Now we are dealing with an interval rather'$''

tttun u poini uutu" of our *nao* variable.We shall concern ourselves with computing probabilities for various inter-

vals of continuous random variables such as P(a < X < b), P(W > c), and soforth. Note that when X is continuous

P(a < X < b) : P{a < X < b) + P(X : b

: P(s< X <b).

Page 9: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

icalalso:oin'redsionrialitu-

actlyEg lnlsibleiabler anyEnti-qlers.rctersaeteid"ssign; talkrs butrather

inter-nd so

I

Scc. 2-3

I

C ontinuous Pr ob abilit y Distributions

(c)

Figure 2.4 Typical density functions.

9 ), .That

is.. it does not matter whether we include an end point of the interval ore | - not. This is not true. though. when X is discrete.

Although the probability distribution of a continuous random variablecannot be presented in tabular form, it can have a formula. Such a formulawould necessarily be a function of the numerical values of the continuous- vaiiable X and as such will be represented by the functional notation/(x). In

, ^,\. / dealing with continuous variables,/(x) is usually called the probability density[* function, or simply the density function of X. Since X is defined over a contin-

-.:,',t5 uous sample space, it is possible for/(x) to have a finite number of discontin-.;.. f uities. However, most density functions that have practical applications in the.. ,, analysis of statistical data are continuous and their graphs may take any of' ,, , several forms, some of which are shown in Figure 2.4. Because areas will be

.' ,-, used to represent probabilities and probabilities are positive numerical values,the density _fu,Irgli_on must lie entirely above the x axis.

itv densitv function isA probabilitv density lunction is constructed so that the area under its curvebounded bv the x axi ualtolw qyer,ltlqlg-lgr el X_!gI

x) is defined. Should this range of X be a finite interval, it is alwayspossible to exten interval to include the entire set of real numbers bydefining/(x) to be zero at all points in the extended portions of the interval. InFigure 2.5, the probability that X assumes a value between a and b is equal tothe shaded area under the density function between the ordinatss at x : o andx : b, and from integral calculus is given by

tl, 1I P@. x <b): I /tx) a_r.[L- J" --l

5I

Page 10: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

52 Ch. 2 ' Random Yariables and probability Distributions

Figure25 P(a<X<b).

Definition 2.6 The functionl(x) is c probability density function /or the continuous ranilom aari-able X, defined ouer the set of real numbers R, if

\:i.f(,t)>o forauxeR. \ I'^ \ i:r@ \ ti2. I fg) dx: r. \J--- iri

Ii-fDi, 3. p(a<x<b)= | /(x)dx. \Jo -..,-. ..- ,....',

Example 2.6 Suppose that the error in the reactionlaboratory experiment is a continuousability density function

Itrr,): J I .

t0,(a) Yerify condition 2 of Definiti on 2.6.(b) FindP(0<X<l).

Solution

temperature, inrandom variable

oC, for a controlledX having the prob-

-l<x<2elsewhere-

t*t J' rt,l o,: I_,t o.:il'_,

(b)P(o<x<l):,[ ,*:ul,

8r--+-:l9'9

I9'

Page 11: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

I

Sec. 2.3 . Continuoas Probability Distributians

Definition 2.7 The cumulative rlistribution F(x) of a continuous ranilom Dariable X with densityfunction[(x\ k giaen by

53

for-m<x<@.

As an immediate consequence of Definition 2-'l one can write the two results

P(a<X<b):F(b)-F(a)and

dFklf(x):;if the derivative exists.

Exarnple 2J For the density function of Example 2.6 find F(x) and use it to evaluateP(0<x<l).Solution For-L<x<2,

x3+1

ftF(x): P(X < x): I f(t) dtJ--

Therefore,

I h+f=a,!Xn*l

t' ,, -"1'a n'- 9l-, -x < -l-l<x<2x> 2.j-

,l-Iyl rtv =

att'i b ,z r,o

-- gve la= :r,t t - {t-tf

08

= $ - (-l-'|_- I 06

g '91z o'4

L)7

-l o I

Figure 2.6 Continuouscumulative distribution.

Page 12: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

Ch. 2 ' Random Variables and probability Distibutions

The cumulative distribution F(x) is expressed graphically in Figure 2.6. Now,P(0 < X < 1) : r(1I_ F(0) : 4 _ t : *,

which agrees with the result obtained by using the density function in Example2.6.

Exercises

" l. Classify the following random variables as discrete 06.or continuous-

the number of automobile accidents per yearin Virginia.

Y: the length of time to play 18 holes of golf.M: the amount of milk produced yearly by a-./7.particular cow.

N: the number of eggs laid each month by ahen.

P: the number of building permits issued eachmonth in a certain city.

Q: the weight of grain produced per acre. '/8',2. An overseas shipment of 5 foreign automobiles

contains 2 that have slight paint blemishes. If anagency receives 3 of these automobiles at random,list the elements of the sample space S using the '/9.letters B and N for ..blemished - and" nonblemished," respectively; then to each samplepoint assign a vdlue x of the random variable Xrepresenting the number of automobiles pur-chased by the agency with paint blemishes. ./10-

t 3. Let W be a random variable giving the number ofheads minus the number of tails in three tosses ofa coin. List the elements of the sample space S for /ll.the three tosses of the coin and to each sample --'point assign a value w ofW.

/4. A cain is flipped until 3 heads in succession occur.List only those elements of the sample space thatrequire 6 or less tosses. Is this a discrete samplespace? Explain.

v'5. Determine the value c so that each of the follow- lLing functions can serve as a probability distribu-tion of the discrete random variable X:

t(a) f(x) : c(x2 + 4) for x : 0, 1,2,3; 13'

(b) f(xt: "(:)(,I.) for x:0, r,2

From a box containing 4 dimes and 2 nickels, 3coins are selected at random without replacement.Find the probability distribution for the total T ofthe 3 coins. Express the probability distributiongraphically as a probability histogram.From a box containing 4 black balls and 2 greenballs, 3 balls are drawn in succession, each ballbeing replaced in the box before the next draw ismade. Find the probability distribution for thenumber of green balls.

Find the probability distribution of the randomvariable 17 in Exercise 3, assuming that the coin isbiased so that a head is twice as likely to occur asa tail.

Find the probability distribution for the numberof jarz records when 4 records are selected atrandom from a collection consisting of 5 jezzrecords, 2 classical records, and 3 polka records.Express your results by means of a formula.Find a formula for the probability distribution ofthe random variable X representing the outcomewhen a single die is rolled once.

A shipment of 7 television sets contains 2 defectivesets. A hotel makes a random purchase of 3 of thesets. If X is the number o[ defective sets purchasedby the hotel, find the probability distribution of X.Express the results graphically as a probabilityhistogram.

Three cards are drawn in succession from a deckwithout replacement. Find the probability dis-tribution for the number of spades.

Find the cumulative distribution ol the randomvariable l/ in Exercise 8. Using F(w), find(a) P(W > o);(b) P(-t<w <3).

Page 13: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

;ec. 2.5 Joint Probability Distibutions

decimal point, each repeated five times such

that the double-digit leaves 00 through 19 are

associated with stems coded by the letter a;

leaves 20 through 39 are associated with stems

63

coded by the letter b; and so forth' Thus a

number such as 1.29 has a stem value of lb and

a leaf equal to 29'(b) Set up i relative frequency distribution'

1.5 Joint Probability Distributigr'!

(e)ourstudyofrandomvariablesandtheirprobabilitydistributionsinthepre.ced i n g sec ti o ns * ;';.;;;;t'd tggl,':q iT'l'i " " il' l++"-:p:"="-:: i: :l:: Hf*.";0 ". ;I;i,"li3:.!we might measure the -:-^ .^ ^ +rr,^ .ri-ancinnalw€ trrrBrrl rrrv4Jurv r'v 'ving rise to a two-dimensionalfrom a controlled chemical experiment gr

sample space consistd^;ilil;;tcomes (p' :l' "-t "t"::lT be-interested in

the hardness H and ,"i'if" 'tt""gth T of cold-drawn copper resulting in the

ourcomes (h, 4. In " ;;; io J"i".-ine the likelihood of success in college'

based on high school J*", on" might use a three-dimensional sample space

andrecordforeachindividualhisorheraptitudetestscore,highschoolrankin class, and grade-poi;; ;;;;;g" at the endof the freshman year in college'

If X and y ur" t*o-dlr"."tJ."rroom variables, the probability distribution

lor their simultaneous occurrence can be represented by a function with values

I;;;;";;"v puit or *ru"t 1t' v) within the range of the random variables X

and y, It is customary ,o-i"r"t ,. this function as the ioint probability distribu-

2"8 The function f (x, y)is a ioint probability distribution or probability mass function o/

the discrete 'lon''lo^ uariables X and Y if

tion of X and Y' Hence, in the discrete case'

f{x,Y}:P(x:x'Y:Y);that is, the values /(x, y) give the probability that outcomes x and y occur at

the same time' For "*L'u:ptin,

if aielevision set is to be serviced and X rep-

resents the age to ttre iea're'i y"u' of the set and Y represents the number of

defective tubes in trr" r"t, it"n i6,z)is the probability that the television set is

5 years old and needs 3 new tubes'

7. f (x, y) > 0 for all (x, Y)'

, \\.f(x, y): 1.

3. P(X:x,Y:Y):f(x,Y)'For any region A in the xy plane' Pl(X' Y) e Af : I I 16' il'

Page 14: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

64 Ch. 2 - Random Yariables and Probability Distributions

Two refills for a ballpoint pen are selected at random from a box that contains3 blue refills, 2 red refills, and 3 green refills. If X is the numbcr of blue refillsand Y is the number of red refills selected, find (a) the joint probability func-{oni(x, d, ana 0)"1(X,Yf e Af,whdre.4 is the region {(t, y)lx + y < 1}.

Solation(a) The possible pairs of values (x, y) are (0, 0), (0, 1), (1, 0), (1, 1), (0, 2), and

(2,0). Now,/(0, 1), for example, represents the probability that a red and agreen refill are selected. The total number of equally likely ways of selec-

ting any 2 refills from the t - 0 : 28. The number of ways of selecting I

red from 3 red refills and I green from 3 green refills is (?Xi) : 6. Hence

,f(0, 1) :6128 -- 3114. Similar calculations yield the probabilities for theother cases, which are presented in Table 2.6. Note that the probabilitiessum to 1. In Chapter 3 it will become clear that the joint probability dis-tribution of Table 2.6 can be represented by the formula

, !' -o;

., \-00(,-1-,)Jtx,y):T__,,\r/

for x : A, \2; | : 0, 1,2;0 < x + Y < 2.

(b) P[(X, Y] e A]: P(X + Y < 1):"f(0, 0) +/(0' 1) +/(l' 0):rr3+*+*:&

Example 2.8

i.,. j

Table 2.6 Joint ProbabilityDistribution for Example 2.8

t,

f(x, v)

xRow

Totalso ii i^.\ 2

0yl

2

'_tlel28l28ii -r- I -r-,1411+rlii 2R:i

-L28ll'2A

37

-L2A

ColumnTotals

-r ,r-r iLa. 2g 2ai l-.r'

I

Page 15: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

uions

ntainsrefillsfunc-

r).

l), andand a'selec-

*ing 1

Hence

or thebilitiesty dis-

I

Sec. 2.5 Joint 65Pr ob abiltt y Distributions

When X and Y are continuous random variables, the joint density functionf(x,y) is a@, and P[(X, Y\ e Af, where,4 is anyregion in the xy olane- is eoual to tht uolg-e of th" !!ght tthe base .4 and the surfiG]-

Definition 2.9 ,**;1t?;f(*,y\ isc jointdensityfunction of thecontinuousrsndomoariablesX

f(x, y) dx dy : 1.

for any region A in the xy plane.

Erample Z.g ) A candy company distributes boxes of chocolates with a mixture of creams,' toffees, and nuts coated in both light and dark chocolate. For a randomlyselected box, let X and Y, respectively, be the proportions of the light anddark chocolates that are creams and suppose that the joint density function isgiven by

+3y), 0<x<1,0<y<lelsewhere.

l.f(x,v)>fa fo

r. .J__ .l__

O for all (x, y).

3. Pt(x, Y) e Af: iitO, fl dx dy

f(x, v): {::tVerify condition 2 of Definition 2.9. *)Find P[(X, Y) e A], where.4 is the region

l.(a)(b)

r i'"' -' J'r"-{'s

Solution -,

*t,u' !e:t'/t' "

fo fo ft rr;-*\\(a) l- l* 1,", y) dx dy: .l. .J, itz, * 3y) d) dyJ-*J-* ,rr*r 6xvr'=r:l . +=l dvJo ) ) l'-o

: f' (?* 9) a, 2v 3v'l'Jo \) J/ '':T* t l.23

--!--l- - t - - t.))

Page 16: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

66 Ch. 2 ' Random Variebles anil Probability Distributians

(b) P[(x, Y) e Af

Given the joint probability distribution/(x, y) of the discrete random vari-ables X and Y, the probability distribution g(x) of X alone is obtained bysumming f (x, y) over the values of Y. Similarly, the probability distributionh$) of Y alone is obtained by summing f (x, y) over the values of X. We defineg(x) and h(y) to be the marginal distributions of X and Y, respectively. When Xand Y are continuous random variables, summations are replaced by infegrals.We can now make the following general definition. t

,

:P(o<x<t,+<Y<+)f Ltz f Ltz 1: J,,. Jo i{z' + 3Y) ttx dY

| ''' 2r' 6xyl'= r rz:l - +-:l dyJrn ) ) l'=o

: l,: :(* . +) *: fi * #l:,,',

: * (1.;)- (i. *)l:,60.11

Definition 2.10 The marginal distributions of x alone and of y alone are giuen by

s(x):L.f t*, yl and h(y):L f$, y)

for the discrete case and byl€e(x):1 f8'Y)dYJ--

for the continuous csse.

foand h(y): I f(x. y) dxJ--

The term marginal is used here because, in the discrete case, the values ofg(x) and h(y) arejust the marginal totals of the respective columns and rowswhen the values off(x, y) are displayed in a rectangular table.

Example 2.10 Show that the column and row totals of Table 2.6 give the marginal distribu-tion of X alone and of Y alone.

Sotation. For the random variable X, we see that2

p(x :0) : s(0) : I "r(0, y) :,f(0, 0) +/(0, 1) + f (0,2)v=o:zt+*+*:*,

\

Page 17: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

t

J oint ProbsbilitY Distributions

Lxample 2.11

67

2

P(X:1):9(1):lf0,t)v=0

:/(1,0) +/(1, 1) +f(r,2)--&+rnr+o:4;'

2

a P(X : 2) : g(2) : L f(2, v) :f(2,0) + f(2' r) + f(2'2))=0

:*+0+0:*,which are just the column totals of Table 2'6' In a similar manner we could

show that the values "i-lttyl "* given by ll9 to't" totals' In tabular fornr' these

margittut distributions may be written as follows:

Find g(x) and h(y) for the joint density function of Example 2'9'

Solution. BY definition'ra f r')

s$): .J__r,*, v) dY : .|. ; (" + 3Y) dY

4xv 6v'lt= 1 4x * 3: s *lol,=o 5

for 0 < x ( 1, and g(x) : 0 elsewhere' Similarly'ro lr )

h(y): .|_to, r) dx: J. i,t. + 3) dx

-4r t_3v\)

for 0 < Y S 1, and h(Y) :0 elsewhere'

The fact that the marginal distributions g(x) and hlyYt: inlef the prob*

abitity distributions ,iiir-iiai"idual variiL. X "nA Y alone can easily be

verified by showing ;1";;;""ditions of Definition 2.4 or Definition 2'6 are

..iitn"a. io, examplc, in the continuous case

lu:

[* n(r) ar: l* i' ,,', v\ dv dx: Ij-- J-o J-o

Page 18: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

68 Ch. 2 ' Random Yariables anil Probabtlity Distributions

P(a < X < b) : P(a < X 1b, -co < Y < co)

and

lb l*:l I f@,v)dvdxJoJ-fb: I g$\ dx'

Jo

In Section 2.1 we stated that the value x of the random variable X rep-resents an event that is a subset of the sample space. If we use the definition ofconditional probability as given in Chapter 1,

P(Bl A) : P(A o B)P(.4) > 0,

P(A)

where / and B are now the events defined by X : x and Y: y, respectively,then

P(Y : ylX: x): P(X--x,Y:l)P(X : x\

: IJ+!, s(x) > o,s@)

when X and Y are disglgte'raadam-raua-bles*."*Itlr ""i Aiffilt t; show that the function f(x,y\ls!), which is strictly a

function of y with x fixed, satisfies all the conditions of a probability distribu-tion. This is also true when/(x, y) and g(x) arc the joint density and marginaldistribution of continuous random variables. Expressing such a probabilitydistribution by the symbol/(y lx), we have the following definition.

Definition 2.11 Let X and Y be two random variables, discrete or continuous. Ihe*cgndjtionaldistribution of the random uariable Y, giun thot X : ,, it gir.4

-<f ulx) : W, s(x) > o.

Shnilarly, the conditional distribution of the random variable X, giuen thatY : y, is giuen by

f(xli:W, h(v)>0.

If one wished to find the probability that the discrete random variable Xfalls between a and b when it is known that the discrete variable f - y, wEevaluate

P(a < X < blY : y) : I.f(rly),

Page 19: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

J oint Pt obabilitY Distributions

Solurton.

Now

Therefore,

w" needl find/(xly), where y : 1' First we find that

h(l) = i .f(x, 1): * + * +o :+'x=O

f(x, l) t .(r, ,), x : o, l, Z./(xl1):7f=3r

lttl

]j

,tl

lii

irir

til

bnra

69

where the summation extends over all values of X between a and b' When X

and Y are continuous, we evaluatelb

P(a < x < blY : !) : J"ft*li a*'

/(0t1) : +f(a,l): (3x*): *

/(11 1) : !f(r,l) : (3x*) : I/(21 1) : zf {2,1) : (3x0) : 0

and the conditional distribution of X' given that Y : l' is

f(x I l)

FinallY, O r€t Y: 1):.r(ol1): *'

G)Therefore, if it is known that 1 of-the 2 pen refills selected is red' we have a

-;;;;;;uiiv "qutt to-r/z tt'ut the other refill is not blue'

/-' ^ r-^^+r^n Y nf male runners and the fraction Y of female*fu "qlp1s-z,reJw.*Jn'ff JfiT'*,f,*?:::,':#TFilil#;ii":"*'densitv

function o!\(t{r

r(x, y): til' I,i"J,i;. o < / < 1

Find g(x), h(v),/(y I x)' and determine the probability that f:Y-": '1"'n

1/8 of the

women entered i' u pJrti"oru, marathon d;lly i"tshed if it is known that

;xafi; ip;i;" male runners completed the race'

x

Page 20: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

70 Ch. 2 . Random variables snd probability Dis*ibutions

By definition,fo lx

s@): I f6, y) dy : | 8xy dyJ-- Jo

lY=t:4xy2l :4xt, o<x<1,lY=o

fo frh(y): I .f&, t) dx: l$ry a,J-- Clx= r- 4x'yl : 4il1 - yz),lx=y

Solution.

and

Now,

o<ycl.

o<y<x,

Example 2.14

find9(x), h(y),f(xly),andevaluate P(+ <X < +ly: +).

Solution. By definition,

s',): Il*tr*, v) dv: [o'

'o +-tY') o,

xv rur [r= t x:i+Tl,:o:i, o<x<2,and

f€ f2 xe + 3y2)h(v): J_*I@, r)

dx: J" 'T o*

x2 3xryr1'=, l+3y,:T+--1,=r: 2-, o<v<1.

Page 21: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

listributions J oint Probability Distributions 7I

Therefore,

f (xlt):t

and

f (x, y) _ x(l + 3y2)14

h(y) - (1 +3y\2 -/".-tl

x3td*: a'

(tPl -\4

0<x<2.

< x <)1, :): l,'::n"ru mi,stic al Independence

If /(x ly) lg9qlo!_{:e91{g_l_1, as was the case in Example 2.14, then

f (x, y) : f (xly)h(y)

into the marginal distribution of X. That is,

fa fos$): I .f(", y) dy : I f Vlilh(v) dv,J-- J--If/(x ly) does not depend on y, we may write

fos(x):f(xlil | h(y) dy.

'--. ,Now

| -

,(ot dv: r,J-- -'

since h(y) is the probability density function of Y. Therefore,

s{x):f(xlv}and then

f(x, y) : s(x)h(y).

It should make sense to the reader that ifl(x ly) does not depend on y, thenof course the outcome of the random variable Y has no impact on theoutcome of the random variable X. In other words, we say that X and Y areindependent random variables. We now offer the following formal definition of

L. -'--Statistical independence.

Mdmimtqmn 2.12 Let X anil Y be two random uariables, discrete or continuous,with joint probabil-ity distribution f (x, y) anil marginal ilistributions g(x) and h(y), respectiuely' Thersndom uariables {, and Y pre said ro be statistically independent d anil only if

Yk'-rl: 9(x)h{t\for all (x, y) within their range.

Page 22: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

7 2 Ch. 2 - RandoTn Variables and Probability Distributions

The continuous random variables of Example 2.L4 are statistically indepen-dent, since the product of the two marginal distributions gives the joint densityfunction. This is obviously not the case, however, for the continuous variablesof Example 2.13. Checking for statistical independence of discrete randomvariables requires a more thorough investigation, since it is possible to havethe product of the marginal distributions equal to the joint probability dis-tribution for some but not all combinations of (x, y). If you can find any point(x, y) for which/(x, y) is defined such that/(x, y) + S6)h(y), the discrete vari-ables X and Y are not statistically independent.

Example 2.15 Show that the random variables of Example 2.8 are not statistically indepen-dent.

Solution.'Let us consider the point (0, 1). From Table 2.6 we find the threeprobabilities,f(0, 1), g(0), and i(1) to be

/(0' l): t)

s(o): I f$, v): * +'=O

2

h(1): I ,f(x, 1): * +x=O

3 r I -l-14r 28-t4

*i + o:;.Clearly,

/(0, l) # g9)h(t),

and therefore X and Y are not statistically independent-

All the preceding definitions concerning two random variables can be gener-alized to the case of n random variables. Let f(xr, x2, ..., x,) be the jointprobability function of the random variables Xy Xr, ..., X,. The marginaldistribution of Xr, for example' is given by

s(x):I I f(xyxz,...,xJfor the discrete case and by

s(xr): I: f *

.rtrr, xz, ..., xi;,) dx, dx3 '' ' dxn

for the continuous case. We can now obtain ioint marginal distributions suchas @(x1, xr), where

(discrete case)

x^) dx3 dxa "' dx, (continuous case).

It L f@r, xz, -.', Xo)

l-t xn

ll- "J-'-tt'"x2r"'r6(xt, xr) :

Sec. 2.5

Definitr

Exi

Page 23: Random Variables Pr obability Distributionste.ugm.ac.id/~wibirama/tku115/week04/chapter2_walpole_4... · 2011. 3. 15. · 46 Ch. 2 ' Random Variables and probability Distributions

istributions

y indepen-int densitys variableste randomle to haverbility dis-any point

crete vari-

r indepen-

the three

t

Sec, 2.5 Joint Probability Distributions 73

one could consider numerous conditional distributions. For example, the jointconditional distribution of Xr, X.r, and X., given that Xnl rn, X, : x5, ...,X n : x,, is written

f (xt, xz, xtlx+, xs, ..., xn) : f lxt xz' ' ", x)"' g(x+, x5, .. ., xJ'where g(xa, xs,..., x,) is the joint marginal distribution of the random vari-ables Xn, X s, ..., X n.

A generalization of Definition 2.12 leads to the following definition for themutually statistical independence of the variables X ,, X r, . .-. , Xn.

be gener-the jointmarginal

ons such

as€)

rs case).

mk'finition 2.13 Let Xr,Xr,.", xnbenrandomuariobles,discrete or continuous,withjointprob-ability distribution f (x,., xr, . . ., xo) and marginal distributions fr1xr1,, yrlxrj, ...,f,(x,), respectiuely. The random uariqbles X ,, X r, ..., Xn or, ,iti'ti b:i*iiuallystatistically independent if and only if

f (x,., xr, .. ., x,) : fr$)fz(xz) . . . f ,(x,)for all (xr, x,..., Xn) within their range.

frample 2.16 Suppose that the shelf life, in years, of a certain perishable food product pack-aged in cardboard containers is a random variable whose proUaUitity densityfunction is given by

tvt:{'^" x>o[0, elsewhere.

Let X r, Xr, and X, represent the shelf lives for three of these containersselected independently and find p(X, < 2, 1 < X, 1 3, X, > 2).

Solution. Since the containers were selected independently, we can assumethat the random variables X r X z, and X. are statistically independent, havingthe joint probability density

f (xy xz, xr) -,f(xr) f $rlf(xr\: g- x\ e- xze- xl

: e-tt -J2-r3

for x, > 0, xz 2 0, xr ) 0, aqd/(xr, xz, xs): 0elsewhere. Hence

P(J' < 2, 1 < x2 < 3, xt > 2) :l-,[t lr', r-',-xz-x1 d,x1 d.x2 dx,

: (1 - "-2)'1r-r - e-3)e-2:0.0376.