Docsity

Simulation: Using Random Digits to Estimate Probabilities - Prof. L. Hendrix, Study notes of Statistics

Toggle sidebar
bg1
Chapter 19 - Simulation Page 1
Chapter 19
Simulation
We learned some basic rules of probability in our discussions of Chapters 17 and 18. We computed
the probability of simple events, as well as the probability of unions and intersections of simple
events. We computed these probabilities based on a probability model.
How did we get these probability models?
1. Empirical Probability – proportion of times the event will occur in the long-run based on
proportion of times the event occurs in a long series of repetitions
2. Theoretical Probability – proportion of times the event will occur in the long run based on a
set of theories holding true
Oftentimes, in practice, it is not practical (or possible) to compute the probability of complicated
events – either through theoretical or empirical methods. In these cases, we use a technique called
simulation.
Definition
Using random digits from a table or from computer software to imitate chance behavior is called
SIMULATION.
Simulation
Is widely used by scientists and engineers to find probabilities in complex situations
Is only as good as the probability model you start with
Uses the fact that the proportion of repetitions on which an event occurs will eventually be
close to the probability, so we get good estimates
Example 1
Find the probability of getting a run of at least 3 consecutive “heads” or at least 3 consecutive “tails” in
the experiment where a fair coin is tossed 10 times.
Step 1 Give a probability model.
Each toss has a probability of 0.5 of a “heads” and 0.5 of a “tails”
Tosses are independent of one another (recall: independence tells us that the outcome of one
toss of the coin does not change the probability of the outcome of any other toss)
Step 2 Assign digits to represent outcomes
Goal: assign digits in a way that matches the probabilities from Step 1
Solution: (one of several possibilities)
Let one digit represent 1 toss of the coin
an odd digit represents heads and an even digit represents tails
this works because each digit in the table has a 1/10 chance to be the next digit and
successive digits are independent, so 5/10 = half the digits are odd and 5/10 = half the
digits are even
pf3
pf4
pf5

Partial preview of the text

Download Simulation: Using Random Digits to Estimate Probabilities - Prof. L. Hendrix and more Study notes Statistics in PDF only on Docsity!

Chapter 19

Simulation

We learned some basic rules of probability in our discussions of Chapters 17 and 18. We computed the probability of simple events, as well as the probability of unions and intersections of simple events. We computed these probabilities based on a probability model. How did we get these probability models?

  1. Empirical Probability – proportion of times the event will occur in the long-run based on proportion of times the event occurs in a long series of repetitions
  2. Theoretical Probability – proportion of times the event will occur in the long run based on a set of theories holding true

Oftentimes, in practice, it is not practical (or possible) to compute the probability of complicated events – either through theoretical or empirical methods. In these cases, we use a technique called simulation.

Definition Using random digits from a table or from computer software to imitate chance behavior is called SIMULATION.

Simulation  Is widely used by scientists and engineers to find probabilities in complex situations  Is only as good as the probability model you start with  Uses the fact that the proportion of repetitions on which an event occurs will eventually be close to the probability, so we get good estimates

Example 1 Find the probability of getting a run of at least 3 consecutive “heads” or at least 3 consecutive “tails” in the experiment where a fair coin is tossed 10 times.

Step 1 Give a probability model. Each toss has a probability of 0.5 of a “heads” and 0.5 of a “tails” Tosses are independent of one another ( recall: independence tells us that the outcome of one toss of the coin does not change the probability of the outcome of any other toss ) Step 2 Assign digits to represent outcomes Goal: assign digits in a way that matches the probabilities from Step 1 Solution: (one of several possibilities)  Let one digit represent 1 toss of the coin  an odd digit represents heads and an even digit represents tails this works because each digit in the table has a 1/10 chance to be the next digit and successive digits are independent, so 5/10 = half the digits are odd and 5/10 = half the digits are even

Step 3 Simulate many repetitions

We’ll do three together.

Now, you do one repetition.

CLICKER

Use your clicker to record whether you had a run of at least three “heads” or at least three “tails” in your one repetition. Did you have a run of at least 3 “heads” or at least 3 “tails” A. YES B. NO

So, our estimate of the probability of getting a run of at least 3 “heads” or at least 3 “tails” our of 10 coin flips is

Example for fun (not in text) When would we want to simulate a coin flip rather than actually flip a coin? When we discussed response error, we discussed how when respondents are asked “sensitive” questions, they may not be truthful in their response. One such question that has most likely been asked of you in the past (in Junior High or High School) concerns marijuana use. Many of you admitted to not being truthful on these types of questions. “Forced Yes” Method Respondents flip a coin. Only the respondent knows the outcome of the coin flip. If the coin turns up “heads” respondents answer “yes” to the sensitive question If the coin comes up “tails” respondents are asked to answer truthfully. This way, the respondents are assured that there is no way their response of “yes” can be traced back to whether it was a forced “yes” or a true “yes”. Some researchers believe this experiment works best when the coin flipping is simulated…why?

Let’s use this idea to answer the following question in class now: Do you currently smoke marijuana on a regular basis (defined as at least once a month)?

Use the random digits table for your simulation of a coin flip.

“heads” means FORCED YES “tails” means TRUTHFUL YES or NO

CLICKER

A. “YES” (either because you flipped “heads” or you flipped “tails” and are answering truthfully) B. “NO” (you flipped “tails” and you really don’t use marijuana on a regular basis)

Now, what is a good way to estimate the proportion of those who use marijuana at least once a month?

What are the drawbacks to this method?

What are the benefits?

More Elaborate Simulations Example 4 A couple plans to have children until they have a girl or until they have three children. What is the probability they will have a girl among their children?

Simulation Step 1 Probability Model

Step 2 Assign Digits

Step 3 Repeat many Simulations

True Probability

Tree Diagram A useful tool for organizing more complicated probabilities in a graphical form is called a tree diagram. A tree diagram represents different stages of a probability model by different “branchings”. Multiplication up the branches denotes intersections of events (considering conditions) and adding the resulting intersections’ probabilities can give us the probability of a union. Now compute the true probability this couple will have a girl.