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
The Expected Value and Variance of a Random Variable The expected value of a random variable can be thought of as the idealized analog of the mean of a set of observations (i.e., if you measured an infinite number of independent samples from a random variable, the mean of your measurements would be the expected value of that random variable). For a discrete random variable, X, (we’ll stick to discrete random variables for simplicity), its expected value, E(X), can be computed as follows: E(X) = ∑ P(X = x i )x i i where xi is the ith possible value X can take and P(X=xi) is the probability that X takes that value. For example, consider a gambling game where there are two equally probably outcomes, you win $2 or you lose $1 (i.e., win $1). The expected value of playing this game once is: € E(X) = P(X = $2)($2) + P(X = −$1)(−$1) = .5($2) − .5($1) = $.5 So if you played this game an infinite number of times, you would win on average 50 cents. Another important trait of a random variable is its variance, which can be thought of as the idealized analog of the variance of a set of observations. The variance, Var(X), of a discrete random variable, X, can be computed as follows: € Var(X) = E((X − E(X)) 2 ) = ∑ P(X = x i )(x i − E(X)) 2 i In other words, the variance of X is the expected value of X’s squared deviation from its own expected value. Returning to our gambling example, we can compute the variance of the outcome of playing the game once: € Var(X) = P(X = $2)($2 − $.5) 2 + P(X = −$1)(−$1− $.5) 2 = .5($1.5) 2 + .5(−$1.5) 2 = $ 22.25 € Thus, if you played the game an infinite number of times, on average, the squared deviation of a single outcome from the mean of $.5 would be 2.25 dollars squared.