Understanding Randomness Chapter 11 Understanding Randomness
Why do we want randomness? Random selection seems fair because: nobody knows the outcome beforehand fairness usually means that the possible outcomes are equally likely
Randomness (cont.) Ex: A coin flip. Can you predict the outcome beforehand?
Randomness (cont.) Randomness isn’t chaos to statisticians To them, it’s a tool
Difficulty of Randomness Truly random numbers are difficult to generate Computers are widely used to do so Though they aren’t completely random, they’re close Pseudorandom
Simulations A simulation consists of a collection of things that happen randomly The most basic event of the simulation is called a component Each component has possible outcomes that will happen randomly
Simulations (cont.) Trial - sequence of events to investigate They usually involve several components Afterward, record what happened - the response variable
Simulation Steps Identify the component to be repeated. Explain how you will model the outcome. Explain how you will simulate the trial. State clearly what the response variable is. Run several trials. Analyze the response variable. State your conclusion (in the context of the problem, as always).
Possible Problems Don’t rely too much on your results - actual results will not model yours exactly Be sure to say “the simulation indicates that…”, not “this will happen…”
Possible Problems (cont.) Run enough trials Too few trials will not give a good enough representation of the possible outcomes
Problem #21 Late in a basketball game, the team that is behind often fouls someone in an attempt to get the ball back. Usually the opposing player will get to shoot foul shots “one and one,” meaning he gets a shot, and then a second shot only if he makes the first one. Suppose the opposing player has made 72% of his foul shots this season. Estimate the number of points he will score in a “one and one” situation.
Problem #21 Cont. First generate a list of random numbers 82 06 60 98 58 04 38 88 39 61 49 84 52 95 64 85 96 89 11 44 Then group the numbers into twos. If the number is between 0-71 its a basket. only look at the second number in the group if the first is a basket. 82 06/ 60 98/ 58 04/ 38 88/ 39 61/ 49 84/ 52 95/ 64 85/ 96 89/ 11 44 0 1 2 1 2 1 1 1 0 2 Now average the number of points for each trial So this model suggests the player will score 1.1 points
Problem #25 Many couples want to have both a boy and a girl. If they decide to continue having children until they have one child of each gender, what would the average family size be? Assume that boys and girls are equally likely.
Problem #25 Cont. Because boys and girls are equally likely we can assign boys to 0 and girls to 1. So generate multiple lists of random numbers between 0-1 1 0 0 0 0/0 1 1 1 0/0 1 1 1 0/1 1 0 0 0 /1 1 1 0 1 /0 1 1 0 1/ 1 1 0 1 1/1 0 1 0 1 / 0 1 1 0 0 /0 1 1 1 1 For each set count the number of integers that appear before you get a 1 and a 0. Then average the numbers from each number set. So this model would suggest that the average family with both a boy and a girl will have 2.4 children