lecture notes for class5

21
Continuous Random Variables May 29, 2014 Continuous Random Variables

Upload: perry01

Post on 23-Nov-2015

81 views

Category:

Documents


0 download

DESCRIPTION

Probability and Statisitics

TRANSCRIPT

  • Continuous Random Variables

    May 29, 2014

    Continuous Random Variables

  • Before we begin todays lecture, let us discuss an exercise from theHW:

    Components of a certain type are shipped to a supplier in batchesof ten. Suppose that 50% of all such batches contain no defectivecomponents, 30% contain one defective component, and 20% con-tain two defective components. Two components from a batch arerandomly selected and tested.

    What are the probabilities associated with 0, 1, and 2 defectivecomponents being in the batch under each of the following condi-tions?

    a. Neither tested component is defective.

    b. One of the two tested components is defective.

    Continuous Random Variables

  • Let Bi , i 0, 1, 2 be the event that the batch has i defectivecomponents (out of ten).

    We know that PpB0q .5, PpB1q .3, PpB2q .2

    Let Si , i 0, 1, 2 be the event that the sample has discovered idefective components (out of two).

    We will work only part a) -part b) is similar -. What is being askedin part a) is

    PpBi |S0q ??

    As usual, it helps to visualize the partition of the sample spacewith the tree of conditional events.

    Continuous Random Variables

  • Figure: The tree of Conditional Events need pruning.

    Continuous Random Variables

  • Figure: The tree, pruned. We need to find out the unknowns.Continuous Random Variables

  • The unknowns are the conditional probabilities PpSi |Bjq. We needto compute all of them:

    For PpS0|B0q, it is obvious that if there are 0 defective compo-nents in the batch, there can not be any defective components inthe sample, so it is 1.

    For PpS1|B1q, if there is one defective component the probabilityof detecting it in a sample of two is:

    9`102

    .2 PpS1|B1qHence, PpS0|B1q .8.

    Continuous Random Variables

  • For PpS2|B2q, we have that if there are two defective componentsin the Batch, the probability of detecting both in a sample of twois

    PpS2|B2q 210 1

    9 .022

    (Think of two independent events of finding one defective compo-nent at a time) similarly,

    PpS0|B2q 810 7

    9 .622

    Hence, PpS1|B2q 1 .022 .622 .356We have found all the unknowns in the tree so we can apply Bayestheorem as usual.

    Continuous Random Variables

  • PpB0|S0q PpB0 X S0qPpS0q

    PpS0|B0q PpB0qPpS0 X B0q ` PpS0 X B1q ` PpS0|B2q

    all this data is by now known and easy to find in the tree.We obtain:

    PpB0|S0q .5.5` .24` .1244 .578

    and, by an analogous reasoning:

    PpB1|S0q .24.5` .24` .1244 .278

    PpB2|S0q .1244.5` .24` .1244 .144

    Continuous Random Variables

  • A random variable is continuous if both of the following apply:

    1. Its set of possible values consists either of all numbers in a sin-gle interval on the number line, or a disjoint union of intervals.

    2. No possible value of the variable has positive probability, thatis, PpX cq 0 for any value c .

    Continuous Random Variables

  • Figure: Example of a continuous r.v Average temperature on the surfaceof the earth.

    Continuous Random Variables

  • Problem: In order to obtain Expected Value, Variance etc of anr.v. we need the weights ppxq.

    But, in a continuous r.v. ppxq 0 for all x .

    How to solve this? We introduce the concept of probability densityfunction.

    Let X be a continuous rv. Then a probability distribution or prob-ability density function (pdf) of X is a function f pxq such that forany two numbers a and b:

    Ppa X bq baf pxq dx

    Continuous Random Variables

  • Example: The current in a certain circuit as measured by an am-meter is a continuous random variable X with the following den-sity function:

    f pxq #.075x ` .2 if 3 x 50 otherwise

    a. Graph the pdf and verify that the total area under the densitycurve is indeed 1.

    b. Calculate PpX 4q. How does this probability compare toPpX 4q?

    c. Calculate Pp3.5 X 4.5q and also Pp4.5 X q.

    Continuous Random Variables

  • a.- The pdf is an affine curve. To check that the total mass is in-deed 1:

    53.075x ` .2 dx .0375x2 ` .2x

    5

    3

    . . . 1

    b.- PpX 4q PpX 4q PpX 4q. Since X is a continuousr.v. this is zero.

    PpX 4q 43.075x ` .2 dx . . . .4625

    Continuous Random Variables

  • We have:

    f pxq 0 for all xand 8

    8f pxq dx 1

    Constructing pdf of a continuous r.v. for different experiments willbe more delicate than in the discrete case. However, there is avery elementary distribution that we now describe:

    Problem: We wish to find the pdf of a distribution that, given aninterval rA,Bs R, has PprA,Bsq 1, and the probability of anysubinterval depends only in the length of the subinterval.

    Continuous Random Variables

  • Answer: Clearly, one must have f pxq cte. To see exactly whichconstant, we recall that PprA,Bsq 1, so

    pB Aq cte 1

    We call this the uniform distribution supported on rA,Bs. Thus, ithas pdf:

    f pxq #pB Aq1, if x P rA,Bs0, otherwise

    Continuous Random Variables

  • Example: Suppose the reaction temperature X (in degrees Cel-sius) in a certain chemical process has a uniform distribution withA 5 and B 5.

    a. Compute PpX 0q.

    b. Compute Pp2.5 X 2.5q.

    d. For k satisfying 5 k k ` 4 5, computePpk X k ` 4q

    Continuous Random Variables

  • Answer: Of course, one can compute the desired probabilitieswith the integral of the (constant) density, but it is faster to usethe characterization of the uniform distribution.

    Here, the interval where the distribution is supported is r5, 5s, So

    Pp5 X 5q 1Clearly, then,

    PpX 0q 1{2 , Pp2.5 X 2.5q 1{2(since both intervals are of the same length equal to one half ofthe length of the supporting interval), and

    Ppk X k ` 4q 0.4

    Continuous Random Variables

  • HW: Section 4.1, 5, 6 ,10

    (ans. for 6: b) k 3{4, d) 0.367 , e) .3125)

    (ans. for 10: d) p{aqk p{bqk)

    Continuous Random Variables

  • Question: How to define the Expected Value and the Variance?

    Answer: Recall that ppxq f pxq dx . Hence,

    X E rX s 88

    x f pxq dx

    If hpX q is a function of the r.v. X , then as before we can considerthe r.v. hpX q. Similarly to the discrete case, we have:

    E rhpX qs 88

    hpxq f pxq dx

    Continuous Random Variables

  • As for the Variance:

    V rX s E pX q2 88px q2 f pxq dx

    As in the discrete case, it measures the average deviation from themean X of the r.v.

    It can be shown, and it is easier to compute:

    V rX s E rX 2s pE rX sq2

    Continuous Random Variables

  • HW: Section 4.2 , 15, 17, 21, 22.

    (ans. for 15: b) 0.0107 , e) E rX s .8182, V rX s 0.0124).

    (ans for 21: 314.79 m2)

    (ans for 22: b) median = 1.640 , c) E rX s 1.614, d) 0.061 )

    Continuous Random Variables