Chapter 11 Understanding Randomness. What is Randomness? Some things that are random: Rolling dice...

Post on 05-Jan-2016

216 views 2 download

Transcript of Chapter 11 Understanding Randomness. What is Randomness? Some things that are random: Rolling dice...

Chapter 11

Understanding Randomness

What is Randomness?

Some things that are random: Rolling dice Shuffling cards Lotteries Bingo Flipping a coin

Randomness Why do we need randomness?

We use randomness in our data collection to give a fair and accurate picture of the world.

Drawing conclusions from data relies on randomness in data collection

Randomness How do we use randomness in Statistics? Simulations (Chapter 11) Sampling and Surveys (Chapter 12) Experiments (Chapter 13) Very important for any statistical Inference

It’s Not Easy Being Random

It’s Not Easy Being Random (cont.) It’s surprisingly difficult to generate random values even when they’re equally likely.

Computers have become a popular way to generate random numbers. Even though they often do much better than humans, computers can’t generate truly random numbers either.

Since computers follow programs, the “random” numbers we get from computers are really pseudorandom.

Fortunately, pseudorandom values are good enough for most purposes.

It’s Not Easy Being Random (cont.) There are ways to generate random numbers so that they are both equally likely and truly random.

The best ways we know to generate data that give a fair and accurate picture of the world rely on randomness, and the ways in which we draw conclusions from those data depend on the randomness, too.

A Simulation A simulation consists of a collection of things that happen at random. The most basic event is called a component of the simulation.

Each component has a set of possible outcomes, one of which will occur at random.

A Simulation (cont.) The sequence of events we want to investigate is called a trial. Trials usually involve several components.

After the trial, we record what happened—our response variable.

There are seven steps to a simulation…

Simulations Identify the component to be repeated. Decide how the outcome will me modeled. Decide how a trial will be simulated. State clearly what the response variable is.

Run several trials. (as many as possible)

Analyze the response variable. State conclusions in the context of the problem.

Simulations A simulation consists of a sequence of random outcomes that model a situation.

Example: Suppose we have a basketball player who is an 80% free-throw shooter. How many shots can she make in a row without missing?

Example - simulations Component – the most basic event we are simulating: a single free-throw (foul shot)

Trial – the sequence of events we want to investigate: shooting until a miss

Response: number of shots made before the miss

Statistic: Find the mean number of shots made.

Example - Simulations To perform one trial:

Use a sequence of random digits (from a random number table)

She makes 80% of her free-throw, so let the digits 0 - 7 represent shots that are made

Let the digits 8 and 9 represent shots that are missed

Example - Simulations Use the Random Digits Table to perform a trial. Row 1 and Column 1 of table gives

• 5965 2913 • In this trial she misses her second shot.

Trial #2 Row 2 and Column 1 of table gives

• 5801 9383• In this trial she also misses her second shot.

Trial #3 Row 3 and Column 1 of table gives

• 1223 5344 3649• In this trial she does not miss a shot.

Trial #4 etc.

Algorithm for Using the Random Number Table We have a population of size N; we want to take a sample size n

Number all of the individuals in the population <10 in pop: everyone gets a one digit number <100 in pop: everyone gets a two digit number

Go to the table and write down numbers by 1’s (if individuals are labeled with one digit) 2’s (if individuals are labeled with two digits)

Algorithm Continued Throw out numbers that do not correspond to an individual in the population

Throw out repeats (we don’t want to sample the same person twice!)

First n numbers are the sample

Example - Selecting a Random Sample

Population = 30 companies Sample = 4 companies

Number the companies 01, 02, …, 09, 10, 11, 12, …, 30

Go to random number table and write down numbers by twos

Throw out 00 and 31 through 99 Throw out repeats First 4 numbers are our sample

Example – Selecting a Random Sample Random Numbers69051 64817 87174 09517 84534 06489 87201

By twos:69 05 16 48 17 87 17 40 95 17 84 53 40 64 89 87 20

Throw out 00 and 31 through 9905 16 17 17 17 20

Throw out repeats05 16 17 20

Sample = {05, 16, 17, 20}