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
Section 4: Random Variables and Probability Distributions, Independent Random Variables September 11th, 2014 Lesson 6 A random variable is a function X on a probability space S whose output is a real number X (s). In general, we think of a random variable as associating some number and probability to the outcome of a given experiment. Suppose we take a gamble involving flipping a fair coin. If heads is flipped, $1 is paid out. If tails is flipped, $2 is paid out. The random variable X that describes this experiment would take the values 1 and 2, the outcomes of the experiment, and the associated probabilities would be 12 for each outcome. Note that the specific experiment doesn’t really matter. A gamble where rolling an even number on a fair die pays out $1 and rolling an odd number pays out $2 would have the same random variable. Lesson 6 A random variable is discrete and has a discrete distribution if the values it takes come from a finite or countably infinite sequence (i.e. a subset of the integers). Suppose we flip a coin. Let X = 1 if the first head occurs on an even-numbered flip. Let X = 0 if the first head occurs on an odd-numbered flip. Let Y = n be the number of the toss on which the first head occurs. Then X and Y are both discrete random variables, with X taking values in the set {0, 1} and Y taking values in the set {1, 2, 3, . . .} Lesson 6 The probability function (pf) of a discrete random variable will typically be denoted by f (x ) or p(x ), and it is equal to the probability that the value x occurs for the random variable X . We often denote this probability by P[X = x ]. A pf must satisfy the conditions (i) 0 ≤ p(x ) ≤ 1 for all x , and X (ii) p(x ) = 1. x We also have P[X ∈ A] = X p(x ) = P[A]. x ∈A Lesson 6 Consider the experiment of rolling a fair six-sided die, with probability space S = {1, 2, 3, 4, 5, 6}. Let X be the random variable describing this experiment. Note that X is discrete. For any s ∈ S, we have 1 f (s) = P[X = s] = . 6 Let A be the event “rolls an even number”, and let B be the event “rolls a number that doesn’t start with a ’t’ or an ’f’. Then 1 P[X ∈ A] = P[X = 2] + P[X = 4] + P[X = 6] = , 2 and 1 P[X ∈ B] = P[X = 1] + P[X = 6] = . 3 Lesson 6 A continuous random variable takes values in some interval of real numbers. Given a continuous random variable X , a probability density function (pdf) for X is a function f (x ) which is continuous at all but finitely many points. To find the probability that X takes a value in some interval, we integrate f (x ) over that integral. That is, P[X ∈ (a, b)] = P[a < X < b] = Z b a Lesson 6 f (x ) dx . Note that P[X = a] = aa f (x ) dx = 0. This means that the probability that X takes on any one value is 0. Thus R P[a < X < b] = P[a ≤ X < b] = P[a < X ≤ b] = P[a ≤ X ≤ b] If f (x ) is a pdf, then it must satisfy the conditions (i) f (x ) ≥ 0 for all x , and (ii) Z ∞ f (x ) dx = 1. −∞ Lesson 6 Example (4.1) Suppose that X has density function ( f (x ) = 3x 2 0 0<x <1 elsewhere (a) Show that f satisfies the conditions of a pdf (b) Calculate P[.3 < X ≤ .8] (c) Calculate P[X ≥ .5] Lesson 6 For a random variable X , the cumulative distribution function (cdf) of X is the function F (x ) = P[X ≤ x ]. It is the cumulative probability to the left of (and including) x . The survival function is the complement S(x ) = 1 − F (x ) = P[X > x ]. Lesson 6 If X is a discrete random variable, then F (x ) = and then F (x ) is a step function. P w ≤x p(w ), x If X is a continuous random variable, then F (x ) = −∞ f (t) dt. By the Fundamental Theorem of Calculus, we have R F 0 (x ) = d dx Rx −∞ f (t) dt = f (x ). For any cdf, P[a < X ≤ b] = F (b) − F (a), lim F (x ) = 1, and x →∞ lim F (x ) = 0. x →−∞ Lesson 6 The condition that a collection of random variables are independent is exactly what one would expect. If the random variables X and Y are independent, then we have P[(a < X ≤ b) ∩ (c < Y ≤ d)] = P[a < X ≤ b] · P[c < Y ≤ d]. Example (4.2) An ordinary single die is tossed repeatedly and independently until the first even number turns up. The random variable X is defined to be the number of the toss on which the first even number turns up. Find the probability that X is an even number. Lesson 6 Example (4.3) Let X be a continuous random variable with density function ( f (x ) = 6x (1 − x ) 0 Calculate P[|X − 38 | > 81 ]. Lesson 6 0<x <1 otherwise Example (4.4) The lifetime of a machine part has a continuous distribution on the interval (0, 40) with probability density fuction f , where f (x ) is proportional to (x + 7)−2 . Calculate the probability that the lifetime of the machine part is less than 5. Lesson 6