Simulation and Random Number Generation for AP Statistics
Practice problems for these concepts can be found at:
- Probability and Random Variables Multiple Choice Practice Problems for AP Statistics
- Probability and Random Variable Free Response Practice Problems for AP Statistics
- Probability and Random Variables Cumulative Review Problems for AP Statistics
- Probability and Random Variables Rapid Review for AP Statistics
Sometimes probability situations do not lend themselves easily to analytical solutions. In some situations, an acceptable approach might be to run a simulation. A simulation utilizes some random process to conduct numerous trials of the situation and then counts the number of successful outcomes to arrive at an estimated probability. In general, the more trials, the more confidence we can have that the relative frequency of successes accurately approximates the desired probability. The law of large numbers states that the proportion of successes in the simulation should become, over time, close to the true proportion in the population.
One interesting example of the use of simulation has been in the development of certain "systems" for playing Blackjack. The number of possible situations in Blackjack is large but finite. A computer was used to conduct thousands of simulations of each possible playing decision for each of the possible hands. In this way, certain situations favorable to the player were identified and formed the basis for the published systems.
- example: Suppose there is a small Pacific Island society that places a high value on families having a baby girl. Suppose further that every family in the society decides to keep having children until they have a girl and then they stop. If the first child is a girl, they are a one-child family, but it may take several tries before they succeed. Assume that when this policy was decided on that the proportion of girls in the population was 0.5 and the probability of having a girl is 0.5 for each birth. Would this behavior change the proportion of girls in the population? Design a simulation to answer this question.
solution: Use a random number generator, say a fair coin, to simulate a birth. Let heads = "have a girl" and tails = "have a boy." Flip the coin and note whether it falls heads or tails. If it falls heads, the trial ends. If it falls tails, flip again because this represents having a boy. The outcome of interest is the number of trials (births) necessary until a girl is born (if the third flip gives the first head, then x = 3). Repeat this many times and determine how many girls and how many boys have been born.
If flipping a coin many times seems a bit tedious, you can also use your calculator to simulate flipping a coin. Let 1 be a head and let 2 be a tail. Then enter MATH PRB randInt(1,2) and press ENTER to generate a random 1 or 2. Continue to press ENTER to generate additional random integers 1 or 2. Enter randInt(1,2,n) to generate n random integers, each of which is a 1 or a 2. Enter randInt(a,b,n) to generate n random integers X such that a ≤ X ≤ b.
- Kindergarten Sight Words List
- First Grade Sight Words List
- 10 Fun Activities for Children with Autism
- Child Development Theories
- Grammar Lesson: Complete and Simple Predicates
- Definitions of Social Studies
- Social Cognitive Theory
- Signs Your Child Might Have Asperger's Syndrome
- Why is Play Important? Social and Emotional Development, Physical Development, Creative Development
- Theories of Learning