Transcription of Continuous r.v practice problems - Carnegie Mellon School ...
1 Continuous practice problemsSDS 321 Intro to Probability and Statistics1. (2+2+1+1 = 6 pts) The annual rainfall (in inches) in a certain region is normally dis-tributed with mean 40 and standard deviation 4.(a) What is the probability that, starting with this year, it will take over 10 years beforea year occurs having a rainfall of over 50 inches?LetRdenote the amount of (R 50) =P(R 404 ) = 1 ( ) =.006. LetXbe the number of years before we see over 50 inches of (X 10) =P(None of the first 10 years have more than 50 inches of rain) = (1 .006)10=. pt for gettingP(R 50). 1 pt for correct calculation with geometric.(b) What is the probability that at least 4 out of the next 50 years will have a rainfallof over 50 inches?This is a binomial probability withn= 50,p=.006 andnp=.3. May be better touseX Poisson(3) whereXdenotes number of years with rainfall more than (X 4) = 1 (3 i=0P(X=i)) = 1.
2 9997 =.00031 pt for understanding this is a binomial. 1 pt for the expression. OK if they dontevaluate it.(c) What is the expected number of years with over 50 inches of rainfall in the next 50years?Expectation of a Poisson: 50 .006 = pt for using the expectation of a binomial.(d) What assumptions are you making?The rainfall on each day is independent of each pt for correct (2+1+3+1+3 = 10pts) The joint pdf of two random variablesXandYare given by:fX,Y(x,y) ={24xy x,y [0,1],0 x+y 10otherwise(a) Show thatfX,Y(x,y) is a valid joint probability density function. 10 1 x024xydxdy= 12 10x(1 x)2dx= 12 10(x 2x2+x3) = 11 pt for correct limits on y (or x) and 1 pt for seeing it integrates to (b) FindfX(x).fX(x) = yfX,Y(x,y)dxdy= 1 x024xydy= 12x(1 x)2 Whenx 0 and zero as before.(c) FindE[X] and var(X).E[X] = 10xfX(x)dx= 12 10x2(1 x)2dx= 12 10(x2 2x3+x4)dx= 12(1/3 1/2 + 1/5) = 2/5var(X) =E[X2] E[X]2= 10x2fX(x)dx (2/5)2= 12 10x3(1 2x+x2)dx 4/25 = 12 10(x3 2x4+x5)dx 4/25 =.}
3 04 Any consistent rubric would do as long as they know the definitions of E and Varand know how to integratexi.(d) FindfY(y).By symmetry, this isfY(y) = 12y(1 y)2wheny 0 and zero the corresponding rubric forX.(e) FindE(Y) and var(Y).Since the pdf s are the same, the expectation and variances are (2+1+1+2+2=8pts) The random variables X and Y have joint density functionfX,Y(x,y) ={cxy(1 x) 0< x <1,0< y <10otherwise(a) 10 10xy(1 x)dxdy=c 10x(1 x)dx 10ydy=c12= 1c= 12(b) FindE[X].fX(x) = 10fX,Y(x,y)dy= 6x(1 x). SoE[X] = 106x2(1 x)dx=.5(c) FindE[Y].fY(y) = 10fX,Y(x,y)dx= 2y. SoE[Y] = 102y2dy= 2/3.(d) FindV ar(X). var(X) =E[X2] .25 = 106x3(1 x)dx .25 = 3/10 1/4 = 1/20(e) FindV ar(Y). var(Y) =E[Y2] 4/9 = 102y3dy 4/9 = 1/2 4/9 = 1/1824. The random variablesXandYhave a joint density function given by:f(x,y) ={2e 2x/x0 x < , 0 y x0otherwise(a) What arefX(x) andfY(y)?}}
4 (b) What areE[X] andE[Y]? We have:fX(x) = y=0fX,Y(x,y)dy= x02e 2x/xdy=2e 2x. SoE[X] = 0x2e 2xdx= 1/2 AndfY(y) = x=0fX,Y(x,y)dx= y2e 2x/xdxSo,E[Y] = 0yfY(y)dy= 0y( y2e 2xxdx)dy= 02e 2xx( x0ydy)dx= 0xe 2xdx= 1/4 0ve vdv= 1/4In the last step, we changed the order of the integrals. Originally the outer integralwas over 0 y < and inner was overy x < . But for ease of integration, theouter integral is now over 0 x < and the inner is over 0 y (x) ={C(2x x3) 0< x <5/20x 0 Couldfbe a probability density function? If so findC. We want 1 = 5/20C(2x x3)dx=C( ( )4/4) = (1 25/16) = Now say we useC= 1 = . (x)>0 for allxand integrates to one, then we call it a valid pdf. If you can find axwhere it is negative then this is (1) =C(x2 x4/4) = 3C/4. IfC <0 then this isnegative and thats not okay. So no, this cannot be a probability density Consider the density functionfX(x) ={C(2 x) 0< x <20x 0 Couldfbe a probability density function?}}
5 If so findC. We know that 20C(2 x)dx= 1and soC(4 (2)2/2) = 2C= 1 and soC= 1/2. Also (2 x)/2 0 for 0< x <2. Sothis is a valid pdf.(a) We know that 20C(2 x)dx= 1 and soC(4 (2)2/2) = 2C= 1 and soC= 1/2.(b) Also (2 x)/2 0 for 0< x <2.(c) So this is a valid LetUbe an uniform [0,1] and leta < bbe constants. Show that:(a) Ifb >0 thenbU Uniform([0,b]).(b)a+U Uniform([a,a+ 1])(c) What function ofUis distributed asUniform([a,b])(d) Show that min(U,1 U) Uniform(0,1/2)(a) LetX=bU. Fist note the valuesX=bUcan [0,b] WhenFX(x) =P(X x) =P(bU x)FX(x) =P(U x/b) = 0 Forx <0 x/b0du=u/bFor 0 x/b 11 Forx/b >1 SofX(x) = 1/bwhenx [0,b] and 0 otherwise. But this is the pdf of aUniform([0,b]).(b) First note thata+U [a,a+ 1].Now,Fa+U(x) =P(a+U x) =P(U x a) = (x a),whenx [a,a+ 1], 0 whenx < aand 1 whenx > +U(x) = 1 whenx [a,a+ 1] and 0 otherwise. This is Uniform[a,a+ 1].
6 (c) From the last two exercises we see that adding a constant shifts the Uniform dis-tribution, and multiplying by a constant stretches it. To convertUniform([0,1])toUniform([a,b]) we need both shifting and stretching. LetX= U+ Uniform([a,b]).X [ , + ]. =aand + =band so =b a. So(b a)U+a Uniform([a,b])(d) LetX= min(U,1 U). First note thatXhas to lie in [0,1/2].FX(x) =P(min(U,1 U) x) = 1 P(U x,1 U x)= 1 P(x U 1 x) = 1 (1 2x) = 2xIfx 1/2 and 0 otherwiseAndfX(x) = 2 ifx [0,1/2]. This isUniform([0,1/2]).8. The joint density ofXandYare given by:fX,Y(x,y) ={xe (x+y)x >0,y >00otherwise(a) AreXandYindependent?(b) What arefX(x) andfY(y)?(c) What isP(X+Y 2)?(a) Check if the joint factorizes for allx,y? Yes. So independent. Always remember,check if the bounds onxinvolvey, that can lead to dependence. Here it does not.(b)fX(x) = y=0xe (x+y)dy=xe x(c)fY(y) = x=0xe (x+y)dy=e y 0xe xdx=e (d) This is convolution, because the random variables are (X+Y 2) = x=0 2 xy=0fX(x)fY(y)dxdy= 2x=0xe x 2 xy=0e ydydx= 2x=0xe x(1 e (2 x))dx= 2x=0=xe xdx e 2 20xdx= (1 3/e2) 2/e2= 1 5/e2 Note that after you plug infY(y), you basically say that 2 x 0 sox 2 andthat changes the limits on The joint density function ofXandYis:fX,Y(x,y) ={x+y0< x <1,0< y <10otherwise(a) AreXandYindependent?}}
7 (b) FindfX(x)(c) FindP(X+Y <1)(a) No, the joint density does not factorize into a product of functions of x and y.(b)fX(x) = 1y=0(x+y)dy=x+ 1/2 andfY(y) =y+ 1/2(c)P(X+Y 1) = (x,y):x+y 1fX,Y(x,Y)dxdy= 1x=0 1 xy=0(x+y)dxdy= 10(x(1 x) + (1 x)2/2)dx= 10(x x2+ 1/2 x+x2/2)= 10(1/2 x2/2) = 1/2 1/6 = 1/310. The running time in seconds of an algorithm on a medium sized data set is approximatelynormally distributed with mean 30 and variance 25.(a) What is the probability that the running time of a run selected at random will exceed25 seconds?(b) What is the probability that the running time of at least one of four randomlyselected runs will exceed 25 seconds?5(c) What is the probability that the running time of all runs will exceed 25 seconds givenat least one of four randomly selected runs will exceed 25 seconds?(a) (b) 1 (1 )4(c).84134/(1 (1 .8413)4)11. (2+2+1+1 + 1+1= 8pts) The joint density of X and Y is given byfX,Y(x,y) ={c0< x < y,0< y <10 otherwise(a) What isc?}
8 (b) What isfY(y)?(c) What isE[Y]?(d) What is the conditional pdffX|Y(x|y)?(e) AreXandYindependent?(a) The pdf has to normalize to one. xyfX,Y(x,y)dxdy= 1x=0 1y=xcdxdy=c 1x=0(1 x)dx=c/2 = 1c= 2(b)fY(y) ={ xfX,Y(x,y)dx= yx=02dx= 2yWhen 0< y <10 Otherwise(c)E[Y] = 10yfY(y)dy= 102y2dy= 2/3(d)fX|Y(x|y) =fX,Y(x,y)fY(y)=22y=1yWhen 0< x < y,0< y <1 and 0 otherwise.(e)fX(x) ={ yfX,Y(x,y)dy= 1y=x2dy= 2(1 x) When 0< x < , since 0< x < y <1, there are values such asx=.5,y=.1, where the pdf iszero butfX(x) andfY(y) is}}
9