Probability and Random Variable Primer

Similar documents
Chapter 1. Probability

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

j) = 1 (note sigma notation) ii. Continuous random variable (e.g. Normal distribution) 1. density function: f ( x) 0 and f ( x) dx = 1

CS-433: Simulation and Modeling Modeling and Probability Review

Simulation and Random Number Generation

Expected Value and Variance

Engineering Risk Benefit Analysis

Lecture 3: Probability Distributions

CS 798: Homework Assignment 2 (Probability)

PhysicsAndMathsTutor.com

Statistics Spring MIT Department of Nuclear Engineering

Homework 9 for BST 631: Statistical Theory I Problems, 11/02/2006

Distributions /06. G.Serazzi 05/06 Dimensionamento degli Impianti Informatici distrib - 1

Maximum Likelihood Estimation of Binary Dependent Variables Models: Probit and Logit. 1. General Formulation of Binary Dependent Variables Models

Notes prepared by Prof Mrs) M.J. Gholba Class M.Sc Part(I) Information Technology

A random variable is a function which associates a real number to each element of the sample space

Maximum Likelihood Estimation of Binary Dependent Variables Models: Probit and Logit. 1. General Formulation of Binary Dependent Variables Models

The Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction

Applied Stochastic Processes

Convergence of random processes

PROBABILITY PRIMER. Exercise Solutions

A be a probability space. A random vector

Introduction to Random Variables

First Year Examination Department of Statistics, University of Florida

Probability Theory (revisited)

MIMA Group. Chapter 2 Bayesian Decision Theory. School of Computer Science and Technology, Shandong University. Xin-Shun SDU

9.07 Introduction to Probability and Statistics for Brain and Cognitive Sciences Emery N. Brown

Propagation of error for multivariable function

Suites of Tests. DIEHARD TESTS (Marsaglia, 1985) See

Statistical analysis using matlab. HY 439 Presented by: George Fortetsanakis

Binomial Distribution: Tossing a coin m times. p = probability of having head from a trial. y = # of having heads from n trials (y = 0, 1,..., m).

Chapter 2 Transformations and Expectations. , and define f

THE ROYAL STATISTICAL SOCIETY 2006 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE

SELECTED PROOFS. DeMorgan s formulas: The first one is clear from Venn diagram, or the following truth table:

DS-GA 1002 Lecture notes 5 Fall Random processes

Statistics and Probability Theory in Civil, Surveying and Environmental Engineering

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur

Department of Computer Science Artificial Intelligence Research Laboratory. Iowa State University MACHINE LEARNING

1. Inference on Regression Parameters a. Finding Mean, s.d and covariance amongst estimates. 2. Confidence Intervals and Working Hotelling Bands

RELIABILITY ASSESSMENT

β0 + β1xi and want to estimate the unknown

ANSWERS CHAPTER 9. TIO 9.2: If the values are the same, the difference is 0, therefore the null hypothesis cannot be rejected.

Here is the rationale: If X and y have a strong positive relationship to one another, then ( x x) will tend to be positive when ( y y)

Equilibrium Analysis of the M/G/1 Queue

1. Fundamentals 1.1 Probability Theory Sample Space and Probability Random Variables Limit Theories

MATH 829: Introduction to Data Mining and Analysis The EM algorithm (part 2)

Problem Set 9 - Solutions Due: April 27, 2005

Multiple Choice. Choose the one that best completes the statement or answers the question.

Stochastic Structural Dynamics

Statistics and Quantitative Analysis U4320. Segment 3: Probability Prof. Sharyn O Halloran

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)

} Often, when learning, we deal with uncertainty:

Limited Dependent Variables

Randomness and Computation

= z 20 z n. (k 20) + 4 z k = 4

UNIVERSITY OF TORONTO Faculty of Arts and Science. December 2005 Examinations STA437H1F/STA1005HF. Duration - 3 hours

1.4. Experiments, Outcome, Sample Space, Events, and Random Variables

7. Multivariate Probability

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 3: Large deviations bounds and applications Lecturer: Sanjeev Arora

