Presentation is loading. Please wait.

Presentation is loading. Please wait.

Continuous Random Variables Lecture 24 Section 7.5.3 Tue, Mar 7, 2006.

Similar presentations


Presentation on theme: "Continuous Random Variables Lecture 24 Section 7.5.3 Tue, Mar 7, 2006."— Presentation transcript:

1 Continuous Random Variables Lecture 24 Section 7.5.3 Tue, Mar 7, 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. 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. In other words, In other words, AREA = PROBABILITY

3 Example The TI-83 will return a random number between 0 and 1 if we enter rand and press ENTER. 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. These numbers have a uniform distribution from 0 to 1. Let X be the random number returned by the TI-83. Let X be the random number returned by the TI-83.

4 Example The graph of the pdf of X. The graph of the pdf of X. x f(x)f(x) 01 1

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

6 Example x f(x)f(x) 01 1 0.3

7 Example What is the probability that the random number is at least 0.3? What is the probability that the random number is at least 0.3? x f(x)f(x) 01 1 0.3

8 Example What is the probability that the random number is at least 0.3? What is the probability that the random number is at least 0.3? x f(x)f(x) 01 1 0.3

9 Area = 0.7 Example What is the probability that the random number is at least 0.3? What is the probability that the random number is at least 0.3? Probability = 70%. Probability = 70%. x f(x)f(x) 01 1 0.3

10 Example What is the probability that the random number is between 0.25 and 0.75? What is the probability that the random number is between 0.25 and 0.75? x f(x)f(x) 01 1 0.30.9

11 Example What is the probability that the random number is between 0.25 and 0.75? What is the probability that the random number is between 0.25 and 0.75? x f(x)f(x) 01 1 0.250.75

12 Example What is the probability that the random number is between 0.3 and 0.9? What is the probability that the random number is between 0.3 and 0.9? x f(x)f(x) 01 1 0.250.75

13 Example What is the probability that the random number is between 0.3 and 0.9? What is the probability that the random number is between 0.3 and 0.9? Probability = 60%. Probability = 60%. x f(x)f(x) 01 1 0.250.75 Area = 0.5

14 Experiment Use the TI-83 to generate 500 values of X. Use the TI-83 to generate 500 values of X. Use rand(500) to do this. Use rand(500) to do this. Check to see what proportion of them are between 0.25 and 0.75. Check to see what proportion of them are between 0.25 and 0.75. Use a TI-83 histogram and Trace to do this. Use a TI-83 histogram and Trace to do this. Or use Excel to generate 10000 values of X. Or use Excel to generate 10000 values of X.Excel

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). 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 0 : X is U(0, 1). H 1 : X is U(0.5, 1.5). H 1 : X is U(0.5, 1.5). One value of X is sampled (n = 1). If X is more than 0.75, then H 0 will be rejected. One value of X is sampled (n = 1). If X is more than 0.75, then H 0 will be rejected.

16 Hypothesis Testing (n = 1) Distribution of X under H 0 : Distribution of X under H 0 : Distribution of X under H 1 : Distribution of X under H 1 : 00.511.5 1 00.511.5 1

17 Hypothesis Testing (n = 1) What are  and  ? What are  and  ? 00.511.5 1 00.511.5 1

18 Hypothesis Testing (n = 1) What are  and  ? What are  and  ? 0.75 00.511.5 1 00.511.5 1

19 Hypothesis Testing (n = 1) What are  and  ? What are  and  ? 0.75 00.511.5 1 00.511.5 1 Acceptance RegionRejection Region

20 Hypothesis Testing (n = 1) What are  and  ? What are  and  ? 0.75 00.511.5 1 00.511.5 1

21 Hypothesis Testing (n = 1) What are  and  ? What are  and  ? 0.75 00.511.5 1 00.511.5 1   = ¼ = 0.25

22 Hypothesis Testing (n = 1) What are  and  ? What are  and  ? 0.75 00.511.5 1 00.511.5 1   = ¼ = 0.25   = ¼ = 0.25

23 Example Now suppose we use the TI-83 to get two random numbers from 0 to 1, and then add them together. Now suppose we use the TI-83 to get two random numbers from 0 to 1, and then add them together. Let Y = the sum of the two random numbers. Let Y = the sum of the two random numbers. What is the pdf of Y? What is the pdf of Y?

24 Example The graph of the pdf of Y. The graph of the pdf of Y. y f(y)f(y) 012 1

25 Example y f(y)f(y) 012 1 Area = 1

26 Example What is the probability that Y is between 0.5 and 1.5? What is the probability that Y is between 0.5 and 1.5? y f(y)f(y) 0120.51.5 1

27 Example What is the probability that Y is between 0.5 and 1.5? What is the probability that Y is between 0.5 and 1.5? y f(y)f(y) 0120.51.5 1

28 Example The probability equals the area under the graph from 0.5 to 1.5. The probability equals the area under the graph from 0.5 to 1.5. y f(y)f(y) 01 1 20.51.5

29 Example Cut it into two simple shapes, with areas 0.25 and 0.5. Cut it into two simple shapes, with areas 0.25 and 0.5. y f(y)f(y) 0120.51.5 1 Area = 0.5 Area = 0.25 0.5

30 Example The total area is 0.75. The total area is 0.75. The probability is 75%. The probability is 75%. y f(y)f(y) 0120.51.5 1 Area = 0.75

