Transcript E(X 2 )
Numerical parameters of a
Random Variable
•
•
•
•
Remember when we were studying sets of
data of numbers. We found some numbers
useful, namely
The spread
The frequencies
The average
The standard deviation
(population or sample)
We are going to do the same with RV’s.
Let’s translate ….
spread
becomes
range
frequencies
become
probabilities
average
becomes
expected value
standard
deviation
becomes
standard
deviation
The concepts of range, probability distribution and
expected value we have already seen. How do we
compute the
standard deviation of a RV ?
The Standard Deviation of a
Random Variable
In the case of datasets we defined the standard
deviation as the
average distance from the mean,
and since distances use | |, which are hard to
use, we changed to the variance, that is the
average of the squares of the distances.
Recall that “average” translate to expected
value, so it is natural to define the
variance of a Random Variable as follows:
Let = E(X). Then
Var(iance)(X) = Expected value of the
squares of the distances from that is
E((x - )2)
As usual, this calculation can get hairy, but,
as usual, there is a short cut, based on the
formula:
E((x - )2) = E(x2) -
In words, you compute the expected value of
the squares (no distances) and subtract the
mean squared.
Let's do an example:
Here is the probability distribution table of a RV
First of all we compute :
Now we apply the definition (no shortcut)
So, if we use the definition we must do the following
calculation:
which I am way too lazy to even try!
Here is the shortcut:
From the second row we get E(x2), that is
Now all we have to compute is
9.52 - (2.18)2
Which gives
4.77 (actually 4.7676)
Notation
• We denote with Var(X) the variance of X.
Observe that our shortcut reads:
Var(X) = E(X2) - [E(X)]2
• And, of course,
Var(X)
Special Values
E(b(n,p))
The above notation is shorthand for
The expected value of a binomial RV based on
the number of successes in
n identical and independent Bernoulli trials
in each of which the probability of Success is p.
Let’s look at what we have to compute:
n i n- i
E(b(n, p)) i gp gq
i
n
i0
n 1 n1
n 2 n2
n n 0
0 p q 1 p q 2 p q ... n p q
1
2
n
0
n
Don’t be scared, our trusty intuition will help us.
Look at this list:
n
p
we expect
5
0.4
2
successes
20
0.6
12
successes
70
0.45
31.5
successes
100
0.47
47
successes
Your intuition seems to suggest that
E(b(n,p)) = np
and your intuition is CORRECT!
Var(b(n,p))
The above notation is shorthand for
The variance of a binomial RV based on
the number of successes in
n identical and independent Bernoulli trials
in each of which the probability of Success is p.
Let’s look at what we have to compute (using
shortcut):
n i n- i
2
Var(b(n, p)) i gp gq (np)
i
n
2
i0
n 1 n1 2 n 2 n2
n 0
2 n
0 p q 1 p q 2 p q ... n p q (np)2
1
2
n
2
0 n
2
Don’t be scared, we will NOT do the computation.
Unfortunately our intuition does not tell us … diddly
squat, I will just have to tell you the answer:
Var(b(n,p)) = npq
Therefore the two fundamental parameters
of the Binomial RV
X = b(n,p)
are (memorizing time !!)
E( X) np
Var( X) npq
th e re fo re
( X)
npq
Chebyshev’s and Empirical
rules applying
The same rules we learned about the role
of the standard deviation in the case of
numerical datasets apply verbatim to RV’s.
More specifically:
• (Chebyshev’s) For “any” RV
P( - k x k ) 1 ( is our old cabbage leaf!)
1
k
2
• (Empirical) If the distribution is “nice” then
P( - x )
68%
P( - 2 x 2 ) 9 5 %
P( - 3 x 3 ) 9 9 .7 %
where “nice” means approximately mound-shaped
and approximately symmetric.
That’s all for discrete RVs !