Discrete Probability Distributions The discrete probability distribution function (pdf) f(x) = P(X = x) ≥ 0 Σx f(x) = 1 The cumulative distribution, F(x) F(x) = P(X ≤ x) = Σt ≤ x f(t) Note the importance of case: F not same as f MDH Chapter 3-4 Lecture 1 EGR 252 2015
Probability Distributions From our example, the probability that no more than 2 of the envelopes contain $10 bills is P(X ≤ 2) = F (2) = _________________ F(2) = f(0) + f(1) + f(2) = .833625 Another way to calculate F(2) (1 - f(3)) The probability that no fewer than 2 envelopes contain $10 bills is P(X ≥ 2) = 1 - P(X ≤ 1) = 1 – F (1) = ________ 1 – F(1) = 1 – (f(0) + f(1)) = 1 - .425 = .575 Another way to calculate P(X ≥ 2) is f(2) + f(3) F(2) = f(0) + f(1) + f(2) = .833625 (OR 1 - f(3)) 1 – F(1) = 1 – (f(0) + f(1)) = 1 - .425 = .575 (OR f(2) + f(3)) MDH Chapter 3-4 Lecture 1 EGR 252 2015
Continuous Probability Distributions In general, The probability that the average daily temperature in Georgia during the month of August falls between 90 and 95 degrees is The probability that a given part will fail before 1000 hours of use is Probability density function f(x) MDH Chapter 3-4 Lecture 1 EGR 252 2015
Visualizing Continuous Distributions The probability that the average daily temperature in Georgia during the month of August falls between 90 and 95 degrees is The probability that a given part will fail before 1000 hours of use is MDH Chapter 3-4 Lecture 1 EGR 252 2015
Continuous Probability Calculations The continuous probability density function (pdf) f(x) ≥ 0, for all x ∈ R The cumulative distribution, F(x) Example: the uniform distribution (i.e., f(x) = 1, 1 < x < 2) 1. what is the area of the rectangle? (1) The total area under the curve is P(S) and so will always be 1. MDH Chapter 3-4 Lecture 1 EGR 252 2015
Example: Problem 3.7, pg. 92 The total number of hours, measured in units of 100 hours x, 0 < x < 1 f(x) = 2-x, 1 ≤ x < 2 0, elsewhere P(X < 120 hours) = P(X < 1.2) = P(X < 1) + P (1 < X < 1.2) NOTE: You will need to integrate two different functions over two different ranges. b) P(50 hours < X < 100 hours) = Which function(s) will be used? { P(X < 1.2) = P(X < 1) + P (1 < X < 1.2) = ∫01xdx + ∫11.2 (2-x)dx = (x2/2)|01 + (2x- x2/2)|11.2 =0.68 P(.5 < X < 1) = 0.375 MDH Chapter 3-4 Lecture 1 EGR 252 2015
4.1 Mathematical Expectation Example: Repair costs for a particular machine are represented by the following probability distribution: What is the expected value of the repairs? That is, over time what do we expect repairs to cost on average? x $50 $200 $350 P(X = x) 0.3 0.2 0.5 The expected value or mean of a probability distribution is the long-run theoretical average. MDH Chapter 3-4 Lecture 1 EGR 252 2015
Expected Value – Repair Costs μ = mean of the probability distribution For discrete variables, μ = E(X) = ∑ x f(x) So, for our example, E(X) = 50(0.3) + 200(0.2) + 350(0.5) = $230 E(x) <weighted average> E(X) = 50(0.3) + 200(0.2) + 350(0.5) = $230 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Another Example – Investment By investing in a particular stock, a person can take a profit in a given year of $4000 with a probability of 0.3 or take a loss of $1000 with a probability of 0.7. What is the investor’s expected gain on the stock? X $4000 -$1000 P(X) 0.3 0.7 E(X) = $4000 (0.3) -$1000(0.7) = $500 X 4000 -1000 P(X) 0.3 0.7 E(X) = 4000 (0.3) -1000(0.7) = 500 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Expected Value - Continuous Variables For continuous variables, μ = E(X) = E(X) = ∫ x f(x) dx Vacuum cleaner example: problem 7 pg. 92 x, 0 < x < 1 f(x) = 2-x, 1 ≤ x < 2 0, elsewhere (in hundreds of hours.) { = 1 * 100 = 100.0 hours of operation annually, on average MDH Chapter 3-4 Lecture 1 EGR 252 2015
Functions of Random Variables Ex 4.4. pg. 111: Probability of X, the number of cars passing through a car wash in one hour on a sunny Friday afternoon, is given by Let g(X) = 2X -1 represent the amount of money paid to the attendant by the manager. What can the attendant expect to earn during this hour on any given sunny Friday afternoon? E[g(X)] = Σ g(x) f(x) = Σ (2X-1) f(x) = (2*4-1)(1/12) +(2*5-1)(1/12) …+(2*9-1)(1/6) = $12.67 x 4 5 6 7 8 9 P(X = x) 1/12 1/4 1/6 Σ (2x-1) f(x) = 7(1/12) + 9(1/12) … + 17(1/6) = $12.67 MDH Chapter 3-4 Lecture 1 EGR 252 2015
4.2 Variance of a Random Variable Recall our example: Repair costs for a particular machine are represented by the following probability distribution: What is the variance of the repair cost? That is, how might we quantify the spread of costs? x $50 200 350 P(X = x) 0.3 0.2 0.5 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Variance – Discrete Variables For discrete variables, σ2 = E [(X - μ)2] = ∑ (x - μ)2 f(x) = E (X2) - μ2 Recall, for our example, μ = E(X) = $230 Preferred method of calculation: σ2 = [E(X2)] – μ2 = 502 (0.3) + 2002 (0.2) + 3502 (0.5) – 2302 = $17,100 Alternate method of calculation: σ2 = E(X- μ)2 f(x) = (50-230)2 (0.3) + (200-230)2 (0.2) + (350-230)2 (0.5) = $17,100 E(X2) – μ2 = 502 (0.3) + 2002 (0.2) + 3502 (0.5) – 2302 = $17,100 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Variance - Investment Example By investing in a particular stock, a person can take a profit in a given year of $4000 with a probability of 0.3 or take a loss of $1000 with a probability of 0.7. What are the variance and standard deviation of the investor’s gain on the stock? E(X) = $4000 (0.3) -$1000 (0.7) = $500 σ2 = [∑(x2 f(x))] – μ2 = (4000)2(0.3) + (-1000)2(0.7) – 5002 = $5,250,000 σ = $2291.29 X 4000 -1000 P(X) 0.3 0.2 E(X) = 4000 (0.3) -1000(0.7) = 500 σ2 = ∑(x2 f(x)) –μ2 = (4000)2(0.3) + (-1000)2(0.7) – 5002 = $5,250,000 σ =$2291.29 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Variance of Continuous Variables For continuous variables, σ2 = E [(X - μ)2] =[∫ x2 f(x) dx] – μ2 Recall our vacuum cleaner example pr. 7 pg. 88 x, 0 < x < 1 f(x) = 2-x, 1 ≤ x < 2 0, elsewhere (in hundreds of hours of operation.) What is the variance of X? The variable is continuous, therefore we will need to evaluate the integral. { E(X) = ∫x2 f(x)dx – μ2 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Variance Calculations for Continuous Variables (Preferred calculation) What is the standard deviation? σ = 0.4082 hours [∫01 x3 dx + ∫12x2 (2-x)dx] – μ2 = x4/4 |10 + (2x3/3 – x4/4)|12 - 12 = 0.1667 σ = 0.4082 MDH Chapter 3-4 Lecture 1 EGR 252 2015
Covariance/ Correlation A measure of the nature of the association between two variables Describes a potential linear relationship Positive relationship Large values of X result in large values of Y Negative relationship Large values of X result in small values of Y “Manual” calculations are based on the joint probability distributions Statistical software is often used to calculate the sample correlation coefficient (r) MDH Chapter 3-4 Lecture 1 EGR 252 2015