Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Random Variable (RV) A function that assigns a numerical value to each outcome of an experiment. Notation: X, Y, Z, etc Observed values: x, y, z, etc Example 1 Two fair coins tossed. Let X = No of Heads Outcomes HH HT TH TT Probability ¼ ¼ ¼ ¼ Value of X 2 1 1 0 Random Variable Discrete RV – finite or countable number of values Continuous RV – taking values in an interval Probability Distribution Probability distribution of a discrete RV described by what is known as a Probability Mass Function (PMF). Probability distribution of a continuous RV described by what is known as a Probability Density Function (PDF). Probability Mass Function (PMF) p(x) = Pr (X = x) satisfying p(x) ≥ 0 for all x ∑p(x) = 1 Example 1 (Contd) X = No of Heads. The PMF of X is: x 0 1 2 Pr (X = x) 1/4 2/4=1/2 1/4 Example 1 (Contd) Probability Density Function (PDF) f(x) satisfying f(x) ≥ 0 for all x ∫f(x) dx = 1 ∫ab f(x) dx = Pr (a < X < b) Pr (X = a) = 0 Example 2 Example 3 Expectation E (X) = ∑x p (x) for a Discrete RV E (X) = ∫x f (x) dx for a Continuous RV Expectation E (X2)= ∑x2 p (x) for a Discrete RV E (X2) = ∫x2 f (x) dx for a Continuous RV Expectation E (g(X)) = ∑g(x) p (x) for a Discrete RV E (g(X)) = ∫g(x) f (x) dx for a Continuous RV Variance Var (X) = E (X2) – (E(X))2 Standard Deviation SD (X) = √Var (X) Properties of Expectation E (c) = c for a constant c E (c X) = c E (X) for a constant c E (c X + d) = c E (X) + d for constants c & d Properties of Variance Var (c) = 0 for a constant c Var (c X) = c2 Var (X) for a constant c Var (c X + d) = c2 Var (X) for constants c & d Example 1 (Contd) X = No of Heads. Find the following: (a) (b) (c) (d) (e) (f) E (X) E (X2) E ((X+10)2) E (2X) Var (X) SD (X) Ans: 1 Ans: 1.5 Ans: 121.5 Ans: 2.25 Ans: 0.5 Ans: 1/√2 Example 4 If X is a random variable with the probability density function f (x) = 2 (1 - x) for 0 < x < 1 find the following: (a) E (X) (b) E (X2) (c) E ((X+10)2) (d) Var (X) (e) SD (X) Ans: Ans: Ans: Ans: Ans: 1/3 1/6 106.8333 1/18 1/(3√2) Example 5 An urn contains 4 balls numbered 1, 2, 3 & 4. Let X denote the number that occurs if one ball is drawn at random from the urn. What is the PMF of X? Example 5 (Contd) Two balls are drawn from the urn without replacement. Let X be the sum of the two numbers that occur. Derive the PMF of X. Example 6 The church lottery is going to give away a £3,000 car and 10,000 tickets at £1 a piece. (a) If you buy 1 ticket, what is your expected gain. (Ans: -0.7) (b) What is your expected gain if you buy 100 tickets? (Ans: -70) (c) Compute the variance of your gain in these two instances. (Ans: 899.91 & 89100) Example 7 A box contains 20 items, 4 of them are defective. Two items are chosen without replacement. Let X = No of defective items chosen. Find the PMF of X. Example 8 You throw two fair dice, one green and one red. Find the PMF of X if X is defined as: A) B) C) D) Sum of the two numbers Difference of the two numbers Minimum of the two numbers Maximum of the two numbers Example 9 If X has the PMF p (x) = ¼ for x = 2, 4, 8, 16 compute the following: (a) E (X) Ans: 7.5 (b) E (X2) Ans: 85 (c) E (1/X) Ans: 15/64 (d) E (2X/2) Ans: 139/2 (e) Var (X) Ans: 115/4 (f) SD (X) Ans: √115/2 Example 10 If X is a random variable with the probability density function f (x) = 10 exp (-10 x) for x > 0 find the following: (a) E (X) (b) E (X2) (c) E ((X+10)2) (d) Var (X) (e) SD (X) Ans: Ans: Ans: Ans: Ans: 0.1 0.02 102.02 0.01 0.1 Example 11 If X is a random variable with the probability density function f (x) = (1/√(2)) exp (-0.5 x2) for - < x < find the following: (a) E (X) (b) E (X2) (c) E ((X+10)2) (d) Var (X) (e) SD (X) Ans: Ans: Ans: Ans: Ans: 0 1 101 1 1 Example 12 A game is played where a person pays to roll two fair six-sided dice. If exactly one six is shown uppermost, the player wins £5. If exactly 2 sixes are shown uppermost, then the player wins £20. How much should be charged to play this game is the player is to break-even? Example 13 Mr. Smith buys a £4000 insurance policy on his son’s violin. The premium is £50 per year. If the probability that the violin will need to be replaced is 0.8%, what is the insurance company’s gain (if any) on this policy?