Chapter 3 Describing Data Using Numerical Measures

An Experiment/Some Intuition (Fall 2006): Lecture 18 The EM Algorithm heads coin 1 tails coin 2 Overview Maximum Likelihood Estimation

TAIL BOUNDS FOR SUMS OF GEOMETRIC AND EXPONENTIAL VARIABLES

A Robust Method for Calculating the Correlation Coefficient

A REVIEW OF ERROR ANALYSIS

Analysis of Discrete Time Queues (Section 4.6)

Using T.O.M to Estimate Parameter of distributions that have not Single Exponential Family

4 Analysis of Variance (ANOVA) 5 ANOVA. 5.1 Introduction. 5.2 Fixed Effects ANOVA

Durban Watson for Testing the Lack-of-Fit of Polynomial Regression Models without Replications

Predictive Analytics : QM901.1x Prof U Dinesh Kumar, IIMB. All Rights Reserved, Indian Institute of Management Bangalore

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

CS 2750 Machine Learning. Lecture 5. Density estimation. CS 2750 Machine Learning. Announcements

Probability Theory. The nth coefficient of the Taylor series of f(k), expanded around k = 0, gives the nth moment of x as ( ik) n n!

Markov chains. Definition of a CTMC: [2, page 381] is a continuous time, discrete value random process such that for an infinitesimal

HMMT February 2016 February 20, 2016

See Book Chapter 11 2 nd Edition (Chapter 10 1 st Edition)

b ), which stands for uniform distribution on the interval a x< b. = 0 elsewhere

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9

Chapter 7 Channel Capacity and Coding

Computation of Higher Order Moments from Two Multinomial Overdispersion Likelihood Models

Why Monte Carlo Integration? Introduction to Monte Carlo Method. Continuous Probability. Continuous Probability

Rules of Probability

Statistical Inference. 2.3 Summary Statistics Measures of Center and Spread. parameters ( population characteristics )

Strong Markov property: Same assertion holds for stopping times τ.

6. Stochastic processes (2)

Marginal Effects in Probit Models: Interpretation and Testing. 1. Interpreting Probit Coefficients

6. Stochastic processes (2)

A note on almost sure behavior of randomly weighted sums of φ-mixing random variables with φ-mixing weights

Lecture Notes on Linear Regression

Cathy Walker March 5, 2010

Economics 130. Lecture 4 Simple Linear Regression Continued

CHAPTER 3: BAYESIAN DECISION THEORY

Chapter 13: Multiple Regression

BIO Lab 2: TWO-LEVEL NORMAL MODELS with school children popularity data

Resource Allocation and Decision Analysis (ECON 8010) Spring 2014 Foundations of Regression Analysis

Hydrological statistics. Hydrological statistics and extremes

Error Probability for M Signals

MACHINE APPLIED MACHINE LEARNING LEARNING. Gaussian Mixture Regression

CSCE 790S Background Results

Hidden Markov Models

Machine learning: Density estimation

Transcription:

B. Maddah ENMG 622 Smulaton 2/22/ Probablty and Random Varable Prmer Sample space and Events Suppose that an eperment wth an uncertan outcome s performed (e.g., rollng a de). Whle the outcome of the eperment s not known n advance, the set of all possble outcomes s known. Ths set s the sample space, Ω. For eample, when rollng a de Ω = {, 2, 3, 4, 5, 6}. When tossng a con, Ω = {H, T}. When measurng lfe tme of a machne (years), Ω = {, 2, 3, }. A subset E Ω s known as an event. E.g., when rollng a de, E = {} s the event that one appears and F = {, 3, 5} s the event that an odd number appears. Probablty of an event If an eperment s repeated for a number of tmes whch s large enough, the fracton of tme that event E occurs s the probablty that event E occurs, P{E}. E.g., when rollng a far de, P{} = /6, and P{, 3, 5} = 3/6 = /2. When tossng a far con, P{H} = P{T} = /2. In some cases, events are not repeated many tmes. For such cases, probabltes can be a measure of belef (subjectve probablty).

