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
Discrete Random Variables 1. Expectation: A probability function is obtained by assigning a probability, p(x) to each possible value of a random variable. E.g. Spinner x p(x) 0 0.1 1 0.3 2 0.4 3 0.2 The mean, μ , or expected value of X, E[X], is given by E[X] = Σ xi p(xi) In the above example: E[X] = Σ xi p(xi) = 0 0.1 1 0.3 2 0.4 3 0.2 Σ Pg 23 = 1.7 E.g.2 Raffle A raffle of 100 tickets has 1st prize $200, 2nd prize $100 and 3rd prize $50. What is the expected return of a ticket buyer? Answer: Let X be a R.V. representing the buyer’s winnings 1 1 1 x 200 100 50 0 100 50 E[X] = 200 100 100 100 1 1 1 97 p(x) = $3.50 100 100 100 100 Expected winnings = $3.50 (i.e. if raffle is fair tickets should sell at $3.50) E.g.3 Car Insurance A racing car valued at $10 000 has the probability of being a total loss estimated at 0.002, 50% loss w.p. 0.01, and a 25% loss w.p. 0.1. What insurance should be charged if the firm wants to make a $100 profit? (w.p. – with probability) Answer: Let X be a R.V. representing the amount the company has to pay out x p(x) 10000 0.002 5000 0.01 2500 0.1 0 0.888 E[X] = $320 (check this) So charge should be $420 2. Expected Value of a Function of a R.V. E[aX + b] = aE[X] + b x 0 1 2 3 x 2 5 8 11 p(x) 0.1 0.3 0.4 0.2 p(x) 0.1 0.3 0.4 0.2 E[X] = 1.7 E[3X + 2] = 2 0.1 5 0.3 8 0.4 11 0.2 3E[X] + 2 = 3 1.7 2 = 7.1 = 7.1 This verifies the result – use sigma notation laws if you want a proof Σ Pg 28 3. Variance of a Random Variable Var[X] = E[(X – μ)2] = E[X2] – μ2 (Proof: see appendix 1 sigma) Σ Pg 31 Example: X p(x) 1 0.1 2 0.4 3 0.2 (X-μ)2 p(x) 4 0.3 μ = 1 0.1 2 0.4 3 0.2 4 0.3 = 2.7 E[X2] = 1 0.1 4 0.4 9 0.2 16 0.3 = 8.3 Var[X] = E[X2] – μ2 = 8.3 – 2.72 = 1.01 4. Variance of a Function of a R.V. Var[aX + b] = a2 Var[X] see appendix 1, sigma for proof Example: x p(x) 0 0.1 1 0.2 2 0.3 2.89 0.1 0.49 0.4 0.09 0.2 1.69 0.3 Var[x] = E[(X – μ)2] = 2.89 0.1 etc = 1.01 σ= Var[X] Σ Pg 35 3 0.4 (a) Verify E[X] = 2, and E[X2] = 5 So that Var[X] = 1 (b) Then (i) E[3X – 1] = 3E[X] – 1 = 3 2 1 =5 (ii) Var[3X – 1] = 9Var[X] = 9 1 =9 5. Sum and Difference of Random Variables (a) E[X + Y] = E[X] + E[Y] E[X – Y] = E[X] – E[Y] (b) If X and Y are independent Var[X ± Y] = Var[X] + Var[Y] So for independent R.V.’s we have E[aX + bY +c] = aE[X] + bE[Y] + c Var[aX + bY +c] = a2Var[X] + b2Var[Y] Σ Pg 42 Example 1: The mean mark for a PE test is 48, standard deviation 6. For maths the mean is 53, S.D. = 8. Marks are added – what is the mean and S.D. for the sum? Assuming Independence Answer: E[X + Y] = E[X] + E[Y] Var[X + Y] = Var[X] + Var[Y] = 48 + 53 = 62 + 82 = 101 = 100 So the mean is 101, S.D. = 100 = 10 (c) For identically distributed, independent R.V.’s X1, X2, …….., Xn with mean, μ, and S.D., σ (i) E[X1, X2, …….., Xn] = E[X1] + E[X2] + …+ E[Xn] =μ+μ+…+μ = nμ (ii) Var[X1, X2, …….., Xn] = Var[X1] + Var[X2] + … + Var[Xn] = nσ2 Example: Blocks of cheese have mean weight 5kg with standard deviation 0.5kg. A carton consists of 25 such blocks. What is the mean and standard deviation of a carton? Answer: (Setting out is important) Let X1, X2, …, X25 be R.V.’s representing the weights of blocks 1 to 25. Then each Xi is a R.V. with μ = 5, σ2 = 0.25. Take Y to be a R.V. representing the weight of a carton. E[Y] = E[X1, X2 + … + X25] = E[X1] + E[X2] + …+ E[X25] (By laws of expectation algebra) = 25 5 (Assuming identically distributed) = 125kg Var[Y] = Var[X1, X2, …….., X25] = Var[X1] + Var[X2] + … + Var[X25] (By laws of expectation algebra, assuming independence, assuming identical distribution) = 25 0.25 = 6.25 σY = 2.5 (d) Expected Value and Variance of the Sample Means When a sample of size n is taken from a population with mean μ, variance σ2 Then E[ X ] = μx Var[ X ] = 2x =μ 2 = n Σ Pg 181 (Proof: see sigma pg 169) Example: (sigma pg 169) Samples of 16 nuts taken from a population with mean weight μ = 18g, standard deviation σ = 2g. Find the expected value and standard deviation of the distribution of sample means. Answer: μx = μ = 18g 2x = x = = 2 n n 10 16 = 0.5g Assignment 1. The variate X has the following probability function: X p(x) -2 0.2 -1 0.1 0 0.3 1 0.3 2 0.1 Compute E[X], E[3X – 1], E[X2] Var[X], Var[3X], Var[3X – 1] 2. The R.V. X has mean 20; standard deviation 5. Y has mean 30; standard deviation 12. Find the mean and standard deviation of (a) X + Y (b) X – Y (c) 2X – Y (d) X + 3Y – 5 3. Ball bearings manufactured by a factory have mean weight 15gms, standard deviation 0.5gms. Find the mean and standard deviation of the weights of packets of 100 such bearings. 4. Packets of 12 boxes of matches have mean weight 125gms and a standard deviation of 10gms. What is the mean and standard deviation for the weight of a single box?