6672b40fb1dc891b51b7cca5aee609e4.ppt
- Количество слайдов: 41
Discrete Random Variables • This Chapter is on Discrete Random Variables • We are going to learn what these are! • We will look at Cumulative Distribution • We will also be re-visiting Mean and Variance in these situations • We will look at Discrete Uniform Distribution
Discrete Random Variables Explanation of Discrete Random Variables are linked to Probability. A Discrete Random Variable can be obtained by real-world measurement. For example, rolling a dice. They must always be numerical values. For example, you could toss a coin and say ‘how many heads? ’, the answer being 1 or 0. However you could not say ‘heads or tails’ as these are not numerical. The possibilities can only be whole numbers (discrete). There can be others but these are not the focus of the chapter. Summary Discrete random variables allow us to calculate the expected outcomes of events with given probabilities. 8 A
Discrete Random Variables Notation of Discrete Random Variables A Capital letter, such as X, will be used for the random variable, and a lower case x for a particular value of that variable. P(X = x) means the Probability that the Random variable is equal to a particular value. Rolling a Dice ‘X’ P(X = 5) = 1/6 P(X > 4) = 2/6 = 1/3 Tossing a coin once Number of heads ‘X’ P(X = 0) = 1/2 P(X = 1) = 1/2 8 A
Discrete Random Variables A coin is tossed 6 times and the number of heads (X) is noted. What are the possible values of X? 0, 1, 2, 3, 4, 5, 6 Which of the following are Discrete Random Variables? The average height of a group of boys No as height is on a continuous scale The number of times a dice is rolled before a 2 appears Yes, it is numerical and comes from an experiment The number of months in a year No as it is fixed and therefore not random 8 A
Discrete Random Variables You can draw up a table to show the Probability Distribution of a discrete Random Variable. This should be something you always do first if you are not given it in the question. A fair dice is rolled. Show the Probability of getting any number as a Probability Distribution. x P(X = x) 1 2 3 4 5 6 1/ 1/ 1/ 6 6 P(X = x) = 1/6 for x = 1, 2, 3, 4, 5, 6 6 6 This is the Probability Function. It summarises the data in the table. 8 A
Discrete Random Variables a) Three fair coins are tossed. The number of heads is counted. a) Draw the sample space for this experiment. This shows all possibilities b) Show this as a Probability Distribution The table summarises the Probabilities c) Show this as a Probability Function This summarises the table. It is common practice to include a ‘ 0’ probability at the bottom. b) H H T T H T H T No. Heads, x P(X = x) These Probabilities will always add up to 1 0 1 1/ 3/ 8 2 8 3 3/ 1/ 8 8 c) 8 A
Discrete Random Variables x a) Find the value of k in the table opposite b) Complete the missing values in the table, based on the value of k. 1 2 3 4 5 P(X = x) You will need to be able to calculate missing values, based on the Probabilities adding up to 1. 0. 2 k 0. 1 0. 2 3 k 0. 2 + k + 0. 1 + 0. 2 + 3 k = 1 Group together like terms 4 k + 0. 5 = 1 - 0. 5 4 k = 0. 5 ÷ 4 k = 0. 125 x P(X = x) 1 2 0. 125 3 0. 1 4 5 0. 2 0. 375 8 A
Discrete Random Variables You will need to be able to calculate missing values, based on the Probabilities adding up to 1. A tetrahedral (4 sided) dice is numbered 1, 2, 3 and 4. The probability of it landing on a given side is k/x, where k is constant. x 1 P(X = x) k/ 2 1 3 4 k/ k/ k/ 2 3 4 Make the denominators equal Now you can group them a) Draw the Probability Distribution of P(X = x), in terms of k. x 12 b) Calculate the value of k ÷ 25 8 A
Discrete Random Variables You will need to be able to calculate missing values, based on the Probabilities adding up to 1. A tetrahedral (4 sided) dice is numbered 1, 2, 3 and 4. The probability of it landing on a given side is k/ , where k is constant. x a) Draw the Probability Distribution of P(X = x), in terms of k. b) Calculate the value of k x 1 P(X = x) k/ x P(X = x) 1 12/ 25 2 1 3 4 k/ k/ k/ 2 2 6/ 25 3 3 4/ 25 4 4 3/ 25 12 12 Half of /25 ÷ 3 /25 ÷ 4 12/ 25 c) Draw the finished Probability Distribution 8 A
Discrete Random Variables Probability of multiple values A discrete random variable X has the Probability Distribution to the right x 1 2 3 4 5 6 P(X = x) 0. 1 0. 2 0. 3 0. 25 0. 1 0. 05 Calculate: a) ‘Probability X is bigger than 1 and less than 5’ b) ‘Probability X is bigger than or equal to 2 and less than or equal to 4’ c) ‘Probability X is bigger than 3 and less than or equal to 6’ d) ‘Probability X is less than 3’ 8 B
Discrete Random Variables Probability of multiple values You can also find the Cumulative Distribution Function. If a value for X is x, the Probability that X is less than or equal to x is written as F(x) can be calculated by adding together probabilities that are equal to or less than x. It can be included in the Probability Distribution table. You should see that F(x) = 1 for the highest value of x x 1 2 3 4 5 6 P(X = x) 0. 1 0. 2 0. 3 0. 25 0. 1 0. 05 F(x) 0. 1 0. 3 0. 6 0. 85 0. 95 1 Add the probabilities as you go along So F(1) = 0. 1 ‘The probability of X being less than or equal to 1 is 0. 1’ F(4) = 0. 85 ‘The probability of X being less than or equal to 4 is 0. 85’ 8 B
Discrete Random Variables The Possibilities Probability of multiple values Two fair coins are tossed. X is the number of heads showing on the coins. Draw up a sample space and then a Probability Distribution table. Include the Cumulative Distribution Function. HH HT TH TT No. heads, x 0 1 2 P(X = x) 0. 25 F(x) 0. 25 0. 75 1 8 B
Discrete Random Variables 3 is the highest value Probability of multiple values A discrete random variable X has a Cumulative Distribution Function F(x) defined by: Use x = 3 x 8 -3 a) Find the value of k. b) Draw the Cumulative Distribution Function table. x F(x) 1 6/ 2 8 3 7/ 1 8 c) What is the value of F(2. 6)? ‘Probability X is less than or equal to 2. 6’ 8 B
Discrete Random Variables Probability of multiple values A discrete random variable X has a Cumulative Distribution Function F(x) defined by: To the right is the Cumulative Distribution Function from the previous question. a) Calculate the Probability Distribution x 1 2 3 8 1/ F(x) 6/ 8 7/ P(X = x) 6/ 8 1/ 8 The first To get from 6/8 from 7/8 to value is To get to always the 7/8, we added 1/8 same 1, we /8 8 B
Discrete Random Variables Calculating the Expected value The table shows the number of television sets per household, in a survey of 100. No. sets 0 1 2 3 Frequency 10 75 10 5 a) Calculate the mean for this data 8 C
Discrete Random Variables Calculating the Expected value The table shows the number of television sets per household, in a survey of 100. No. sets 0 1 2 3 Frequency 10 75 10 5 Mean = 1. 1 sets a) Calculate the mean for this data b) Draw the probability distribution for X where X is the number of TV sets for a house picked at random. x 0 1 2 3 p(x) 0. 1 0. 75 0. 1 0. 05 xp(x) 0 0. 75 0. 2 0. 15 c) Calculate E(X), the expected value of X. E(X) is sometimes called ‘the mean of X’ 8 C
Discrete Random Variables Calculating the Expected value If we know the probability distribution for a variable X, we can calculate the expected value of X The expected value is not necessarily a value which is possible It is effectively the mean of the distribution (this will become clearer as we do some questions) Notation ‘The expected value of x’ ‘The sum of (x multiplied by the probability of x)’ 8 C
Discrete Random Variables Finding the expected value of x In order to calculate Standard Deviation in these types of question, we need to see how to work out E(X 2). x P(X = x) 1 12/ 25 2 6/ 25 3 4/ 25 4 3/ 25 a) Find the value of E(X) 8 C
Discrete Random Variables The random variable X has the following probability distribution. x 1 2 3 4 5 p(x) 0. 1 p 0. 3 q 0. 2 a) Given that E(X) = 3, write down 2 equations involving p and All the probabilities q. add up to 1 Group together the numbers Subtract 0. 6 8 C
Discrete Random Variables The random variable X has the following probability distribution. x 1 2 3 4 5 p(x) 0. 1 p 0. 3 q 0. 2 a) Given that E(X) = 3, write down 2 equations involving p and q. Work out each bracket Group numbers Subtract 2 8 C
Discrete Random Variables The random variable X has the following probability distribution. x 1 2 3 4 5 p(x) 0. 1 p 0. 3 q 0. 1 0. 2 a) Given that E(X) = 3, write down 2 equations involving p and q. b) Use your equations to find the values of p and q. 1 x 2 2 3 4 4 - 3 8 C
The Variance of X The Variance of a set of data, X, is given by; x P(X = x) 1 12/ 25 2 6/ 25 3 4/ 25 4 3/ 25 ‘The expected value of X 2 subtract the expected value of X, squared’ a) Calculate E(X) and E(X 2) for the following set of data… 8 C
Discrete Random Variables Finding the expected value of x 2 In order to calculate Standard Deviation in these types of question, we need to see how to work out E(X 2). x 1 P(X = x) x 2 12/ P(X = x) 12/ 125 25 2 6/ 4 25 6/ 25 3 4/ 9 25 4/ 25 4 3/ 16 25 3/ 25 a) Find the value of E(X) b) Calculate E(X 2) Note that E(X 2) IS NOT E(X) squared! 8 C
Discrete Random Variables The Variance of X The Variance of a set of data, X, is given by; ‘The expected value of X 2 subtract the expected value of X, squared’ 8 D
Discrete Random Variables The Variance of X The Variance of a set of data, X, is given by; x 1 2 3 4 x 2 1 4 9 16 1/ 1/ 1/ P(X=x) 3 3 6 1/ 6 ‘The expected value of X 2 subtract the expected value of X, squared’ a) Calculate E(X) and E(X 2) for the following set of data… E(X) = 2 1/6 8 D
Discrete Random Variables The Variance of X The Variance of a set of data, X, is given by; x 1 2 3 4 x 2 1 4 9 16 1/ 1/ 1/ P(X=x) 3 3 6 1/ 6 ‘The expected value of X 2 subtract the expected value of X, squared’ a) Calculate E(X) and E(X 2) for the following set of data… E(X) = 2 1/6 E(X 2) = 5 5/6 8 D
Discrete Random Variables The Variance of X The Variance of a set of data, X, is given by; x 1 2 3 4 x 2 1 4 9 16 1/ 1/ 1/ P(X=x) 3 3 6 1/ 6 ‘The expected value of X 2 subtract the expected value of X, squared’ a) Calculate E(X) and E(X 2) for the following set of data… E(X) = 2 1/6 E(X 2) = 5 5/6 b) Calculate the Variance of X 1. 14 (2 dp) 8 D
Discrete Random Variables Calculating E(X) and Var(X) for functions of X A rule relating E(X) and E(a. X + b) is; So whatever the value in front of X is. . … Multiply E(X) by that amount And whatever the value of b is… … Add it on afterwards 8 E
Discrete Random Variables Calculating E(X) and Var(X) for functions of X A rule relating Var(X) and Var(a. X + b) is; So whatever the value in front of X is. . … Multiply Var(X) by the square of that amount And whatever the value of b is… Ignore it as it will not affect the spread of data… 8 E
Discrete Random Variables Calculating E(X) and Var(X) for functions of X a) E(3 X) Multiply E(X) by 3 12 b) E(X - 2) Subtract 2 from E(X) A random variable X has E(X) = 4, and Var(X) = 3 Calculate: a) E(3 X) = 12 b) E(X – 2) = 2 c) Var(3 X) = 27 d) Var (X - 2) = 3 e) E(X 2) 2 c) Var(3 X) Multiply Var(X) by 32 27 d) Var(X - 2) Do nothing as it will not affect spread… 3 8 E
Discrete Random Variables Calculating E(X) and Var(X) for functions of X A random variable X has E(X) = 4, and Var(X) = 3 Calculate: Add 16 a) E(3 X) = 12 b) E(X – 2) = 2 c) Var(3 X) = 27 d) Var (X - 2) = 3 e) E(X 2) = 19 8 E
Discrete Random Variables Longer Example Question Two fair 10 p coins are tossed. The random variable X represents the value of the coins that land heads up. x 0 10 20 x 2 0 100 400 P(X=x) 1/ 4 1/ 2 1/ 4 a) Calculate E(X) and Var(X) E(X) = 10 When the data is symmetrical, E(X) is just the middle value! 8 E
Discrete Random Variables Longer Example Question Two fair 10 p coins are tossed. The random variable X represents the value of the coins that land heads up. x 0 10 20 x 2 0 100 400 P(X=x) 1/ 4 1/ 2 1/ 4 a) Calculate E(X) and Var(X) E(X) = 10 E(X 2) = 150 8 E
Discrete Random Variables Longer Example Question Two fair 10 p coins are tossed. The random variable X represents the value of the coins that land heads up. x 0 10 20 x 2 0 100 400 P(X=x) 1/ 4 1/ 2 1/ 4 a) Calculate E(X) and Var(X) E(X) = 10 E(X 2) = 150 Var(X) = 50 8 E
Discrete Random Variables Longer Example Question Two fair 10 p coins are tossed. The random variable X represents the value of the coins that land heads up. a) Calculate E(X) and Var(X) E(X) = 10 E(X 2) = 150 Var(X) = 50 b) Two random variables S and T are defined as follows… S = X – 10 E(S) = E(X) – 10 E(S) = 10 – 10 E(S) = 0 T = 1 / 2 X – 5 E(T) = 1/2 E(X) – 5 E(T) = (1/2 x 10) – 5 E(T) = 0 S = X – 10 T = 1/2 X – 5 Show that E(S) = E(T) 8 E
Discrete Random Variables Longer Example Question Two fair 10 p coins are tossed. The random variable X represents the value of the coins that land heads up. S = X – 10 a) Calculate E(X) and Var(X) T = 1 / 2 X – 5 E(X) = 10 E(X 2) = 150 Var(X) = 50 Var(T) = (1/2)2 Var(X) b) Two random variables S and T are defined as follows… S = X – 10 T = 1/2 X – 5 c) Find Var(S) and Var(T) Var(S) = Var(X) Var(S) = 50 Var(T) = (1/4)Var(X) Var(T) = 12. 5 E(S) and E(T) were the same for both, so on average both will give the same overall result… Var(S) is bigger than Var(T), so results for S will be more varied… 8 E
6672b40fb1dc891b51b7cca5aee609e4.ppt