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
Expectation and Probability Distributions This is the concept of the expected mean of a random variable. It is closely related to the arithmetic mean or average. x n x = E(X) = i=1 i P(X = x i) A table or formula listing all possible values that a discrete variable can take on, together with associated probabilities is called a discrete probability distribution e.g. Calculate the expected value of X, E(X) where X denotes the outcomes on a die. x 1 2 3 4 5 6 P(X = x) 1/6 1/6 1/6 1/6 1/6 1/6 E(X) = 1×1/6 + 2×1/6 + 3×1/6 + 4×1/6 + 5×1/6 + 6×1/6 = 3.5 e.g. Find E(T) for the probability distribution for T, where T counts the sum when 2 dice are thrown. t 1 2 3 4 5 6 7 8 9 10 11 12 0/36 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36 P(T=t) E(T) = 1×0/36 + 2×1/36 + 3×2/36 + ... + 12×1/36 = 7 Note: 1. The probability distribution lists all of the possible outcomes. 2. The sum of the probabilities must be 1 if it is a probability distribution Games of Chance A fair price for a ticket in a lottery would be one which returned the same amount from ticket sales as was distributed in prizes Gain = payoff – entry price e.g. In a gambling game a man is paid $5 if he gets all heads or all tails when three coins are tossed, and he pays out $3 if either 1 or 2 heads occur. What is his expected gain? x P(X = x) $5 1/4 -$3 3/4 E(X) = 5 × ¼ + -3 × ¾ = -1 Therefore: on average man will lose $1 per toss. Game is not fair. Variance of a Random Variable - gives us an indication of the spread of results every time we conduct the experiment - the variance is the average of the squared distances from the mean. i.e. VAR(X) = E[(X – )2] The formula can be simplified to: 2 2 VAR(X) = E(X ) – [E(X)] Note: to find E(X2) square all x-values and multiply by original probabilities. e.g. Using the previous distribution tables, calculate VAR(X) for the die experiment, and VAR(T) for the sum of two dice. VAR(X) = 12×1/6 + 22×1/6 + 32×1/6 + 42×1/6 + 52×1/6 + 62×1/6 – (3.5)2 = 2.92 (2 d.p.) VAR(T) = 12×0/36 + 22×1/36 + … + 112×2/36 + 122×1/36 – (7)2 = 5.83 (2 d.p.) Note: The standard deviation is the square root of the variance PROOF: VAR(X) = E (X – ) 2 2 2 = E X – 2X + 2 2 2 =E X 2 – 2E(X) + E 2 =E X – 2(E(X)) + (E(X)) =E X – (E(X)) 2 2 Linear Functions of a Random Variable Consider the random variable: x 1 P(X = x) 0.2 2 0.3 3 0.4 4 0.1 VAR(X) = 6.6 – 2.42 = 0.84 E(X) = 2.4 Each data value is doubled then one is subtracted (i.e. 2X – 1). Calculate the new expected mean and variance x P(X = x) E(X) = 3.8 1 0.2 3 0.3 5 0.4 7 0.1 VAR(X) = 17.8 – 3.82 = 3.36 By taking the original mean and variance, we could have obtained the same results by using: E(aX + b) = aE(X) + b 2 VAR(aX + b) = a VAR(X) where a and b are constants and VAR(b) = 0 i.e. E(X) = 2×2.4 – 1 VAR(X) = 22×0.84 = 3.8 = 3.36 Note: SD(aX) = aSD(X) as the standard deviation is the square root of the variance e.g. X is a random variable with mean 20 and variance 4. Find the mean and standard deviation of: the mean the variance the standard (VAR) deviation (SD) X+2 22 4 2 3X 60 36 6 X–1 19 4 2 2X – 1 39 16 4 -X -20 4 2 e.g. A soup recipe requires 1200mL of milk (available in two 600mL cartons). The standard deviation of the volume of milk in a 600mL carton is 3mL. Calculate the standard deviation of the total volume purchased. Let C = C1 + C2 VAR(C) = VAR(C1 + C2) = VAR(C1) + VAR(C2) = 32 + 32 = 18 Therefore standard deviation = √18 Note: treat as separate containers C1 and C2 not 2C PROOF (see workbook) Sums of Random Variables Consider the random variables X and Y x 1 2 3 P(X = x) 1/3 1/3 1/3 E(X) = 2 2/3 y P(Y = y) VAR(X) = 2/3 2 1/3 E(Y) = 3 3 1/3 4 1/3 VAR(Y) = Let Z = X + Y, then the distribution of Z is: y 2 3 4 x 2 4 5 6 1 3 4 5 3 5 6 7 and the probability distribution for Z is: z 3 4 P(Z = z) 1/9 2/9 5 3/9 E(Z) = 5 VAR(Z) = 4/3 i.e. E(Z) = E(X) + E(Y) VAR(Z) = VAR(X) + VAR(Y) 6 2/9 7 1/9 RESULTS: 1. E(aX + bY) = aE(X) + bE(Y) 2. VAR(aX bY) = a VAR(X) + b VAR(Y) 2 2 Note: You still add the variances when the variables are subtracted. Square root the variance to get the standard deviation You generally only square a/b terms when dealing with non-context questions or contextual questions dealing with money (or if variables are independent). e.g. The “second-hand” bookstore purchases magazines and books. It pays $5 for books and $2 for magazines. The mean number of books purchased each day is 50 with a standard deviation of 9 books The mean number of magazines purchased each day is 40 with a standard deviation of 4 books. Calculate the mean and standard deviation of the amount they pay each day. Let P = amount paid each day, B = books and M = magazines. P = 5B + 2M PROOF: see workbook E(P) = 5×50 + 2×40 = $330 VAR(P) = VAR(5B + 2M) = 52×VAR(B) +22×VAR(M) = 2089 SD(P) = $45.71