Download presentation
Presentation is loading. Please wait.
1
Continuous Random Variables
Lecture 25 Section 7.5.3 Mon, Oct 23, 2006
2
Continuous Probability Distribution Functions
Continuous Probability Distribution Function (pdf) – For a random variable X, it is a function with the property that the area between the graph of the function and an interval a ≤ x ≤ b equals the probability that a ≤ X ≤ b. Remember, AREA = PROBABILITY
3
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.
4
Example The graph of the pdf of X. f(x) 1 x 1
5
Example What is the probability that the random number is at least 0.3?
6
Example What is the probability that the random number is at least 0.3? f(x) 1 x 0.3 1
7
Example What is the probability that the random number is at least 0.3? f(x) 1 x 0.3 1
8
Example What is the probability that the random number is at least 0.3? f(x) 1 x 0.3 1
9
Example What is the probability that the random number is at least 0.3? Probability = 70%. f(x) 1 Area = 0.7 x 0.3 1
10
Example What is the probability that the random number is between 0.25 and 0.75? f(x) 1 x 0.3 0.9 1
11
Example What is the probability that the random number is between 0.25 and 0.75? f(x) 1 x 0.25 0.75 1
12
Example What is the probability that the random number is between 0.3 and 0.9? f(x) 1 x 0.25 0.75 1
13
Example What is the probability that the random number is between 0.3 and 0.9? Probability = 60%. f(x) 1 Area = 0.5 x 0.25 0.75 1
14
Experiment Use the TI-83 to generate 500 values of X.
Use rand(500) to do this. Check to see what proportion of them are between 0.25 and 0.75. Use a TI-83 histogram and Trace to do this. Or use Excel to generate values of X.
15
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).
16
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.
17
Hypothesis Testing (n = 1)
Distribution of X under H0: Distribution of X under H1: 0.5 1 1.5 0.5 1 1.5
18
Hypothesis Testing (n = 1)
What are and ? 1 0.5 1 1.5 1 0.5 1 1.5
19
Hypothesis Testing (n = 1)
What are and ? 1 0.5 0.75 1 1.5 1 0.5 0.75 1 1.5
20
Hypothesis Testing (n = 1)
What are and ? 1 0.5 0.75 1 1.5 Acceptance Region Rejection Region 1 0.5 0.75 1 1.5
21
Hypothesis Testing (n = 1)
What are and ? 1 0.5 0.75 1 1.5 1 0.5 0.75 1 1.5
22
Hypothesis Testing (n = 1)
What are and ? = ¼ = 0.25 1 0.5 0.75 1 1.5 1 0.5 0.75 1 1.5
23
Hypothesis Testing (n = 1)
What are and ? = ¼ = 0.25 1 0.5 0.75 1 1.5 = ¼ = 0.25 1 0.5 0.75 1 1.5
24
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 sum of the two random numbers. What is the pdf of X2?
25
Example The graph of the pdf of X2. f(y) 1 y 1 2
26
Example The graph of the pdf of X2. f(y) 1 Area = 1 y 1 2
27
Example What is the probability that X2 is between 0.5 and 1.5? f(y) 1
0.5 1 1.5 2
28
Example What is the probability that X2 is between 0.5 and 1.5? f(y) 1
0.5 1 1.5 2
29
Example The probability equals the area under the graph from 0.5 to 1.5. f(y) 1 y 0.5 1 1.5 2
30
Example Cut it into two simple shapes, with areas 0.25 and 0.5. f(y) 1
0.5 1 1.5 2
31
Example The total area is 0.75. The probability is 75%. Area = 0.75
f(y) 1 Area = 0.75 y 0.5 1 1.5 2
32
Verification Use the TI-83 to generate 500 values of Y.
Use rand(500) + rand(500). Use a histogram to find out how many are between 0.5 and 1.5. Or use Excel to generate pairs of values of X.
33
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 sum. If X2 is more than 1.5, then H0 will be rejected.
34
Hypothesis Testing (n = 2)
Distribution of X2 under H0: Distribution of X2 under H1: 1 2 3 1 2 3
35
Hypothesis Testing (n = 2)
What are and ? 1 2 3 1 2 3
36
Hypothesis Testing (n = 2)
What are and ? 1 2 3 1.5 1 2 3 1.5
37
Hypothesis Testing (n = 2)
What are and ? 1 2 3 1.5 1 2 3 1.5
38
Hypothesis Testing (n = 2)
What are and ? 1 2 3 = 1/8 = 0.125 1.5 1 2 3 1.5
39
Hypothesis Testing (n = 2)
What are and ? 1 2 3 = 1/8 = 0.125 1.5 1 2 3 = 1/8 = 0.125 1.5
40
Conclusion By increasing the sample size, we can lower both and simultaneously.
41
Example Now suppose we use the TI-83 to get three random numbers from 0 to 1, and then add them together. Let X3 = the sum of the three random numbers. What is the pdf of X3?
42
Example The graph of the pdf of X3. f(y) 1 y 1 2 3
43
Example The graph of the pdf of X3. f(y) 1 Area = 1 y 1 2 3
44
Example What is the probability that X3 is between 1 and 2? f(y) 1 y 1
1 2 3
45
Example What is the probability that Y is between 1 and 2? f(y) 1 y 1
1 2 3
46
Example The probability equals the area under the graph from 1 to 2. 1
1 2 3
47
Verification Use Excel to generate 10000 sums of three values.
See if about 2/3 of the values lie between 1 and 2.
48
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). Three values of X3 are sampled (n = 3). Let X3 be the sum. If X3 is more than 1.5, then H0 will be rejected.
49
Hypothesis Testing (n = 2)
Distribution of X3 under H0: Distribution of X3 under H1: 1 2 3 4 1 1 2 3 4
50
Hypothesis Testing (n = 2)
Distribution of Y under H0: Distribution of Y under H1: = 0.07 1 2 3 4 1 = 0.07 1 2 3 4
51
Example Suppose we get 12 random numbers, uniformly distributed between 0 and 1, from the TI-83 and add them all up. Let X12 = sum of 12 random numbers from 0 to 1. What is the pdf of X12?
52
Example It turns out that the pdf of X12 is nearly exactly normal with a mean of 6 and a standard of 1. N(6, 1) x 3 4 5 6 7 8 9
53
Example What is the probability that the sum will be between 5 and 7?
P(5 < X12 < 7) = P(–1 < Z < 1) = – =
54
Example What is the probability that the sum will be between 4 and 8?
P(4 < X12 < 8) = P(–2 < Z < 2) = – =
55
Experiment Use the Excel spreadsheet Sum12.xls to generate values of X, where X is the sum of 12 random numbers from U(0, 1). We should see a value between 5 and 7 about 68.27% of the time. We should see a value between 4 and 8 about 95.45% of the time. We should see a value between 3 and 9 about 99.73% of the time.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.