Aoms of probablty () For E Ω, P{E} ; (2) P{ Ω} = ; (3) For events E, E 2,, E,, wth E Ω, E E j =, for all and j, P E = P{ E} =. = Implcatons The aoms of probablty mply the followng results: o For E and F Ω, P{E or F} = P{E F} = P{E} + P{F} P{E F} ; o If E and F are mutually eclusve (.e., E F = ), then P{E F} = P{E} + P{F}; o For E Ω, let E c be the complement of E (.e., E E c = Ω), P{E c } = P{E}; o P{ } =. Condtonal probablty The probablty that event E occurs gven that event F has already occurred s PE { F} PE { F} =. PF { } P{E F} = P{E and F}. 2

Independent events For E and F Ω, P{E F} = P{E F}P{F}. Two events are ndependent f an only f P{E F} = P{E}P{F}. That s, P{E F} = P{E}. Eample Suppose that two far cons are tossed. What s the probablty that ether the frst or the second con falls heads? In ths eample, Ω = {(H, H), (H, T), (T, H), (T,T)}. Let E (F) be the event that the frst (second) con falls heads, E ={(H, H), (H, T)} and F = {(H, H), (T, H)}, and E F ={H, H}. The desred probablty s PE { F} = PE { } + PF { } PE { F} = /2+ /2 /4 = 3/4. Eample 2 When rollng two far dce, suppose the frst de s 3, what s the probablty the sum of the two dce s 7? Let E be the event that the sum of the two dce s 7, E = {(, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, )}, and F be the event that the frst de s 3, F= {(3, ), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)}. Then, PE { F} P{(3,4)} PE { F} = = PF { } P{(3, ), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6)} /36 = =. 6/36 6 Fndng Probablty by Condtonng Suppose that we know the probablty of event B once event A s realzed (or not). We also know P{A}. That s, we know P{B A}, and P{B A c } and P{A}. What s P{B}? 3

Note that B = (A B) (A c B) P{B} = P{A B} + P{A c B}. Therefore, P{B} = P{B A}P{A} + P{B A c }P{A c } = P{B A}P{A} + P{B A c }( P{A}). Here we are fndng P{B} by condtonng on A. In general, f the realzaton of B depends on a partton A of Ω, A A2 A =Ω, A A =, j, n j n P{ B} = P{ B A} P{ A}. = Bayes Formula Ths follows from condtonal probabltes. For two events, PA { B} PB { APA } { } PAB { } = =. c c PB { } PB { APA } { } + PB { A} PA { } Wth a partton A, Eample 3 PA { j B} PB { Aj} PA { j} PA { j B} = =. n PB { } P{ B A} P{ A} Consder two urns. The frst urn contans three whte and seven black balls, and the second contans fve whte and fve black balls. We flp a con and then draw a ball from the frst urn or the second urn dependng on whether the outcome was heads or tals. What s the probablty that a whte ball s selected? = 4

P{W} = P{W H}P{H} + P{W T}P{T} = (3/)(/2) + (5/)(/2) = 2/5. What s the probablty that a black ball s selected? P{B} = P{W} = 3/5. What s the probablty that the con has landed heads gven that a whte ball s selected? PW { H} PH { } (3/)(/ 2) 3 From Bayes formula, PH { W} = = =. PW { } 2/5 8 Random Varables Consder a functon that assgns real numbers to events (outcomes) n Ω. Such real-valued functon s a random varable. E.g., when rollng two far dce, defne as the sum of the two dce. Then, s a random varable wth P{ = 2} = P{(,)}=/36, P{ = 3} = P{(, 2), (2, )}=2/36=/8, etc. E.g., the salvage value of a machne, S, s $,5 f the market goes up (wth probablty.4) and $, f the market goes down (wth probablty.6). Then, S s a random varable wth P{S = 5} =.4 and P{S = } =.6. If the random varable can take on a lmted number of values. Then, ths s a dscrete random varable. E.g., the random varable representng the sum of two dce. 5

