continuous random variables -...

Post on 08-Sep-2018

218 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Continuous Random VariablesLecture 23

Section 7.5.4

Robb T. Koether

Hampden-Sydney College

Wed, Feb 29, 2012

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 1 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 2 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 3 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 4 / 30

Hypothesis Testing (n = 1)

An experiment is designed to determine whether a randomvariable X has the distribution U(0,1) or U(0.5,1.5).

H0 : X is U(0,1).H1 : X is U(0.5,1.5).

One value of X is sampled (n = 1).If X is more than 0.90, then H0 will be rejected.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 5 / 30

Hypothesis Testing (n = 1)

-0.5 0.5 1.0 1.5 2.0

0.2

0.4

0.6

0.8

1.0

-0.5 0.5 1.0 1.5 2.0

0.2

0.4

0.6

0.8

1.0

Hypothetical distributions of X under H0 and H1:

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 6 / 30

Hypothesis Testing (n = 1)

-0.5 0.5 1.0 1.5 2.0

0.2

0.4

0.6

0.8

1.0

-0.5 0.5 1.0 1.5 2.0

0.2

0.4

0.6

0.8

1.0

What is α?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 6 / 30

Hypothesis Testing (n = 1)

-0.5 0.5 1.0 1.5 2.0

0.2

0.4

0.6

0.8

1.0

-0.5 0.5 1.0 1.5 2.0

0.2

0.4

0.6

0.8

1.0

What is β?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 6 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 7 / 30

Example

Now suppose we use the TI-83 to get two random numbers from 0to 1.Let X2 = the average of the two random numbers.What is the pdf of X2?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 8 / 30

Example

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

The graph of the pdf of X2.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 9 / 30

Example

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

What is the probability that X2 is between 0.25 and 0.75?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 9 / 30

Hypothesis Testing (n = 2)

An experiment is designed to determine whether a randomvariable X has the distribution U(0,1) or U(0.5,1.5).

H0 : X is U(0,1).H1 : X is U(0.5,1.5).

Two values of X are sampled (n = 2).Let X2 be the average.If X2 is more than 0.90, then H0 will be rejected.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 10 / 30

Hypothesis Testing (n = 2)

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

-0.5 0.0 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

Hypothetical distributions of X under H0 and H1:

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 11 / 30

Hypothesis Testing (n = 2)

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

-0.5 0.0 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

What is α?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 11 / 30

Hypothesis Testing (n = 2)

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

-0.5 0.0 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

What is β?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 11 / 30

Conclusion

ConclusionBy increasing the sample size, we can lower both α and βsimultaneously.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 12 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 13 / 30

Example

Now suppose we use the TI-83 to get three random numbers from0 to 1, and then average them.Let X3 = the average of the three random numbers.What is the pdf of X3?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 14 / 30

Example

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

The graph of the pdf of X3.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 15 / 30

Example

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

What is the probability that X3 is between 0.25 and 0.75?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 15 / 30

Example

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

It turns out to be 5564 = 0.8954.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 15 / 30

Hypothesis Testing (n = 3)

An experiment is designed to determine whether a randomvariable X has the distribution U(0,1) or U(0.5,1.5).

H0 : X is U(0,1).H1 : X is U(0.5,1.5).

Three values of X3 are sampled (n = 3). Let X3 be the average.If X3 is more than 0.90, then H0 will be rejected.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 16 / 30

Hypothesis Testing (n = 3)

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

The hypothetical distributions of X3 under H0 and H1.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 17 / 30

Hypothesis Testing (n = 3)

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

It turns out that α = 0.0045.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 17 / 30

Hypothesis Testing (n = 3)

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

-0.5 0.5 1.0 1.5 2.0

0.5

1.0

1.5

2.0

And β = 0.2840.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 17 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 18 / 30

Example

Suppose we get 12 random numbers, uniformly distributedbetween 0 and 1, from the TI-83 and get their average.Let X12 = average of 12 random numbers from 0 to 1.What is the pdf of X12?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 19 / 30

Example

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

It turns out that the pdf of X12 is nearly exactly normal with a mean of 12

and a standard deviation of 112 .

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 20 / 30

Example

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

It turns out that the pdf of X12 is nearly exactly normal with a mean of 12

and a standard deviation of 112 .

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 20 / 30

Example

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

What is the probability that X12 is between 0.25 and 0.75?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 20 / 30

Hypothesis Testing (n = 12)

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

The hypothetical distributions of X12 under H0 and H1.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 21 / 30

