continuous random variables lecture 26 section 7.5.4 mon, mar 5, 2007

42
Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Upload: brandon-watson

Post on 18-Jan-2018

220 views

Category:

Documents


0 download

DESCRIPTION

Hypothesis Testing (n = 1) An experiment is designed to determine whether a random variable X has the distribution U(0, 1) or U(0.5, 1.5).  H 0 : X is U(0, 1).  H 1 : X is U(0.5, 1.5). One value of X is sampled (n = 1).

TRANSCRIPT

Page 1: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Continuous Random Variables

Lecture 26Section 7.5.4Mon, Mar 5, 2007

Page 2: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Uniform Distributions

The uniform distribution from a to b is denoted U(a, b).

a b

1/(b – a)

Page 3: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

An experiment is designed to determine whether a random variable 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).

Page 4: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

An experiment is designed to determine whether a random variable 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.75, then H0 will be

rejected.

Page 5: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

Distribution of X under H0:

Distribution of X under H1:0 0.5 1 1.5

1

0 0.5 1 1.5

1

Page 6: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

What are and ?

0 0.5 1 1.5

1

0 0.5 1 1.5

1

Page 7: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

What are and ?

0.75

0.75

0 0.5 1 1.5

1

0 0.5 1 1.5

1

Page 8: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

What are and ?

0.75

0.75

0 0.5 1 1.5

1

0 0.5 1 1.5

1Acceptance Region Rejection Region

Page 9: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

What are and ?

0.75

0.75

0 0.5 1 1.5

1

0 0.5 1 1.5

1

Page 10: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

What are and ?

0.75

0.75

0 0.5 1 1.5

1

0 0.5 1 1.5

1

= ¼ = 0.25

Page 11: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 1)

What are and ?

0.75

0 0.5 1 1.5

1

0 0.5 1 1.5

1

= ¼ = 0.25

= ¼ = 0.25

0.75

Page 12: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

Now suppose we use the TI-83 to get two random numbers from 0 to 1, and then add them together.

Let X2 = the average of the two random numbers.

What is the pdf of X2?

Page 13: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The graph of the pdf of X2.

y

f(y)

0 0.5 1

?

Page 14: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The graph of the pdf of X2.

y

f(y)

0 0.5 1

2

Area = 1

Page 15: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

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

y

f(y)

0 0.5 10.25 0.75

2

Page 16: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

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

y

f(y)

0 0.5 10.25 0.75

2

Page 17: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The probability equals the area under the graph from 0.25 to 0.75.

y

f(y)

0 0.5

2

10.25 0.75

Page 18: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

Cut it into two simple shapes, with areas 0.25 and 0.5.

y

f(y)

0 0.5 10.25 0.75

2

Area = 0.5

Area = 0.250.5

Page 19: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The total area is 0.75.

y

f(y)

0 0.5 10.25 0.75

2

Area = 0.75

Page 20: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Verification

Use Avg2.xls to generate 10000 pairs of values of X.

See whether about 75% of them have an average between 0.25 and 0.75.

Page 21: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

An experiment is designed to determine whether a random variable 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.75, then H0 will be rejected.

Page 22: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

Distribution of X2 under H0:

Distribution of X2 under H1:0 0.5 1 1.5

2

0 0.5 1 1.5

2

Page 23: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

What are and ?

0 0.5 1 1.5

2

0 0.5 1 1.5

2

Page 24: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

What are and ?

0 0.5 1 1.5

2

0 0.5 1 1.5

2

0.75

0.75

Page 25: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

What are and ?

0 0.5 1 1.5

2

0 0.5 1 1.5

2

0.75

0.75

Page 26: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

What are and ?

0 0.5 1 1.5

2

0 0.5 1 1.5

2

0.75

0.75

= 1/8 = 0.125

Page 27: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 2)

What are and ?

0 0.5 1 1.5

2

0 0.5 1 1.5

2

0.75

0.75

= 1/8 = 0.125

= 1/8 = 0.125

Page 28: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Conclusion

By increasing the sample size, we can lower both and simultaneously.

Page 29: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

Now suppose we use the TI-83 to get three random numbers from 0 to 1, and then average them.

Let X3 = the average of the three random numbers.

What is the pdf of X3?

Page 30: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The graph of the pdf of X3.

y0 1/3 2/3

3

1

Page 31: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The graph of the pdf of X3.

y0 1/3 2/3 1

Area = 1

3

Page 32: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

What is the probability that X3 is between 1/3 and 2/3?

y0 1/3 2/3 1

3

Page 33: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

What is the probability that X3 is between 1/3 and 2/3?

y0 1/3 2/3 1

3

Page 34: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

The probability equals the area under the graph from 1/3 to 2/3.

y0 1/3 2/3 1

Area = 2/3

3

Page 35: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Verification

Use Avg3.xls to generate 10000 triples of numbers.

See if about 2/3 of the averages lie between 1/3 and 2/3.

Page 36: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 3)

An experiment is designed to determine whether a random variable 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.75, then H0 will be rejected.

Page 37: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 3)

Distribution of X3 under H0:

Distribution of X3 under H1:0 1/3 2/3 1 4/3

0 1/3 2/3 1

1

4/3

Page 38: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Hypothesis Testing (n = 3)

Distribution of X3 under H0:

Distribution of X3 under H1:0 1/3 2/3 1 4/3

= 0.07

0 1/3 2/3 1

1

4/3

= 0.07

Page 39: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

Suppose we get 12 random numbers, uniformly distributed between 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?

Page 40: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

It turns out that the pdf of X12 is nearly exactly normal with a mean of 1/2 and a standard deviation of 1/12.

x1/2 2/31/3

N(1/2, 1/12)

Page 41: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Example

What is the probability that the average will be between 0.45 and 0.55?

Compute normalcdf(0.45, 0.55, 1/2, 1/12). We get 0.4515.

Page 42: Continuous Random Variables Lecture 26 Section 7.5.4 Mon, Mar 5, 2007

Experiment

Use the Excel spreadsheet Avg12.xls to generate 10000 values of X, where X is the average of 12 random numbers from U(0, 1).

Test the 68-95-99.7 Rule.