If the random varable can take on an uncountable number of values. Then, ths s a contnuous random varable. E.g., the random varable H representng heght of an AUB student. If s a dscrete random varable, the functon f () = P{ = } s the probablty mass functon (pmf) of. The functon F () = P{ } = f ( ) s the cumulatve dstrbuton functon (cdf) of. E.g., for the random varable S representng salvage value of a machne above,.6 f s= f s< fs() s =.4 f s= 5, FS() s =.6 f s< 5. othewse f s 5 For a contnuous random varable,, the cdf s defned based on a functon f () called the densty functon, where P { } = F( ) = f ( tdt ). Fact. For a dscrete random varable f( ) =. For a contnuous random varable, f ( ) =. Independent Random varables Two random varables and Y are sad to be ndependent f P{, Y y} = P{ } P{ Y y} = F ( ) F ( y). Y 6

Epectaton of a random varable The epectaton of a dscrete random varable s. E [ ] = P { = } = f ( ) The epectaton of a contnuous random varable s E[ ] = f ( d ). The epectaton of a random varable s the value obtaned f the underlyng eperence s repeated for a number of tmes whch s large enough and the resultng values are averaged. The epectaton s lnear. That s, for two random varables and Y, E[a + by] = ae[] + be[y]. The epectaton of a functon of random varable, g(), s Eg [ ( )] = g( ) f ( d ). An mportant measure s the n th moment of, n =, 2, n n E[ ] = f ( d ) Measures of varablty The varance of a random varable s ( ) 2 2 2 Var[ ] E[( E[ ]) ] E[ ] E[ ] = =. The standard devaton of a random varable s σ = Var[ ]. 7

The coeffcent of varaton of s CV[] = σ /E[]. The varance (standard devaton) measures the spread of the random varable around the epectaton. The coeffcent of varaton s useful when comparng varablty of dfferent alternatves. Note that Var[a+b] =a 2 Var[], for any real number a and random varable a. Jont dstrbuton The jont dstrbuton functon of two random varables s F, Y(, y) = P{, Y y}. If and Y are dscrete random varables then, F (, y) = P{ =, Y = j} = f (, j), Y, Y,, j y, j y where f,y (.) s the jont pmf of and Y. If and Y are contnuous random varables then, y F (, y ) f (, y ) ddy, = Y, Y, where f,y (.) s the jont pdf of and Y. Fact. F, (, y) = F ( ) F ( y) f and only f (ff) and Y are ndependent. Y Y 8

Covarance The covarance measures the dependence of two random varables. For two random varables and Y, where, σ Y = Cov[, Y ] = E[( E[ ])( Y E[ Y ])] = E[ Y ] E[ ] E[ Y ], E [ Y ] yf (, y ) ddy, = Y, If σ > (<), and Y are sad to be postvely (negatvely) correlated. σ y = ff and Y are ndependent. Propertes of covarance Cov[, ] = Var[ ], Cov[ Y, ] = Cov[ Y, ], Cov[ a, Y ] = acov[ Y, ], Cov[, Y + Z] = Cov[, Y] + Cov[, Z], Cov[ Y, ] = σ σ σ. Y Y σ Y The coeffcent of correlaton s defned as ρ Y =. σ σ Note that ρ Y Note that Var[ + Y] = Var[ ] + 2Cov[, Y] + Var[ Y]. If and Y are ndependent, Var[+Y] = Var[] + Var[Y]. Y 9

The Bernoull Random Varable Suppose an eperment can result n success wth probablty p and falure wth probablty (w.p.) p. We defne a Bernoull random varable as = f the eperment outcome s a success and =, otherwse. The pmf of s p f = f ( ) = P{ = } = p f =. The epected value of s E[] = ( p) + (p) = p. The second moment of s E[ 2 ] = 2 ( p) + 2 (p) = p. The varance of s Var[] = E[ 2 ] (E[]) 2 = p p 2 = p( p). The Bnomal Random Varable Consder n ndependent trals, each of whch can results n a success w.p. p and falure w.p. p. We defne a Bnomal random varable,, as the number of successes n the n trals. The pmf of s defned as n n f () = P{ = } = p ( p), =,, n n n! where =. ( n )!!

