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
7.2 Means and Variances of Random Variables Review Review Review Review Mean of a Discrete Random Variable The mean value of a discrete random variable x, denoted by mx, is computed by first multiplying each possible x value by the probability of observing that value and then adding the resulting quantities. Symbolically, m X x p(x) all possible values of x Example • A professor regularly gives multiple choice quizzes with 5 questions. Over time, he has found the distribution of the number of wrong answers on his quizzes is as follows x 0 1 2 3 4 5 P(x) 0.25 0.35 0.20 0.15 0.04 0.01 Example • Multiply each x value by its probability and add the results to get mx. x 0 1 2 3 4 5 P(x) 0.25 0.35 0.20 0.15 0.04 0.01 x•P(x) 0.00 0.35 0.40 0.45 0.16 0.05 1.41 mx = 1.41 Variance and Standard Deviation of a Discrete Random Variable The Variance of a Discrete Random Variable x, 2 denoted by x is computed by fist subtracting the mean from each possible x value to obtain the deviations, then squaring each deviation and multiplying the result by the probability of the corresponding x value, and then finally adding these quantities. Symbolically, 2 x X The standard deviation of x, denoted by x, is the square root of the variance. X2 (x m )2 p(x) all possible values of x Previous Example continued x 0 1 2 3 4 5 P(x) 0.25 0.35 0.20 0.15 0.04 0.01 x•P(x) 0.00 0.35 0.40 0.45 0.16 0.05 1.41 x-m -1.41 -0.41 0.59 1.59 2.59 3.59 (x - m (x - m•P(x) 1.9881 0.4970 0.1681 0.0588 0.3481 0.0696 2.5281 0.3792 6.7081 0.2683 12.8881 0.1289 1.4019 Variance 1.4019 2 X Standard deviation x 1.4019 1.184 The Mean & Variance of a Linear Function If x is a random variable with mean mx 2 and variance X and a and b are numerical constants, the random variable y defined by y = a + bx is called a linear function of the random variable x. The mean of y = a + bx is my = ma + bx = a + bmx The variance of y is 2y a2bx b2 X2 From which it follows that the standard deviation of y is y abx b x Example Suppose x is the number of sales staff needed on a given day. If the cost of doing business on a day involves fixed costs of $255 and the cost per sales person per day is $110, find the mean cost (the mean of x or mx) of doing business on a given day where the distribution of x is given below. x 1 2 3 4 p(x) 0.3 0.4 0.2 0.1 Example continued We need to find the mean of y = 255 + 110x x p(x) xp(x) 1 0.3 0.3 2 0.4 0.8 3 0.2 0.6 4 0.1 0.4 2.1 m 2.1 x m y m 255110 x 255 110m x 255 110(2.1) $486 Example continued We need to find the variance and standard deviation of y = 255 + 110x x 1 2 3 4 2 p(x) (x-m) p(x) 0.3 0.3630 0.4 0.0040 0.2 0.1620 0.1 0.3610 0.8900 2 2 x x 0.89 0.9434 (110) (110) (0.89) 10769 2 255 110 m X 0.89 255 110 m X 2 x 2 110 x 110(0.9434) 103.77 Means and Variances for Linear Combinations If x1, x2, , xn are random variables and a1, a2, , an are numerical constants, the random variable y defined as y = a1x1 + a2x2 + + anxn is a linear combination of the xi’s. Means and Variances for Linear Combinations If x1, x2, , xn are random variables with means m1, m2, and , , , mn and variances 2 1 , 2 2 2 n respectively, y = a1x1 + a2x2 + + anxn then 1. my = a1m1 + a2m2 + + anmn (This is true for any random variables with no conditions.) 2. If x1, x2, , xn are independent random variables then 2y a1212 a2222 an2n2 and y a1212 a2222 an2n2 Example A distributor of fruit baskets is going to put 4 apples, 6 oranges and 2 bunches of grapes in his small gift basket. The weights, in ounces, of these items are the random variables x1, x2 and x3 respectively with means and standard deviations as given in the following table. Apples Oranges Grapes Mean m Standard deviation 8 10 7 0.9 1.1 2 Find the mean, variance and standard deviation of the random variable y = weight of fruit in a small gift basket. Example continued It is reasonable in this case to assume that the weights of the different types of fruit are Apples Oranges Grapes independent. Mean m Standard deviation 8 10 7 0.9 1.1 2 a1 4, a2 6, a3 2, m1 8, m 2 10, m 3 7 1 0.9, 2 1.1, 3 2 m y ma x a x 1 1 2 2 a3 x 3 a1m1 a2m 2 a3m 3 4(8) 6(10) 2(7) 106 2y a2 x a x 1 1 2 2 a3 x 3 a12 12 a2222 a3232 42 (.9)2 6 2 (1.1)2 22 (2)2 72.52 y = 72.52 8.5159 Summary • The Law of Large Numbers says that the average of the values of X observed in many trials approach μ. • If X is discrete with the possible values xi, the means is the average of the values of X, each weighted by its probability: μX = x1p1 + x2p2 + … + xnpn • The variance σ2 for a discrete variable: σ2X = (x1 - μ)2p1 + (x2 – μ)2p2 + … + (xn - μ)2pn • The standard deviation σX is the square root of the variance. Summary The means and variance of random variables obey the following rules • If a nd b are fixed numbers, then μa + bX = a + b μX σ2a+bX = b2σ2X • If X and Y are any two random variables, then μX + Y = μX + μY • And if X and Y are independent, then σ2 X + Y = σ2 X + σ2 Y σ2X – Y = σ2X + σ2Y