Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

46
Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008

Transcript of Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Page 1: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Continuous Random Variables

Lecture 22

Section 7.5.4

Mon, Feb 25, 2008

Page 2: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Random Variables

Random variable Discrete random variable Continuous random variable

Page 3: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Continuous Probability Distribution Functions Continuous Probability Distribution

Function (pdf) – For a random variable X, it is a function with the property that the area below the graph of the function between any two points a and b equals the probability that a ≤ X ≤ b.

Remember, AREA = PROPORTION = PROBABILITY

Page 4: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

The TI-83 will return a random number between 0 and 1 if we enter rand and press ENTER.

These numbers have a uniform distribution from 0 to 1.

Let X be the random number returned by the TI-83.

Page 5: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

The graph of the pdf of X.

x

f(x)

0 1

1

Page 6: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

What is the probability that the random number is at least 0.3?

Page 7: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

What is the probability that the random number is at least 0.3?

x

f(x)

0 1

1

0.3

Page 8: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

What is the probability that the random number is at least 0.3?

x

f(x)

0 1

1

0.3

Page 9: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

What is the probability that the random number is at least 0.3?

x

f(x)

0 1

1

0.3

Page 10: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Area = 0.7

Example

Probability = 70%.

x

f(x)

0 1

1

0.3

Page 11: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

0.25

Example

What is the probability that the random number is between 0.25 and 0.75?

x

f(x)

0 1

1

0.75

Page 12: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

What is the probability that the random number is between 0.25 and 0.75?

x

f(x)

0 1

1

0.25 0.75

Page 13: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

What is the probability that the random number is between 0.25 and 0.75?

x

f(x)

0 1

1

0.25 0.75

Page 14: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

Probability = 50%.

x

f(x)

0 1

1

0.25 0.75

Area = 0.5

Page 15: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Uniform Distributions

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

a b

1/(b – a)

x

Page 16: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

A Non-Uniform Distribution

Consider this distribution.

5 10x

Page 17: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

A Non-Uniform Distribution

What is the height?

5 10

?

x

Page 18: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

A Non-Uniform Distribution

The height is 0.4.

5 10

0.4

x

Page 19: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

A Non-Uniform Distribution

What is the probability that 6 X 8?

5 10

0.4

x6 8

Page 20: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

A Non-Uniform Distribution

It is the same as the area between 6 and 8.

5 10

0.4

x6 8

Page 21: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Uniform Distributions

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

a b

1/(b – a)

Page 22: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 23: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 24: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 25: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Hypothesis Testing (n = 1)

What are and ?

0 0.5 1 1.5

1

0 0.5 1 1.5

1

Page 26: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 27: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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

Acceptance Region Rejection Region

Page 28: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 29: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 30: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 31: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 32: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

The graph of the pdf of X2.

y

f(y)

0 0.5 1

?

Page 33: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

The graph of the pdf of X2.

y

f(y)

0 0.5 1

2

Area = 1

Page 34: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 35: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 36: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 37: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 38: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Example

The total area is 0.75.

y

f(y)

0 0.5 10.25 0.75

2

Area = 0.75

Page 39: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 40: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 41: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Hypothesis Testing (n = 2)

What are and ?

0 0.5 1 1.5

2

0 0.5 1 1.5

2

Page 42: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 43: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 44: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 45: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

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 46: Continuous Random Variables Lecture 22 Section 7.5.4 Mon, Feb 25, 2008.

Conclusion

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