.3 f ().2. Note that 2 3 4 5 n n n n f () = p ( p) =, =,, n. = = Fact. Let =, =,, n, f the th tral results n success and =, otherwse. Then n =. = Note that are ndependent and dentcally dstrbuted (d) Bernoull random varable wth parameter p. Therefore, n E [ ] = E [ ] = np, Var [ ] = Var [ ] = np( p). Eample 4 = = A far con s flpped 5 tmes. What s the probablty that two heads are obtaned? The number of heads,, s a bnomal random varable wth parameters n = 5 and p =.5. Then, the desred probablty s P{ = 2} = [5!/(2! 3!)] (.5) 2 (.5) 3 =.33. n

The Geometrc Random Varable Suppose ndependent trals, each havng a probablty p of beng a success, are performed. We defne the geometrc random varable (rv) as the number of trals untl the frst success occurs. The pmf of s defned as f = P = = p p = () { } ( ),, 2,.5 f ()..5 5 5 2 Note that f () defnes a pmf snce f ( ) = p ( p) = p ( p) = p/[ ( p)] =. = = = Let q = p. The frst two moments and varance of are [ ], E = q p= = p 2 p 2 2 [ ] = =, 2 = p E p q p = E E = p 2 2 Var[ ] [ ] ( [ ]). 2 2

Eample 5. When rollng a de repettvely, what s the probablty that the frst 6 appears on the sth roll? Let be the number of rolls untl a 6 appears. Then, s a geometrc rv wth parameter p = /6, and the desred probablty s P{ = 6} = (5/6) 5 (/6) =.667. What s the epected number of rolls untl a 6 appears? E[] = /p = 6. The Posson Random Varable A rv, takng on values,,, s sad to be a Posson random varable wth parameter λ > f λ λ f () = P{ = } = e, =,,!.5 f ()..5 2 4 6 8 f () defnes a pmf snce λ () = = ( )( ) =. λ λ λ f e e e = =! The Posson rv s a good model for demand, arrvals, and certan rare events. 3

The frst two moments and the varance of are E [ ] = λ, E λ λ 2 2 [ ] = +, Var E E 2 2 [ ] = [ ] ( [ ]) =. λ Let and 2 be two ndependent Posson rv s wth means λ and λ 2. Then, Z = + 2 s a Posson rv wth mean λ + λ 2. Eample 6. The monthly demand for a certan arplane spare part of Fly Hgh Arlnes (FHA) fleet at Berut arport s estmated to be a Posson random varable wth mean.5. Suppose that FHA wll stock one spare part at the begnnng of March. Once the part s used, a new part s ordered. The delvery lead tme for a part s 2 months. What s the probablty that the spare part wll be used durng March? Let be the demand for the spare part. The desred probablty s P{ } = e λ = e.5 =.393. What s the probablty that FHA wll face a shortage on ths part n March? The desred probablty s P{ > } = P{ = } P{ = } = e.5.5e.5 =.9. The Unform Random Varable A rv that s equally lke to be near any pont of an nterval (a, b) s sad to have a unform dstrbuton. 4

The pdf of s, f a< < b f ( ) = b a, otherwse Note that f () defnes a pdf snce b a b f ( ) = d. b a = a.3 f ( ).2. 2 3 4 5 6 The cdf of s, f < a a F( ) = f ( tdt ) =, f a b b a, otherwse The frst two moments of are b b 2 2 b a b a + E [ ] = f ( d ) = d= =, b a 2( b a) 2 a a b b 2 3 3 2 2 2 2 b a a + ab+ b [ ] = ( ) = = =. b a 3( b a) 3 a a E f d d The varance of s E[ 2 ] (E[]) 2 = (b a) 2 / 2. 5

