Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Random Variables ECE460 Spring, 2012 Combinatorics Notation: Population size Subpopulation size Ordered Sample n r a1 , a2 , a3 a3 , a1 , a2 How many samples of size r can be formed from a population of size n? 1. Sampling with replacement and ordering 2. Sampling without replacement and with ordering 2 How many samples of size r can be formed from a population of size n? 3. Sampling without replacement and without ordering 4. Sampling with replacement and without ordering 3 Bernoulli Trials Independent trials that result in a success with probability p any failure probability 1-p. 4 Conditional Probabilities Given two events, E1 & E2, defined on the same probability space with corresponding probabilities P(E1) & P(E2): P E1 E2 , P E2 0 P( E1 | E2 ) P E2 0, Otherwise 5 Example 4.5 An information source produces 0 and 1 with probabilities 0.3 and 0.7, respectively. The output of the source is transmitted via a channel that has a probability of error (turning a 1 into a 0 or a 0 into a 1) of 0.2. 1. What is the probability that at the output a 1 is observed? 2. What is the probability that a 1 was the output of the source if at the output of the channel a 1 is observed? 6 Random Variables Working with Sets has its limitations – Selecting events in Ω – Assigning P[ ] – Verification of 3 Axioms 1. P E 0 2. P 1 3. P E F P E P F if E F Would like to leave set theory and move into more advanced & widely used mathematics (i.e., Integration, Derivatives, Limits…) Random Variables: – Maps sets in Ω to R – Subsets of the real line of the form (, x] are called Borel sets. A collection of Borel sets is called a Borel σ-fields. – A function that will associate events in Ω with the Borel sets is called a Random Variable. 7 Cumulative Distribution Function (CDF) CDF of a random variable X is defined as: FX x P : X x or FX x P X x Properties: 1. 0 FX x 1 2. FX x is nondecreasing 3. lim FX x 0 and lim FX x 1 x x 4. FX x is continuous from the right 5. P a X b FX b FX a 6. P X a FX a FX a 8 Probability Density Function (PDF) PDF of a random variable X is defined as: fX x d FX x dx Properties: 1. 2. 3. fX x 0 b a f X x dx 1 f X x dx P a X b 4. In general, P X A f X x dx A 5. FX x x f X u du For discrete random variables, this is known as the Probability Mass Function (PMF) pi P X xi 9 Example 4.6 A coin is flipped three times and the random variable X denotes the total number of heads that show up. The probability of a head in one flip of this coin is denoted by p. 1. What values can the random variable X take? 2. What is the PMF of the random variable X? 3. Derive and plot the CDF of X. 4. What is the probability that X exceeds 1? 10 Uniform Random Variable This a continuous random variable taking values between a and b with equal probabilities over intervals of equal length. 11 Bernoulli Random Variable Only two outcomes (e.g., Heads or Tails) Probability Mass Function: x0 1 p, P[ X x] p, x 1 0, otherwise Leads to binomial law (sampling w/o replacement & w/o ordering) P k successes in n trials b k ; n, p where p = probability of a success Example: 10 independent, binary pulses per second arrive at a receiver. The error probability (that is, a zero received as a one or vice versa) is 0.001. What is the probability of at least one error/second? 12 Binomial Law Example Five missiles are fired against an aircraft carrier in the ocean. It takes at least two direct hits to sink the carrier. All five missiles are on the correct trajectory must get through the “point defense” guns of the carrier. It is known that the point defense guns can destroy a missile with probability P = 0.9. What is the probability that the carrier will still be afloat after the encounter? 13 Uniform Distribution 1 ba a b x Probability Density Function (pdf) Cumulative distribution function A resistor r is an RV uniform distribution between 900 and 1100 ohms. Find the probability that r is between 950 and 1050 ohms. 14 Gaussian (Normal) Random Variable A continuous random variable described by the density function: fX x 1 e 2 ( x m )2 2 2 Notation: X : N m, Properties: 1. If Y aX b where a and b are scalars, then Y : N a m b, a 2 2. xm N 0,1 3. F a a f x dx X X 15 Special Case: CDF for N(0,1) The CDF for the normalized Gaussian random variable with m = 0 and σ = 1 is: 2 X x x 1 t2 e dt 2 Pre-Normalized Gaussian: xm FX x X Another related function (complimentary error function) used for finding P(X > x) is: 2 1 t2 Q x e dt , x 2 1 X x Properties: x0 Q x 1 Q x 1 Q 0 2 Q 0 16 Gaussian Example A random variable is N(1000; 2500). Find the probability that x is between 900 and 1050. 17 Complimentary Error Function 18 The Central Limit Theorem Let X 1 , X 2 ,..., X n be a set of random variables with the following properties: 1. The Xk with k = 1, 2, …, n are statistically independent 2. The Xk all have the same probability density function 3. Both the mean and the variance exist for each Xk Let Y be a new random variable defined as n Y Xk k 1 The, according to the central limit theorem, the normalized random variable Y E[Y ] Z Y Approaches a Gaussian random variable with zero mean and unit variance as the number of random variables X1 , X 2 ,..., X n Increases without limit. 19 Functions of Random Variables Let X be a r.v. with known CDF and PDF. If g(X) is a function of the r.v. X then Y gX FY y P : g X y fY y i f X xi g xi Example: Given the function Y aX b where a > 0 and b are constants and X is a r.v. with FX x . Find FY y and fY y . 20 Statistical Averages The expected value of the random variable X is defined as E g x g x f X x dx Special Cases: Characteristic Functions: X f X x e j x dx Special Cases: 21 Multiple Random Variables The joint CDF of X and Y is FX ,Y x, y P : X x, Y y P X x, Y y and its joint PDF is 2 f X ,Y x, y FX ,Y x, y x y Properties: 1. FX x FX ,Y x, , 2. fX x 3. 4. FY y FX ,Y , y f X ,Y x, y dy, fY y f X ,Y x, y dx f x, y dx dy 1 P X , Y A f u , v du dv X ,Y x , y A 5. FX ,Y x, y x y X ,Y f X ,Y u , v dv du 22 Expected Values Given g(X,Y) as a function of X and Y, the expected value is E ( g ( X , Y )) g x, y f X ,Y x, y dx dy Special Cases: • Correlation of X & Y (e.g, g ( X , Y ) X Y ) RXY ( x, y ) E ( g ( X , Y )) • Covariance of X & Y COV( X , Y ) x y f X ,Y x, y dx dy e.g, g ( X , Y ) X m Y m x y ( x mx )( y m y ) f X ,Y x, y dx dy Conditional PDF fY | X f X ,Y x, y , y | x f x X 0, fX x 0 otherwise X and Y are statistically independent if: f X ,Y x, y f X x fY y 23 Example Two random variables X and Y are distributed according to K e x y x y 0 f X ,Y x, y otherwise 0 1. Find the value of the constant K. 2. Find the marginal density functions of X and Y . 3. Are X and Y independent? 24 Example 4. Find f X |Y x | y . 5. Find E X | Y y . 6. Find COV X , Y and X ,Y . 25 Jointly Gaussian R.V.’s Definition: X and Y are jointly Gaussian if 1 1 f X ,Y x, y exp 2 2 1 2 1 2 1 2 2 2 x m1 y m2 2 x m1 y m2 2 2 1 2 1 2 where ρ is the correlation coefficient between X and Y. If ρ = 0, then f X ,Y x, y f X x fY y If jointly Gaussian, then the following are also Gaussian f X x , fY y , f x | y , f y | x 26 n - Jointly Gaussian R.V.’s Definition: X X 1 , X 2 ,..., X n is jointly Gaussian if T fX x where 1 2 n 2 T 1 1 exp x m C x m 1 2 C2 E[ X 1 ] m E X E[ X ] n mean vector of X. and C E X m X m Cov X 1 , X 2 Var X 1 Cov X 2 , X 1 Var X 2 Cov X n , X 1 covariance matrix of X. T Cov X 1 , X n Cov X 2 , X n Var X n 27 Jointly Gaussian Properties 1. Any subset of X1 , X 2 ,..., X n is a vector of jointly Gaussian R.V.’s 2. Jointly Gaussian R.V.’s are completely characterized by m and C. 3. Any collection of R.V.’s X1 , X 2 ,..., X n are uncorrelated iff C is diagonal. Also, independence implies their noncorrelation. For jointly Gaussian R.V.’s, non-correlation independence 4. A collection of uncorrelated R.V.’s, each of which is Gaussian, may not be jointly Gaussian. 5. If X is jointly Gaussian, then Y AX b is also jointly Gaussian with: mY E Y A E X b Am X b T CY E Y mY Y mY T E A X m X X m X AT AC X AT 28 Example Let A be a binary random variable that takes the values of +1 and -1 with equal probabilities. Let X ~ N 0, 2 . A and X are statistically independent. Let Y = A X. 1. Find the pdf fY y . 2. Find the covariance cov(X,Y). 3. Find the covariance cov(X2,Y2). 4. Are X and Y jointly Gaussian? 29