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
Unit 4: Probability Distributions and Predictions 4.1 Probability Distributions and Expected Value Posing and refining questions Collecting data and finding information Making sense of the data Making the case Evaluating the conclusions A certain section of a course has a 4% failure rate. Is that good or bad? The results of a clinical trial of a certain test of a disease show a 15% false positive rate. If you are tested positive for the disease, should you followed the prescribed medical treatment? Probability Distributions • The last unit looked at probability of individual outcomes of an experiment • Now, we will look at the distribution of probabilities of all possible outcomes • Distributions can involve outcomes with equal or uneven probabilities Experiment • You will receive 2 dice • Roll the two dice and record the sum n times • We will combine the class results • Calculate the experimental probability for each sum • Create a probability distribution table of the possible sums Sum of Two Dice X 2 3 4 5 6 7 8 9 10 11 12 P(X=x) • Experimental Probability Distribution • Theoretical Probability Distribution X 2 3 4 5 6 7 8 9 10 11 12 P(X=x) 1 2 3 4 36 36 36 36 5 36 6 36 5 36 4 36 3 36 2 36 1 36 Probability Distributions • Provides probability of each possible value of random variable X • Can be given in table or graph form Histogram Sum of 2 dice 0.35 Relative Frequency 16 14 12 Count Histogram Sum of 2 dice 10 8 6 4 0.30 0.25 0.20 0.15 0.10 0.05 2 0 2 4 6 8 sum 10 12 14 0 2 4 6 8 10 sum 12 14 • Relative frequency distribution shows ratio of frequency to total number of trials 16 Variables • Many probability experiments have numerical outcomes • Random variable, X – Single value (denoted x) for each outcome • Discrete variables – Values are counted • Continuous variables – Infinite number of possible values on a continuous interval Are the following variables discrete or continuous? • • • • • • Number of times you catch a ball Length of time you play ball Length of car in centimetres Number of red cars on highway Volume of water in a tank Number of candies in a box discrete continuous continuous discrete continuous discrete We will be looking at discrete random variables for now. Uniform Probability Distribution • All outcomes in distribution equally likely in any single trial • Probability of discrete uniform distribution 1 P( X x) n for all possible x Expected Value, E(X) • The value you would expect to get for one trial of an experiment – E.g.: The theoretical probability for sum of two dice is highest for 7 – You would expect to get a sum of 7 • E(X) is the predicted average of all possible outcomes E ( X ) x1P( X x1 ) x2 P( X x2 ) xn P( X xn ) It’s actually just a weighted mean (the probabilities are the weights)! E(X) of Sum of Two Dice E ( X ) x1P( X x1 ) x2 P( X x2 ) n xn P( X xn ) xi P ( X xi ) i 1 2 P( X 2) 3 P( X 3) 11 P( X 11) 12 P( X 12) 1 2 3 4 5 6 2 3 4 5 6 7 36 36 36 36 36 36 7 5 4 3 2 1 8 9 10 11 12 36 36 36 36 36 So? • Why would we want to know the expected value of an experiment? • We can compare the expected value to actual values • Are the actual values “reasonable?” – That is, is that what we could expect to get? Example 2 You pull 3 books out of your locker at random. You have 3 math/science books and 4 English/history books. a) What is the probability that at least two of the books are for a math/science class? b) Create a probability distribution table for the possible book selection. c) How many math/science books could you expect to pull out of your locker? Example 2a sol’n n( A) P( A) n( S ) 3 4 3 4 2 1 3 0 7 3 0.371 Therefore there is a 37.1% chance of pulling out at least two math/science books. Example 2b sol’n Combina- 0 math/sci 1 math/sci 2 math/sci 3 math/sci tions 3 Eng/hist 2 Eng/hist 1 Eng/hist 0 Eng/hist Proba0.114 0.514 0.029 bility 0.343 Calculations: What is the sum of all the probabilities? 1 Example 2c sol’n What is the discrete random variable X? X is the number of math/science books pulled out of the locker. 4 E ( X ) xi P( X xi ) i 1 0 P( X 0) 1 P( X 1) 2 P( X 2) 3 P( X 3) 0(0.114) 1(0.514) 2(0.343) 3(0.029) 1.3 You can expect to pull out about 1.3 math/science books. What is the expected value of a fair game? 0 Why? The probabilities should be evenly distributed and the wins should balance the losses No game in a casino is fair. The expected value on a simple bet of a game of roulette is -$0.053. That is, for every spin, the casino expects to make about 5 cents. (How many spins are there in an average year?) Roulette Odds Result of spin Win (ball lands on your number 1-36) Lose (ball lands on other number or 0 or 00) x P(X = x) $35 1 38 -$1 37 38