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 and Probability Distribution (1) • Definition: A random variable is a function that associates a real number with each element in the sample space. • A random variable symbol should be capital letter such X, Y, … and its corresponding is small letter. Random Variables and Probability Distribution (1) • Example: Two balls are drawn in succession without replacement from an urn containing 4 red balls and 3 black balls. The possible outcomes and the value Y of the random variable Y where Y is the number of red balls are: • Sample space “S”: [RR, RB, BR, BB] • Number of reds “Y”: [2, 1, 1, 0] Random Variables and Probability Distribution (1) • Definition: • If a sample space contains a finite number of possibilities or an unending sequence with as many elements as there are whole numbers, it is called a discrete sample space. Random Variables and Probability Distribution (1) • Definition: • If a sample space contains an infinite number of possibilities equal to the number of points on a line segment, it is called a continuous sample space. Random Variables and Probability Distribution (1) • Example: Classify the following random variables are discrete or continuous: • X: The number of automobile accidents? • It is discrete random variable. • Y: The length of time to play 18 holes of Golf? • It is continuous random variable. • M: The mount of milk produced yearly by a particular cow? • It is continuous random variable. Random Variables and Probability Distribution (1) • Example: • N: The number of eggs laid each month by a hen? • It is discrete random variable. • P: The number of building permits issued each monthly in a certain city? • It is discrete random variable. • Q: The weight of grain produced per acre? • It is continuous random variable. Random Variables and Probability Distribution (1) Discrete Probability Distribution • 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 for each possible outcome x ; Random Variables and Probability Distribution (1) As f ( x) 0 f ( x) 1 x P( X x) f ( x) Random Variables and Probability Distribution (1) • Example (1): • A shipment of 20 similar laptop computers to a retail outlet contains 3 that are defective. If a school makes a random purchase of 2 of these computers, find the probability distribution for the number of defectives. Random Variables and Probability Distribution (1) • Solution: • Let X be a random variable whose values x are the possible numbers of defective computers purchased by the school. Then x can only take the numbers 0, 1, 2 then: 3 17 0 2 3!17! 136 68 f (0) P ( X 0) (3 0)!0!15!2! 190 95 20 2 20! 2!18! Random Variables and Probability Distribution (1) 2. 3 17 1 1 3!17! 3 17 51 f (1) P( X 1) 2!16! 19 190 20 20 19 18! 2 18!2! 3 17 2 0 3 f (2) P( X 2) 190 20 2 Random Variables and Probability Distribution (1) Then the probability distribution is X f(x) 0 1 2 68/95 51/190 3/190 68 51 3 2 68 51 3 1 x f ( x) 95 190 190 190 Random Variables and Probability Distribution (1) • Example2: • Suppose X is the sum of up faces of 2 dies: # of ways 2 die can sum to x f ( x) P ( X x) # of 2 die can result in f ( x) P( X x) Pr obabilitym mass function Random Variables and Probability Distribution (1) • X: sum of up faces of 2 dies 1 2 3 4 5 6 1 2 2 3 3 4 4 5 5 6 6 7 3 4 5 4 5 6 5 6 7 6 7 8 7 8 9 8 9 10 6 7 7 8 8 9 9 10 10 11 11 12 Random Variables and Probability Distribution (1) • The probability distribution function table is X 2 f(x) = P (X=x) 1/36 3 4 5 2/36 3/36 4/36 6 7 8 9 5/36 6/36 5/36 4/36 10 11 12 3/36 2/36 1/36 Random Variables and Probability Distribution (1) • Then 1 2 3 4 5 6 5 4 3 2 1 36 1 x f ( x) 36 36