1 / 85

Probability & Random Variables

Learn about the concept of probability, debunking myths about randomness, and how to design and perform simulations. Includes examples of the Golden Ticket Parking Lottery and NASCAR Cards & Cereal Boxes.

ushas
Télécharger la présentation

Probability & Random Variables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Probability & Random Variables

  2. Probability & Random Variables • Randomness, Probability, and Simulation • Probability Rules • Conditional Probability and Independence • Discrete and Continuous Random Variables • Transforming and Combining Random Variables • Binomial and Geometric Random Variables

  3. Randomness, Probability, and Simulation Learning Objectives After this section, you should be able to… • DESCRIBE the idea of probability • DESCRIBE myths about randomness • DESIGN and PERFORM simulations

  4. Randomness, Probability, and Simulation • The Idea of Probability Chance behavior is unpredictable in the short run, but has a regular and predictable pattern in the long run. The law of large numbers says that if we observe more and more repetitions of any chance process, the proportion of times that a specific outcome occurs approaches a single value. Definition: The probability of any outcome of a chance process is a number between 0 (never occurs) and 1(always occurs) that describes the proportion of times the outcome would occur in a very long series of repetitions.

  5. Randomness, Probability, and Simulation • Myths about Randomness The idea of probability seems straightforward. However, there are several myths of chance behavior we must address. The myth of short-run regularity: The idea of probability is that randomness is predictable in the long run. Our intuition tries to tell us random phenomena should also be predictable in the short run. However, probability does not allow us to make short-run predictions. The myth of the “law of averages”: Probability tells us random behavior evens out in the long run. Future outcomes are not affected by past behavior. That is, past outcomes do not influence the likelihood of individual outcomes occurring in the future.

  6. Randomness, Probability, and Simulation • Simulation The imitation of chance behavior, based on a model that accurately reflects the situation, is called a simulation. Performing a Simulation State: What is the question of interest about some chance process? Plan: Describe how to use a chance device to imitate one repetition of the process. Explain clearly how to identify the outcomes of the chance process and what variable to measure. Do: Perform many repetitions of the simulation. Conclude: Use the results of your simulation to answer the question of interest. We can use physical devices, random numbers (e.g. Table D), and technology to perform simulations.

  7. Golden Ticket Lottery • Golden Ticket Parking Lottery • At a local high school, 95 students have permission to park on campus. Each month, the student council holds a “golden ticket parking lottery” at a school assembly. The two lucky winners are given reserved parking spots next to the school’s main entrance. Last month, the winning tickets were drawn by a student council member from the AP Statistics class. When both golden tickets went to members of that same class, some people thought the lottery had been rigged. There are 28 students in the AP Statistics class, all of whom are eligible to park on campus. Design and carry out a simulation to decide whether it’s plausible that the lottery was carried out fairly.

  8. Example: Golden Ticket Parking Lottery What is the probability that a fair lottery would result in two winners from the AP Statistics class? Reading across row 139 in Table D, look at pairs of digits until you see two different labels from 01-95. Record whether or not both winners are members of the AP Statistics Class. Based on 18 repetitions of our simulation, both winners came from the AP Statistics class 3 times, so the probability is estimated as 16.67%.

  9. NASCAR Cards & Cereal Boxes • Simulations with technology • In an attempt to increase sales, a breakfast cereal company decides to offer a NASCAR promotion. Each box of cereal will contain a collectible card featuring one of these NASCAR drivers: Jeff Gordon, Dale Earnhardt, Jr., Tony Stewart, Danica Patrick, or Jimmie Johnson. The company says that each of the 5 cards is equally likely to appear in any box of cereal. A NASCAR fan decides to keep buying boxes of the cereal until she has all 5 drivers’ cards. She is surprised when it takes her 23 boxes to get the full set of cards. Should she be surprised? Design and carry out a simulation to help answer this question.

  10. Example: NASCAR Cards and Cereal Boxes Read the example on page 291. What is the probability that it will take 23 or more boxes to get a full set of 5 NASCAR collectible cards? Use randInt(1,5) to simulate buying one box of cereal and looking at which card is inside. Keep pressing Enter until we get all five of the labels from 1 to 5. Record the number of boxes we had to open. 3521 5 2 3 5 49 boxes 435 3 5 1 1 1 5 3 1 5 4 5 215 boxes 5 5 5 241 2 1 5 310 boxes We never had to buy more than 22 boxes to get the full set of cards in 50 repetitions of our simulation. Our estimate of the probability that it takes 23 or more boxes to get a full set is roughly 0.

  11. Probability Rules Learning Objectives After this section, you should be able to… • DESCRIBE chance behavior with a probability model • DEFINE and APPLY basic rules of probability • DETERMINE probabilities from two-way tables • CONSTRUCT Venn diagrams and DETERMINE probabilities

  12. Probability Rules • Probability Models In Section 5.1, we used simulation to imitate chance behavior. Fortunately, we don’t have to always rely on simulations to determine the probability of a particular outcome. Descriptions of chance behavior contain two parts: Definition: The sample space S of a chance process is the set of all possible outcomes. A probability model is a description of some chance process that consists of two parts: a sample space S and a probability for each outcome.

  13. Probability Rules • Example: Roll the Dice Give a probability model for the chance process of rolling two fair, six-sided dice – one that’s red and one that’s green. Sample Space 36 Outcomes Since the dice are fair, each outcome is equally likely. Each outcome has probability 1/36.

  14. Probability Rules • Probability Models Probability models allow us to find the probability of any collection of outcomes. Definition: An event is any collection of outcomes from some chance process. That is, an event is a subset of the sample space. Events are usually designated by capital letters, like A, B, C, and so on. If A is any event, we write its probability as P(A). In the dice-rolling example, suppose we define event A as “sum is 5.” There are 4 outcomes that result in a sum of 5. Since each outcome has probability 1/36, P(A) = 4/36. Suppose event B is defined as “sum is not 5.” What is P(B)? P(B) = 1 – 4/36 = 32/36

  15. Probability Rules • Basic Rules of Probability All probability models must obey the following rules: • The probability of any event is a number between 0 and 1. • All possible outcomes together must have probabilities whose sum is 1. • If all outcomes in the sample space are equally likely, the probability that event A occurs can be found using the formula • The probability that an event does not occur is 1 minus the probability that the event does occur. • If two events have no outcomes in common, the probability that one or the other occurs is the sum of their individual probabilities. Definition: Two events are mutually exclusive (disjoint) if they have no outcomes in common and so can never occur together.

  16. Probability Rules • Basic Rules of Probability • For any event A, 0 ≤ P(A) ≤ 1. • If S is the sample space in a probability model, P(S) = 1. • In the case of equally likely outcomes, • Complement rule:P(AC) = 1 – P(A) • Addition rule for mutually exclusive events: If A and B are mutually exclusive, P(A or B) = P(A) + P(B).

  17. Probability Rules • Example: Distance Learning Distance-learning courses are rapidly gaining popularity among college students. Randomly select an undergraduate student who is taking distance-learning courses for credit and record the student’s age. Here is the probability model: • Show that this is a legitimate probability model. • Find the probability that the chosen student is not in the traditional college age group (18 to 23 years). Each probability is between 0 and 1 and 0.57 + 0.17 + 0.14 + 0.12 = 1 P(not 18 to 23 years) = 1 – P(18 to 23 years) = 1 – 0.57 = 0.43

  18. Probability Rules • Two-Way Tables and Probability When finding probabilities involving two events, a two-way table can display the sample space in a way that makes probability calculations easier. Consider the example on page 303. Suppose we choose a student at random. Find the probability that the student • has pierced ears. • is a male with pierced ears. • is a male or has pierced ears. Define events A: is male and B: has pierced ears. (a) Each student is equally likely to be chosen. 103 students have pierced ears. So, P(pierced ears) = P(B) = 103/178. (b) We want to find P(male and pierced ears), that is, P(A and B). Look at the intersection of the “Male” row and “Yes” column. There are 19 males with pierced ears. So, P(A and B) = 19/178. (c) We want to find P(male or pierced ears), that is, P(A or B). There are 90 males in the class and 103 individuals with pierced ears. However, 19 males have pierced ears – don’t count them twice! P(A or B) = (19 + 71 + 84)/178. So, P(A or B) = 174/178

  19. Probability Rules • Two-Way Tables and Probability Note, the previous example illustrates the fact that we can’t use the addition rule for mutually exclusive events unless the events have no outcomes in common. The Venn diagram below illustrates why. General Addition Rule for Two Events If A and B are any two events resulting from some chance process, then P(A or B) = P(A) + P(B) – P(A and B)

  20. Probability Rules • Venn Diagrams and Probability Because Venn diagrams have uses in other branches of mathematics, some standard vocabulary and notation have been developed. The complement ACcontains exactly the outcomes that are not in A. The events A and B are mutually exclusive (disjoint) because they do not overlap. That is, they have no outcomes in common.

  21. Probability Rules • Venn Diagrams and Probability The intersection of events A and B (A ∩ B) is the set of all outcomes in both events A andB. The union of events A and B (A ∪ B) is the set of all outcomes in either event A or B. Hint: To keep the symbols straight, remember ∪ for union and ∩ for intersection.

  22. Probability Rules • Venn Diagrams and Probability Recall the example on gender and pierced ears. We can use a Venn diagram to display the information and determine probabilities. Define events A: is male and B: has pierced ears.

  23. Conditional Probability and Independence Learning Objectives After this section, you should be able to… • DEFINE conditional probability • COMPUTE conditional probabilities • DESCRIBE chance behavior with a tree diagram • DEFINE independent events • DETERMINE whether two events are independent • APPLY the general multiplication rule to solve probability questions

  24. Conditional Probability and Independence • What is Conditional Probability? The probability we assign to an event can change if we know that some other event has occurred. This idea is the key to many applications of probability. When we are trying to find the probability that one event will happen under the condition that some other event is already known to have occurred, we are trying to determine a conditional probability. Definition: The probability that one event happens given that another event is already known to have happened is called a conditional probability. Suppose we know that event A has happened. Then the probability that event B happens given that event A has happened is denoted by P(B | A). Read | as “given that” or “under the condition that”

  25. Conditional Probability and Independence • Example: Grade Distributions Consider the two-way table on page 314. Define events E: the grade comes from an EPS course, and L: the grade is lower than a B. Total 6300 1600 2100 Total 3392 2952 3656 10000 Find P(L) Find P(E | L) Find P(L | E) P(L) = 3656 / 10000 = 0.3656 P(E | L) = 800 / 3656 = 0.2188 P(L| E) = 800 / 1600 = 0.5000

  26. Conditional Probability and Independence • Conditional Probability and Independence When knowledge that one event has happened does not change the likelihood that another event will happen, we say the two events are independent. Definition: Two events A and B are independent if the occurrence of one event has no effect on the chance that the other event will happen. In other words, events A and B are independent if P(A | B) = P(A) and P(B | A) = P(B). Example: Are the events “male” and “left-handed” independent? Justify your answer. P(left-handed | male) = 3/23 = 0.13 P(left-handed) = 7/50 = 0.14 These probabilities are not equal, therefore the events “male” and “left-handed” are not independent.

  27. Conditional Probability and Independence • Tree Diagrams We learned how to describe the sample space S of a chance process in Section 5.2. Another way to model chance behavior that involves a sequence of outcomes is to construct a tree diagram. Consider flipping a coin twice. What is the probability of getting two heads? Sample Space: HH HT TH TT So, P(two heads) = P(HH) = 1/4

  28. Conditional Probability and Independence • General Multiplication Rule The idea of multiplying along the branches in a tree diagram leads to a general method for finding the probability P(A ∩B) that two events happen together. General Multiplication Rule The probability that events A and B both occur can be found using the general multiplication rule P(A ∩B) = P(A) • P(B | A) where P(B | A) is the conditional probability that event B occurs given that event A has already occurred.

  29. Conditional Probability and Independence • Example: Teens with Online Profiles The Pew Internet and American Life Project finds that 93% of teenagers (ages 12 to 17) use the Internet, and that 55% of online teens have posted a profile on a social-networking site. What percent of teens are online and have posted a profile? 51.15% of teens are online and have posted a profile.

  30. Example: Who Visits YouTube? See the example on page 320 regarding adult Internet users. What percent of all adult Internet users visit video-sharing sites? P(video yes ∩ 18 to 29) = 0.27 • 0.7 =0.1890 P(video yes ∩ 30 to 49) = 0.45 • 0.51 =0.2295 P(video yes ∩ 50 +) = 0.28 • 0.26 =0.0728 P(video yes) = 0.1890 + 0.2295 + 0.0728 = 0.4913

  31. Conditional Probability and Independence • Independence: A Special Multiplication Rule When events A and B are independent, we can simplify the general multiplication rule since P(B| A) = P(B). Definition: Multiplication rule for independent events If A and B are independent events, then the probability that A and B both occur is P(A ∩B) = P(A) • P(B) Example: Following the Space Shuttle Challenger disaster, it was determined that the failure of O-ring joints in the shuttle’s booster rockets was to blame. Under cold conditions, it was estimated that the probability that an individual O-ring joint would function properly was 0.977. Assuming O-ring joints succeed or fail independently, what is the probability all six would function properly? P(joint1 OK and joint 2 OK and joint 3 OK and joint 4 OK and joint 5 OK and joint 6 OK) =P(joint 1 OK) • P(joint 2 OK) • … • P(joint 6 OK) =(0.977)(0.977)(0.977)(0.977)(0.977)(0.977) = 0.87

  32. Conditional Probability and Independence • Calculating Conditional Probabilities If we rearrange the terms in the general multiplication rule, we can get a formula for the conditional probability P(B | A). General Multiplication Rule P(A ∩B) = P(A) • P(B | A) P(A ∩B) P(A) P(B | A) Conditional Probability Formula To find the conditional probability P(B | A), use the formula =

  33. Conditional Probability and Independence • Example: Who Reads the Newspaper? In Section 5.2, we noted that residents of a large apartment complex can be classified based on the events A: reads USA Today and B: reads the New York Times. The Venn Diagram below describes the residents. What is the probability that a randomly selected resident who reads USA Today also reads the New York Times? There is a 12.5% chance that a randomly selected resident who reads USA Today also reads the New York Times.

  34. Discrete and Continuous Random Variables Learning Objectives After this section, you should be able to… • APPLY the concept of discrete random variables to a variety of statistical settings • CALCULATE and INTERPRET the mean (expected value) of a discrete random variable • CALCULATE and INTERPRET the standard deviation (and variance) of a discrete random variable • DESCRIBE continuous random variables

  35. Discrete and Continuous Random Variables • Random Variable and Probability Distribution A probability model describes the possible outcomes of a chance process and the likelihood that those outcomes will occur. A numerical variable that describes the outcomes of a chance process is called a random variable. The probability model for a random variable is its probability distribution Definition: A random variable takes numerical values that describe the outcomes of some chance process. The probability distribution of a random variable gives its possible values and their probabilities. Consider tossing a fair coin 3 times. Define X = the number of heads obtained Example: X = 0: TTT X = 1: HTT THT TTH X = 2: HHT HTH THH X = 3: HHH

  36. Discrete and Continuous Random Variables • Discrete Random Variables There are two main types of random variables: discrete and continuous. If we can find a way to list all possible outcomes for a random variable and assign probabilities to each one, we have a discrete random variable. Discrete Random Variables and Their Probability Distributions • A discrete random variableX takes a fixed set of possible values with gaps between. The probability distribution of a discrete random variable X lists the values xiand their probabilities pi: • Value: x1x2x3 … • Probability: p1p2p3 … • The probabilities pi must satisfy two requirements: • Every probability piis a number between 0 and 1. • The sum of the probabilities is 1. • To find the probability of any event, add the probabilities piof the particular values xithat make up the event.

  37. Example: Babies’ Health at Birth Read the example on page 343. • Show that the probability distribution for X is legitimate. • Make a histogram of the probability distribution. Describe what you see. • Apgar scores of 7 or higher indicate a healthy baby. What is P(X ≥ 7)? (a) All probabilities are between 0 and 1 and they add up to 1. This is a legitimate probability distribution. (c) P(X ≥ 7) = .908 We’d have a 91 % chance of randomly choosing a healthy baby. (b) The left-skewed shape of the distribution suggests a randomly selected newborn will have an Apgar score at the high end of the scale. There is a small chance of getting a baby with a score of 5 or lower.

  38. Discrete and Continuous Random Variables • Mean of a Discrete Random Variable When analyzing discrete random variables, we’ll follow the same strategy we used with quantitative data – describe the shape, center, and spread, and identify any outliers. The mean of any discrete random variable is an average of the possible outcomes, with each outcome weighted by its probability. Definition: Suppose that X is a discrete random variable whose probability distribution is Value: x1x2x3 … Probability: p1p2p3 … To find the mean (expected value) of X, multiply each possible value by its probability, then add all the products:

  39. Example: Apgar Scores – What’s Typical? Consider the random variable X = Apgar Score Compute the mean of the random variable X and interpret it in context. The mean Apgar score of a randomly selected newborn is 8.128. This is the long-term average Agar score of many, many randomly chosen babies. Note: The expected value does not need to be a possible value of X or an integer! It is a long-term average over many repetitions.

  40. Discrete and Continuous Random Variables • Standard Deviation of a Discrete Random Variable Since we use the mean as the measure of center for a discrete random variable, we’ll use the standard deviation as our measure of spread. The definition of the variance of a random variable is similar to the definition of the variance for a set of quantitative data. Definition: Suppose that X is a discrete random variable whose probability distribution is Value: x1x2x3 … Probability: p1p2p3 … and that µXis the mean of X. The variance of X is To get the standard deviation of a random variable, take the square root of the variance.

  41. Example: Apgar Scores – How Variable Are They? Consider the random variable X = Apgar Score Compute the standard deviation of the random variable X and interpret it in context. Variance The standard deviation of X is 1.437. On average, a randomly selected baby’s Apgar score will differ from the mean 8.128 by about 1.4 units.

  42. Discrete and Continuous Random Variables • Continuous Random Variables Discrete random variables commonly arise from situations that involve counting something. Situations that involve measuring something often result in a continuous random variable. Definition: A continuous random variableX takes on all values in an interval of numbers. The probability distribution of X is described by a density curve. The probability of any event is the area under the density curve and above the values of X that make up the event. The probability model of a discrete random variable X assigns a probability between 0 and 1 to each possible value of X. A continuous random variable Y has infinitely many possible values. All continuous probability models assign probability 0 to every individual outcome. Only intervals of values have positive probability.

  43. Example: Young Women’s Heights Read the example on page 351. Define Y as the height of a randomly chosen young woman. Y is a continuous random variable whose probability distribution is N(64, 2.7). What is the probability that a randomly chosen young woman has height between 68 and 70 inches? P(68 ≤ Y ≤ 70) = ??? P(1.48 ≤ Z ≤ 2.22) = P(Z ≤ 2.22) – P(Z ≤ 1.48) = 0.9868 – 0.9306 = 0.0562 There is about a 5.6% chance that a randomly chosen young woman has a height between 68 and 70 inches.

  44. Transforming and Combining Random Variables Learning Objectives After this section, you should be able to… • DESCRIBE the effect of performing a linear transformation on a random variable • COMBINE random variables and CALCULATE the resulting mean and standard deviation • CALCULATE and INTERPRET probabilities involving combinations of Normal random variables

  45. Transforming and Combining Random Variables • Linear Transformations In Section 6.1, we learned that the mean and standard deviation give us important information about a random variable. In this section, we’ll learn how the mean and standard deviation are affected by transformations on random variables. • In Chapter 2, we studied the effects of linear transformations on the shape, center, and spread of a distribution of data. Recall: • Adding (or subtracting) a constant, a, to each observation: • Adds a to measures of center and location. • Does not change the shape or measures of spread. • Multiplying (or dividing) each observation by a constant, b: • Multiplies (divides) measures of center and location by b. • Multiplies (divides) measures of spread by |b|. • Does not change the shape of the distribution.

  46. Transforming and Combining Random Variables • Linear Transformations Pete’s Jeep Tours offers a popular half-day trip in a tourist area. There must be at least 2 passengers for the trip to run, and the vehicle will hold up to 6 passengers. Define X as the number of passengers on a randomly selected day. The mean of X is 3.75 and the standard deviation is 1.090. Pete charges $150 per passenger. The random variable C describes the amount Pete collects on a randomly selected day. The mean of C is $562.50 and the standard deviation is $163.50. Compare the shape, center, and spread of the two probability distributions.

  47. Transforming and Combining Random Variables • Linear Transformations How does multiplying or dividing by a constant affect a random variable? Effect on a Random Variable of Multiplying (Dividing) by a Constant • Multiplying (or dividing) each value of a random variable by a number b: • Multiplies (divides) measures of center and location (mean, median, quartiles, percentiles) by b. • Multiplies (divides) measures of spread (range, IQR, standard deviation) by |b|. • Does not change the shape of the distribution. Note: Multiplying a random variable by a constant b multiplies the variance by b2.

  48. Transforming and Combining Random Variables • Linear Transformations Consider Pete’s Jeep Tours again. We defined C as the amount of money Pete collects on a randomly selected day. The mean of C is $562.50 and the standard deviation is $163.50. It costs Pete $100 per trip to buy permits, gas, and a ferry pass. The random variable V describes the profit Pete makes on a randomly selected day. The mean of V is $462.50 and the standard deviation is $163.50. Compare the shape, center, and spread of the two probability distributions.

  49. Transforming and Combining Random Variables • Linear Transformations How does adding or subtracting a constant affect a random variable? Effect on a Random Variable of Adding (or Subtracting) a Constant • Adding the same number a (which could be negative) to each value of a random variable: • Adds a to measures of center and location (mean, median, quartiles, percentiles). • Does not change measures of spread (range, IQR, standard deviation). • Does not change the shape of the distribution.

  50. Transforming and Combining Random Variables • Linear Transformations Whether we are dealing with data or random variables, the effects of a linear transformation are the same. Effect on a Linear Transformation on the Mean and Standard Deviation • If Y = a + bX is a linear transformation of the random variable X, then • The probability distribution of Y has the same shape as the probability distribution of X. • µY = a+ bµX. • σY= |b|σX (since b could be a negative number).

More Related