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
10/13/2014 Midterm Contents Section 4.1 Tues, Oct. 21st Introduction 1.1 Data & Measurements 1.2 - 2.2 Descriptive Statistics 2.3 - 2.5 Probability I 3.1 - 3.2 Probability II 3.3 - 3.4 Discrete Probability Distributions A hypochondriac at heart, he thought (Though symptom free) he had a dire disease, And after fruitless weeks of worry, sought Some test to take to set his mind at ease. He forthwith found one that would do the trick, And accurate (at oh point nine) to tell Those having the disease that they were sick, And just the same, the well that they were well. One crucial point he failed to note was this: That of a hundred like him, only one Had the disease, and this slip made him miss The implication when the test was done Probability Distributions 4.1 – 4.3 - approximately 1 hour long - format short answer, similar to homework - bring calculator, 1 sheet allowed Larson/Farber Ch. 4 Why Richard Cory Offed Himself Or One Reason to Take a Course in Probability by Jasper D. Memory (1935 - ) And positive! therefore, consumed with dread, And now convinced his blackest fears were right (By faulty logic fatally misled), He shattered silence that calm summer night. Larson/Farber Ch. 4 Random Variables Types of Random Variables A random variable, x, is the numerical outcome of a probability experiment. Value occurs by chance. A random variable is discrete if the number of possible outcomes is finite or countable. Discrete random variables are determined by a count. x = number of people in a car x = gallons of gas bought in a week x = time it takes to drive from home to school A random variable is continuous if it can take on any value within an interval. The possible outcomes cannot be listed. Continuous random variables are determined by a measure. x = number of trips to school you make per week Larson/Farber Ch. 4 Larson/Farber Ch. 4 1 10/13/2014 Types of Random Variables Identify each random variable as discrete or continuous. x = number of people in a car Discrete Probability Distributions A discrete probability distribution lists each possible value of the random variable, together with its probability. A survey asks how many vehicles in each family. Discrete – count the number of people in a car x = gallons of gas bought in a week number of vehicles Continuous – measure the gallons of gas. You cannot list the possible values. x = time it takes to drive from home to school Continuous – measure the amount of time. x 0 1 2 3 P(x) 0.004 0.435 0.355 0.206 Properties of a probability distribution • Each probability must be between 0 and 1, inclusive. x = number of trips to school you make per week Discrete – count the number of trips you make. • The sum of all probabilities is 1. May have rounding. Larson/Farber Ch. 4 Larson/Farber Ch. 4 Probability Histogram Mean, Variance, and Standard Deviation 0.435 .40 The mean of a discrete probability distribution is: 0.355 P(x) .30 0.206 .20 The variance of a discrete probability distribution is: .10 0.004 0 00 11 22 33 x Number of Vehicles • The height of each bar corresponds to the probability of x. • When the width of the bar is 1, the area of each bar corresponds to the probability the value of x will occur. Larson/Farber Ch. 4 The standard deviation of a discrete probability distribution is: Since P(x) = f/n, formulas are equivalent to grouped data formulas in Chptr. 2 Larson/Farber Ch. 4 2 10/13/2014 Mean (Expected Value) Calculate the mean Calculate the Variance and Standard Deviation The mean is 1.763 vehicles. Multiply each value by its probability. Add the products x 0 1 2 3 P(x) 0.004 0.435 0.355 0.206 x 0 1 2 3 xP(x) 0 0.435 0.71 0.618 1.763 P(x) 0.004 0.435 0.355 0.206 x- μ -1.763 -0.763 0.237 1.237 (x -μ ) 3.108 0.582 0.056 1.530 variance = The expected value (the mean) is 1.763 vehicles. Larson/Farber Ch. 4 P(x)(xP(x) - ) 0.012 0.253 0.020 0.315 0.601 The standard deviation is 0.775 vehicles. Larson/Farber Ch. 4 Binomial Experiments Section 4.2 Binomial Distributions Characteristics • Fixed number of trials (n). • n trials are independent and identically repeated. • Each trial has 2 outcomes, S = Success or F = Failure. • Probability of success on a single trial is p. P(S) = p • Probability of success is the same in each trial • Probability of failure is q. P(F) =q where p + q = 1 • Challenge: find the probability of x successes out of n trials. Where x = 0 or 1 or 2 … n. x is a count of the number of successes in n trials Examples: coin tosses, basketball free throws Larson/Farber Ch. 4 Larson/Farber Ch. 4 3 10/13/2014 Exercise Example: Guess the Answers 1. What is the 11th digit after the decimal point for the irrational number e? (a) 2 (b) 7 (c) 4 (d) 5 2. What was the Dow Jones Average on February 27, 1993? (a) 3265 (b) 3174 (c) 3285 (d) 3327 3. How many Sri Lankan students studied at U.S. universities from 1990-91? (a) 2320 (b) 2350 (c) 2360 (d) 2240 4. How many kidney transplants were performed in 1991? (a) 2946 (b) 8972 (c) 9943 (d) 7341 Results The correct answers to the quiz are: 1. d 2. a 3. b 4. c 5. b Count the number of correct answers. Let the number of correct answers = x. Why is this a binomial experiment? success or failure What are the values of n, p and q? n=5, p=.25, q=.75 5. How many words are in the American Heritage Dictionary? (a) 60,000 (b) 80,000 (c) 75,000 (d) 83,000 Larson/Farber Ch. 4 What are the possible values for x? X{0,1,2,3,4,5} Larson/Farber Ch. 4 Binomial Experiments Example: A multiple choice test has 8 questions each of which has 3 choices, one of which is correct. You want to know the probability that you guess exactly 5 questions correctly. Find n, p, q, and x. n=8 p = 1/3 q = 2/3 p = 0.80 q = 0.20 Find the probability of getting exactly 3 questions correct out of 5 on a quiz (with 4 choices for each question). 1. Write the first 3 correct and the last 2 wrong as SSSFF P(SSSFF) = (.25)(.25)(.25)(.75)(.75) = (.25)3(.75)2 = 0.0087954 x=5 Example: A doctor tells you that 80% of the time a certain type of surgery is successful. If this surgery is performed 7 times, find the probability exactly 6 surgeries will be successful. Find n, p, q, and x. n=7 Binomial Probabilities x=6 2. Since order does not matter, you could get any combination of three correct out of five questions. SSSFF FFSSS SSFSF FSFSS SSFFS FSSFS SFFSS SFSSF SFSFS How to calculate FFSSF the number? Each of these 10 ways has a probability of 0.00879. What is the probability of 3 out of 5? P(x = 3) = 10(0.25)3(0.75)2 = 10(0.00879) = 0.0879 Larson/Farber Ch. 4 Larson/Farber Ch. 4 4 10/13/2014 Binomial Probabilities Combination of n values, choosing x In a binomial experiment, the probability of exactly x successes in n trials is: There are ways. Calculate the probability of getting 0, 1, 2, 3, 4, or all 5 correct Each of these 10 ways has a probability of 0.00879. P(x = 3) = 10(0.25)3(0.75)2= 10(0.00879)= 0.0879 P(3) = 0.088 Larson/Farber Ch. 4 x 0 1 2 3 4 5 Binomial Histogram Probability (x) .30 .396 .264 .237 Probabilities P(x) 0.237 0.396 0.264 0.088 0.015 0.001 1. What is the probability of answering either 2 or 4 questions correctly? P(x = 2 or x = 4) = 0.264 + 0.015 = 0. 279 x 0 1 2 3 4 5 P(x) 0.237 0.396 0.264 0.088 0.015 0.001 2. What is the probability of answering at least 3 questions correctly? .20 P(x 3) = P( x = 3 or x = 4 or x = 5) = 0.088 + 0.015 + 0.001 = 0.104 .088 .10 0 0 P(5) = 0.001 Larson/Farber Ch. 4 Binomial Distribution .40 P(4) = 0.015 1 2 3 .015 .001 4 5 3. What is the probability of answering at least one question correctly? x P(x 1) = 1 - P(x = 0) = 1 - 0.237 = 0.763 Table 2 in text (pg. A 8) has binomial probability distribution values Larson/Farber Ch. 4 Larson/Farber Ch. 4 5 10/13/2014 Binomial Distribution Parameters for a Binomial Experiment Mean: Variance: Standard deviation: Find the mean, variance, and standard deviation for the distribution of correct answers on the quiz. Find: P(3 heads in 5 coin tosses); P(3 out of 5 correct with 4 choices for each question) 0.312 (p=0.5), 0.088 (p=0.25) Larson/Farber Ch. 4 Larson/Farber Ch. 4 The Geometric Distribution Section 4.3 More Discrete Probability Distributions A geometric distribution is a discrete probability distribution of the random variable x that satisfies: 1. A trial is repeated until a success occurs. 2. Repeated trials are independent of each other. 3. Probability of success p is the same for each trial. The probability that the first success will occur on trial number x is P(x) = (q)x – 1p where q = 1 – p Larson/Farber Ch. 4 Larson/Farber Ch. 4 6 10/13/2014 The Geometric Distribution The probability that a person who enters a store will make a purchase is 0.30 • The probability the first purchase will be made by the first person who enters the store is 0.30. P(1) = 0.30. • The probability the first purchase will be made by the second person who enters the store is (0.70) ( 0.30). P(2) = (0.70) ( 0.30) = 0.21. • The probability the first purchase will be made by the third person who enters the store is (0.70)(0.70)( 0.30). P(3) = (0.70) (0.70)(0.30) = 0.147. The probability the first purchase will be made by person number x is P(x) = (.70)x - 1(.30) Larson/Farber Ch. 4 Application Example: A cereal maker places a game piece in its boxes. The probability of winning a prize is 1 in 4. Find the probability you a) Win your first prize on the 4th purchase P(4) = (.75)3(.25) = 0.1055 b) Win your first prize on your 2nd or 3rd purchase P(2) = (.75)1(.25) = 0.1875 and P(3) = (.75)2(.25) = 0.1406 So P(2 or 3 ) = 0.1875 + 0.1406 = 0.3281 c) Do not win your first prize in your first 4 purchases. 1 – (P(1) + P(2) + P(3) + P(4)) 1 – ( 0.25 + 0.1875 + 0.1406 + 0.1055) = 1 – .6836 = 0.3164 Larson/Farber Ch. 4 Application The Poisson Distribution The Poisson distribution is a discrete probability distribution of the random variable x that satisfies: 1. The experiment consists of counting the number of times, x, an event occurs in an interval of time, area, or space. Example: Sharks kill approximately 10 people each year. Find the probability that: a) Three people are killed by sharks this year 2. The probability that an event will occur is the same for each interval. 3. The number of occurrences in one interval is independent of the number of occurrences in other intervals. The probability of exactly x occurrences in an interval is: where e is the irrational number approximately 2.71828 is the mean number of occurrences per interval. Larson/Farber Ch. 4 b) Two or three people are killed by sharks this year P(3) = 0.0076 P(2 or 3) = 0.0023 + 0.0076 = 0.0099 Larson/Farber Ch. 4 7