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
Probability and Statistical Methods Math 322 Chapter 3 Random Variables and Probability Distributions In statistics we deal with random variables- variables whose observed value is determined by chance. Random variables usually fall into one of two categories: discrete or continuous Random Variable. A random variable (r.v.) is a function that associates a real number with each element in the sample space. Random variables will be denoted by uppercase letters and their observed numerical values by lowercase letters. Discrete Random Variable. A random variable is discrete if it can assume at most a finite or a countably infinite number of possible values. Example 1. Two balls are drawn in succession without replacement from an urn containing 4 red and 3 black balls. The possible outcomes and values y of the random variable Y where Y is the number of red balls are: Sample Space y RR 2 RB 1 BR 1 BB 0 Continuous Random Variable. A random variable is continuous if it can assume any value in some interval or intervals of real numbers and the probability that it assumes any specific value is 0. Discrete Probability Distributions Definition. The set of ordered pairs ( x, f ( x ) ) is a probability function, probability mass function or probability distribution of the discrete random variable X if, (1) f ( x ) ≥ 0 (2) ∑ f ( x) = 1 x (3) P ( X = x ) = f ( x ) . Example 1. A committee of size 5 is to be selected at random from 3 chemists and 5 mathematicians. Find the probability distribution (p.d.) for the number of chemists on the committee. Sonuç Zorlu Lecture Notes 1 Let X be the number of chemists on the committee. Then x : 0,1, 2,3 . 3 5 0 5 1 ; P ( X = 0) = f ( 0) = = 56 8 5 3 5 1 4 15 P ( X = 1) = f (1) = = 56 8 5 3 5 2 3 30 P ( X = 2) = f ( 2) = = ; P ( X = 3) = f ( 3) = 56 8 5 Therefore the probability distribution of X is x f ( x) 0 1 56 1 15 56 2 30 56 3 5 3 2 = 10 56 8 5 3 10 56 Exercise. Among 10 applicants for an open position 6 are female and are males. Suppose 3 applicants are randomly selected from the applicant pool for final interviews. Find the probability distribution for X , which is the number of female applicants among the final three. Exercise. Let w be a random variable giving the number of heads minus the number of tails in three tosses of a coin. (a) List the elements of the sample space (b) Assign a value w of W to each sample points. (c) Find the probability distribution of the random variable W assuming that the coin is biased so that a head is twice as likely to occur as a tail. Cumulative Distribution. The cumulative distribution F ( x ) of a discrete random variable X with probability distribution f ( x ) is F ( x ) = P ( X ≤ x ) = ∑ f ( t ) , for −∞ ≤ x ≤ ∞ . t≤x Example 2. Find the cumulative distribution of the number of red balls in example 1. Using 10 F ( x ) , show that f ( 3) = . 56 F ( 0) = f ( 0) = 1 ; 56 Sonuç Zorlu Lecture Notes 2 F (1) = f ( 0 ) + f (1) = 16 56 46 ; 56 F ( 3) = f ( 0 ) + f (1) + f ( 2 ) + f ( 3) = 1 . F ( 2 ) = f ( 0 ) + f (1) + f ( 2 ) = Hence, if x < 0 0, 1 56 16 F ( x) = 56 46 56 1 46 10 = . Now, f ( 3) = F ( 3) − F ( 2 ) = 1 − 56 56 if 0 ≤ x < 1 if 1 ≤ x < 2 if 2 ≤ x < 3 if x ≥ 3 Continuous Probability Distributions The function f ( x ) is a probability density Definition. (Probability Density Function) function for the continuous random variable X , defined over the set of real numbers » , if (1) f ( x ) ≥ 0, for all x ∈ » ∞ (2) ∫ f ( x ) dx = 1 −∞ b (3) P ( a < X < b ) = ∫ f ( x ) dx . a Note that for a continuous random variable X , a P ( X = a ) = ∫ f ( x ) dx = 0 . a Cumulative Distribution. The cumulative distribution F ( x ) of a continuous random variable X with density function f ( x ) is F ( x) = P ( X ≤ x) = x ∫ f ( t )dt for − ∞ < x < ∞ . −∞ Sonuç Zorlu Lecture Notes 3 Example 1. Suppose that a random variable X has a probability density function given by kx (1 − x ) 0 ≤ x ≤ 1 f ( x) = elsewhere 0 (a) Find the value of k that makes this a probability function. 1 ∫ kx (1 − x ) dx = 1 ⇒ k = 6 0 (b) Find P ( 0.4 ≤ X ≤ 1) ( 0.4 )2 ( 0.4 )3 ∫ 6 x (1 − x ) dx = 1 − 6 2 − 3 = 0.332 0.4 (c) Find F ( x ) = P ( X ≤ x ) and sketch the graph of this function. 1 if x ≤ 0 0, 2 3 F ( x) = 3 x − 2 x , if 0 < x < 1 1, if x ≥1 Example 2. The weekly demand X for kerosene at a certain supply station has a density function given by for 0 ≤ x ≤ 1 x f ( x) = 1/ 2 for 1 < x ≤ 2 0 elsewhere 3 1 (a) Find P ≤ X ≤ 2 2 (b) Find F ( x ) = P ( X ≤ x ) Joint Probability Distributions Joint Probability Distributions of two discrete random variables X and Y : Definition. The function f ( x, y ) is a joint probability distribution of the discrete random variables X and Y if (1) f ( x, y ) ≥ 0 for all ( x, y ) (2) ∑∑ f ( x, y ) = 1 x y (3) P ( X = x, Y = y ) = f ( x, y ) For any region A in the xy − plane , P ( X , Y ) ∈ A = ∑∑ f ( x, y ) A Sonuç Zorlu Lecture Notes 4 Example 1. Determine the value of c so that the following functions represent the joint probability distribution of the random variables X and Y . (a) f ( x, y ) = cxy for x = 1, 2,3, y = 1, 2,3 (b) f ( x, y ) = c x − y for x = −2, 0, 2, y = −2,3 Definition. The function f ( x, y ) is a joint probability density function of the continuous random variables X and Y if (1) f ( x, y ) ≥ 0 for all ( x, y ) (2) ∞ ∫ ∫ ∞ −∞ −∞ f ( x, y )dxdy = 1 (3) P ( X , Y ) ∈ A = ∫∫ f ( x, y )dxdy A for any region A in the xy − plane . Example 2. Let X denote the reaction time, in seconds, to a stimulant and denote Y the temperature ( 0 F ) at which a certain reaction starts to take place. Suppose that two random variables X and Y have the joint density 4 xy, 0 < x < 1 f ( x, y ) = 0, elsewhere (a) Show that f ( x, y ) is a probability density function 1 1 1 (b) Find P 0 ≤ X ≤ , ≤ Y ≤ . 2 4 2 Marginal Distributions Definition. The marginal distributions of X alone and Y alone are g ( x ) = ∑ f ( x, y ) and h ( y ) = ∑ f ( x, y ) y x for the discrete case and g ( x) = ∞ ∫ f ( x, y ) dy and -∞ h( y) = ∞ ∫ f ( x, y ) dx -∞ for the continuous case. Example 1. Suppose that X and Y have the following joint probability distribution: f ( x, y ) y 1 3 5 g ( x) x 1 2 h( y) 0.10 0.20 0.10 0.40 0.15 0.30 0.15 0.60 0.25 0.50 0.25 1 Sonuç Zorlu Lecture Notes 5 (a) Find the marginal distribution of X x 1 g ( x ) 0.40 (b) Find the marginal distribution of Y y 1 h ( y ) 0.25 2 0.60 3 5 0.50 0.25 Statistical Independence Definition. Let X and Y be two random variables, discrete and continuous, with joint probability distribution f ( x, y ) and marginal distributions g ( x) and h( y ) respectively. The random variables X and Y are said to be statistically independent if and only if f ( x, y ) = g ( x ) h ( y ) for all ( x, y ) within their range. Example 1. Let X denote the number of times a certain numerical control machine will malfunction: 1,2,3 times on any given day. Let Y denote the number of times a technician is called on an emergency call. Their joint probability distribution is given as f ( x, y ) y 1 2 3 x 1 2 3 0.05 0.05 0.10 0.05 0.10 0.35 0 0.20 0.10 (a) Find the marginal distribution of X The Marginal distribution of X is x 1 2 g ( x) 0.10 0.35 3 0.55 (b) Find the marginal distribution of Y The marginal distribution of Y is y 1 h( y ) 0.20 3 0.30 2 0.50 (c) Determine whether X and Y are independent or not. Let X = 1 and Y = 1, then f ( x, y ) = 0.05 . Now check whether f ( x, y ) = g ( x)h( y ) . ? So, f (1,1) = g (1)h(1) , 0.05 ≠ (0.10)(0.20) , which implies that X and Y are not independent. Sonuç Zorlu Lecture Notes 6 Example 2. Consider the following joint probability density function of the random variables X and Y : 3 x − y , 1 < x < 3,1 < y < 2 f ( x, y ) = 9 elsewhere 0 (a) Find the marginal distributions of X and Y The marginal distribution of X is 2 3x − y 1 y 2 2 2 x − 1 , 1< x < 3 g ( x) = ∫ dy = 3 xy − = 9 9 2 1 6 1 The marginal distribution of Y is 3 h( y ) = ∫ 1 3 12 − 2 y 3x − y 1 3x 2 , 1< x < 2 dx = − yx = 1 9 9 2 9 (b) Are X and Y independent If f ( x, y ) = g ( x)h( y ) then X and Y are independent. Since 3 x − y 2 x − 1 12 − 2 y , the variables X and Y are not independent. ≠ 9 6 9 (c) Find P ( X > 2) . 3 3 P ( X 2) = ∫ g ( x)dx = ∫ 2 2 2 x −1 2 dx = . 6 3 Exercise. A coin is tossed twice. Let Z denote the number of heads on the first toss and W the total number of heads on the 2 tosses. If the coin is unbalanced and a head has a 40% chance of occurring, find (a) the joint probability distribution of W and Z (b) the marginal distribution of W (c) the marginal distribution of Z (d) the probability that at least 1 tail occurs. Sonuç Zorlu Lecture Notes 7