MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern...

36
MAT 1000 Mathematics in Today's World

Transcript of MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern...

Page 1: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

MAT 1000

Mathematics in Today's World

Page 2: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Last Time

We discussed the four rules that govern probabilities:

1. Probabilities are numbers between 0 and 12. The probability an event does not occur is 1 minus the

probability that it does3. The probability of one or the other of two disjoint events

occurring is the sum of their probabilities4. All possible outcomes together have a probability of 1

Page 3: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Last Time

We also discussed “independent” events.

If two events are independent, the probability that both happen is the product of the probabilities of each.

We also saw how to analyze simple probabilities using sample spaces, and probability models.

Probability models can be represented visually by probability histograms

Page 4: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Today

We will talk about random phenomena with “equally likely” outcomes.

Meaning: all outcomes have the same probability.

When outcomes are all equally likely, to find probabilities we just need to count.

Page 5: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Today

We will also talk about “simulation.”

Probability is a long-term frequency, so we can experimentally approximate probabilities.

Page 6: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

A probability model is a list of all possible outcomes (the sample space) and the probability of each.

Models where all outcomes have the same probability are especially easy to work with.

When all outcomes in a probability model have the same probability, we say the outcomes are equally likely.

Page 7: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

Some of the simple examples we have considered have equally likely outcomes.

Flipping a coin:

Rolling a die:

Page 8: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

But, not every probability model has equally likely outcomes. We’ve seen a few examples of this.

The gender of a newborn baby:

The color of a randomly drawn M&M

Page 9: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

If we know that a probability model has equally likely outcomes, finding the probability of each individual outcome is quite easy.

When all outcomes are equally likely:

Page 10: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

Last time we found the sample space for rolling two dice:

I also said that the probability of any one outcome is:

The reason is that there are 36 possible outcomes, and they are all equally likely.

Page 11: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

“Outcomes” and “events” are somewhat different things

An event is a collection of outcomes.

When rolling two dice, “the sum of the numbers on the dice is 10” is an event (not an outcome).

Which outcomes are in this event?

Page 12: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

What is the probability of this event? I claimed last time that it is

Why is this true?

When all outcomes are equally likely:

Page 13: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Equally likely outcomes

Be careful. These two formulas are not always true:

They are only true when all of the outcomes are equally likely.

Page 14: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Suppose we flip a coin six times in a row. For each flip, we’ll write down H if we get heads and T if we get tails. Which of these sequences is less likely to happen?

H H H H H H

T H H T H T

Almost everyone would answer that the first sequence is less likely. This is false.

Page 15: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Each flip of a coin is independent.

Getting heads or tails on one flip doesn’t change the probabilities of getting heads or tails on the next.

What’s the probability of getting heads on two flips?

Page 16: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

What’s the probability of getting heads on three flips?

Four?

Page 17: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

By now you see the pattern, and you can guess that the probability of the sequence H H H H H H should be multiplied by itself 6 times.

What is the probability of the sequence T H H T H T ?

Exactly the same.

Page 18: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

The probability that we toss a coin and get tails is The next toss is independent of this, so the probability of getting heads is Becausae these two tosses are independent, we have

The next toss is also independent, so

Page 19: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Again you should see the pattern. Each of the six tosses is independent, so the probability of the sequence

T H H T H T is multiplied by itself 6 times:

The probability of tossing a coin six times and getting

T H H T H T is the same as the probability of getting

H H H H H H

Page 20: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Our intuition is wrong in believing thatT H H T H T

is more likely thanH H H H H H

But, there is a kernel of truth in this false intuition.

It is true that tossing a coin six times and getting heads three times is more likely than tossing a coin six times and getting heads all six times.

Page 21: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Compare the wording:

“getting heads three times in six tosses”

“tossing a coin six times and getting T H H T H T”

These are different statements. Why?

There are several ways to toss a coin six times and get heads three times. The sequence T H H T H T is just one way. Here are two more:

T T H H T H

H H T T T H

Page 22: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

So what is the probability of tossing a coin six times and getting heads three times?

Turns out it’s

Page 23: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Any sequence of six outcomes for our coin tosses is equally likely (they all have probability ).

Remember that

So finding the probability of getting heads on three tosses requires counting how many ways there are to do this.

Page 24: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Probability myths

Turns out there are 20 (we’ll see a nice formula for counting this next time) ways to get three heads on six tosses.

Also there are 64 possible outcomes (another formula we’ll learn next time).

So, as I said, the probability is

Page 25: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

This type of question quickly get difficult to analyze.

Suppose we want to know the probability of tossing a coin ten times and getting a “run” of at least three heads in a row.

This can be calculated mathematically, but it’s fairly subtle.

Fortunately, there is an alternative approach.

We can estimate probabilities using “simulation.”

Page 26: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

Probabilities are long-run frequencies.

To estimate the probability of getting a run of three or more heads in ten coin tosses, we could repeatedly toss a coin ten times.

Keeping track of how often we get a run of three or more on ten tosses, we could look at the frequency:

The more times we do this, our approximation will get closer and closer to the actual probability.

Page 27: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

But tossing a coin thousands of times would take a long time.

We can use what’s called “simulation” to speed up the process (and this can be done on a computer).

The key idea of simulation: use random digits to imitatate chance behavior.

Page 28: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

Setting up a simulation:

Step 1. Give a probability model for the underlying random phenomenon.

Our model is that we have two outcomes: “heads” and “tails.” They are independent, and equally likely (probability of either is )

Page 29: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

Setting up a simulation:

Step 2. Assign digits to represent outcomes.

If we use a table of random digits, we will get digits from 0 to 9. Each digit is equally likely (probability ), and successive digits are independent.

Page 30: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

In our simulation each digit will represent a coin toss.

We can let odd digits represent the outcome “heads” and let even digits represent the outcome “tails.”

Note this works out because there are 5 odd digits and 5 even digits (including 0), so the probability of choosing an odd number is exactly the probability of getting heads (0.5), and the probability of choosing an even number is exactly the same as the probability of getting tails (0.5 again).

Page 31: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

Setting up a simulation:

Step 3. Simulate many repetitions.

We want to simulate what happens when toss a coin ten times. Each digit is one toss. So we look at ten digits from a table of random digits to simulate ten tosses.

Let’s start from the first line…

Page 32: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Chapter 2 32

Page 33: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

The first 10 digits are

Odd means “heads” and even means “tails,” so these 10 digits simulate tossing a coin ten times and getting:

H H T T H H H T H T

This time we did get 3 heads in a row.

Let’s do two more repetitions.

Page 34: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

The next 10 digits on the table are

This corresponds to the sequence:

T H H H T T T H H H

Another sequence with three heads in a row (twice).

The next 10 digits are

H T T T H H T H H H

Yet again we have three heads in a row.

Page 35: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

At this point our simulation estimates the probability of tossing a coin ten times and getting three or more heads to be

Not a very good estimate.

We haven’t done enough simulations. Of course a computer can quickly do thousands, which is enough to give a good estimate.

Page 36: MAT 1000 Mathematics in Today's World. Last Time We discussed the four rules that govern probabilities: 1.Probabilities are numbers between 0 and 1 2.The.

Simulation

If we do 17 more simulations, for a total of 20, heads occurs at least three times in a row in 11 simulations.

This gives an estimated probability of

For comparison (using some difficult math) the actual probability is

So even 20 simulations gives a decent estimate.