Hypothesis Testing (n = 12)

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

-0.5 0.0 0.5 1.0 1.5 2.0

1

2

3

4

5

What are α and β?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 21 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 22 / 30

Preview of the Central Limit Theorem

We looked at the distribution of the average of 1, 2, 3, and 12uniform random variables U(0,1).We saw that the shapes of their distributions was moving towardsthe shape of the normal distribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 23 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 1

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 2

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 3

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 4

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 5

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 6

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 7

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 8

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 9

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 10

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 11

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

0.0 0.2 0.4 0.6 0.8 1.0

1

2

3

4

5

n = 12

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 24 / 30

Preview of the Central Limit Theorem

Some observations:Each distribution is centered at the same place, 1

2 .The distributions are being “drawn in” towards the center.That means that their standard deviations are decreasing as thesample size increases.

Can we quantify this?

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 25 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 26 / 30

Suppose that a population is 50% male and 50% female.

We take a sample of 25 and compute the sample proportion ofmales.The sample proportion could be anything from 0% to 100%,depending on the sample.But it is probably close to 50%.We will simulate this situation.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 27 / 30

Suppose that a population is 50% male and 50% female.We take a sample of 25 and compute the sample proportion ofmales.

The sample proportion could be anything from 0% to 100%,depending on the sample.But it is probably close to 50%.We will simulate this situation.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 27 / 30

Suppose that a population is 50% male and 50% female.We take a sample of 25 and compute the sample proportion ofmales.The sample proportion could be anything from 0% to 100%,depending on the sample.

But it is probably close to 50%.We will simulate this situation.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 27 / 30

Suppose that a population is 50% male and 50% female.We take a sample of 25 and compute the sample proportion ofmales.The sample proportion could be anything from 0% to 100%,depending on the sample.But it is probably close to 50%.

We will simulate this situation.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 27 / 30

Suppose that a population is 50% male and 50% female.We take a sample of 25 and compute the sample proportion ofmales.The sample proportion could be anything from 0% to 100%,depending on the sample.But it is probably close to 50%.We will simulate this situation.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 27 / 30

Use rand(0,1,25) to randomly select twenty-five 0’s and 1’s.

Interpret 1 as male, 0 as female.Compute the sample proportion of males.Then apply the sum function to count the 1’s.A simpler way to do this is to enter randBin(25,.5).Repeat this many times until we can see the shape of thedistribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 28 / 30

Use rand(0,1,25) to randomly select twenty-five 0’s and 1’s.Interpret 1 as male, 0 as female.

Compute the sample proportion of males.Then apply the sum function to count the 1’s.A simpler way to do this is to enter randBin(25,.5).Repeat this many times until we can see the shape of thedistribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 28 / 30

Use rand(0,1,25) to randomly select twenty-five 0’s and 1’s.Interpret 1 as male, 0 as female.Compute the sample proportion of males.

Then apply the sum function to count the 1’s.A simpler way to do this is to enter randBin(25,.5).Repeat this many times until we can see the shape of thedistribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 28 / 30

Use rand(0,1,25) to randomly select twenty-five 0’s and 1’s.Interpret 1 as male, 0 as female.Compute the sample proportion of males.Then apply the sum function to count the 1’s.

A simpler way to do this is to enter randBin(25,.5).Repeat this many times until we can see the shape of thedistribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 28 / 30

Use rand(0,1,25) to randomly select twenty-five 0’s and 1’s.Interpret 1 as male, 0 as female.Compute the sample proportion of males.Then apply the sum function to count the 1’s.A simpler way to do this is to enter randBin(25,.5).

Repeat this many times until we can see the shape of thedistribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 28 / 30

Use rand(0,1,25) to randomly select twenty-five 0’s and 1’s.Interpret 1 as male, 0 as female.Compute the sample proportion of males.Then apply the sum function to count the 1’s.A simpler way to do this is to enter randBin(25,.5).Repeat this many times until we can see the shape of thedistribution.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 28 / 30

Outline

1 Hypothesis Testing (Continuous)Sample Size 1Sample Size 2Sample Size 3Sample Size 12

2 Preview of the Central Limit Theorem

3 Sampling with Proportions

4 Assignment

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 29 / 30

Assignment

HomeworkRead Sections 8.1, 8.2.Work Example 8.2 as homework.Work Let’s Do It! 8.1, 8.2 as homework.

Robb T. Koether (Hampden-Sydney College) Continuous Random Variables Wed, Feb 29, 2012 30 / 30

top related