∀xf(x)≥0∑xf(x)=1
In the case of a continuous random variable, the second formula would be expressed as an integral:
∫xf(x)dx=1
There are some differences between discrete and continuous random variables but the ideas behind them are the same.
To motivate the idea behind an expected value, we'll begin with a more familiar concept: an average.
The Average
At some point in time, most folks have taken an average of a number of figures. I'm going to begin by motivating the idea behind the generalized notion of an average.
Suppose I have the following numbers:
1,4,6,6,7,12,12,12,14,21
The average (which I'll denote as μ=E(X)) of these numbers can be found by summing them up and dividing by the number of numbers that are there (in this case 10):
μ=E(X)=1+4+6+6+7+12+12+12+14+2110=9510=9.5
Now I'm going to rewrite the expression above by noting a couple of things. First there are 2 6's and 3 12's. And second, by the distributive property, we are dividing each number by 10 (or multiplying by 110. This makes the expression look like this:
μ=E(X)=1110+4110+6210+7110+12310+14110+21110
In a sense what we've done is we've said that each number has an equal probability with the exception of 6 and 12 since they occurred 2 times and 3 times respectively. We can now construct a probability function from all of those probabilities. This will be a discrete probability function:
f(x)={110:x∈{1,4,7,14,21}210:x=6310:x=120:otherwise}
What this says assigns a probability of 10% to the numbers 1, 4, 7, 14 or 21, a probability of 20% to 6, a probability of 30% for 12 and 0% probability for all other numbers.
Note that, this is a probability function since it's never negative and the probabilities add up to 1 (5×10%+20%+30%=100%).
Hence we can rewrite this formula for average (symbolically) as:
μ=E(X)=∑xxf(x)
This will be our generalized definition of average (or mean) for a discrete random variable. For a continuous random variable our "sum" will just be an integral:
μ=E(X)=∫xxf(x)dx
So that's our "average".
Example 1:
Suppose that I have two fair dice. I'm interested in the probabilities of the sum of the two dice. Now each die has 6 sides with the numbers 1 through 6 on them. So there are a total of 6×6=36 possible combinations of rolls. So here are all of the possible combinations:
So there is only 1 way to get a 2, 2 ways to get a 3 and so on. So our probability function will look like:
f(x)={136:x=2236:x=3336:x=4436:x=5536:x=6636:x=7536:x=8436:x=9336:x=10236:x=11136:x=120:otherwise}
The average will then be:
μ=E(X)=∑xxf(x)=2136+3236+4336+5436+6536+7636+8536+9436+10336+11236+12136=7
So the average roll of the die will give us 7.
Expected Value
Now I've already introduced the notation of E(X). This notation is expressed as "the expected value of X". We're going to generalize the notion of expected value as follows for discrete and continuous random variables generally:
E[g(x)]=∑xg(x)f(x)E[g(x)]=∫xg(x)f(x)dx
At times we might be interested in a more complicated expected value so the generalization above will be useful.
Example 2:
Consider our dice game. Suppose that every time you rolled you received $3 multiplied by the quantity your rolled. So if you roll an 8 you win $24. What's the expected value of your winnings?
E[g(x)]=∑x$3xf(x)=$3×2136+$3×3236+$3×4336+$3×5436+$3×6536+$3×7636 +$3×8536+$3×9436+$3×10336+$3×11236+$3×12136=$21
Expected Value is a Linear Operator
In the above example you may have noticed that the expected value of your winnings ($21) was just $3 multiplied by the expected value of the roll of the dice (7). This is not just a coincidence. Expected Value is a linear operator. What that means is for constants a and b and a function g(x):
E[ag(x)+b]=aE[g(x)]+b
The fact that Expected Value is a linear operator follows from the fact that both summation and integration are linear operators.
It should also be noted here that the expected value of a constant is just the constant:
E(c)=c
This would be the case if we were just multiplying the probabilities by a constant. Since the probabilities sum up to 1, we would just be multiplying the constant by 1.
Example 3:
Consider in Example 2 but suppose it costs us $20 to play the game. Then what we want to find is this:
E[$3X−$20]
Since Expected Value is a linear operator and (from example 1) we know that E(X)=7 we can expand this out:
E[$3X−$20]=$3E(X)−$20=$3×7−$20=$1
So on average, you would win about $1 playing this game.
Back to the Table of Contents
No comments:
Post a Comment
Some common OpenID URLs (no change to URL required):
Google: https://www.google.com/accounts/o8/id
Yahoo: http://me.yahoo.com/