continuous random variables lecture 22 section 7.5.4 mon, feb 25, 2008
TRANSCRIPT
Continuous Random Variables
Lecture 22
Section 7.5.4
Mon, Feb 25, 2008
Random Variables
Random variable Discrete random variable Continuous random variable
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
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.
Example
The graph of the pdf of X.
x
f(x)
0 1
1
Example
What is the probability that the random number is at least 0.3?
Example
What is the probability that the random number is at least 0.3?
x
f(x)
0 1
1
0.3
Example
What is the probability that the random number is at least 0.3?
x
f(x)
0 1
1
0.3
Example
What is the probability that the random number is at least 0.3?
x
f(x)
0 1
1
0.3
Area = 0.7
Example
Probability = 70%.
x
f(x)
0 1
1
0.3
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
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
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
Example
Probability = 50%.
x
f(x)
0 1
1
0.25 0.75
Area = 0.5
Uniform Distributions
The uniform distribution from a to b is denoted U(a, b).
a b
1/(b – a)
x
A Non-Uniform Distribution
Consider this distribution.
5 10x
A Non-Uniform Distribution
What is the height?
5 10
?
x
A Non-Uniform Distribution
The height is 0.4.
5 10
0.4
x
A Non-Uniform Distribution
What is the probability that 6 X 8?
5 10
0.4
x6 8
A Non-Uniform Distribution
It is the same as the area between 6 and 8.
5 10
0.4
x6 8
Uniform Distributions
The uniform distribution from a to b is denoted U(a, b).
a b
1/(b – a)
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).
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.
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
Hypothesis Testing (n = 1)
What are and ?
0 0.5 1 1.5
1
0 0.5 1 1.5
1
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
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
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
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
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
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?
Example
The graph of the pdf of X2.
y
f(y)
0 0.5 1
?
Example
The graph of the pdf of X2.
y
f(y)
0 0.5 1
2
Area = 1
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
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
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
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
Example
The total area is 0.75.
y
f(y)
0 0.5 10.25 0.75
2
Area = 0.75
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.
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
Hypothesis Testing (n = 2)
What are and ?
0 0.5 1 1.5
2
0 0.5 1 1.5
2
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
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
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
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
Conclusion
By increasing the sample size, we can lower both and simultaneously.