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
Definition of a Random Variable Distribution Functions Properties of Distribution Functions Topic 7 Random Variables and Distribution Functions Distribution Functions 1 / 11 Definition of a Random Variable Distribution Functions Properties of Distribution Functions Outline Definition of a Random Variable Distribution Functions Discrete Random Variables Continuous Random Variables Properties of Distribution Functions 2 / 11 Distribution Functions Definition of a Random Variable Properties of Distribution Functions Introduction statistics probability universe of information ⇓ ask a question and collect data ⇓ organize into the empirical cumulative distribution function ⇓ compute sample means and variances sample space - Ω and probability - P ⇓ define a random variable X ⇓ organize into the cumulative distribution function ⇓ compute distributional means and variances 3 / 11 Definition of a Random Variable Distribution Functions Properties of Distribution Functions Definition of a Random Variable A random variable is a real valued function from the probability space. X : Ω → R. Typically, we shall use capital letters near the end of the alphabet, e.g., X , Y , Z for random variables. The range of a random variable is called the state space. Exercise. Give some random variables on the following probability spaces, Ω. 1. Roll a die 3 times and consider the sample space Ω = {(i, j, k); i, j, k = 1, 2, 3, 4, 5, 6} . 2. Flip a coin 10 times and consider the sample space Ω, the set of 10-tuples of heads and tails. We can create new random variables via composition of functions: ω 7→ X (ω) 7→ g (X (ω)) Thus, if X is a random variable, then so are p X 2 , exp αX , X 2 + 1, tan2 X , bX c 4 / 11 Distribution Functions Definition of a Random Variable Properties of Distribution Functions Distribution Functions A (cumulative) distribution function of a random variable X is defined by FX (x) = P{ω ∈ Ω; X (ω) ≤ x} = P{X ≤ x}. For the complement of {X ≤ x}, we have the survival function F X (x) = P{X > x} = 1 − P{X ≤ x} = 1 − FX (x). Choose a < b, then the event {X ≤ a} ⊂ {X ≤ b}. Their set theoretic difference {X ≤ b} \ {X ≤ a} = {a < X ≤ b}. Consequently, by the difference rule for probabilities, P{a < X ≤ b} = P({X ≤ b} \ {X ≤ a}) = P{X ≤ b} − P{X ≤ a} = FX (b) − FX (a). In particular, FX is non-decreasing. 5 / 11 and less than or equal to b. Consequently, by the difference rule for probabilities, Distribution Functions Definition of a Random Variable P {a < X b} = P ({X b} \ {X a}) = P {X b} Properties of Distribution Functions P {X a} = FX (b) FX (a). (7.2) Thus, we can compute the probability that a random variable takes values in an interval by subtracting the distribution function evaluated at the endpoints of the intervals. Care is needed on the issue of the inclusion or exclusion of the endpoints of the interval. Distribution Functions Let X be the sum of the values on two fair dice, Example 7.8. To give the cumulative distribution function for X, the sum of the values for two rolls of a die, we start x P{X = x} with the table 2 3 1/36P {Xx2/36 = x} 4 2 3 1/363/36 2/36 5 6 7 4 5 6 7 8 4/36 5/36 6/36 3/36 4/36 5/36 6/36 5/36 8 9 10 5/36 4/36 3/36 9 10 11 12 4/36 3/36 2/36 1/36 11 2/36 12 1/36 Here is FX and thecreate cumulative distribution function. the graph. 1 6 3/4 1/2 1/4 1 r 2 r 3 r 4 r r r r r r r r 11 12 5 6 7 8 9 10 Figure 7.1: Graph of FX , the cumulative distribution function for the sum of the values for two rolls of a die. 6 / 11 Definition of a Random Variable Distribution Functions Properties of Distribution Functions Distribution Functions Notice that the distribution function • is constant in between the possible values for X , • has a jump size at x is equal to P{X = x}, and • is right continuous. Call X a discrete random variable if its distribution function FX has these properties. Examples. 6 3 3 = P{X = 4} = FX (4) − FX (4−) = − 36 36 36 P{4 < X ≤ 7} = FX (7) − FX (4) = 21 6 15 5 − = = . 36 36 36 12 P{4 ≤ X ≤ 7} = FX (7) − FX (4−) = 21 3 18 1 − = = . 36 36 36 2 7 / 11 Definition of a Random Variable Distribution Functions Properties of Distribution Functions Distribution Functions Exercise. 1. Flip a fair coins 3 times. Let X be the number of heads. Under equally likely outcomes, find P{X = x} for x = 0, 1, 2, and 3. and use this to sketch a graph of the distribution function FX . 2. Deal 5 cards out of a deck of 52. Let X be the number of ♦. Under equally likely outcomes, use the choose function in R to determine P{X = x} for x = 0, 1, 2, 3, 4, and 5. and use this to sketch a graph of the distribution function FX . 8 / 11 Definition of a Random Variable Distribution Functions Properties of Distribution Functions Distribution Functions 1 For a dart board with radius 1, assume that the dart lands randomly uniformly. Let X be the distance from the center. For x ∈ [0, 1], 0.8 0.6 0.4 0.2 0 x !0.2 !0.6 !0.8 !1 !0.8 !0.6 !0.4 !0.2 0 0.2 0.4 0.6 0.8 1 0.6 0.4 probability 0.8 1.0 !1 0.2 Thus, we have the distribution function if x ≤ 0, 0 x2 if 0 < x ≤ 1, FX (x) = 1 if x > 1. !0.4 0.0 FX (x) = P{X ≤ x} area inside circle of radius x = area of circle 2 πx = = x 2. π12 0.0 0.5 1.0 x 9 / 11 Definition of a Random Variable Distribution Functions Properties of Distribution Functions Distribution Functions Exercise. 1. Find the probability that the dart no more than 1/2 unit from the center. 2. Find the probability that the dart lands further 1/3 unit but no more than 2/3 unit from the center. 3. Find the median, x1/2 so that P{X ≤ x1/2 } = 1/2. Definition. X is continuous random variable if it has a cumulative distribution function FX that is differentiable. 10 / 11 Distribution Functions Definition of a Random Variable Properties of Distribution Functions Properties of Distribution Functions 1.0 A distribution function FX has the property that it is right continuous, starts at 0, ends at 1, and does not decrease with increasing values of x. • For every a, b satisfying a < b, FX (a) ≤ Fx (b). 0.6 0.4 distribution function • limx→∞ FX (x) = 1. 0.2 • limx→−∞ FX (x) = 0. 0.0 • For every a, limx→a+ FX (x) = FX (a). 0.8 In mathematical terms, 0 5 10 15 20 25 x 11 / 11