520 likes | 798 Views
Random Variables and Probability Distributions. Schaum’s Outlines of Probability and Statistics Chapter 2 Presented by Carol Dahl Examples by Tyler Hodge. Outline of Topics. Topics Covered: Random Variables Discrete Probability Distributions Continuous Probability Distributions
E N D
Random Variables and Probability Distributions Schaum’s Outlines of Probability and Statistics Chapter 2 Presented by Carol Dahl Examples by Tyler Hodge
Outline of Topics • Topics Covered: • Random Variables • Discrete Probability Distributions • Continuous Probability Distributions • Discrete Joint Distributions • Continuous Joint Distributions • Joint Distributions Example • Independent Random Variables • Changing of Variables • Convolutions
Random Variables • Variables • events or values • given probabilities • Examples • Drill for oil - may hit oil or a dry well • Quantity oil found
Random Variables • Notation: P (X=xk)= P(xk) • probability random variable, X, takes value xk = P(xk). • Example • Drilling oil well in Saudi Arabia • outcome is either (Dry, Wet) • 5% chance of being dry • P (X = Dry well) = 0.05 or 5% • P (X = Wet well) = 0.95 or 95%
Discrete Probability Distributions • Discrete probability distribution • takes on discrete, not continuous values. • Examples: • Mineral exploration • discrete - finds deposit or not • Amount of deposit found • continuous - any amount may be found
Discrete Probability Distributions • If random variable X defined by: • P(X=xk)= P(xk) , k=1, 2, …. • Then, • 0<P (xk)<1 • ∑k P(x) = 1
Discrete Probability Distributions • Example: Saudi oil well drilling • So, ∑ f (well) = 0.05 +0.95 = 1.0
Discrete Probability Distributions Random variable X cumulative distribution function probability X x
Discrete Probability Distributions Example:Find cumulative distribution function wind speed at a location (miles per hour)
Continuous Probability Distributions • Definition: Continuous probability distribution • takes any value over a defined range • Similar to discrete BUT • replace summation signs with integrals • Examples: • amount of oil from a well • student heights & weights
Continuous Probability Distributions • Continuous probability distribution • describe probabilities in ranges f (x) 0 Equation for probability X lies between a and b:
Continuous Probability Distributions Example: Engineer wants to know probability gas well pressure in economical range between 300 and 350 psi
Continuous Probability Distributions Example cont: let f(x) = x/180,000 for 0<X<600 = 0 everywhere else verify that f(x) is bonafied probability distribution if not fix it
Continuous Probability Distributions Example cont: let f(x) = x/180,000 for 0<X<600 = 0 everywhere else
Discrete Joint Distributions X and Y - two discrete random variables joint probability distribution of X and Y P(X=x,Y=y) = f(x,y) Where following should be satisfied: f(x,y) 0 and
Discrete Joint Distributions joint distribution of two discrete random table cells make up joint probabilities column and row summations marginal distributions.
Continuous Joint Distributions X and Y two continuous random variables joint probability distribution of X and Y f(x,y) with f(x,y) 0 and
Discrete Joint Distribution (Example) Example: Yield from two forests has distribution f(x,y) = c(2x+y) where x and y are integers such that: 0X2 and 0Y3 and f(x,y)=0 otherwise
Joint Distributions (Example) cont. For previous slide, find value of “c” P (X=2, Y=1) Find P(X 1, Y 2) Find marginal probability functions of X & Y
Joint Distributions (Example) cont. P (X=0, Y=0) = c(2X+Y) = c(2*0+0) = 0 P (X=1, Y=0) = c(2X+Y) = c(2*1+0) = 2c Fill in all possible probabilities in table
Joint Distributions (Example) cont. Since, 42c=1 which implies that c=1/42.
Joint Distributions (Example) cont. find P( X=2 ,Y=1) from table: P(X=2,Y=1)=5/42
Joint Distributions (Example) cont. • Evaluate P(X1,1<Y2) • sum cells of shaded region below: P(X1,1<Y2) = (3 + 4 + 5 + 6)/42 = 18/42=0.429
Joint Distributions (Example) cont. Functions: Marginal X = P(X=xi) = j(X=xi, Y=yj) Marginal Y = P(Y=yj) = i(X=xi, Y=yj)
Joint Distributions (Example) cont. Marginal probability functions read off totals across bottom and side of table:
Joint Distributions Continuous Case X, Y ~ f(X,Y) fx(X) = f(X,Y)dx fy(Y) = f(X,Y)dy Example: ore grade for copper and zinc f(x,y) = ce-x-y 0<x<0.4 0<Y<0.3 = 0 elsewhere
Joint Distributions Continuous Case Example: ore grade for copper and zinc f(x,y) = ce-x-y 0<X<0.4 0<Y<0.3 what is c ∫ ∫ cf(x,y)dxdy = 1 fx(x) = 00.3ce-x-ydy = - ce-x-y| 00.3= - ce-x-0.3 + ce-x-0. =00.4 (-ce-x-0.3 + ce-x-0 )= ce-x-0.3-ce--x | 00.4 = ce-0.4 -0.3 -ce –0.4 - [ce-0.3-ce -0] = 1 = c[e-0.7-e –0.4 - e-0.3+1] = 1 c = 1/[e-0.7-e –0.4 - e-0.3+1]= 1/3.084 = 0.324
Independent Random Variables Random variables X and Y are independent if occurrence of one ->no affect other’s probability 3 tests 1. iff P(X=x|Y=y) = P(X=x) for all X and Y P(X|Y) = P(X) for all values X and Y otherwise dependent
Independent Random Variables Random variables X and Y are independent if occurrence of one ->no affect other’s probability 2. iff P(X=x,Y=y) = P(X=x)*P(Y=y) P(X,Y) = P(X)*P(Y) otherwise X and Y dependent
Independent Random Variables Random variables X and Y are independent if occurrence of one ->no affect other’s probability 3. iff P(Xx,Yy) = P(Xx)*P(Yy) F(X,Y) = F(X)*F(Y) otherwise X and Y dependent
Independent Random Variables(Reclamation Example) • State of Pennsylvania • problems with abandoned coal mines • Government officials-reclamation bonding requirements • new coal mines • size of mine influence probability reclamation
Office of Mineral Resources Management compiled joint probability distribution Independent Random Variables(Reclamation Example cont.)
Independent Random Variables – Check 1 • Mine Size and Reclamation Independent? • 1. Does P(X|Y) = P(X) for all values X and Y? • Does P(Mine 0-100|Reclaim) = • P(Mine 0-100 and reclaim)/P(Reclaim) • (2/18)/(12/18) = 2/12 = 1/6 • P(mine 0 - 100 ) = 3/18 = 1/6 • Holds for these values • Check if holds for all values X and Y • If not hold for any values dependent
Independent Random Variables – Check 2 • 2. Does P(X,Y) = P(X)*P(Y) for all values X and Y? • P(Mine 0-100 and reclaim) = 2/18 = 1/9 • P(mine 0-100)* P(reclaim) = 3/18*12/18 • = 36/324 = 1/9 • Holds for these values • Checking it holds for all values X and Y • If not hold for any values – dependent
Independent Random Variables – Check 3 • 3. Does F(X,Y) = F(X)*F(Y) for all values X and Y? • P(Mine<500 and reclaim) = 2/18 + 4/18 = 1/3 • P(Mine < 500)* P(reclaim) =6/18+3/18 • = 9/18*12/18 • =108/324 = 1/3 • Holds for these values • Checking if holds for all values X and Y • If not hold for any values – dependent
Are Copper and Zinc Ore Grades Independent: Continuous Case f(x,y) = 0.324e-x-y • Discrete: P(X|Y) = P(X) • Continuous f(x|y) = f(x) • f(x|y) = f(x,y)/f(y) = 0.324e-x-y/(-0.324e-0.3-y+0.324e-y) • ?= (-0.324e-0.4-x+0.324e-x) • Discrete: P(X,Y) = P(X)*P(Y) • Continuous: f(x,y) = f(x)*f(y) • 0.324e-x-y?=(-0.324e-0.4-x+0.324e-x)*(-0.324e-0.3-y+0.324e-y) • Discrete: P(Xx,Yy) = P(Xx)*P(Yy)
Convolutions - Example density function of their sum U=X+Y : • X, Y ~ e-X-Y • Y = U-X
Integrate Exponential Functions • IntegrateExponential functions • Let u = x2 du/dx = 2x dx = du/2x Fromoil well example :
Changing of Variables Example • discrete probability distribution • size Pennsylvania coal mine • P(X = 1) = 2-1 = 1/2 • P(X = 2) = 2-2 = 1/4 • P(X = 3) = 2-3 = 1/8, etc.
Changing of Variables • MRM wants probability distribution of • reclamation bond amounts where reclamation = U • U = g(X) = X4 + 1 • What is pdf of U • P(X = 1) = 2-1 = 1/2 =>P(U =X4 + 1= 14 + 1=2)= 1/2 • P(X = 2) = 2-2 = 1/4 =>P(U =X4 + 1= 24 + 1=17)= 1/4 • P(X = 3) = 2-3 = => P(U =X4 + 1= ) = • P(X = x) = 2-x => P(U =X4 + 1)
Changing of Variables Discrete Example • P(X = x) = 2-x = 1/2x => P(U =X4 + 1) = 1/2x • Want in terms of U • U = X4 + 1 • Solve for X = (U – 1)(1/4) • P(U = x) = 2-x= 2(U – 1)^(1/4) for U = (14+1, 24+1, 34+1, . .
Changing Variables General Case • Discrete • X ~ Px(X) for X = a,b,c, . . • U = g(X) => X = g-1(U) • U ~ Pu(U) = Px(g-1(U)) for g(a), g(b), g(c), . . . • Continuous • X ~ fx(X) where fx(X) = f(X) for a < X < b • fx(X) = 0 elsewhere • U = g(X) => X = g-1(U) • U ~ fu(U) = fx(g-1(U)) for g(a) < U < g(b)
Normal Practice Variable Change Problem • X ~ N(, ) – < X < • f(X) = 1 exp(-(X- )2/(2 2)) dX • (2)0.5 • Show that (X – ) / ~ N (0,1) – < Z <
ConvolutionsExtending Variable Change to Joint Distributions X, Y ~ f(X,Y) Want density function of sum U = X + Y
Convolutions special case X and Y are independent, f (x,y) = f1(x) f2(y) and previous equation is reduced to following:
Convolutions - Example • Example: X (Oil Production) and Y (Gas Production) independent random variables • f(x,y) = e-2x*3e-3y • Find density function of their sum U=X+Y? • g(u) = 02e-2x*3e-3(u-x)dx • = complete this example
Sum Up Random Variables and Probability Distributions (PS 2) • Discrete Probability Distributions • values with probabilities attached • Cumulative Discrete Probability Functions • Continuous Probability Distributions
Chapter 2 Sum up • Discrete Joint Distributions • P(X=x,Y=y) = f(x,y) • Independent Random Variables • P(X|Y) = P(X) for all values X and Y • P(X,Y) = P(X)*P(Y) • F(X,Y) = Fx(X)*Fy(Y) f(x,y) = f1(x)*f2(y)
Changing Variables • Discrete • X ~ Px(X) for X = a,b,c, . . • U = g(X) => X = g-1(U) • U ~ Pu(U) = Px(g-1(U)) for g(a), g(b), g(c), . . . • Continuous • X ~ fx(X) where fx(X) = f(X) for a < X < b • fx(X) = 0 elsewhere • U = g(X) => X = g-1(U) • U ~ fu(U) = fx(g-1(U)) for g(a) < U < g(b)