31 Verification Use the TI-83 to generate 500 values of Y. Use the TI-83 to generate 500 values of Y. Use rand(500) + rand(500). Use rand(500) + rand(500). Use a histogram to find out how many are between 0.5 and 1.5. Use a histogram to find out how many are between 0.5 and 1.5. Or use Excel to generate 10000 pairs of values of X. Or use Excel to generate 10000 pairs of values of X.Excel

32 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). 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 0 : X is U(0, 1). H 1 : X is U(0.5, 1.5). H 1 : X is U(0.5, 1.5). Two values of X are sampled (n = 2). Let Y be the sum. If Y is more than 1.5, then H 0 will be rejected. Two values of X are sampled (n = 2). Let Y be the sum. If Y is more than 1.5, then H 0 will be rejected.

33 Hypothesis Testing (n = 2) Distribution of Y under H 0 : Distribution of Y under H 0 : Distribution of Y under H 1 : Distribution of Y under H 1 : 0123 1 0123 1

34 Hypothesis Testing (n = 2) What are  and  ? What are  and  ? 0123 1 0123 1

35 Hypothesis Testing (n = 2) What are  and  ? What are  and  ? 0123 1 0123 1 1.5

36 Hypothesis Testing (n = 2) What are  and  ? What are  and  ? 0123 1 0123 1 1.5

37 Hypothesis Testing (n = 2) What are  and  ? What are  and  ? 0123 1 0123 1 1.5   = 1/8 = 0.125

38 Hypothesis Testing (n = 2) What are  and  ? What are  and  ? 0123 1 0123 1 1.5   = 1/8 = 0.125   = 1/8 = 0.125

39 Conclusion By increasing the sample size, we can lower both  and  simultaneously. By increasing the sample size, we can lower both  and  simultaneously.

40 Example Now suppose we use the TI-83 to get three random numbers from 0 to 1, and then add them together. Now suppose we use the TI-83 to get three random numbers from 0 to 1, and then add them together. Let Y = the sum of the three random numbers. Let Y = the sum of the three random numbers. What is the pdf of Y? What is the pdf of Y?

41 Example The graph of the pdf of Y. The graph of the pdf of Y. y f(y)f(y) 012 1 3

42 Example y f(y)f(y) 012 1 3 Area = 1

43 Example What is the probability that Y is between 1 and 2? What is the probability that Y is between 1 and 2? y f(y)f(y) 012 1 3

44 Example y f(y)f(y) 012 1 3

45 Example The probability equals the area under the graph from 1 to 2. The probability equals the area under the graph from 1 to 2. y 012 1 3 Area = 2/3

46 Verification Use Excel to generate 10000 sums of three values. Use Excel to generate 10000 sums of three values.Excel See if about 2/3 of the values lie between 1 and 2. See if about 2/3 of the values lie between 1 and 2.

47 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). 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 0 : X is U(0, 1). H 1 : X is U(0.5, 1.5). H 1 : X is U(0.5, 1.5). Three values of X are sampled (n = 3). Let Y be the sum. If Y is more than 1.5, then H 0 will be rejected. Three values of X are sampled (n = 3). Let Y be the sum. If Y is more than 1.5, then H 0 will be rejected.

48 Hypothesis Testing (n = 2) Distribution of Y under H 0 : Distribution of Y under H 0 : Distribution of Y under H 1 : Distribution of Y under H 1 : 0123 0123 1 4 4

49 Hypothesis Testing (n = 2) Distribution of Y under H 0 : Distribution of Y under H 0 : Distribution of Y under H 1 : Distribution of Y under H 1 : 0123 0123 1 4 4  = 0.07  = 0.07

50 Example Suppose we get 12 random numbers, uniformly distributed between 0 and 1, from the TI-83 and add them all up. Suppose we get 12 random numbers, uniformly distributed between 0 and 1, from the TI-83 and add them all up. Let X = sum of 12 random numbers from 0 to 1. Let X = sum of 12 random numbers from 0 to 1. What is the pdf of X? What is the pdf of X?

51 Example It turns out that the pdf of X is nearly exactly normal with a mean of 6 and a standard of 1. It turns out that the pdf of X is nearly exactly normal with a mean of 6 and a standard of 1. x 6789543 N(6, 1)

52 Example What is the probability that the sum will be between 5 and 7? What is the probability that the sum will be between 5 and 7? P(5 < X < 7) = P(–1 < Z < 1) P(5 < X < 7) = P(–1 < Z < 1) = 0.8413 – 0.1587 = 0.6826.

53 Example What is the probability that the sum will be between 4 and 8? What is the probability that the sum will be between 4 and 8? P(4 < X < 8) = P(–2 < Z < 2) P(4 < X < 8) = P(–2 < Z < 2) = 0.9772 – 0.0228 = 0.9544.

54 Experiment Use the Excel spreadsheet Sum12.xls to generate 10000 values of X, where X is the sum of 12 random numbers from U(0, 1). Use the Excel spreadsheet Sum12.xls to generate 10000 values of X, where X is the sum of 12 random numbers from U(0, 1).Sum12.xls We should see a value between 5 and 7 about 68.27% of the time. 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 4 and 8 about 95.45% of the time. We should see a value between 3 and 9 about 99.73% of the time. We should see a value between 3 and 9 about 99.73% of the time.


Download ppt "Continuous Random Variables Lecture 24 Section 7.5.3 Tue, Mar 7, 2006."

Similar presentations


Ads by Google