The Eponental Random Varable An eponental rv wth parameter λ s a rv whose pdf s f λe λ, f ( ) =, othewse.5 f ( )..5 5 5 2 Note that f () defnes a pdf snce λ λ f ( ) = λe d= e =. The eponental rv s a good model for tme between arrvals or tme to falure of certan equpments. The cdf of s λt λ λ λ F ( ) = f ( t) dt = e dt = e = e,. A useful property of the eponental dstrbuton s that P{ > } = e λ. 6

The frst two moments and the varance of are E [ ] =, λ 2 E = λ 2 [ ], 2 Var = E E = λ 2 2 [ ] [ ] ( [ ]). 2 Preposton. The eponental dstrbuton has the memoryless property. I.e., P { > t+ u > t} = P { > u}. Proof. P { > t+ u, > t} P { > t+ u} P { > t+ u > t} = = P { > t} P { > t} λ ( t+ u) e λu = = e = P{ > u}. λt e The memoryless property allows developng tractable analytcal models wth the eponental dstrbuton. It makes the eponental dstrbuton very popular n modelng. Preposton. Let and 2 be two ndependent eponental random varables wth parameters λ `and λ 2. Let = mn(, 2 ). Then, s an eponental random varable wth parameter λ `+ λ 2. Proof. P{ > } = P{ >, 2 > } = P{ > }P{ 2 > } λ λ2 ( λ+ λ2) = e e = e. 7

Eample 7. The amount of tme one spends n the bank s eponentally dstrbuted wth mean mnutes. A customer arrves at : PM. What s the probablty that the customer wll be n the bank at :5 PM? Let be the tme the customers spends n the bank. Then, s eponentally dstrbuted wth parameter λ = /. The desred probablty s P{ > 5} = e 5λ = e 5/ =.223. It s now :2 PM and the customer s stll n the bank? What s the probablty that the customer wll be n the bank at :35 PM?.223 (by the memoryless property). The Normal Random Varable We say that a random varable s a normal rv wth parameters μ and σ > f t has the followng pdf: 2 2 ( μ) /(2 σ ) e f ( ) =, (, ). 2πσ.5 f ( )..5 5 5 5 8

Note that f () defnes a pdf. Wth a change of varable z = ( μ)/σ and usng the fact that z 2 /2 2 2 e e dz = 2 π, ( μ) /(2 σ ) 2 z /2 f ( ) d = d = e dz =. 2πσ 2 π The normal rv s a good model for quanttes that can be seen as sums or averages of a large number of rv s. The cdf of, F( ) = f( t) dt, has no closed-form. The frst two moments of and varance of are E[ ] = μ, E 2 2 2 [ ], Var = σ + μ = σ 2 [ ]. Fact. If s a normal rv, then Z = ( μ)/σ s a standard normal r.v. wth parameters and. Proof. Note that μ + σ z 2 2 ( t μ ) /(2 σ ) μ e P{ Z < z} = P{ < z} = P{ < μ+ σz} = dt. σ 2πσ Let u = (t μ)/σ, then z u 2 /2 e P{ Z < z} = du, whch s the cdf of 2π the standard normal. Ths fact mples that = μ + σ Z. 9

The cdf of, F (), s evaluates through the cdf of Z, F Z (z), whch s often tabulated, μ μ P { < } = PZ { < } F( ) = FZ σ σ. Proposton If and 2 are two ndependent normal rvs wth means μ and varances σ 2, =,2, then Z = + 2 s normal wth mean μ + μ 2 and varance σ 2 + σ 2 2. Theorem (central lmt theorem). If, =, 2,, n, are d rv s wth mean μ and varance σ 2. Then, for n large enough, n = s normally dstrbuted wth mean nμ and varance nσ 2. Eample 8. The heght of an AUB male student s a normal rv wth mean 7 cm and standard devaton 8 cm. What s the probablty that the heght of an AUB student s less than 8 cm? Let be the heght of the student. Then, the desred probablty s P{ < 8} = P{Z < (8 7)/8} = P{Z <.25} =.894. 2