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
TELECOMMUNICATIONS Dr. Hugh Blanton ENTC 4307/ENTC 5307 Random Variables Random Variables • Many random phenomena have outcomes that are real numbers, • e.g., the voltage, v(t) at time, t, across a noisy resistor, number of people on a New York to Chicago train, etc. • In engineering, technology, and science; we are generally interested in numerical outcomes. • Even when the universal set, S, in not numerical, we may apply a mapping to convert the outcomes to real numbers. Dr. Blanton - ENTC 4307 - Random Variables 3 Definition of a Random Variable: • A random variable is a number labeling the outcomes of a probabilistic experiments. • X can be considered to be a function that maps all the elements in S into points on the real line or some parts thereof. Dr. Blanton - ENTC 4307 - Random Variables 4 X:SR Universal Set, S X(.) Mapping Domain Range R (Real numbers) Conditions: The mapping is single-valued. The set {X x} is an event. This is the set of random variable X taking values equal or less than x in a trial chance experiment, E. Dr. Blanton - ENTC 4307 - Random Variables 5 Basic Definitions • Discrete Random Variable: A random variable that has a countable number of elements in the range. • Continuous Random Variable: A random variable that has an uncountably infinite number of elements in the range. Dr. Blanton - ENTC 4307 - Random Variables 6 Random Variables • The mapping (function) that assigns a number to each outcome is called a random variable. • If the random variable is denoted by X, then the distribution function F(xo) is defined by F ( xo ) Pr{ X xo } Dr. Blanton - ENTC 4307 - Random Variables 7 Example 1: Suppose you match coins with a friend, winning $1 if two coins match and losing $1 if the coins do not match. Example 1: S={HH, HT, TH, TT} s1 s2 s3 s4 Random Variable: X(s1) = X(s4) = +1 X(s2 ) = X(s3) = -1 Thus, X 1 -1 -1 1 S HH HT TH TT Single-valued mapping Dr. Blanton - ENTC 4307 - Random Variables 8 In this case, a random variable takes on only a finite number of values (+1, -1), satisfying property c. If we let x = 0.6, then X 0.6, if s = HT or TH, i.e., the event {HT, TH}. Thus x = 0.6 determines an event. Let x = -10, the {X -10} = Ø Let x > 1, then {X x} = S Thus, for every x, we have an event and b is satisfied. Dr. Blanton - ENTC 4307 - Random Variables 9 Basic Definitions • Discrete Random Variable: A random variable that has a countable number of elements in the range. • Continuous Random Variable: A random variable that has an uncountably infinite number of elements in the range. • Probability Assignment: There are two standard forms for probability assignment either using Cumulative Distribution Function (CDF) or Probability Distribution Function (PDF). Dr. Blanton - ENTC 4307 - Random Variables 10 Cumulative Distribution Function (CDF) Let X : a random variable with a particular value, x, then, FX(x) = Pr[X x] Thus, the CDF is the probability of event {X x}, i.e., the random variable, X, takes on a value equal to or less than x. Dr. Blanton - ENTC 4307 - Random Variables 11 Example 2 Experiment: Observing the parity bit in a word in computer memory. Bit “ON” X = 1 Bit “OFF” X = 0 The OFF state has a probability q and thus the ON state has a probability of (1-q). Sample space, S = {OFF, ON} Plot FX(x) Dr. Blanton - ENTC 4307 - Random Variables 12 Example 2 (1) For x 0, event X x FX ( x) 0 (2) For 0 x 1, event X x is equivalent to the event OFF Thus, FX ( x) PX 0 q (3) For x 1, event X x OFF , ON S Thus, FX ( x) 1 FX(x) Prob. of event {X=1} Prob. of event {X=0} q q Dr. Blanton - ENTC 4307 - Random Variables x 13 Example 3 Determine CDF for a single toss of a die. Dr. Blanton - ENTC 4307 - Random Variables 14 Example 3 S 1,2,3,4,5,6 For x 1 FX ( x) Pr[ X x] 0 1 x 2 FX ( x) Pr[ X x] 1/ 6 2 x3 FX ( x) Pr[ X x] 2 / 6 5 x 6 x6 FX ( x) Pr[ X x] 5 / 6 FX ( x) Pr[ X x] 1 Dr. Blanton - ENTC 4307 - Random Variables 15 1 FX(x) 1/6 1 6 Dr. Blanton - ENTC 4307 - Random Variables x 16 Example 4 A random variable has a PDF given by FX(x) = 0 = 1-e-2x - < x 0 0<x Find the probability that X > 0.5. Find the probability that X 0.25 Find the probability that 0.3 X 0.7 Dr. Blanton - ENTC 4307 - Random Variables 17 Example 4 (a) PrX 0.5 1 Pr[ X 0.5] 1 FX (0.5) 1 1 (1 e ) 0.3679 0.5 (b) Pr X 0.25 FX (0.25) (1 e ) 0.3935 (c) Pr0.3 X 0.7 FX (0.7) FX (0.3) (1 e 1.4 ) (1 e 0.6 ) 0.3022 Dr. Blanton - ENTC 4307 - Random Variables 18 1 FX(x) x Dr. Blanton - ENTC 4307 - Random Variables 19 Example 5 A random variable has PDF given by: FX(x) = A(1-e-(x-1)) =0 1< x < -<x1 Find A for a valid CDF FX(x) = ? Pr[2 < X < ] = ? Pr[1 < X 3] = ? Dr. Blanton - ENTC 4307 - Random Variables 20 Example 5 (a) Since FX() = 1, A [1 – e-] A = 1 (b) FX(2) = [1 – e-1] = 0.6321 Pr[2 < X < ] = FX() - FX(2) = 1 - 0.6321 = 0.3679 (c) Pr[1 < X 3 ] = FX(3) - FX(1) = (1 – e-2) - (1 – e0) = 0.8647 Dr. Blanton - ENTC 4307 - Random Variables 21 CDF or Discrete Random Variable: A discrete random variable , X, taking on one of the countable set of possible values x1, x2, with probability Pr[X = xk], k[1,N] forming a stair-step CDF with amplitude of each step being Pr[X = xk], k = 1, 2, . Thus, N FX ( x) where, Pr[ X x ]u( x x ) k k 1 k x0 x0 1 u ( x) 0 Or more compactly, N FX ( x) Prx u( x x ) k k k 1 Dr. Blanton - ENTC 4307 - Random Variables 22 Example 6 A bus arrives at random in (0, T], i.e., 0 < t T. Let X be a random variable representing time of arrival, then clearly, FX(t) = 0 FX(T) = 1 for t 0 impossible event certain event Bus is uniformly likely to come at any time within (0,T]. t0 0 FX(t) Then FX (t ) t / T 1 0t T t T 1 0 T t A continuous random variable has a continuous CDF. Dr. Blanton - ENTC 4307 - Random Variables 23 Probability Density Function (PDF) A PDF is defined as dFX ( x) f x ( x) dx Properties of PDF: If fX(x) exists, then x (1) FX ( x) f X ( )d i.e., CDF (2) Pr[a x b] FX (b) FX (a) b a f X ( )d b f X ( )d Dr. Blanton - ENTC 4307 - Random Variables f X ( )d a 24 (3) If a = - and b = , then f X ( )d FX () FX () 1 (4) f X ( x) 0 decreasing x since CDF is non- From (2), the probability that X takes on values between x and x + x is Pr[ x X x x] FX ( x x) FX ( x) Dr. Blanton - ENTC 4307 - Random Variables 25 x x FX ( x x) FX ( x) f X ( )d f X ( x)x x Dr. Blanton - ENTC 4307 - Random Variables 26 Generalization For discrete random variables, the PDF has a general N form of f X ( x) Pr( x ) ( x x ) k k k 1 Example 8: For a random variable, X, we have Ax(1 x) f X ( x) 0 0 x 1 otherwise (a)Find A so that this function is a valid PDF. (b) Find Pr[1/2 x 1]. Dr. Blanton - ENTC 4307 - Random Variables 27 Example 8 (a) 1 f X ( x)dx 1 Ax(1 x)dx 1 0 1 1 A ( x x 2 )dx A ( x)dx x 2 dx 0 0 0 1 1 x x A A A A 1 2 3 0 2 3 6 2 A6 3 Dr. Blanton - ENTC 4307 - Random Variables 28 Example 8 (cont.) 1 1 (b) Pr x 1 6 x(1 x)dx 2 1 2 1 1 1 2 3 1 6x 6x 2 2 6 ( x x )dx 6 xdx x dx 3 1 1 1 2 1 2 2 2 2 3x 2 x 2 3 1 1 2 3 2 1 1 3 2 1 4 8 2 2 Dr. Blanton - ENTC 4307 - Random Variables 29