1 / 20

STAT3600

STAT3600. Lecture 5 Chapter III Discrete Random Variables and Probability Distributions. Discrete Random Variables.

faolan
Download Presentation

STAT3600

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. STAT3600 Lecture 5 Chapter III Discrete Random Variables and Probability Distributions

  2. Discrete Random Variables • A random variable (rv) is any rule in the universe of an experiment that associates a number with each possible outcome of the experiment. The rv’s domain is the sample space and its range is the set of real numbers. • Random variables are denoted by uppercase letters, like X, Y, etc. The lowercase letters, say x, are used to show the numbers associated with an outcome s by the rv X. • A discrete rv’s possible values, Rx, either constitute a finite set or else can be listed in an infinite sequence in which there is a first element, a second element, etc.

  3. An rv whose possible values are 1 and 0 only is called a Bernoulli random variable. • Example: Every computer manufactured at ABC Computer Co. is inspected before it leaves for the customer. A computer either fails (F), or passes (P) the inspection. • U={F,P} X(F) = 0 X(P) = 1

  4. Probabiltiy Distributions for Discrete Random Numbers • Probabilities assigned to various outcomes in U determine probabilities associated with the values of any particular rv X. • Example 3.7 (page 102) Lot 1 2 3 4 5 6 Num. of defective 0 2 0 1 2 0 Let X be the number of defective components in a lot. The three possible values of X are X=0 for no defective, X=1 for 1 defective, and X=2 for two defective components. Let p(0) denote the probability that X=0, p(1) and p(2) are the probabilities that X=1, and X=2, respectively. Then; p(0) = P(X=0) = P(lot 1 or 3 or 6) = 3 / 6 = 0.500 p(1) = P(X=1) = P(lot 4) = 1 / 6 = 0.167 p(2) = P(X=2) = P(lot 2 or 5) = 2 / 6 = 0.333

  5. The probability distribution or the probability mass function (pmf) of a discrete rv is defined for every number x by: p(x) = P(X = x) = P(all s  U: X(s) = x) • Example 3.8 (page 102) X=0 for desktop computer, X=1 for laptop computer. 20% of the purchasers selected a laptop this week. Then the pmf for X is: p(0) = P(X=0) = P(purchaser selects a desktop) = 0.80 p(1) = P(X=1) = P(purchaser selects a laptop) = 0.20 p(x) = P(X=x) = 0 for x ≠ 0 or 1

  6. Line graph 0 1 2 1 0 1 2 1 • pmf plotting: Probability histogram

  7. The cumulative distribution function (cdf): • Gives the probability that the observed value of X will be at most x. Note that the cdf accumulates all the prs to the left of and at the value of x. Example 3.11 (page 106) y 1 2 3 4 p(y) 0.4 0.3 0.2 0.1 F(1) = P(Y1) = P(Y=1) = 0.4 F(2) = P(Y2) = P(Y=1 or Y=2) = 0.4 + 0.3 = 0.7 F(3) = P(Y3) = P(Y=1 or Y=2 or Y=3) = 0.4 + 0.3 + 0.2 = 0.9 F(4) = P(Y4) = P(Y=1 or Y=2 or Y=3 or Y=4) = 0.4 + 0.3 + 0.2 + 0.1 = 1.0

  8. 1.0 • cdf plotting: 0.5 1 2 3 4 • For a discrete rv, the graph of F(X) will have a jump at every possible value of X, and will be flat between possible values. The dots plotted on the graph show the value of F(X) at the point of discontinuity. E.g. F(1) = 0.4 not 0, F(2) = 0.7 not 0.4, etc. Such graphs are called step functions.

  9. Properties of cdfs: • 0  F(x)  1 for all x in Rx • F(x) must be monotonically non-decreasing • F() = 0 and F(+) = 1 • Given that Rx = [a, b], where a and b are real numbers and b > a , then for certain: F(x) = 0 for all x < a, and F(x) = 1 for all x  b.

  10. The Expected Value of a Discrete RV • The expected value (or mean) of a discrete random variable is calculated by: • Example (page 111) 15,000 students. X=the number of courses for which a randomly selected student is registered. x 1 2 3 4 5 6 7 p(x) 0.01 0.03 0.13 0.25 0.39 0.17 0.02 Num. reg. 150 450 1950 3750 5850 2550 300 Avg. num. of reg. courses per student = Total num. of course registrations / Total number of students = [1(150) + 2(450) + 3(1950) + 4(3750) + … + 7(300)] / 15000 = 1(150/15000) + 2(450/15000) + 3(1950/15000) + … + 7(300/15000) =1 · p(1) + 2 · p(2) + 3 · p(3) + 4 · p(4) + 5 · p(5) + 6 · p(6) + 7 · p(7) The average or the mean value of X is the weighted average of the possible values of X, Rx, where the weights are the probabilities of the possible values of X.

  11. The expected value of a function of X • Sometimes, it is necessary to find the expected value of a function of the descrete rv X, i.e. say h(X). Example: Let X=the number of cylinders in the engine of the next car to be serviced. The cost of tune up is related to h(X) = 20 + 3X + 0.5X2. Since X is a random variable, h(X) will also be a random variable. Lets denote h(X) by Y. x 4 6 8 y 40 56 76 p(x) 0.5 0.3 0.2 p(y) 0.5 0.3 0.2 E(Y) = E[h(X)] = (40)(0.5) + (56)(0.3) + (76)(0.2) E(Y) = 52 E(X) = (4)(0.5) + (6)(0.3) + (8)(0.2) = 5.4 h(5.4) = 50.78 NOTE THAT E[h(X)] ≠ h(E[x])

  12. Rules of expected value: • E(aX+b) = a · E(X) + b The expected value of a linear function of X equals the linear function evaluated at the expected value of X. • For any constant a, E(aX) = a · E(X) • For any constant b, E(X+b) = E(X) + b

  13. The Variance of a Discrete RV Let X have pmf p(x) and expected value . The variance of X, V(X), or 2 is: • The standard deviation is: • An alternative formula for V(X): V(X) = E(X2)  [E(X)]2

  14. When h(X) is a linear function of X, then the variance of h(X) is easily related to V(X); • Rules of variance: • Variance of h(X): Example 3.22 (page 115) Three computers are purchased at $500 each. They will be sold for $1000 a piece. Unsold computers will be sold back to the manufacturer at $200 a piece. X=number of computers sold. p(0)=0.10, p(1)=0.20, p(2)=0.30, p(3)=0.40. h(X) = profit = 1000X + 200(3-X) – 1500 = 800X-900. E[X] = 0·p(0)+1·p(1)+2·p(2)+3·p(3) = 0·(0.10) + 1·(0.20) + 2·(0.30) + 3·(0.40) = 2  The expected number of computers sold. E[h(X)] = h(0)·p(0)+h(1)·p(1)+h(2)·p(2)+h(3)·p(3) = (-900)·(0.10) + (-100)·(0.20) + (700)·(0.30) + (1500)·(0.40) = $700  The expected profit. E[X2] = 02·(0.10) + 12·(0.20) + 22·(0.30) + 32·(0.40) = 5 V[X] = E[X2] – [E(X)]2 = 5-22 = 1 V[h(X)] = (800)2 · V(X) = (640,000)(1) = 640,000 and stdev[h(X)] = 800 ( h(X) = 800X – 900 ) a=800 b = -900  V[h(X)] = a2 · V(X)

  15. Consider an experiment, whose outcome can be classified as either a success (1) or a failure (0). Then the random variable used to express the outcome of the experiment is called a Bernoulli rv. • The Bernoulli RV • For the Bernoulli RV:

  16. The expected value of a Bernoulli RV: • = E(X) = 0(1  p) + 1  p = p • The variance of a Bernoulli RV: V(X) = p · q Example: A small part of a steel pipe is produced by an automatic machine, but the machine is not perfect and manufactures one NCU in 100 units, i.e., the pr of a randomly selected unit being defective is p = 0.01. One item is selected at random from a lot of N = 5000 parts. Let X be the Bernoulli rv with U = {good, NC }, Rx = {0, 1}. Then the PDF of X is given by The proportion p = 0.01 is called the FNC (fraction non conforming) of the process. E(X) = 0.01 and V(X) = 0.0099

  17. The Binomial PDF An experiment that conform to the following: • The experiment consists of a sequence of n smaller experiments called trials, where n is fixed prior to the experiment, • Each trial can result in one of the two possible outcomes (success-failure or 0-1), • The trials are independent, • The probability of success (or failure) is constant from one trial to the other. is called a binomial experiment. Now, consider n > 1 independent Bernoulli trials in successions. The binomial rv, X, is defined as X = “The number of successes observed in n trials”, where Rx = {0, 1, 2, 3,..., n  1, n}, and p = probability of success at each single trial.

  18. Example: Two dice are tossed 10 times. Compute the pr that a total of 8 comes up exactly x = 3 times (out of 10 trials). Success = {The 2 faces of the dice sum to 8 in one toss} Success = {(2, 6), (3, 5), (4, 4), (5, 3), (6, 2)}. p = pr of success in a single trial = 5/36, q = pr of failure = 1  p = 31/36. The Binomial rv X = The number of Eight’s observed in 10 tosses. The following table shows one possible way to obtain exactly three successes in 10 trials, where Success = {8}, and Failure = {8} = { Non-eight} Because of the multiplication principle, the pr for the above specific sequence 888 is (31/36)(31/36)(5/36)(31/36)(5/36)(31/36)(31/36)(31/36)(5/36)(31/36) = (5/36)3· (31/36)7 However, since we are just interested in exactly three 8's in n = 10 trials and each sequence of 8's and are MUEX and have the same exact pr of (5/36)3(31/36)7 (plus the fact that the total number of different ways of placing the three successes in 10 different trials is 10C3, we obtain: b(3; 10, 5/36) = 10C3 (5/36)3· (31/36)7 = 0.1128751 10C3 =

  19. For the same example, the pr of observing exactly x successes in 10 trials is given by: p(x) = b(x; 10, 5/36) = 10Cx(5/36)x(31/36)10  x x = 0, 1, 2, ..., 10. • The above PDF is called the Binomial with parameters n = 10 and p = 5/36, denoted as Bin(n, p) = Bin(10, 5/36). The general form of the Binomial pmf is given by: b(x; n, p) = nCx px qnx , (where q = 1  p), and its cdf is given by: F(x) = B(x; n, p) = = It is paramount to observe that the binomial rv, X, is the sum of n independent Bernoulli rvs, Xi, i.e., X = X1 + X2 + ... + Xn where Xi represents the Bernoulli rv at the ith trial whose value is equal to 0 or 1 (0 for failure and 1 for success) so that the Rx = 0, 1, 2, ..., n.

More Related